Managing Contracts on the Dashboard
For each project in the Oasis Dashboard, you will be able to see two categories of contracts that can be used in your project.
Public Contracts are a curated collection of smart contracts written by other users and vetted by Oasis Labs that you can redeploy or use as a foundation to build your own smart contract. For these contracts, you can view the methods available in the contract, and set the arguments to be used for the constructor when redeploying them.
By deploying a contract you will make a transaction on the Oasis Devnet that is owned from your account as a developer. If you have MetaMask activated, the Dashboard will prompt you to authorize this transaction from your account. If you don't your oasis managed wallet will be automatically used. More information about oasis-managed wallets can be found here.
Creating a new contract
You can also choose to write your own contract. To register a new contract with the Dashboard, press the plus button in the bottom right of the "My Contracts" section of the project page.
The contract creation form will prompt you for a number of fields. The most important fields are:
- Contract ABI - The contract ABI is a standard JSON encoding of the interface of a smart contract. It lists the methods and events that the contract contains, and is a required definition for a client to interact with a contract.
- Contract Bytecode - The bytecode is the compiled contract itself. This is the data that will be uploaded to the oasis chain when you deploy the contract. The bytecode is generated by a contract compiler.
- Expose Publicly - Indicating that a contract should be shown publicly indicates that the contract should be shared with other users in the "Public Contracts" section.
The Dashboard provides a list of users that have interacted with your deployed contracts. Once you have deployed a contract, you will see a new section on the project page describing user activity. Users are identified by the wallet address used to interact with your contract. The Dashboard will show the balances of these wallets, and how many tokens have been allocated to them based on your project.