A vault contract, accepts WBTC as a deposit, mints back spdBTC at 1-1 ratio.
Before deployment takes place, make sure you have created an .env file in the deployments/ directory.
There is an .env.example file to help you get started.
TokenMinter is a mock contract which allows anyone to print infinite tokens, it is useful if you don't want to work
with real tokens just yet. Deploy it simply with npm run deploy:tokenminter:NETWORK, where NETWORK is
either sepoliaor ethereum.
Since the contract will always be behind proxy, the implementation itself requires zero configuration.
Just run npm run deploy:spdbtc:NETWORK, where NETWORK is either sepoliaor ethereum.
A call to proxy will call spdBTC construction, so this is the step where configuration happens. You will have to prepare the following environment variables:
OWNER- account which will own the proxy. Will be set to deployer wallet if omitted;CUSTODIAN- account which will hold all deposited tokens;MAX_DEPOSIT- a limit on total supply of deposited tokens, for example, if you want to limit it to 0.5WBTC, and WBTC has 6 decimals, set this variable to'500000';ASSET- either the address of WBTC or TokenMinter obtained at step 0;SYMBOL- e.g.testspdBTC;NAME- e.g.testspdBTC;SPDBTC_IMPLEMENTATION- address obtained at step 1.
After exporting all required variables, run npm run deploy:ossifiableproxy:NETWORK, where
NETWORK is either sepoliaor ethereum.
After deployment, contract will store the caller's address as the owner. If that's not desired,
execute transferOwnership(address) and set a new owner.