CALLDATACOPY instruction.

Contract body gets created from init code.
This commit is contained in:
Gav Wood 2014-04-23 20:37:16 +01:00
parent 3a2597d871
commit 0f16595ba1

5
vm.cpp
View File

@ -70,14 +70,13 @@ public:
txs.push_back(_t); txs.push_back(_t);
} }
} }
h160 create(u256 _endowment, u256* _gas, bytesConstRef _code, bytesConstRef _init) h160 create(u256 _endowment, u256* _gas, bytesConstRef _init)
{ {
Transaction t; Transaction t;
t.value = _endowment; t.value = _endowment;
t.gasPrice = gasPrice; t.gasPrice = gasPrice;
t.gas = *_gas; t.gas = *_gas;
t.data = _code.toBytes(); t.data = _init.toBytes();
t.init = _init.toBytes();
txs.push_back(t); txs.push_back(t);
return right160(t.sha3(false)); return right160(t.sha3(false));
} }