Skip to content

SystemContract

The SystemContract is the PinkContractPromise instance for the system contract, with typed.

owner

system.version

system.getDriver

Get the contract id of specified driver contract.

Parameters

driver

string

The name of the driver contract. The available drivers includes:

  • PinkLogger
  • SidevmOperation
  • ContractDeposit

Returns

Promise<string>

system.getDriver2

system.deploySidevmTo

system.stopSidevmAt

system.setContractWeight

system.totalBalanceOf

system.isAdmin

system.doUpgrade

system.codeExists

Check if the specified code hash exists in the chain.

Parameters

codeHash

string

The code hash to check.

type

string

Should be one of the following:

  • Ink
  • Sidevm

Returns

Promise<Bool>

system.codeHash

system.driverHistory

system.currentEventChainHead

system.deploySidevmToWorkers

system.grantAdmin

system.setDriver

system.setHook

system.upgradeSystemContract

system.upgradeRuntime

contractDeposit.changeDeposit