git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit d3a050a5491cb0c8f228c86cf23e8cf4725e2038

Environment: use Address type

Alex Beregszaszi committed on 8/16/2016, 10:43:03 PM
Parent: c4e8c0c1c6d56c2694855ab10d0fc01edaf3c2c5

Files changed

environment.jschanged
environment.jsView
@@ -1,6 +1,7 @@
11 const constants = require('./constants.js')
22 const U256 = require('./u256.js')
3+const Address = require('./address.js')
34
45 module.exports = class Environment {
56 constructor (data) {
67 const defaults = {
@@ -8,20 +9,20 @@
89 gasPrice: 0,
910 gasLimit: 1000000, // The gas limit for the block
1011 gasRefund: 0,
1112 // 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'),
1516 difficulty: 0,
16- caller: new Uint8Array(constants.ADDRESS_SIZE_BYTES),
17+ caller: new Address('0x0000000000000000000000000000000000000000'),
1718 callValue: new U256(0),
1819 callData: new Uint8Array(),
1920 // the ROM
2021 code: new Uint8Array(), // the current running code
2122 // output calls
2223 logs: [],
23- selfDestructAddress: new Uint8Array(constants.ADDRESS_SIZE_BYTES),
24+ selfDestructAddress: new Address('0x0000000000000000000000000000000000000000'),
2425 // more output calls
2526 returnValue: new Uint8Array()
2627 }
2728

Built with git-ssb-web