Deploying your contract
In this chapter, you’ll deploy your Walnut contract to a local Seismic node for testing. By the end of this guide, you’ll have a fully deployed contract that you can interact with using your CLI or scripts. Estimated Time: ~15 minutes.
Writing the deploy script
Navigate to the script folder in your Walnut App and open the Walnut.s.sol
file located at:
and add the following to it:
This script will deploy a new instance of the Walnut contract with an initial shell strength of 3 and an initial kernel value of 0.
Deploying the contract
In a separate terminal window, run
in order to spin up a local Seismic node.
In
packages/contracts
, create a.env
file and add the following to it:
The RPC_URL
denotes the port on which sanvil
is running and the PRIVKEY
is one of the nine standard sanvil
testing private keys.
Now, from
packages/contracts
, run
Your contract should be up and deployed to your local Seismic node!
Last updated