contract.html example is working with sync api
This commit is contained in:
@ -32,6 +32,9 @@ BigNumber.config({ ROUNDING_MODE: BigNumber.ROUND_DOWN });
|
||||
|
||||
var ETH_PADDING = 32;
|
||||
|
||||
/// method signature length in bytes
|
||||
var ETH_METHOD_SIGNATURE_LENGTH = 4;
|
||||
|
||||
/// Finds first index of array element matching pattern
|
||||
/// @param array
|
||||
/// @param callback pattern
|
||||
@ -389,11 +392,10 @@ var outputParser = function (json) {
|
||||
return parser;
|
||||
};
|
||||
|
||||
/// @param json abi for contract
|
||||
/// @param method name for which we want to get method signature
|
||||
/// @returns (promise) contract method signature for method with given name
|
||||
var methodSignature = function (json, name) {
|
||||
return web3.sha3(web3.fromAscii(name));
|
||||
var methodSignature = function (name) {
|
||||
return web3.sha3(web3.fromAscii(name)).slice(0, 2 + ETH_METHOD_SIGNATURE_LENGTH * 2);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
|
Reference in New Issue
Block a user