Skip to content

Commit

Permalink
go: Fix support for CREATE2 salt
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Jan 15, 2019
1 parent de58981 commit 18b3e99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [6.0.2-dev] - unreleased

- Fixed: [[#179](https://github.com/ethereum/evmc/pull/179)]
Add missing salt argument for CREATE2 in Host in Go bindings.

## [6.0.1] - 2018-11-10

- Fixed: [[#169](https://github.com/ethereum/evmc/pull/169)]
Expand Down Expand Up @@ -85,6 +90,7 @@
Constantinople: Storage status is reported back from `evmc_set_storage()`.


[6.0.2-dev]: https://github.com/ethereum/evmc/compare/v6.0.1...release/6.0
[6.0.1]: https://github.com/ethereum/evmc/releases/tag/v6.0.1
[6.0.0]: https://github.com/ethereum/evmc/releases/tag/v6.0.0
[5.2.0]: https://github.com/ethereum/evmc/releases/tag/v5.2.0
Expand Down
4 changes: 2 additions & 2 deletions bindings/go/evmc/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type HostContext interface {
EmitLog(addr common.Address, topics []common.Hash, data []byte)
Call(kind CallKind,
destination common.Address, sender common.Address, value *big.Int, input []byte, gas int64, depth int,
static bool) (output []byte, gasLeft int64, createAddr common.Address, err error)
static bool, salt *big.Int) (output []byte, gasLeft int64, createAddr common.Address, err error)
}

//export accountExists
Expand Down Expand Up @@ -207,7 +207,7 @@ func call(pCtx unsafe.Pointer, msg *C.struct_evmc_message) C.struct_evmc_result

kind := CallKind(msg.kind)
output, gasLeft, createAddr, err := ctx.Call(kind, goAddress(msg.destination), goAddress(msg.sender), goHash(msg.value).Big(),
goByteSlice(msg.input_data, msg.input_size), int64(msg.gas), int(msg.depth), msg.flags != 0)
goByteSlice(msg.input_data, msg.input_size), int64(msg.gas), int(msg.depth), msg.flags != 0, goHash(msg.create2_salt).Big())

statusCode := C.enum_evmc_status_code(0)
if err != nil {
Expand Down

0 comments on commit 18b3e99

Please sign in to comment.