Skip to content

Commit

Permalink
fix ibc
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed May 3, 2024
1 parent c1dc0a6 commit 805e71b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
14 changes: 12 additions & 2 deletions integration_tests/configs/ibc.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,18 @@ config {
'account-prefix': 'crc',
'coin-type': 60,
key_name: 'signer1',
accounts: super.accounts[:std.length(super.accounts) - 1] + [super.accounts[std.length(super.accounts) - 1] {
coins: super.coins + ',100000000000ibcfee',
accounts: [{
name: 'community',
coins: '10000000000000000000000basetcro',
mnemonic: '${COMMUNITY_MNEMONIC}',
}, {
name: 'signer1',
coins: '20000000000000000000000basetcro',
mnemonic: '${SIGNER1_MNEMONIC}',
}, {
name: 'signer2',
coins: '30000000000000000000000basetcro,100000000000ibcfee',
mnemonic: '${SIGNER2_MNEMONIC}',
}] + [
{
name: 'user' + i,
Expand Down
13 changes: 11 additions & 2 deletions integration_tests/cosmoscli.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,16 @@ def staking_pool(self, bonded=True):
)["bonded_tokens" if bonded else "not_bonded_tokens"]
)

def transfer(self, from_, to, coins, generate_only=False, fees=None, **kwargs):
def transfer(
self,
from_,
to,
coins,
generate_only=False,
event_query_tx=True,
fees=None,
**kwargs,
):
kwargs.setdefault("gas_prices", DEFAULT_GAS_PRICE)
rsp = json.loads(
self.raw(
Expand All @@ -349,7 +358,7 @@ def transfer(self, from_, to, coins, generate_only=False, fees=None, **kwargs):
**kwargs,
)
)
if rsp["code"] == 0:
if rsp["code"] == 0 and event_query_tx:
rsp = self.event_query_tx_for(rsp["txhash"])
return rsp

Expand Down
3 changes: 2 additions & 1 deletion integration_tests/ibc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,8 @@ def funds_ica(cli, adr):
assert cli.balance(adr) == 0

# send some funds to interchain account
rsp = cli.transfer("signer2", adr, "1cro", gas_prices="1000000basecro")
price = "1000000basecro"
rsp = cli.transfer("signer2", adr, "1cro", gas_prices=price, event_query_tx=False)
assert rsp["code"] == 0, rsp["raw_log"]
wait_for_new_blocks(cli, 1)
amt = 100000000
Expand Down

0 comments on commit 805e71b

Please sign in to comment.