Skip to content

Commit

Permalink
call from ZetaChain
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Oct 21, 2024
1 parent e3a6d5a commit 33c46c1
Show file tree
Hide file tree
Showing 3 changed files with 507 additions and 27 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@inquirer/prompts": "^5.5.0",
"@uniswap/v2-core": "^1.0.1",
"@uniswap/v2-periphery": "^1.1.0-beta.0",
"@zetachain/protocol-contracts": "11.0.0-rc2",
"@zetachain/protocol-contracts": "11.0.0-rc3",
"ansis": "^3.3.2",
"concurrently": "^8.2.2",
"ethers": "^6.13.2",
Expand Down
9 changes: 8 additions & 1 deletion packages/localnet/src/handleOnZEVMCalled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@ export const handleOnZEVMCalled = async ({
log("ZetaChain", "Gateway: 'Called' event emitted");
try {
tss.reset();
const sender = args[0];
const receiver = args[2];
const message = args[3];
const callOptions = args[4];
const isArbitraryCall = callOptions[1];
const messageContext = {
sender: isArbitraryCall ? ethers.ZeroAddress : sender,
};
console.log(messageContext);
log("EVM", `Calling ${receiver} with message ${message}`);

const executeTx = await protocolContracts.gatewayEVM
.connect(tss)
.execute(receiver, message, deployOpts);
.execute(messageContext, receiver, message, deployOpts);

const logs = await provider.getLogs({
address: receiver,
Expand Down
Loading

0 comments on commit 33c46c1

Please sign in to comment.