Show / Hide Table of Contents

Contract Class

The class representing a contract.

Namespace: Neo.SmartContract.Framework.Services

Assembly: Neo.SmartContract.Framework

Syntax

public class Contract

Attributes

NameDescription
IdContract Id. The native contract ID is a negative integer, and the normal contract ID is a positive integer.
UpdateCounterContract update counter
HashContract hash, which is determined by the deployer's script hash, the contract NEF checkcode, and the contract name.
NefNef
ManifestJson strings that represents the contract Manifest

Methods

NameDescription
Call(UInt160 scriptHash, string method, object[] arguments) Invokes the contract
GetCallFlags() Gets the CallFlag of the contract
CreateStandardAccount() Generate a script hash of standard account with public key
CreateMultisigAccount(int, params Cryptography.ECC.ECPoint[])Generate a script hash of multi-signature accounts based on the public key list and minimum number of signatures

Constructor

The Contract object can be constructed through ContractManagement.GetContract(UInt60 hash) .

ContractManagement.Deploy(byte[] nefFile, string manifest) publishes the contract onto the blockchain and returns a contract object.