diff --git a/bindings/go/evmc/evmc.go b/bindings/go/evmc/evmc.go index 9229d5679..f43bef08c 100644 --- a/bindings/go/evmc/evmc.go +++ b/bindings/go/evmc/evmc.go @@ -139,16 +139,19 @@ const ( type Revision int32 const ( - Frontier Revision = C.EVMC_FRONTIER - Homestead Revision = C.EVMC_HOMESTEAD - TangerineWhistle Revision = C.EVMC_TANGERINE_WHISTLE - SpuriousDragon Revision = C.EVMC_SPURIOUS_DRAGON - Byzantium Revision = C.EVMC_BYZANTIUM - Constantinople Revision = C.EVMC_CONSTANTINOPLE - Petersburg Revision = C.EVMC_PETERSBURG - Istanbul Revision = C.EVMC_ISTANBUL - Berlin Revision = C.EVMC_BERLIN - London Revision = C.EVMC_LONDON + Frontier Revision = C.EVMC_FRONTIER + Homestead Revision = C.EVMC_HOMESTEAD + TangerineWhistle Revision = C.EVMC_TANGERINE_WHISTLE + SpuriousDragon Revision = C.EVMC_SPURIOUS_DRAGON + Byzantium Revision = C.EVMC_BYZANTIUM + Constantinople Revision = C.EVMC_CONSTANTINOPLE + Petersburg Revision = C.EVMC_PETERSBURG + Istanbul Revision = C.EVMC_ISTANBUL + Berlin Revision = C.EVMC_BERLIN + London Revision = C.EVMC_LONDON + Shanghai Revision = C.EVMC_SHANGHAI + MaxRevision Revision = C.EVMC_MAX_REVISION + LatestStableRevision Revision = C.EVMC_LATEST_STABLE_REVISION ) type VM struct { diff --git a/bindings/go/evmc/evmc_test.go b/bindings/go/evmc/evmc_test.go index fafd74451..e4c5b7b12 100644 --- a/bindings/go/evmc/evmc_test.go +++ b/bindings/go/evmc/evmc_test.go @@ -59,3 +59,12 @@ func TestExecuteEmptyCode(t *testing.T) { t.Errorf("execution returned unexpected error: %v", err) } } + +func TestRevision(t *testing.T) { + if MaxRevision != Shanghai { + t.Errorf("missing constant for revision %d", MaxRevision) + } + if LatestStableRevision != London { + t.Errorf("wrong latest stable revision %d", LatestStableRevision) + } +}