Configuration
Seed Phrases
You can install dotenv
to have a local .env
file in your project with seed phrases of the accounts that
you intent to use to sign transactions. Read more in the Accounts section.
The .env
file will contain the environment variables that will be access by process.env
in
your scripts.
For example your .env
file can be
And then you can create accounts that will be able to sign transactions in a .js
file under
/scripts
by:
Active Network
You can configure the active network against which the scripts will run in the scaf.config.js
configuration file that should be located in the main directory of your project (where the
package.json
file is also located).
The options for the network
parameter are the following:
localnet
: refers to the project-specific local Sui networkdevnet
: public Sui devnettestnet
: public Sui testnetmainnet
: public Sui mainnet
Local Network Genesis
When running a local, project-specific Sui blockchain, you can configure the genesis state
of the blockchain by updating the genesis.yaml
file that should be located in the main
directory of your project. Read more about the Local Sui Network
and why you might want to use it.
If there is no genesis.yaml
on the main directory of your project, you can get a
sample genesis.yaml
file by running npx scaf
. One thing that you would like to
update are the addresses that have the initial Sui coins, under the address:
sections
of the files, and you can add more addresses based on your needs.