MOVED: See receipts/secret-4/deployments/prod.yml
for the up-to-date mainnet addresses of all production contracts.
git clone <this-repo>
git submodule update --init --recursive
nix-shell # optional, or bring your own Cargo and PNPM
pnpm i
pnpm build latest
FADROMA_CHAIN=Scrt_1_2_Devnet pnpm deploy latest
The smart contracts are written in Rust, targeting SecretNetwork's fork of cosmwasm-std 0.10
on wasm32-unknown-unknown
.
See package.json
and scripts/
for the available workflow commands.
See also:
- Git submodules documentation,
and most importantly the
git submodule update --init --recursive
command. - The pnpm package manager, and most importantly its Workspaces feature.
-
artifacts contains the compiled smart contracts (gitignored) and their checksums (not gitignored).
-
contracts contains the Rust source code of the smart contracts, as well as the TypeScript code necessary to build them and interact with them.
-
📖 tge - Token Generation Event (TGE): mints and vests a new token
- Contract: snip20-sienna - Main SIENNA governance token
- Contract: mgmt - Vesting management contract
- Contract: rpt - Remaining pool token splitter contract
- Script: deploy.ts - TGE deployment
-
📖 amm - Automated Market Maker (AMM): Sienna Swap and friends
- Contract: amm-snip20 - Vanilla SNIP20 token usable by the AMM
- Contract: factory - Sienna Swap Factory
- Contract: exchange - Sienna Swap Exchange
- Contract: lp-token - Sienna Swap LP Token
- Contract: router - Sienna Swap Router
- Contract: 📖 rewards - Sienna Rewards
- Contract: launchpad - Sienna Launchpad
- Contract: ido - Sienna IDO
- Script: deploy.ts - AMM deployment
- Script: upgrade.ts - AMM migrations
-
📖 lend - Sienna Lend - Private Lending Protocol
- Contract: market
- Contract: oracle
- Contract: overseer
- Contract: interest_model
-
-
deps contains submodules of our foundational frameworks.
- fadroma is a Git submodule pointing to the top of the Fadroma deployment framework, which takes care of building and uploading the contracts behind the scenes.
-
frontends contains clients for the smart contracts, written in JS/TS. Some of them are transcluded as git submodules pointing to other repos.
- siennajs - current client library
- @sienna/api - upcoming mixed deploy/client library
- dashboard - rewards simulation dashboard
- reward-pools-monitor - query status of reward pools
- claim - TGE claim frontend
- vest - TGE vest frontend
-
libraries contains Rust libraries used by one or more smart contracts.
- amm-shared defines the contract API of Sienna Swap.
- lend-shared defines the contract API of Sienna Lend.
-
receipts contains the responses to upload and init transactions performed by the framework, grouped by chain ID. This lets you keep track of uploaded contracts.
- secret-4/deployments/prod - current mainnet deployment
- pulsar-2/deployments/.active - current testnet deployment
-
scripts contains utility scripts pertaining to the whole repo.
- Build.ts.md - build with
pnpm build
- Chain.ts.md
- Configure.ts.md
- Deploy.ts.md - deploy with
pnpm deploy
- Deployment.ts.md
- Generate.ts.md
- Live.ts.md
- Receipts.ts.md
- Schema.ts.md
- Status.ts.md
- Test.ts.md - test with
pnpm test
- Tokens.ts.md
- Upload.ts.md
- Build.ts.md - build with
-
settings contains the values of configurable properties for each smart contract, again grouped by chain ID. This is a NPM module that can be imported by the deploy scripts to access the settings for deploying to a specific chain (as testnet configuration may need to systematically differ from mainnet).
- schedule.json - vesting schedule
After deployment the contracts should be transferred to the master multisig account. The CLI and API wrappers in this repo do not support generating multisig transactions.
See hackbg/motika for a GUI-based multisig transaction signer.