-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Overview (What and Why)
We need to deploy a set of several smart contracts, x-compiled from Solidity to wasm, and maintain that deployment (deploy new contract instances and migrate to them once in a while).
We are building an AMM with an innovative design (0xAmber). In order to deploy it from scratch, you need to deploy
- Router
- ERC20-compat contracts (as we need to marry x-compiled solidity contracts with assets being managed by a chain extension)
- Swap pools
- Backstop pool (specialty of our design, single-sided liquidity pool)
The pools need to know the router's address, for instance, to authorise calls to permissioned functions. The swap pools also need to be registered with the router, so the router knows where to find them if someone wants to conduct a swap.
So what we ideally would like to use is sort-of a hardhat-deploy
, but for Substrate. swanky
is a good start, but like one level too low. You still need sort of a runner that checks what contracts have been deployed yet, which ones should be redeployed and then run deployment scripts that invoke swanky.
Find the original question on stack exchange here: https://substrate.stackexchange.com/questions/8157/managing-deployment-of-complex-set-of-wasm-contracts
How
Would require a meta tool on top of swanky
, a deployment script runner. Should allow users to easily script procedural deployment scenarios, provide them with the addresses of previously deployed contracts, etc.
Details tbd.
Definition of Done
- Tool has been built
- Tool has been documented
- Tool has been successfully used in a complex real-world use case like ours
Open Issues and Blockers
(Not sure there are any)