From 18b3e9981675e27e808e9c80075ada7df370dc1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 15 Jan 2019 15:05:59 +0100 Subject: [PATCH] go: Fix support for CREATE2 salt --- CHANGELOG.md | 6 ++++++ bindings/go/evmc/host.go | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e595daa..f059d0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)] @@ -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 diff --git a/bindings/go/evmc/host.go b/bindings/go/evmc/host.go index b2346cd..9ca492d 100644 --- a/bindings/go/evmc/host.go +++ b/bindings/go/evmc/host.go @@ -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 @@ -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 {