Add Contract to your App
Last updated
Was this helpful?
Last updated
Was this helpful?
Define a contract in your application to start working with it
Make sure your and before proceeding.
If you need to work with a previously deployed contract, you will need only its ABI and address. Get it in public repositories or ask the contract developer for it.
If you need to deploy a contract, then you will also need its tvc file. This file, along with ABI, is an artifact of contract compilation. Ask contract developer for this file.
If you plan to develop and compile the contracts yourself then these docs will help you:
Use EVERDEV tool to that will have the following structure:
If you have tvc file, EVERDEV
will convert it into base64 that is suitable for SDK. If you don't have tvc, then this wrapper will be only useful for interaction with an already deployed contract.
Run this command:
The result name of the wrapper will be "ContractName||"Contract".js".
The result file will look like this:
You're all done!
Find out how to and your contract in the next sections.