Skip to content

Commit

Permalink
fix: evm-call
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Sep 12, 2024
1 parent 95f0945 commit d61f6b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/localnet/src/handleOnEVMCalled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ export const handleOnEVMCalled = async ({
args,
deployer,
fungibleModuleSigner,
foreignCoins,
}: {
tss: any;
provider: ethers.JsonRpcProvider;
protocolContracts: any;
args: any;
deployer: any;
fungibleModuleSigner: any;
foreignCoins: any[];
}) => {
log("EVM", "Gateway: 'Called' event emitted");
try {
Expand All @@ -30,7 +32,10 @@ export const handleOnEVMCalled = async ({
sender: await fungibleModuleSigner.getAddress(),
chainID: 1,
};
const zrc20 = protocolContracts.zrc20Eth.target;
const zrc20 = foreignCoins.find(
(coin) => coin.foreign_chain_id === "1" && coin.coin_type === "Gas"
)?.zrc20_contract_address;

log(
"ZetaChain",
`Universal contract ${receiver} executing onCrossChainCall (context: ${JSON.stringify(
Expand Down
2 changes: 2 additions & 0 deletions packages/localnet/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ export const initLocalnet = async (port: number) => {
args,
deployer,
fungibleModuleSigner,
foreignCoins,
});
});

Expand All @@ -335,6 +336,7 @@ export const initLocalnet = async (port: number) => {
foreignCoins,
});
});
console.log(foreignCoins);

process.stdin.resume();

Expand Down

0 comments on commit d61f6b3

Please sign in to comment.