Contract¶
Contract object helps abstract out the process of working with a smart contract. Using this object you can deploy and interact with functions from the contract.
It is recommended to use wrapper static functions to create and load contract objects.
Contract.create¶
static create<S extends IAbstractSchema>(abi: IContractABI, bytcode: string): Contract<S>
const { Contract } = require('evm-lite-core');
const contract = Contract.create(ABI, BYTECODE);
Contract.load¶
static load<S extends IAbstractSchema>(abi: IContractABI, address: string): Contract<S>
const { Contract } = require('evm-lite-core');
const contract = Contract.load(ABI, ADDRESS);