Show / Hide Table of Contents

Contract Class

The class representing a contract.

Namespace: Neo.SmartContract.Framework.Services.Neo

Assembly: Neo.SmartContract.Framework

Syntax

public class Contract

Attributes

Namedescription
IsPayable Represents if the contract can receive NEP-5 assets
Script Returns the scripthash of the contract
StorageContext Returns the storage context of the contract

Methods

NameDescription
Create(byte[], byte[], byte, bool, string, string, string, string, string) Publishes the contract
Migrate(byte[], byte[], byte, bool, string, string, string, string, string) Migrates / renews the contract
Destroy() Destroys the contract

Constructor

The Contract object can be constructed through Blockchain.GetContract(byte[]) .

Contract.Create(byte[], byte[], byte, bool, string, string, string, string, string) publishes the contract onto the blockchain and returns a Contract object.

Contract.Migrate(byte[], byte[], byte, bool, string, string, string, string, string) renews the contract and returns a Contract object.