Skip to content

Contract class

Contract represents a deployed contract and provides generated functions when an ABI is supplied. You can also use it without an ABI for identity and metadata workflows.

export function identifyContract(provider = new Provider(MAINNET_RPC)) {
  const contract = new Contract({ id: KOIN_CONTRACT_ID, provider });
  return contract.getId();
}

View complete file · Run example

This example only constructs the client-side object and does not broadcast. See the Koilib package API for the complete current surface.