Skip to content

Commit

Permalink
fix: evm-call (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev authored Sep 13, 2024
1 parent 95f0945 commit d6b2761
Show file tree
Hide file tree
Showing 2 changed files with 7 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
1 change: 1 addition & 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 Down

0 comments on commit d6b2761

Please sign in to comment.