mirror of
https://github.com/status-im/web3.js.git
synced 2025-02-24 03:58:13 +00:00
commit
8f63640c34
9
dist/web3-light.js
vendored
9
dist/web3-light.js
vendored
@ -1970,6 +1970,14 @@ var call = new Method({
|
||||
inputFormatter: [formatters.inputTransactionFormatter, formatters.inputDefaultBlockNumberFormatter]
|
||||
});
|
||||
|
||||
var estimateGas = new Method({
|
||||
name: 'estimateGas',
|
||||
call: 'eth_estimateGas',
|
||||
params: 1,
|
||||
inputFormatter: [formatters.inputTransactionFormatter],
|
||||
outputFormatter: utils.toDecimal
|
||||
});
|
||||
|
||||
var compileSolidity = new Method({
|
||||
name: 'compile.solidity',
|
||||
call: 'eth_compileSolidity',
|
||||
@ -2013,6 +2021,7 @@ var methods = [
|
||||
getTransactionFromBlock,
|
||||
getTransactionCount,
|
||||
call,
|
||||
estimateGas,
|
||||
sendTransaction,
|
||||
compileSolidity,
|
||||
compileLLL,
|
||||
|
4
dist/web3-light.js.map
vendored
4
dist/web3-light.js.map
vendored
File diff suppressed because one or more lines are too long
5
dist/web3-light.min.js
vendored
5
dist/web3-light.min.js
vendored
File diff suppressed because one or more lines are too long
9
dist/web3.js
vendored
9
dist/web3.js
vendored
@ -1970,6 +1970,14 @@ var call = new Method({
|
||||
inputFormatter: [formatters.inputTransactionFormatter, formatters.inputDefaultBlockNumberFormatter]
|
||||
});
|
||||
|
||||
var estimateGas = new Method({
|
||||
name: 'estimateGas',
|
||||
call: 'eth_estimateGas',
|
||||
params: 1,
|
||||
inputFormatter: [formatters.inputTransactionFormatter],
|
||||
outputFormatter: utils.toDecimal
|
||||
});
|
||||
|
||||
var compileSolidity = new Method({
|
||||
name: 'compile.solidity',
|
||||
call: 'eth_compileSolidity',
|
||||
@ -2013,6 +2021,7 @@ var methods = [
|
||||
getTransactionFromBlock,
|
||||
getTransactionCount,
|
||||
call,
|
||||
estimateGas,
|
||||
sendTransaction,
|
||||
compileSolidity,
|
||||
compileLLL,
|
||||
|
4
dist/web3.js.map
vendored
4
dist/web3.js.map
vendored
File diff suppressed because one or more lines are too long
5
dist/web3.min.js
vendored
5
dist/web3.min.js
vendored
File diff suppressed because one or more lines are too long
@ -174,6 +174,14 @@ var call = new Method({
|
||||
inputFormatter: [formatters.inputTransactionFormatter, formatters.inputDefaultBlockNumberFormatter]
|
||||
});
|
||||
|
||||
var estimateGas = new Method({
|
||||
name: 'estimateGas',
|
||||
call: 'eth_estimateGas',
|
||||
params: 1,
|
||||
inputFormatter: [formatters.inputTransactionFormatter],
|
||||
outputFormatter: utils.toDecimal
|
||||
});
|
||||
|
||||
var compileSolidity = new Method({
|
||||
name: 'compile.solidity',
|
||||
call: 'eth_compileSolidity',
|
||||
@ -217,6 +225,7 @@ var methods = [
|
||||
getTransactionFromBlock,
|
||||
getTransactionCount,
|
||||
call,
|
||||
estimateGas,
|
||||
sendTransaction,
|
||||
compileSolidity,
|
||||
compileLLL,
|
||||
|
41
test/web3.eth.call.js
Normal file
41
test/web3.eth.call.js
Normal file
@ -0,0 +1,41 @@
|
||||
var web3 = require('../index');
|
||||
var testMethod = require('./helpers/test.method.js');
|
||||
|
||||
var method = 'call';
|
||||
|
||||
var tests = [{
|
||||
args: [{
|
||||
to: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b',
|
||||
data: '0x23455654',
|
||||
gas: 11,
|
||||
gasPrice: 11
|
||||
}],
|
||||
formattedArgs: [{
|
||||
to: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b',
|
||||
data: '0x23455654',
|
||||
gas: '0xb',
|
||||
gasPrice: '0xb'
|
||||
}, 'latest'],
|
||||
result: '0x31981',
|
||||
formattedResult: '0x31981',
|
||||
call: 'eth_'+ method
|
||||
},{
|
||||
args: [{
|
||||
to: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b',
|
||||
data: '0x23455654',
|
||||
gas: 11,
|
||||
gasPrice: 11
|
||||
}, 11],
|
||||
formattedArgs: [{
|
||||
to: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b',
|
||||
data: '0x23455654',
|
||||
gas: '0xb',
|
||||
gasPrice: '0xb'
|
||||
}, '0xb'],
|
||||
result: '0x31981',
|
||||
formattedResult: '0x31981',
|
||||
call: 'eth_'+ method
|
||||
}];
|
||||
|
||||
testMethod.runTests('eth', method, tests);
|
||||
|
25
test/web3.eth.estimateGas.js
Normal file
25
test/web3.eth.estimateGas.js
Normal file
@ -0,0 +1,25 @@
|
||||
var web3 = require('../index');
|
||||
var testMethod = require('./helpers/test.method.js');
|
||||
|
||||
var method = 'estimateGas';
|
||||
|
||||
var tests = [{
|
||||
args: [{
|
||||
to: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b',
|
||||
data: '0x23455654',
|
||||
gas: 11,
|
||||
gasPrice: 11
|
||||
}],
|
||||
formattedArgs: [{
|
||||
to: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b',
|
||||
data: '0x23455654',
|
||||
gas: '0xb',
|
||||
gasPrice: '0xb'
|
||||
}],
|
||||
result: '0x31981',
|
||||
formattedResult: 203137,
|
||||
call: 'eth_'+ method
|
||||
}];
|
||||
|
||||
testMethod.runTests('eth', method, tests);
|
||||
|
Loading…
x
Reference in New Issue
Block a user