Commit d3a050a5491cb0c8f228c86cf23e8cf4725e2038
Environment: use Address type
Alex Beregszaszi committed on 8/16/2016, 10:43:03 PMParent: c4e8c0c1c6d56c2694855ab10d0fc01edaf3c2c5
Files changed
environment.js | changed |
environment.js | ||
---|---|---|
@@ -1,6 +1,7 @@ | ||
1 | 1 | const constants = require('./constants.js') |
2 | 2 | const U256 = require('./u256.js') |
3 | +const Address = require('./address.js') | |
3 | 4 | |
4 | 5 | module.exports = class Environment { |
5 | 6 | constructor (data) { |
6 | 7 | const defaults = { |
@@ -8,20 +9,20 @@ | ||
8 | 9 | gasPrice: 0, |
9 | 10 | gasLimit: 1000000, // The gas limit for the block |
10 | 11 | gasRefund: 0, |
11 | 12 | // call infromation |
12 | - address: new Uint8Array(constants.ADDRESS_SIZE_BYTES), | |
13 | - origin: new Uint8Array(constants.ADDRESS_SIZE_BYTES), | |
14 | - coinbase: new Uint8Array(constants.ADDRESS_SIZE_BYTES), | |
13 | + address: new Address('0x0000000000000000000000000000000000000000'), | |
14 | + origin: new Address('0x0000000000000000000000000000000000000000'), | |
15 | + coinbase: new Address('0x0000000000000000000000000000000000000000'), | |
15 | 16 | difficulty: 0, |
16 | - caller: new Uint8Array(constants.ADDRESS_SIZE_BYTES), | |
17 | + caller: new Address('0x0000000000000000000000000000000000000000'), | |
17 | 18 | callValue: new U256(0), |
18 | 19 | callData: new Uint8Array(), |
19 | 20 | // the ROM |
20 | 21 | code: new Uint8Array(), // the current running code |
21 | 22 | // output calls |
22 | 23 | logs: [], |
23 | - selfDestructAddress: new Uint8Array(constants.ADDRESS_SIZE_BYTES), | |
24 | + selfDestructAddress: new Address('0x0000000000000000000000000000000000000000'), | |
24 | 25 | // more output calls |
25 | 26 | returnValue: new Uint8Array() |
26 | 27 | } |
27 | 28 |
Built with git-ssb-web