@neo-one/smart-contract
Advanced tools
Comparing version 3.1.0-preview4.2 to 3.2.0-preview5
@@ -5,2 +5,22 @@ { | ||
{ | ||
"version": "3.1.0", | ||
"tag": "@neo-one/smart-contract_v3.1.0", | ||
"date": "Mon, 08 Feb 2021 21:00:42 GMT", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"comment": "Update for Preview3, primarily in compiler, client, and CLI." | ||
}, | ||
{ | ||
"comment": "Update compiler, client, and CLI for Preview4" | ||
} | ||
], | ||
"minor": [ | ||
{ | ||
"comment": "Preview4 release" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "2.7.0", | ||
@@ -7,0 +27,0 @@ "tag": "@neo-one/smart-contract_v2.7.0", |
# Change Log - @neo-one/smart-contract | ||
This log was last generated on Thu, 23 Jul 2020 22:11:12 GMT and should not be manually modified. | ||
This log was last generated on Mon, 08 Feb 2021 21:00:42 GMT and should not be manually modified. | ||
## 3.1.0 | ||
Mon, 08 Feb 2021 21:00:42 GMT | ||
### Minor changes | ||
- Preview4 release | ||
### Patches | ||
- Update for Preview3, primarily in compiler, client, and CLI. | ||
- Update compiler, client, and CLI for Preview4 | ||
## 2.7.0 | ||
@@ -6,0 +18,0 @@ Thu, 23 Jul 2020 22:11:12 GMT |
{ | ||
"name": "@neo-one/smart-contract", | ||
"version": "3.1.0-preview4.2", | ||
"version": "3.2.0-preview5", | ||
"description": "NEO•ONE smart contract apis.", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.d.ts", |
@@ -202,3 +202,3 @@ // tslint:disable | ||
* `Attribute`s are used to store additional data on `Transaction`s. Most `Attribute`s are used to store arbitrary data, whereas some, like `AddressAttribute`, have specific uses in the NEO | ||
* protocol. The only attribute currently available in the Neo v3 protocol is the "HighPriority" attribute. | ||
* protocol. The only attribute currently available in the Neo v3 protocol is the \"HighPriority\" attribute. | ||
*/ | ||
@@ -403,3 +403,3 @@ export type Attribute = HighPriorityAttribute | ReservedAttribute; | ||
// /** | ||
// * The name of the notification event. "Transfer" in the event of a transfer. | ||
// * The name of the notification event. \"Transfer\" in the event of a transfer. | ||
// */ | ||
@@ -1014,7 +1014,7 @@ // readonly eventName: string; | ||
* If it specifies the public key of a group, then any contract in this group can be invoked | ||
* If this object has hash and group as undefined then this will be considered a wildcard ("*") and any contract can be invoked. | ||
* If this object has hash and group as undefined then this will be considered a wildcard (\"*\") and any contract can be invoked. | ||
*/ | ||
readonly contract: { readonly hash?: string; readonly group?: string }; | ||
/** | ||
* An array of methods that are allowed to be called. An empty array means that no methods will be allowed to be called. This can also be a wildcard string: "*", which means that any method can be called. | ||
* An array of methods that are allowed to be called. An empty array means that no methods will be allowed to be called. This can also be a wildcard string: \"*\", which means that any method can be called. | ||
*/ | ||
@@ -1188,39 +1188,2 @@ readonly methods: string | readonly string[]; | ||
/** | ||
* Marks a `SmartContract` method that verifies `Asset` transfers from the `SmartContract`. | ||
* | ||
* Method must return a boolean indicating whether the `SmartContract` wishes to approve sending the transferred `Asset`s. | ||
* | ||
* Method can take the `Transfer` as the final argument. | ||
* | ||
* See the [Native Assets](https://neo-one.io/docs/native-assets) chapter of the advanced guide for more information. | ||
* | ||
* @example | ||
* | ||
* export class Contract extends SmartContract { | ||
* `@send` | ||
* public withdraw(arg0: Address, arg1: Fixed<8>, transfer: Transfer): boolean { | ||
* // Don't allow sending anything but NEO | ||
* if (!transfer.asset.equals(Hash256.NEO)) { | ||
* return false; | ||
* } | ||
* // Do some additional checks on the transfer.to and transfer.amount being sent and other arguments. | ||
* return true; | ||
* } | ||
* } | ||
* | ||
*/ | ||
export function send(target: any, propertyKey: string, descriptor: PropertyDescriptor): void; | ||
/** | ||
* Marks a `SmartContract` method that verifies `Asset` transfers from the `SmartContract`. | ||
* | ||
* Method must return a boolean indicating whether the `SmartContract` wishes to approve sending the transferred `Asset`s. | ||
* | ||
* Note that unlike `@send`, `@sendUnsafe` does not use a two-phase send. Smart contract authors must implement their own logic for safely sending assets from the contract. | ||
* | ||
* May be used in combination with `@receive`. | ||
* | ||
* See the [Native Assets](https://neo-one.io/docs/native-assets) chapter of the advanced guide for more information. | ||
*/ | ||
export function sendUnsafe(target: any, propertyKey: string, descriptor: PropertyDescriptor): void; | ||
/** | ||
* Marks a `SmartContract` method that verifies receiving `Asset`s to the `SmartContract`. | ||
@@ -1236,12 +1199,2 @@ * | ||
/** | ||
* Marks a `SmartContract` method that verifies GAS claims from the `SmartContract`. | ||
* | ||
* Method must return a boolean indicating whether the `SmartContract` wishes to allow GAS to be claimed. | ||
* | ||
* May optionally take the `ClaimTransaction` this `SmartContract` is executed in as the last argument. Accessing `Blockchain.currentTransaction` will result in an error. | ||
* | ||
* See the [Native Assets](https://neo-one.io/docs/native-assets) chapter of the advanced guide for more information. | ||
*/ | ||
export function claim(target: any, propertyKey: string, descriptor: PropertyDescriptor): void; | ||
/** | ||
* Marks a `SmartContract` method as not modifying storage. | ||
@@ -1248,0 +1201,0 @@ * |
61557
1698