VFT-Manager template that manages the vft contract. It controls the swap between Varas and the tokens specified on VFT contract.
- Compile both contracts.
- Upload the extended-vft contract to the IDEA, you have to put the necesary data for your token.
- Upload the mini_dexs contract, you can put an initial value for the contract (or you can put that info in each call to the contract):
- vft_contract_id: Some or None, it is the contract if of the vft contract.
- min_tokens_to_add: Min tokens to the contract in the vft contract.
- tokens_per_vara: cost of tokens for a Vara (will also be used to change tokens to a Vara).
- In the vft contract you need to grant admin, burn and minter role to the mini_dexs contract.
- Add balance to VFT-Manager with add_tokens_to_contract function.
- With that, you can swap Varas and your tokens!
rustup install 1.81
rustup default 1.81
rustup target add wasm32-unknown-unknown
cargo build --release
Once the compilation is complete, locate the *.opt.wasm
file in the target/wasm32-unknown-unknown/release
directory.
- To interact with the Gear IDEA and deploy your contract, you will need to download a wallet extension such as Polkadot-JS, Talisman, or Subwallet to interact with Substrate-based chains.
- Access Gear IDE using your web browser.
- Connect your Substrate wallet to Gear IDE.
- Upload the
*.opt.wasm
andmetadata.txt
files by clicking the "Upload Program" button.
Vara Standards: Standards