-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remote omni-chain call context: sender and chainID (#912)
* make smoketest work * smoketest: add test for context in depositAndCall * add missing files * add Update System Contract Address msg and smoketest * fix linter complaints * fix openapi * fix gosec complaint and CI config * fix linter config * fix generated file check fail * try fix CI config * address PR comments * add typed events * migrate one more event to typed event * cleanup fixme * update protocol-contract package to latest main branch * Update x/fungible/keeper/evm.go Co-authored-by: Lucas Bertrand <[email protected]> * PR comments address: error types * re-generate go.sum * use protocol-contract commit 5dfbe4f which renames Context => zContext --------- Co-authored-by: brewmaster012 <> Co-authored-by: Lucas Bertrand <[email protected]>
- Loading branch information
1 parent
b7dfadf
commit 50fa378
Showing
45 changed files
with
2,537 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
contrib/localnet/orchestrator/smoketest/contracts/contextapp/ContextApp.abi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
[ | ||
{ | ||
"inputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "constructor" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes", | ||
"name": "origin", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "address", | ||
"name": "sender", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint256", | ||
"name": "chainID", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "address", | ||
"name": "msgSender", | ||
"type": "address" | ||
} | ||
], | ||
"name": "ContextData", | ||
"type": "event" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "bytes", | ||
"name": "origin", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "sender", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "chainID", | ||
"type": "uint256" | ||
} | ||
], | ||
"internalType": "struct Context", | ||
"name": "context", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "zrc20", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "amount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "message", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "onCrossChainCall", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
} | ||
] |
1 change: 1 addition & 0 deletions
1
contrib/localnet/orchestrator/smoketest/contracts/contextapp/ContextApp.bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
608060405234801561001057600080fd5b50610420806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063de43156e14610030575b600080fd5b61004a60048036038101906100459190610182565b61004c565b005b7fcde88c82509f7dbeaae2782de64879ac731556f65d4474e9afc4ea01cca4498885806000019061007d91906102bf565b8760200160208101906100909190610155565b8860400135336040516100a7959493929190610271565b60405180910390a15050505050565b6000813590506100c5816103bc565b92915050565b60008083601f8401126100e1576100e0610383565b5b8235905067ffffffffffffffff8111156100fe576100fd61037e565b5b60208301915083600182028301111561011a57610119610397565b5b9250929050565b6000606082840312156101375761013661038d565b5b81905092915050565b60008135905061014f816103d3565b92915050565b60006020828403121561016b5761016a6103a6565b5b6000610179848285016100b6565b91505092915050565b60008060008060006080868803121561019e5761019d6103a6565b5b600086013567ffffffffffffffff8111156101bc576101bb6103a1565b5b6101c888828901610121565b95505060206101d9888289016100b6565b94505060406101ea88828901610140565b935050606086013567ffffffffffffffff81111561020b5761020a6103a1565b5b610217888289016100cb565b92509250509295509295909350565b61022f81610333565b82525050565b60006102418385610322565b935061024e83858461036f565b610257836103ab565b840190509392505050565b61026b81610365565b82525050565b6000608082019050818103600083015261028c818789610235565b905061029b6020830186610226565b6102a86040830185610262565b6102b56060830184610226565b9695505050505050565b600080833560016020038436030381126102dc576102db610392565b5b80840192508235915067ffffffffffffffff8211156102fe576102fd610388565b5b60208301925060018202360383131561031a5761031961039c565b5b509250929050565b600082825260208201905092915050565b600061033e82610345565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b6103c581610333565b81146103d057600080fd5b50565b6103dc81610365565b81146103e757600080fd5b5056fea26469706673582212203bf8ff0cc81cde452b74dd59e10fc546b8344cb0b268971059b45bc40191115d64736f6c63430008070033 |
Oops, something went wrong.