Skip to content

Latest commit

 

History

History
38 lines (33 loc) · 1.21 KB

README.md

File metadata and controls

38 lines (33 loc) · 1.21 KB

multicall-example

An example on how to create multicall transactions on Starknet

Setup

Install npm packages

npm install

Network

Get Gas Fee

  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
  1. output:
Current timestamp: 1683053450
GasCost: 3900000000000000

Create Multicall transaction

  1. 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
  2. Run
node src/multicall.js network=mainnet receiver=0x00000000000000000000000000000000000000000001 amount=50 fees=3900000000000000 
  1. Copy the transaction hash and paste it on Starknet mainnet or Starknet goerli-1
  2. Wait for the transaction to be accepted on L1.
  3. The relayer will detect your transaction and call withdraw for you.
  4. Done :) !