An example on how to create multicall transactions on Starknet
Install npm packages
npm install
- Example works on Starknet mainnet
- Example works on Starknet goerli-1
- To get the fees you have to pay to get your transaction processed on L1 run the command (IMPORTANT the timestamp should be in UTC time)
node src/getFees.js
- output:
Current timestamp: 1683053450
GasCost: 3900000000000000
- Make sure to create a new
.env
file with your configuration:- your OpenZeppelin based account private key and address from Starknet Goerli
- make sure your account has funds! :)
- address on Ethereum Goerli you wish to send tokens
- Run
node src/multicall.js network=mainnet receiver=0x00000000000000000000000000000000000000000001 amount=50 fees=3900000000000000
- Copy the transaction hash and paste it on Starknet mainnet or Starknet goerli-1
- Wait for the transaction to be accepted on L1.
- The relayer will detect your transaction and call withdraw for you.
- Done :) !