block-core / blockcore-wallet

Web5 Wallet for your coins, tokens, identities, NFTs and more.
https://www.blockcore.net/wallet
MIT License
43 stars 33 forks source link

Add support for stratis contracts DAO/Tokens/call-contract #327

Open dangershony opened 1 year ago

dangershony commented 1 year ago

This refers to the coinvault instance of the wallet. https://github.com/CoinVault/coinvault-extension

Add a tab for DAO Management support

Only the coinvault wallet under Cirrus (CRS) a user will see an additional tab call DAO

image

This tab will enable a user to manage and create DAO contracts

The DAO contract can be found here https://github.com/stratisproject/CirrusSmartContracts/blob/master/Mainnet/DAOContract/DAOContract/DAOContract.cs

The methods that would be nice to support is

Basically we should probably be able to call all the public methods of that contract or at least the ability to vote by DAO users

There is a JS library to build a transaction that can call a method on a smart contract in this repo https://github.com/stratisproject/bitcore-lib-cirrus

Alternatively if its too hard to create the C# byte code for a Cirrus transaction we could expose an endpoint on the cirrus indexer to create the transaction and use the wallet only for signing it, we could add a controller here for CirrusContractTemplatesController.cs https://github.com/block-core/blockcore-indexer/tree/master/src/Blockcore.Indexer.Cirrus/Controllers

Add a tab for Token Management support

This tab will enable a user to manage and create tokens

Functionality of a token management can be found in the cirrus core wallet (this can be downloaded here) https://www.stratisplatform.com/wallets/

The Standard Token contract can be found here https://github.com/stratisproject/CirrusSmartContracts/blob/master/Mainnet/StandardToken/StandardToken/StandardToken.cs

The methods we should support are probably

We should also display some parameters like TotalSupply etc...

Add a tab for Calling Smartcontracts

The same cirrus core wallet has that support already for calling a contract