mirror of
https://github.com/status-im/web3.js.git
synced 2025-02-23 19:48:13 +00:00
* added sub packages * added lerna monopackage management * check for package is instance * added method, subscription and utils package * moved almost all packages * moved all packages, no umbrella package yet * added extend to packages * made contract pass * made batch tests pass * expose providers * fixed test async * fixed test errors * fixed test event encode decode * fixed test formatter tests * fixed method tests * fixed method utils * fixed some eth methods * fixed some eth methods 2 * bumped version 0.18.3 to republish meteor package * fixed get* tests * fixed subscribe tests * added newBlockHeaders subscription * remove unpublished package from package.json * added sendTransaction test * fixed call test * moved files to done * changed extend * added iban tests * Fixed ALL tests * Fixed lint tests * Fixed contract tests * added method tests * added more method tests to test promiEvents extensively * added confirmation event * improved method confirmation checking
89 lines
2.5 KiB
JavaScript
89 lines
2.5 KiB
JavaScript
var testMethod = require('./helpers/test.method.js');
|
|
|
|
var method = 'sendTransaction';
|
|
|
|
|
|
var tests = [{
|
|
args: [{
|
|
from: '0xdbdbdB2cBD23b783741e8d7fcF51e459b497e4a6', // checksum address
|
|
to: '0xdbdbdB2cBD23b783741e8d7fcF51e459b497e4a6', // checksum address
|
|
value: '1234567654321'
|
|
}],
|
|
formattedArgs: [{
|
|
from: "0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6",
|
|
to: "0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6",
|
|
value: "0x11f71f76bb1"
|
|
}],
|
|
result: ['0x1234567'],
|
|
formattedResult: ['0x1234567'],
|
|
notification: {
|
|
method: 'eth_subscription',
|
|
params: {
|
|
subscription: '0x1234567',
|
|
result: {
|
|
blockNumber: '0x10'
|
|
}
|
|
}
|
|
},
|
|
call: 'eth_'+ method
|
|
},{
|
|
args: [{
|
|
from: '0XDBDBDB2CBD23B783741E8D7FCF51E459B497E4A6',
|
|
to: '0XDBDBDB2CBD23B783741E8D7FCF51E459B497E4A6',
|
|
value: '1234567654321',
|
|
data: '0x213453ffffff'
|
|
}],
|
|
formattedArgs: [{
|
|
from: "0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6",
|
|
to: "0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6",
|
|
value: "0x11f71f76bb1",
|
|
data: '0x213453ffffff'
|
|
}],
|
|
result: ['0x12345678976543213456786543212345675432'],
|
|
formattedResult: ['0x12345678976543213456786543212345675432'],
|
|
notification: {
|
|
method: 'eth_subscription',
|
|
params: {
|
|
subscription: '0x12345678976543213456786543212345675432',
|
|
result: {
|
|
blockNumber: '0x10'
|
|
}
|
|
}
|
|
},
|
|
call: 'eth_'+ method
|
|
},{
|
|
args: [{
|
|
from: 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS', // iban address
|
|
to: '0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6',
|
|
value: '1234567654321'
|
|
}],
|
|
formattedArgs: [{
|
|
from: "0x00c5496aee77c1ba1f0854206a26dda82a81d6d8",
|
|
to: "0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6",
|
|
value: "0x11f71f76bb1"
|
|
}],
|
|
result: ['0x12345678976543213456786543212345675432'],
|
|
formattedResult: ['0x12345678976543213456786543212345675432'],
|
|
notification: {
|
|
method: 'eth_subscription',
|
|
params: {
|
|
subscription: '0x12345678976543213456786543212345675432',
|
|
result: {
|
|
blockNumber: '0x10'
|
|
}
|
|
}
|
|
},
|
|
call: 'eth_'+ method
|
|
},{
|
|
error: true, // only for testing
|
|
args: [{
|
|
from: 'XE81ETHXREGGAVOFYORK', // iban address
|
|
to: '0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6',
|
|
value: '1234567654321'
|
|
}],
|
|
call: 'eth_'+ method
|
|
}];
|
|
|
|
testMethod.runTests('eth', method, tests);
|
|
|