Start building on Atlas
Atlas has a cli tool called atlas-toolkit
that allows you to easily create new projects, test contracts, and deploy them to your app chain.
Setup
Install Docker desktop, and Node 16.17 or higher.
Install the
atlas-toolkit
cli tool. You can useatlas-toolkit
oratk
for all commands. We'll be usingatk
.
npm i atlas-toolkit -g
- Login to Atlas via the cli tool.
atk login
This will open a browser window where you can login.
Create a new project
atk new
You'll be able to choose your project name and select a chain to deploy contracts to. If you don't have any chains, you'll have to create one from the app.
Once created, go to your new project and install dependencies:
cd my-project && npm i -f
Write contracts
Write contracts in the contracts
folder. There is also a basic deploy script under the deploy
folder.
You can customize the deploy script if you want to deploy multiple contracts. We use hardhat to compile and deploy contracts.
Testing
Write tests in the test
folder. We use hardhat to test contracts.
Docker desktop must be running for this command
atk test
Deploy contracts to your chain
Docker desktop must be running for this command
atk deploy