Contract 类
表示合约的类。
命名空间: Neo.SmartContract.Framework.Services.Neo
程序集:Neo.SmartContract.Framework
语法
public class Contract
属性
名称 | 说明 | |
---|---|---|
IsPayable | 该合约能否接收 NEP-5 资产 | |
Script | 获得该合约的脚本哈希 | |
StorageContext | 获得该合约的存储区上下文 |
方法
名称 | 说明 | |
---|---|---|
Create(byte[], byte[], byte, bool, string, string, string, string, string) | new 发布智能合约 | |
Migrate(byte[], byte[], byte, bool, string, string, string, string, string) | new 迁移 / 更新智能合约 | |
Destroy() | new 销毁智能合约 |
构造方法
通过 Blockchain.GetContract(byte[]) 方法来构造 Contract 对象。
通过 Contract.Create(byte[], byte[], byte, bool, string, string, string, string, string) 方法来发布智能合约到区块链上,并返回 Contract 对象。
通过 Contract.Migrate(byte[], byte[], byte, bool, string, string, string, string, string) 方法来更新智能合约,并返回 Contract 对象。