Skip to content

Commit

Permalink
core/gethwrappers: replace removed params.Version; make generate
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Nov 21, 2024
1 parent 6b6bc4b commit 7e878d8
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 18 deletions.
8 changes: 5 additions & 3 deletions core/gethwrappers/abigen.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"strings"

"github.com/ethereum/go-ethereum/accounts/abi"
gethParams "github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/version"
"golang.org/x/tools/go/ast/astutil"

"github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils"
Expand All @@ -25,6 +25,8 @@ const headerComment = `// Code generated - DO NOT EDIT.
`

var GethVersion = fmt.Sprintf("%d.%d.%d", version.Major, version.Minor, version.Patch)

// AbigenArgs is the arguments to the abigen executable. E.g., Bin is the -bin
// arg.
type AbigenArgs struct {
Expand All @@ -49,10 +51,10 @@ func Abigen(a AbigenArgs) {
}
version := string(regexp.MustCompile(`[0-9]+\.[0-9]+\.[0-9]+`).Find(
versionResponse.Bytes()))
if version != gethParams.Version {
if version != GethVersion {
Exit(fmt.Sprintf("wrong version (%s) of abigen; install the correct one "+
"(%s) with `make abigen` in the chainlink root dir", version,
gethParams.Version),
GethVersion),
nil)
}
args := []string{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GETH_VERSION: 1.14.11
GETH_VERSION: 1.14.12
burn_from_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnFromMintTokenPool/BurnFromMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnFromMintTokenPool/BurnFromMintTokenPool.bin d5a1028728ed52d3c12ccd0e2f54d536697a6d5f689b0e89a4d083011a8cb1f6
burn_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.bin 7f6b367ccf37878317fd9f50488370770204f0cc10c6e0e576be7e7c4ca8db56
burn_with_from_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.bin e136c9f7a1d7af46ed5bd5bb836317c97715a71ee024868251abd0c462f1f115
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GETH_VERSION: 1.14.11
GETH_VERSION: 1.14.12
functions: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRequest.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRequest.bin 3c972870b0afeb6d73a29ebb182f24956a2cebb127b21c4f867d1ecf19a762db
functions_allow_list: ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServiceAllowList.abi ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServiceAllowList.bin 6581a3e82c8a6b5532addb8278ff520d18f38c2be4ac07ed0ad9ccc2e6825e48
functions_billing_registry_events_mock: ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsBillingRegistryEventsMock.abi ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsBillingRegistryEventsMock.bin 50deeb883bd9c3729702be335c0388f9d8553bab4be5e26ecacac496a89e2b77
Expand Down
4 changes: 1 addition & 3 deletions core/gethwrappers/generation/generate/wrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
"os"
"path/filepath"

gethParams "github.com/ethereum/go-ethereum/params"

gethwrappers2 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers"
)

Expand Down Expand Up @@ -36,7 +34,7 @@ func main() {
if err != nil {
gethwrappers2.Exit("could not read current versions database", err)
}
versions.GethVersion = gethParams.Version
versions.GethVersion = gethwrappers2.GethVersion
versions.ContractVersions[pkgName] = gethwrappers2.ContractVersion{
Hash: gethwrappers2.VersionHash(abiPath, binPath),
AbiPath: abiPath,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GETH_VERSION: 1.14.11
GETH_VERSION: 1.14.12
aggregator_v2v3_interface: ../../contracts/solc/v0.8.6/AggregatorV2V3Interface/AggregatorV2V3Interface.abi ../../contracts/solc/v0.8.6/AggregatorV2V3Interface/AggregatorV2V3Interface.bin 95e8814b408bb05bf21742ef580d98698b7db6a9bac6a35c3de12b23aec4ee28
aggregator_v3_interface: ../../contracts/solc/v0.8.6/AggregatorV2V3Interface/AggregatorV3Interface.abi ../../contracts/solc/v0.8.6/AggregatorV2V3Interface/AggregatorV3Interface.bin 351b55d3b0f04af67db6dfb5c92f1c64479400ca1fec77afc20bc0ce65cb49ab
arbitrum_module: ../../contracts/solc/v0.8.19/ArbitrumModule/ArbitrumModule.abi ../../contracts/solc/v0.8.19/ArbitrumModule/ArbitrumModule.bin 12a7bad1f887d832d101a73ae279a91a90c93fd72befea9983e85eff493f62f4
Expand Down
3 changes: 1 addition & 2 deletions core/gethwrappers/go_generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"strings"
"testing"

gethParams "github.com/ethereum/go-ethereum/params"
"github.com/fatih/color"

cutils "github.com/smartcontractkit/chainlink-common/pkg/utils"
Expand All @@ -38,7 +37,7 @@ func TestCheckContractHashesFromLastGoGenerate(t *testing.T) {
if err != nil {
wd = "<directory containing this test>"
}
require.Equal(t, versions.GethVersion, gethParams.Version,
require.Equal(t, versions.GethVersion, GethVersion,
color.HiRedString(utils.BoxOutput("please re-run `go generate %s` and commit the"+
"changes", wd)))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GETH_VERSION: 1.14.11
GETH_VERSION: 1.14.12
capabilities_registry: ../../../contracts/solc/v0.8.24/CapabilitiesRegistry/CapabilitiesRegistry.abi ../../../contracts/solc/v0.8.24/CapabilitiesRegistry/CapabilitiesRegistry.bin 07e0115065e833b29352017fe808dd149952b0b7fe73d0af87020966d2ece57c
feeds_consumer: ../../../contracts/solc/v0.8.24/KeystoneFeedsConsumer/KeystoneFeedsConsumer.abi ../../../contracts/solc/v0.8.24/KeystoneFeedsConsumer/KeystoneFeedsConsumer.bin 6ac5b12eff3b022a35c3c40d5ed0285bf9bfec0e3669a4b12307332a216048ca
forwarder: ../../../contracts/solc/v0.8.24/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.24/KeystoneForwarder/KeystoneForwarder.bin cb728d316f6392ae0d07e6ad94ec93897a4706f6ced7120f79f7e61282ef8152
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GETH_VERSION: 1.14.11
GETH_VERSION: 1.14.12
abstract_arbitrum_token_gateway: ../../../contracts/solc/v0.8.24/IAbstractArbitrumTokenGateway/IAbstractArbitrumTokenGateway.abi ../../../contracts/solc/v0.8.24/IAbstractArbitrumTokenGateway/IAbstractArbitrumTokenGateway.bin 779e05d8fb797d4fcfa565174c071ad9f0161d103d6a322f6d0e1e42be568fa0
arb_node_interface: ../../../contracts/solc/v0.8.24/INodeInterface/INodeInterface.abi ../../../contracts/solc/v0.8.24/INodeInterface/INodeInterface.bin c72f9e9d1e9b9c371c42817590a490a327e743775f423d9417982914d6136ff7
arbitrum_gateway_router: ../../../contracts/solc/v0.8.24/IArbitrumGatewayRouter/IArbitrumGatewayRouter.abi ../../../contracts/solc/v0.8.24/IArbitrumGatewayRouter/IArbitrumGatewayRouter.bin d02c8ed0b4bfe50630e0fce452f9aef23d394bd28110314356954185a6544cb8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GETH_VERSION: 1.14.11
GETH_VERSION: 1.14.12
channel_config_store: ../../../contracts/solc/v0.8.19/ChannelConfigStore/ChannelConfigStore.abi ../../../contracts/solc/v0.8.19/ChannelConfigStore/ChannelConfigStore.bin 3fafe83ea21d50488f5533962f62683988ffa6fd1476dccbbb9040be2369cb37
channel_config_verifier_proxy: ../../../contracts/solc/v0.8.19/ChannelVerifierProxy/ChannelVerifierProxy.abi ../../../contracts/solc/v0.8.19/ChannelVerifierProxy/ChannelVerifierProxy.bin 655658e5f61dfadfe3268de04f948b7e690ad03ca45676e645d6cd6018154661
channel_verifier: ../../../contracts/solc/v0.8.19/ChannelVerifier/ChannelVerifier.abi ../../../contracts/solc/v0.8.19/ChannelVerifier/ChannelVerifier.bin e6020553bd8e3e6b250fcaffe7efd22aea955c8c1a0eb05d282fdeb0ab6550b7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GETH_VERSION: 1.14.11
GETH_VERSION: 1.14.12
authorized_forwarder: ../../../contracts/solc/v0.8.19/AuthorizedForwarder/AuthorizedForwarder.abi ../../../contracts/solc/v0.8.19/AuthorizedForwarder/AuthorizedForwarder.bin 8ea76c883d460f8353a45a493f2aebeb5a2d9a7b4619d1bc4fff5fb590bb3e10
authorized_receiver: ../../../contracts/solc/v0.8.19/AuthorizedReceiver/AuthorizedReceiver.abi ../../../contracts/solc/v0.8.19/AuthorizedReceiver/AuthorizedReceiver.bin 18e8969ba3234b027e1b16c11a783aca58d0ea5c2361010ec597f134b7bf1c4f
link_token_receiver: ../../../contracts/solc/v0.8.19/LinkTokenReceiver/LinkTokenReceiver.abi ../../../contracts/solc/v0.8.19/LinkTokenReceiver/LinkTokenReceiver.bin 839552e2bea179bdf2591805422fb33769c1646d5a014a00fc2c0cd9c03ef229
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GETH_VERSION: 1.14.11
GETH_VERSION: 1.14.12
burn_mint_erc20: ../../../contracts/solc/v0.8.19/BurnMintERC20/BurnMintERC20.abi ../../../contracts/solc/v0.8.19/BurnMintERC20/BurnMintERC20.bin 9faa5e698c31f771907d9e8404f95fa33b61ecc18ca02cb379836206566331a5
burn_mint_erc677: ../../../contracts/solc/v0.8.19/BurnMintERC677/BurnMintERC677.abi ../../../contracts/solc/v0.8.19/BurnMintERC677/BurnMintERC677.bin 405c9016171e614b17e10588653ef8d33dcea21dd569c3fddc596a46fcff68a3
erc20: ../../../contracts/solc/v0.8.19/ERC20/ERC20.abi ../../../contracts/solc/v0.8.19/ERC20/ERC20.bin 5b1a93d9b24f250e49a730c96335a8113c3f7010365cba578f313b483001d4fc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GETH_VERSION: 1.14.11
GETH_VERSION: 1.14.12
entry_point: ../../../contracts/solc/v0.8.19/EntryPoint/EntryPoint.abi ../../../contracts/solc/v0.8.19/EntryPoint/EntryPoint.bin e43da0e61256471b317cab1c87f2425cecba9b81ac21633334f889bab2f0777d
greeter: ../../../contracts/solc/v0.8.15/Greeter.abi ../../../contracts/solc/v0.8.15/Greeter.bin 653dcba5c33a46292073939ce1e639372cf521c0ec2814d4c9f20c72f796f18c
greeter_wrapper: ../../../contracts/solc/v0.8.19/Greeter/Greeter.abi ../../../contracts/solc/v0.8.19/Greeter/Greeter.bin 7f6def58e337a53553a46cb7992cf2d75ec951014d79376fcb869a2b16b53f6d
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GETH_VERSION: 1.14.11
GETH_VERSION: 1.14.12
workflow_registry_wrapper: ../../../contracts/solc/v0.8.24/WorkflowRegistry/WorkflowRegistry.abi ../../../contracts/solc/v0.8.24/WorkflowRegistry/WorkflowRegistry.bin 2f7e6d51370fbb3a6c467515127333b6cb4b998c61f2e0b74d5e07ccb1a8716b

0 comments on commit 7e878d8

Please sign in to comment.