Skip to content

An example on how to create multicall transactions on Starknet

License

Notifications You must be signed in to change notification settings

0xSpaceShard/multicall-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 :) !

About

An example on how to create multicall transactions on Starknet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published