Aarc
Aarc is a set of tools built to simplify the use of smart accounts. Etherspot’s infrastructure is included within this tooling and available to use within it. In this tutorial we’ll learn how to use an Etherspot smart account with the Aarc SDK. We’ll setup the Smart Account in two steps using Aarc SDK:- Fetch the Smart Account address for the EOA.
- Deploy and transfer native funds to the Smart Account.
Guide
- Create a new directory, initialize npm in it and install Aarc Migrator Package and ethers
- Create a new file index.js in src folder.
- Import the dependencies.
- Get the Aarc API Key (you can learn how to get it from here), your EOA private key, and the RPC URL.
- Initialize the provider and Aarc SDK
- Fetch the Smart Account addresses of the EOA.
- Deploy the Smart Account.
- deploymentWalletIndex and receiver can be fetched from the above response.
- amount should be in hex string, which can be easily done by usingBigNumbers from ethers.
- Run the script.