Multicall

Execute multiple functions from the Factory's contract.

Contract function

multicall

Contract address

0x9b727dcaC7b331f95786D3b01fA79191Ab527DA3

Parameters

data: Byte data from encode mutiple function

Sample code

  const alphaKeyFactory = this.contract.getAlphaKeysFactoryContract();

      const multicalls = [
        alphaKeyFactory.interface.encodeFunctionData(
          'threeThreeReject' as any,
          [body.order_id] as any
        ),
      ];

      multicalls.push(
        alphaKeyFactory.interface.encodeFunctionData('threeThreeRequest', [
          v.token_address,
          parseEther(v.token_amount.toString()),
          v.amount_tc.toString(),
        ])
      );

      const tx = await alphaKeyFactory
        .connect(this.wallet)
        .multicall(multicalls);
      await tx.wait();

Last updated