mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-24 20:37:17 +00:00
Fixes to ethereum.js and standard.js.
This commit is contained in:
parent
61a0158877
commit
7869294a26
14
dist/ethereum.js
vendored
14
dist/ethereum.js
vendored
@ -448,7 +448,7 @@ var abi = require('./abi');
|
||||
* var myContract = web3.eth.contract('0x0123123121', abi); // creation of contract object
|
||||
*
|
||||
* myContract.myMethod('this is test string param for call'); // myMethod call (implicit, default)
|
||||
* myContract.myMethod('this is test string param for call').call(); // myMethod call (explicit)
|
||||
* myContract.call().myMethod('this is test string param for call'); // myMethod call (explicit)
|
||||
* myContract.transact().myMethod('this is test string param for transact'); // myMethod transact
|
||||
*
|
||||
* @param address - address of the contract, which should be called
|
||||
@ -457,6 +457,18 @@ var abi = require('./abi');
|
||||
*/
|
||||
|
||||
var contract = function (address, desc) {
|
||||
|
||||
desc.forEach(function (method) {
|
||||
// workaround for invalid assumption that method.name is the full anonymous prototype of the method.
|
||||
// it's not. it's just the name. the rest of the code assumes it's actually the anonymous
|
||||
// prototype, so we make it so as a workaround.
|
||||
if (method.name.indexOf('(') === -1) {
|
||||
var displayName = method.name;
|
||||
var typeName = method.inputs.map(function(i){return i.type}).join();
|
||||
method.name = displayName + '(' + typeName + ')';
|
||||
}
|
||||
});
|
||||
|
||||
var inputParser = abi.inputParser(desc);
|
||||
var outputParser = abi.outputParser(desc);
|
||||
|
||||
|
4
dist/ethereum.js.map
vendored
4
dist/ethereum.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/ethereum.min.js
vendored
2
dist/ethereum.min.js
vendored
File diff suppressed because one or more lines are too long
@ -37,7 +37,7 @@ var abi = require('./abi');
|
||||
* var myContract = web3.eth.contract('0x0123123121', abi); // creation of contract object
|
||||
*
|
||||
* myContract.myMethod('this is test string param for call'); // myMethod call (implicit, default)
|
||||
* myContract.myMethod('this is test string param for call').call(); // myMethod call (explicit)
|
||||
* myContract.call().myMethod('this is test string param for call'); // myMethod call (explicit)
|
||||
* myContract.transact().myMethod('this is test string param for transact'); // myMethod transact
|
||||
*
|
||||
* @param address - address of the contract, which should be called
|
||||
@ -46,6 +46,18 @@ var abi = require('./abi');
|
||||
*/
|
||||
|
||||
var contract = function (address, desc) {
|
||||
|
||||
desc.forEach(function (method) {
|
||||
// workaround for invalid assumption that method.name is the full anonymous prototype of the method.
|
||||
// it's not. it's just the name. the rest of the code assumes it's actually the anonymous
|
||||
// prototype, so we make it so as a workaround.
|
||||
if (method.name.indexOf('(') === -1) {
|
||||
var displayName = method.name;
|
||||
var typeName = method.inputs.map(function(i){return i.type}).join();
|
||||
method.name = displayName + '(' + typeName + ')';
|
||||
}
|
||||
});
|
||||
|
||||
var inputParser = abi.inputParser(desc);
|
||||
var outputParser = abi.outputParser(desc);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user