Skip to content

Commit

Permalink
deposited and called
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Oct 28, 2024
1 parent a2db10c commit f0ea92e
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions packages/localnet/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { handleOnEVMDeposited } from "./handleOnEVMDeposited";
import { handleOnZEVMWithdrawn } from "./handleOnZEVMWithdrawn";
import { createToken } from "./createToken";
import { handleOnZEVMWithdrawnAndCalled } from "./handleOnZEVMWithdrawnAndCalled";
import { handleOnEVMDepositedAndCalled } from "./handleOnEVMDepositedAndCalled";

const FUNGIBLE_MODULE_ADDRESS = "0x735b14BB79463307AAcBED86DAf3322B1e6226aB";

Expand Down Expand Up @@ -384,6 +385,26 @@ export const initLocalnet = async ({
});
});

contractsEthereum.gatewayEVM.on(
"DepositedAndCalled",
async (...args: Array<any>) => {
handleOnEVMDepositedAndCalled({
tss,
provider,
protocolContracts,
args,
deployer,
fungibleModuleSigner,
foreignCoins,
exitOnError,
chainID: "5",
chain: "ethereum",
gatewayEVM: contractsEthereum.gatewayEVM,
custody: contractsEthereum.custody,
});
}
);

contractsBNB.gatewayEVM.on("Called", async (...args: Array<any>) => {
return await handleOnEVMCalled({
tss,
Expand Down Expand Up @@ -418,6 +439,26 @@ export const initLocalnet = async ({
});
});

contractsBNB.gatewayEVM.on(
"DepositedAndCalled",
async (...args: Array<any>) => {
handleOnEVMDepositedAndCalled({
tss,
provider,
protocolContracts,
args,
deployer,
fungibleModuleSigner,
foreignCoins,
exitOnError,
chainID: "97",
chain: "bnb",
gatewayEVM: contractsBNB.gatewayEVM,
custody: contractsBNB.custody,
});
}
);

return [
...Object.entries(protocolContracts)
.filter(([_, value]) => value.target !== undefined)
Expand Down

0 comments on commit f0ea92e

Please sign in to comment.