aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/environment.go
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-11-27 22:40:29 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2016-02-18 17:08:11 +0800
commit371871d685d54b916aef28de689d6f0af7822083 (patch)
treee704b02ba2ffd2d1164001885fba15106b0f7d94 /core/vm/environment.go
parentaa36a6ae4f24f07e2c470a21c93ff37ad5861982 (diff)
downloadgo-tangerine-371871d685d54b916aef28de689d6f0af7822083.tar.gz
go-tangerine-371871d685d54b916aef28de689d6f0af7822083.tar.zst
go-tangerine-371871d685d54b916aef28de689d6f0af7822083.zip
parmas, crypto, core, core/vm: homestead consensus protocol changes
* change gas cost for contract creating txs * invalidate signature with s value greater than secp256k1 N / 2 * OOG contract creation if not enough gas to store code * new difficulty adjustment algorithm * new DELEGATECALL op code
Diffstat (limited to 'core/vm/environment.go')
-rw-r--r--core/vm/environment.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/vm/environment.go b/core/vm/environment.go
index 4fee583bf..dc60af2ca 100644
--- a/core/vm/environment.go
+++ b/core/vm/environment.go
@@ -70,6 +70,8 @@ type Environment interface {
Call(me ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error)
// Take another's contract code and execute within our own context
CallCode(me ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error)
+ // Same as CallCode except sender and value is propagated from parent to child scope
+ DelegateCall(me ContractRef, addr common.Address, data []byte, gas, price *big.Int) ([]byte, error)
// Create a new contract
Create(me ContractRef, data []byte, gas, price, value *big.Int) ([]byte, common.Address, error)
}
@@ -119,7 +121,9 @@ type Account interface {
SetNonce(uint64)
Balance() *big.Int
Address() common.Address
+ SetAddress(common.Address)
ReturnGas(*big.Int, *big.Int)
SetCode([]byte)
EachStorage(cb func(key, value []byte))
+ Value() *big.Int
}