Initialize the CLI subdirectory
Now that the contracts
subdirectory has been initialized, you should now initialize the cli
subdirectory that will be used to interact with the deployed contracts.
Navigate to the contracts subdirectory:
# Assuming you are currently in the contracts directory
cd ../cli
Initialize a new bun project
bun init -y
Now, create an
src/
folder and moveindex.ts
there.
mkdir -p src && mv -t src index.ts
Now, edit
package.json
to be the following:
{
"name": "walnut-cli",
"license": "MIT License",
"type": "module",
"scripts": {
"dev": "bun run src/index.ts"
},
"dependencies": {
"dotenv": "^16.4.7",
"seismic-viem": "1.0.9",
"viem": "^2.22.3"
},
"devDependencies": {
"@types/node": "^22.7.6",
"typescript": "^5.6.3"
}
}
Edit
.gitignore
to be:
node_modules
Your environment is now set!
Last updated