Awesome
Starknet.js Account Tutorial
This tutorial will walk you through the process of creating a StarkNet account throught Starknet.js.
What's new?
Deploying accounts now require fees as of StarkNet v0.10.2.
Therefore, the process of creating an account is as follows:
- Calculate the account contract address before hand.
- Send some funds to the account contract address.
- Deploy the funded account contract.
How to run this code on testnet-1
Use a modern version of Node.js (>= 16.0.0) and run the following commands:
node index.js
It will print the account contract address and wait for you to send some funds to it on testnet-1
.
Once that's done you can deploy the account contract!
References
Improvements
- Deploy other types of contracts like the openZepplin account contract.
- Deploy on other networks like
testnet-2
andmainnet
. - Check for the account balance and deploy if it's funded.