aion-web3-eth-contract
Advanced tools
Comparing version 1.1.6 to 1.2.5-beta.2
{ | ||
"name": "aion-web3-eth-contract", | ||
"namespace": "aion", | ||
"version": "1.1.6", | ||
"version": "1.2.5-beta.2", | ||
"description": "Web3 module to interact with Ethereum smart contracts.", | ||
@@ -10,12 +10,12 @@ "repository": "https://github.com/aionnetwork/aion_web3/tree/master/packages/web3-eth-contract", | ||
"dependencies": { | ||
"aion-web3-core": "1.1.6", | ||
"aion-web3-core-helpers": "1.1.6", | ||
"aion-web3-core-method": "1.1.6", | ||
"aion-web3-core-promievent": "1.1.6", | ||
"aion-web3-core-subscriptions": "1.1.6", | ||
"aion-web3-eth-abi": "1.1.6", | ||
"aion-web3-utils": "1.1.6", | ||
"aion-web3-core": "1.2.5-beta.2", | ||
"aion-web3-core-helpers": "1.2.5-beta.2", | ||
"aion-web3-core-method": "1.2.5-beta.2", | ||
"aion-web3-core-promievent": "1.2.5-beta.2", | ||
"aion-web3-core-subscriptions": "1.2.5-beta.2", | ||
"aion-web3-eth-abi": "1.2.5-beta.2", | ||
"aion-web3-utils": "1.2.5-beta.2", | ||
"underscore": "1.8.3" | ||
}, | ||
"gitHead": "6cdda35e1124fb489ee6809dcd068c85ed1dfa01" | ||
"gitHead": "713ab735d0b43801b38aee7561f504564058a105" | ||
} |
@@ -53,3 +53,3 @@ /* | ||
if(!(this instanceof Contract)) { | ||
throw new Error('Please use the "new" keyword to instantiate a web3.eth.contract() object!'); | ||
throw errors.InvalidInstantiation(); | ||
} | ||
@@ -65,3 +65,3 @@ | ||
if(!jsonInterface || !(Array.isArray(jsonInterface))) { | ||
throw new Error('You must provide the json interface of the contract when instantiating a contract object.'); | ||
throw errors.InvalidInstantiation(true); | ||
} | ||
@@ -249,3 +249,3 @@ | ||
if(event === type) { | ||
throw new Error('The event "'+ type +'" is a reserved event name, you can\'t use it.'); | ||
throw errors.ReservedEventName(type); | ||
} | ||
@@ -413,3 +413,3 @@ }; | ||
if (inputLength !== args.length) { | ||
throw new Error('The number of arguments is not matching the methods required number. You need to pass '+ inputLength +' arguments.'); | ||
throw errors.ArgumentsMismatch(inputLength); | ||
} | ||
@@ -428,3 +428,3 @@ | ||
if(!this._deployData) | ||
throw new Error('The contract has no contract data option set. This is necessary to append the constructor parameters.'); | ||
throw errors.MissingProperty('contract data'); | ||
@@ -439,3 +439,3 @@ return this._deployData + paramsABI; | ||
if(!returnValue) { | ||
throw new Error('Couldn\'t find a matching contract method named "'+ this._method.name +'".'); | ||
throw errors.InvalidContractMethod(this._method.name); | ||
} else { | ||
@@ -494,3 +494,3 @@ return returnValue; | ||
if(!options.data) { | ||
return utils._fireError(new Error('No "data" specified in neither the given options, nor the default options.'), null, null, callback); | ||
return utils._fireError(errors.NoFieldSpecified('data'), null, null, callback); | ||
} | ||
@@ -539,7 +539,7 @@ | ||
if (!event) { | ||
throw new Error('Event "' + event.name + '" doesn\'t exist in this contract.'); | ||
throw error.EventDoesNotExist(event.name); | ||
} | ||
if (!utils.isAddress(this.options.address)) { | ||
throw new Error('This contract object doesn\'t have address set yet, please set an address first.'); | ||
throw errors.MissingContractAddress(true); | ||
} | ||
@@ -581,3 +581,3 @@ | ||
if (!callback) { | ||
throw new Error('Once requires a callback as the second parameter.'); | ||
throw errors.InvalidCallback('Once', 'second'); | ||
} | ||
@@ -746,3 +746,3 @@ | ||
if(!this._deployData && !utils.isAddress(this._parent.options.address)) | ||
throw new Error('This contract object doesn\'t have address set yet, please set an address first.'); | ||
throw errors.MissingContractAddress(true); | ||
@@ -754,3 +754,3 @@ if(!this._deployData) | ||
if(!processedArgs.options.data) | ||
return utils._fireError(new Error('Couldn\'t find a matching contract method, or the number of parameters is wrong.'), defer.eventEmitter, defer.reject, processedArgs.callback); | ||
return utils._fireError(errors.InvalidContractMethod(), defer.eventEmitter, defer.reject, processedArgs.callback); | ||
@@ -835,7 +835,7 @@ return processedArgs; | ||
if(!utils.isAddress(args.options.from)) { | ||
return utils._fireError(new Error('No "from" address specified in neither the given options, nor the default options.'), defer.eventEmitter, defer.reject, args.callback); | ||
return utils._fireError(errors.NoFieldSpecified('"from" address'), defer.eventEmitter, defer.reject, args.callback); | ||
} | ||
if (_.isBoolean(this._method.payable) && !this._method.payable && args.options.value && args.options.value > 0) { | ||
return utils._fireError(new Error('Can not send value to non-payable contract method or constructor'), defer.eventEmitter, defer.reject, args.callback); | ||
return utils._fireError(errors.NonPayableMethodOrConstructor(), defer.eventEmitter, defer.reject, args.callback); | ||
} | ||
@@ -842,0 +842,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
65612
2
+ Addedaion-lib@1.2.5-beta.2(transitive)
+ Addedaion-web3-core@1.2.5-beta.2(transitive)
+ Addedaion-web3-core-helpers@1.2.5-beta.2(transitive)
+ Addedaion-web3-core-method@1.2.5-beta.2(transitive)
+ Addedaion-web3-core-promievent@1.2.5-beta.2(transitive)
+ Addedaion-web3-core-requestmanager@1.2.5-beta.2(transitive)
+ Addedaion-web3-core-subscriptions@1.2.5-beta.2(transitive)
+ Addedaion-web3-eth-abi@1.2.5-beta.2(transitive)
+ Addedaion-web3-providers-http@1.2.5-beta.2(transitive)
+ Addedaion-web3-providers-ipc@1.2.5-beta.2(transitive)
+ Addedaion-web3-providers-ws@1.2.5-beta.2(transitive)
+ Addedaion-web3-utils@1.2.5-beta.2(transitive)
- Removedaion-lib@1.1.6(transitive)
- Removedaion-web3-core@1.1.6(transitive)
- Removedaion-web3-core-helpers@1.1.6(transitive)
- Removedaion-web3-core-method@1.1.6(transitive)
- Removedaion-web3-core-promievent@1.1.6(transitive)
- Removedaion-web3-core-requestmanager@1.1.6(transitive)
- Removedaion-web3-core-subscriptions@1.1.6(transitive)
- Removedaion-web3-eth-abi@1.1.6(transitive)
- Removedaion-web3-providers-http@1.1.6(transitive)
- Removedaion-web3-providers-ipc@1.1.6(transitive)
- Removedaion-web3-providers-ws@1.1.6(transitive)
- Removedaion-web3-utils@1.1.6(transitive)
Updatedaion-web3-core@1.2.5-beta.2
Updatedaion-web3-utils@1.2.5-beta.2