SmartContract

Class
Marks a class as a SmartContract.
export class SmartContract 

Properties

properties
Properties used for deployment of the SmartContract See the Deployment chapter of the main guide for more information.
processedTransactions
Stores Transaction hashes that have been processed by a method marked with @receive, @send, or @sendUnsafe. Used to enforce that a Transaction with native Assets is only ever processed once by an appropriate @receive, @send, or @sendUnsafe method. Unprocessed transactions that sent assets to the smart contract can be refunded by using refundAssets. See the Native Assets chapter of the advanced guide for more information.
claimedTransactions
Stores Transaction hashes that have been claimed by an address with a method marked with @send. The first contract output of a claimed transaction may be sent to the receiver by using completeSend. See the Native Assets chapter of the advanced guide for more information.
deployed
true
Property primarily used internally to validate that the smart contract is deployed only once.

Methods

destroy

Permanently deletes the contract. See the Deployment chapter of the main guide for more information.
() => void 

refundAssets

Method automatically added for refunding native Assets. See the Native Assets chapter of the advanced guide for more information.
() => boolean 

completeSend

Method automatically added for sending native Assets that have been claimed by a @send method. See the Native Assets chapter of the advanced guide for more information.
() => boolean 

upgrade

Used internally by client APIs to upgrade the contract. Control whether an invocation is allowed to upgrade the contract by overriding approveUpgrade. See the Deployment chapter of the main guide for more information.
(script: Buffer, parameterList: Buffer, returnType: number, properties: number, contractName: string, codeVersion: string, author: string, email: string, description: string) => boolean 
  • @neo-one/client
  • @neo-one/smart-contract
DOCS
InstallationMain ConceptsAdvanced GuidesAPI ReferenceContributing
CHANNELS
GitHubStack OverflowDiscord ChatTwitterYouTube
COPYRIGHT © 2021 NEO•ONE