Socket
Socket
Sign inDemoInstall

@neo-one/smart-contract

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neo-one/smart-contract - npm Package Compare versions

Comparing version 1.0.0-preview.1 to 1.0.0-preview.2

2

package.json
{
"name": "@neo-one/smart-contract",
"version": "1.0.0-preview.1",
"version": "1.0.0-preview.2",
"author": "Alex DiCarlo <alexdicarlo@gmail.com>",

@@ -5,0 +5,0 @@ "description": "NEO•ONE smart contract apis.",

@@ -6,3 +6,3 @@ # NEO•ONE

[![codecov](https://codecov.io/gh/neo-one-suite/neo-one/branch/master/graph/badge.svg)](https://codecov.io/gh/neo-one-suite/neo-one)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://neo-one.io/docs/en/contributing.html)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://neo-one.io/docs/how-to-contribute)
[![DeepScan grade](https://deepscan.io/api/projects/1846/branches/8291/badge/grade.svg)](https://deepscan.io/dashboard#view=project&pid=1846&bid=8291)

@@ -15,3 +15,3 @@ [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1639/badge)](https://bestpractices.coreinfrastructure.org/projects/1639)

Welcome to the NEO•ONE community! We're always looking for more contributors and are happy to have you. Documentation on how to contribute can be found [here](https://neo-one.io/docs/en/contributing.html).
Welcome to the NEO•ONE community! We're always looking for more contributors and are happy to have you. Documentation on how to contribute can be found [here](https://neo-one.io/docs/how-to-contribute).

@@ -18,0 +18,0 @@ ## Contributors

@@ -987,2 +987,8 @@ // tslint:disable

readonly currentTransaction: InvocationTransaction;
/**
* The `Address` of the smart contract that directly invoked the contract.
*
* Will be `undefined` if the smart contract method was not invoked by another smart contract, but instead was invoked by a user directly.
*/
readonly currentCallerContract: Address | undefined;
readonly [OpaqueTagSymbol0]: unique symbol;

@@ -1157,7 +1163,5 @@ }

interface SmartContractValueArray extends Array<SmartContractValue> {}
interface SmartContractValueReadonlyArray<Value extends SmartContractValue = any> extends ReadonlyArray<Value> {}
interface SmartContractValueMap<Key extends SmartContractValue = any, Value extends SmartContractValue = any>
extends Map<Key, Value> {}
interface SmartContractValueReadonlyMap<Key extends SmartContractValue = any, Value extends SmartContractValue = any>
extends ReadonlyMap<Key, Value> {}
interface SmartContractValueReadonlyArray extends ReadonlyArray<SmartContractValue> {}
interface SmartContractValueMap extends Map<SmartContractValue, SmartContractValue> {}
interface SmartContractValueReadonlyMap extends ReadonlyMap<SmartContractValue, SmartContractValue> {}
interface SmartContractValueObject {

@@ -1295,2 +1299,8 @@ readonly [key: string]: SmartContractValue;

export interface Transfer {
readonly amount: Fixed<8>;
readonly asset: Hash256;
readonly to: Address;
}
/**

@@ -1301,3 +1311,3 @@ * Marks a `SmartContract` method that verifies `Asset` transfers from the `SmartContract`.

*
* Method can take the receiving address, asset and amount as the final arguments.
* Method can take the Transfer as the final argument
*

@@ -1308,8 +1318,8 @@ * @example

* @send
* public withdraw(arg0: Address, arg1: Fixed<8>, receiver: Address, asset: Hash256, amount: Fixed<8>): boolean {
* public withdraw(arg0: Address, arg1: Fixed<8>, transfer: Transfer): boolean {
* // Don't allow sending anything but NEO
* if (!asset.equals(Hash256.NEO)) {
* if (!transfer.asset.equals(Hash256.NEO)) {
* return false;
* }
* // Do some additional checks on the receiver and amount being sent and other arguments.
* // Do some additional checks on the transfer.to and transfer.amount being sent and other arguments.
* return true;

@@ -1316,0 +1326,0 @@ * }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc