Commit 18cbe174144e02f5d3b3ba532286239bee873366
Kernel: calculate address of contract created
Alex Beregszaszi committed on 8/23/2016, 12:27:46 AMParent: cf401213145158aadf470ff99c38962a1d0e7d12
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -135,10 +135,9 @@ | ||
135 | 135 | account.set('balance', tx.value) |
136 | 136 | account.set('code', tx.data) |
137 | 137 | account.set('storage', new Map()) |
138 | 138 | |
139 | - // FIXME: calculate the contract address | |
140 | - let address = tx.to | |
139 | + let address = address = Utils.newAccountAddress(tx.from, tx.data) | |
141 | 140 | |
142 | 141 | this.environment.state.set(address.toString(), account) |
143 | 142 | |
144 | 143 | // FIXME: deduct fees |
Built with git-ssb-web