Follow the steps according to https://soroban.stellar.org/docs/getting-started/setup
- For convenience, the repository contains scripts for deploying and bumping smart contracts. Specify the network name in the
network_namefile, the contents of which will be passed to any--networkargument in the deploy and bump scripts. - To automatically bump the contracts, you can call the scripts at regular intervals via crontab. Once per month is enough on official Stellar mainnet/testnet/futurenet. For networks running on local Stellar quickstart images, it may be better to bump once per week due to the quicker ledger time.
-
cd soroban -
make
cdto each desired sub-directory of thesorobanfolder, and runcargo test
-
soroban config identity generate --global admin && \ soroban config identity generate --global acc1 && \ soroban config identity address admin && \ soroban config identity address acc1
- The addresses for the accounts will be output. Take note of the addresses which will be used to initialize the contract and mint the tokens.
- If using these accounts on a non-sandbox environment, you will have to fund them with Friendbot first.
These steps assume that you have a network for your CLI set up already. If not, please refer to https://soroban.stellar.org/docs/getting-started/deploy-to-futurenet#configure-futurenet-in-your-cli
cdto the contract's subdirectory.cd soroban/contract_deployer- Deploy the contract.
sh deploy.sh
- Bump the contract instance and wasm code lifetime.
sh bump.sh
- To keep the contract from expiring after some time, you may want to set up a cron job that runs the same command from step 3 on a monthly basis.
- Edit your crontab configuration using
crontab -e. Add lines such as the following to your crontab, replacing the path to the bump.sh files with your own. These commands run bump.sh daily.0 0 * * * /home/ubuntu/scf/soroban/contract_deployer/bump.sh 0 0 * * * /home/ubuntu/scf/soroban/scf_pool/bump.sh 0 0 * * * /home/ubuntu/scf/soroban/scf_soroban/bump.sh