|
|
@ -106,7 +106,7 @@ func Execute(code, input []byte, cfg *Config) ([]byte, *state.StateDB, error) { |
|
|
|
} |
|
|
|
} |
|
|
|
var ( |
|
|
|
var ( |
|
|
|
address = common.StringToAddress("contract") |
|
|
|
address = common.StringToAddress("contract") |
|
|
|
vmenv = NewEnv(cfg, cfg.State) |
|
|
|
vmenv = NewEnv(cfg) |
|
|
|
sender = vm.AccountRef(cfg.Origin) |
|
|
|
sender = vm.AccountRef(cfg.Origin) |
|
|
|
) |
|
|
|
) |
|
|
|
cfg.State.CreateAccount(address) |
|
|
|
cfg.State.CreateAccount(address) |
|
|
@ -136,7 +136,7 @@ func Create(input []byte, cfg *Config) ([]byte, common.Address, uint64, error) { |
|
|
|
cfg.State, _ = state.New(common.Hash{}, state.NewDatabase(db)) |
|
|
|
cfg.State, _ = state.New(common.Hash{}, state.NewDatabase(db)) |
|
|
|
} |
|
|
|
} |
|
|
|
var ( |
|
|
|
var ( |
|
|
|
vmenv = NewEnv(cfg, cfg.State) |
|
|
|
vmenv = NewEnv(cfg) |
|
|
|
sender = vm.AccountRef(cfg.Origin) |
|
|
|
sender = vm.AccountRef(cfg.Origin) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -158,7 +158,7 @@ func Create(input []byte, cfg *Config) ([]byte, common.Address, uint64, error) { |
|
|
|
func Call(address common.Address, input []byte, cfg *Config) ([]byte, uint64, error) { |
|
|
|
func Call(address common.Address, input []byte, cfg *Config) ([]byte, uint64, error) { |
|
|
|
setDefaults(cfg) |
|
|
|
setDefaults(cfg) |
|
|
|
|
|
|
|
|
|
|
|
vmenv := NewEnv(cfg, cfg.State) |
|
|
|
vmenv := NewEnv(cfg) |
|
|
|
|
|
|
|
|
|
|
|
sender := cfg.State.GetOrNewStateObject(cfg.Origin) |
|
|
|
sender := cfg.State.GetOrNewStateObject(cfg.Origin) |
|
|
|
// Call the code with the given configuration.
|
|
|
|
// Call the code with the given configuration.
|
|
|
|