Skip to content

Commit

Permalink
Use MustNewSimTransactor from chainlink-integrations instead of its o…
Browse files Browse the repository at this point in the history
…ld copy. (#16357)

* Minor

* Minor

* Minor

* Minor

* Minor

* Minor

* Minor

* Minor

* Minor

* Minor

* Minor

* Minor

* Minor

* Minor
  • Loading branch information
pavel-raykov authored Feb 14, 2025
1 parent b2dca03 commit 1124020
Show file tree
Hide file tree
Showing 30 changed files with 115 additions and 102 deletions.
5 changes: 5 additions & 0 deletions .changeset/seven-bees-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#updated Use MustNewSimTransactor from chainlink-integrations instead of its old copy.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"github.com/smartcontractkit/chainlink-integrations/evm/client"
"github.com/smartcontractkit/chainlink-integrations/evm/heads/headstest"
"github.com/smartcontractkit/chainlink-integrations/evm/logpoller"
evmtestutils "github.com/smartcontractkit/chainlink-integrations/evm/testutils"

configsevm "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/configs/evm"
cctypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types"
Expand Down Expand Up @@ -102,7 +103,7 @@ type TestUniverse struct {
}

func NewTestUniverse(ctx context.Context, t *testing.T, lggr logger.Logger) TestUniverse {
transactor := testutils.MustNewSimTransactor(t)
transactor := evmtestutils.MustNewSimTransactor(t)
backend := simulated.NewBackend(ethtypes.GenesisAlloc{
transactor.From: {Balance: assets.Ether(1000).ToInt()},
}, simulated.WithBlockGasLimit(30e6))
Expand Down
3 changes: 2 additions & 1 deletion core/capabilities/ccip/ccipevm/executecodec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"

"github.com/smartcontractkit/chainlink-integrations/evm/assets"
evmtestutils "github.com/smartcontractkit/chainlink-integrations/evm/testutils"
"github.com/smartcontractkit/chainlink-integrations/evm/utils"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/v1_6_0/message_hasher"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/v1_6_0/offramp"
Expand Down Expand Up @@ -128,7 +129,7 @@ func TestExecutePluginCodecV1(t *testing.T) {
ctx := testutils.Context(t)

// Deploy the contract
transactor := testutils.MustNewSimTransactor(t)
transactor := evmtestutils.MustNewSimTransactor(t)
simulatedBackend := backends.NewSimulatedBackend(core.GenesisAlloc{
transactor.From: {Balance: assets.Ether(1000).ToInt()},
}, 30e6)
Expand Down
5 changes: 3 additions & 2 deletions core/capabilities/ccip/ccipevm/msghasher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"

"github.com/smartcontractkit/chainlink-integrations/evm/assets"
evmtestutils "github.com/smartcontractkit/chainlink-integrations/evm/testutils"
"github.com/smartcontractkit/chainlink-integrations/evm/utils"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/v1_6_0/message_hasher"
"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
Expand Down Expand Up @@ -181,7 +182,7 @@ type testSetupData struct {
}

func testSetup(t *testing.T) *testSetupData {
transactor := testutils.MustNewSimTransactor(t)
transactor := evmtestutils.MustNewSimTransactor(t)
simulatedBackend := backends.NewSimulatedBackend(core.GenesisAlloc{
transactor.From: {Balance: assets.Ether(1000).ToInt()},
}, 30e6)
Expand All @@ -204,7 +205,7 @@ func testSetup(t *testing.T) *testSetupData {
}

func TestMessagerHasher_againstRmnSharedVector(t *testing.T) {
transactor := testutils.MustNewSimTransactor(t)
transactor := evmtestutils.MustNewSimTransactor(t)
backend := backends.NewSimulatedBackend(types.GenesisAlloc{
transactor.From: {Balance: assets.Ether(1000).ToInt()},
}, 30e6)
Expand Down
2 changes: 1 addition & 1 deletion core/capabilities/ccip/common/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-integrations/evm/assets"
"github.com/smartcontractkit/chainlink-integrations/evm/testutils"
capcommon "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common"
kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry_1_1_0"
"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
)

func Test_HashedCapabilityId(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion core/capabilities/ccip/ocrimpls/contract_transmitter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"github.com/smartcontractkit/chainlink-integrations/evm/gas"
"github.com/smartcontractkit/chainlink-integrations/evm/keystore"
"github.com/smartcontractkit/chainlink-integrations/evm/logpoller"
evmtestutils "github.com/smartcontractkit/chainlink-integrations/evm/testutils"
evmtypes "github.com/smartcontractkit/chainlink-integrations/evm/types"
"github.com/smartcontractkit/chainlink-integrations/evm/utils"
"github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ocrimpls"
Expand Down Expand Up @@ -203,7 +204,7 @@ func newTestUniverse(t *testing.T, ks *keyringsAndSigners[[]byte]) *testUniverse
t.Helper()

db := pgtest.NewSqlxDB(t)
owner := testutils.MustNewSimTransactor(t)
owner := evmtestutils.MustNewSimTransactor(t)

// create many transmitters but only need to fund one, rest are to get
// setOCR3Config to pass.
Expand Down
2 changes: 1 addition & 1 deletion core/capabilities/integration_tests/framework/ethereum.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/services"

"github.com/smartcontractkit/chainlink-integrations/evm/assets"
"github.com/smartcontractkit/chainlink-integrations/evm/testutils"
evmtypes "github.com/smartcontractkit/chainlink-integrations/evm/types"
"github.com/smartcontractkit/chainlink/v2/core/internal/cltest"
"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
)

type EthBlockchain struct {
Expand Down
6 changes: 3 additions & 3 deletions core/chains/evm/txmgr/attempts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import (
"github.com/smartcontractkit/chainlink-integrations/evm/gas"
gasmocks "github.com/smartcontractkit/chainlink-integrations/evm/gas/mocks"
ksmocks "github.com/smartcontractkit/chainlink-integrations/evm/keystore/mocks"
testutils2 "github.com/smartcontractkit/chainlink-integrations/evm/testutils"
"github.com/smartcontractkit/chainlink-integrations/evm/testutils"
evmtypes "github.com/smartcontractkit/chainlink-integrations/evm/types"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr"
)

func NewEvmAddress() gethcommon.Address {
return testutils2.NewAddress()
return testutils.NewAddress()
}

type feeConfig struct {
Expand Down Expand Up @@ -175,7 +175,7 @@ func TestTxm_NewDynamicFeeTx(t *testing.T) {
for _, tt := range cases {
test := tt
t.Run(test.name, func(t *testing.T) {
cfg := testutils2.NewTestChainScopedConfig(t, test.setCfg)
cfg := testutils.NewTestChainScopedConfig(t, test.setCfg)
cks := txmgr.NewEvmTxAttemptBuilder(*big.NewInt(1), cfg.EVM().GasEstimator(), kst, nil)
dynamicFee := gas.DynamicFee{GasTipCap: test.tipcap, GasFeeCap: test.feecap}
_, _, err := cks.NewCustomTxAttempt(tests.Context(t), txmgr.Tx{Sequence: &n, FromAddress: addr}, gas.EvmFee{
Expand Down
3 changes: 1 addition & 2 deletions core/gethwrappers/ccip/deployment_test/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ import (
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-integrations/evm/assets"
"github.com/smartcontractkit/chainlink-integrations/evm/testutils"

"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/v1_2_0/router"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/v1_5_0/token_admin_registry"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/v1_6_0/fee_quoter"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/v1_6_0/nonce_manager"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/v1_6_0/offramp"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/v1_6_0/onramp"

"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
)

// This tests ensures that all of the compiled contracts can be
Expand Down
4 changes: 2 additions & 2 deletions core/internal/features/features_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ type OperatorContracts struct {
}

func setupOperatorContracts(t *testing.T) OperatorContracts {
user := testutils.MustNewSimTransactor(t)
user := evmtestutils.MustNewSimTransactor(t)
genesisData := gethtypes.GenesisAlloc{
user.From: {Balance: assets.Ether(1000).ToInt()},
}
Expand Down Expand Up @@ -649,7 +649,7 @@ observationSource = """
}

func setupOCRContracts(t *testing.T) (*bind.TransactOpts, types.Backend, common.Address, *offchainaggregator.OffchainAggregator, *flags_wrapper.Flags, common.Address) {
owner := testutils.MustNewSimTransactor(t)
owner := evmtestutils.MustNewSimTransactor(t)
sb := new(big.Int)
sb, _ = sb.SetString("100000000000000000000000", 10) // 1000 eth
genesisData := gethtypes.GenesisAlloc{
Expand Down
3 changes: 2 additions & 1 deletion core/internal/features/ocr2/features_ocr2_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config"

"github.com/smartcontractkit/chainlink-integrations/evm/assets"
evmtestutils "github.com/smartcontractkit/chainlink-integrations/evm/testutils"
ubig "github.com/smartcontractkit/chainlink-integrations/evm/utils/big"
"github.com/smartcontractkit/chainlink/v2/core/bridges"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders"
Expand Down Expand Up @@ -64,7 +65,7 @@ type Node struct {
}

func SetupOCR2Contracts(t *testing.T) (*bind.TransactOpts, *simulated.Backend, common.Address, *ocr2aggregator.OCR2Aggregator) {
owner := testutils.MustNewSimTransactor(t)
owner := evmtestutils.MustNewSimTransactor(t)
sb := new(big.Int)
sb, _ = sb.SetString("100000000000000000000", 10) // 1 eth
genesisData := types.GenesisAlloc{owner.From: {Balance: sb}}
Expand Down
12 changes: 0 additions & 12 deletions core/internal/testutils/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"testing"
"time"

"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
Expand Down Expand Up @@ -47,17 +46,6 @@ var FixtureChainID = big.NewInt(0)
// SimulatedChainID is the chain ID for the go-ethereum simulated backend
var SimulatedChainID = big.NewInt(1337)

// MustNewSimTransactor returns a transactor for interacting with the
// geth simulated backend.
// TODO use evm/testutils
func MustNewSimTransactor(t testing.TB) *bind.TransactOpts {
key, err := crypto.GenerateKey()
require.NoError(t, err)
transactor, err := bind.NewKeyedTransactorWithChainID(key, SimulatedChainID)
require.NoError(t, err)
return transactor
}

// NewAddress return a random new address
func NewAddress() common.Address {
return common.BytesToAddress(randomBytes(20))
Expand Down
7 changes: 4 additions & 3 deletions core/services/fluxmonitorv2/integrations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"

"github.com/smartcontractkit/chainlink-integrations/evm/assets"
evmtestutils "github.com/smartcontractkit/chainlink-integrations/evm/testutils"
"github.com/smartcontractkit/chainlink-integrations/evm/types"
evmutils "github.com/smartcontractkit/chainlink-integrations/evm/utils"
"github.com/smartcontractkit/chainlink/v2/core/bridges"
Expand Down Expand Up @@ -114,9 +115,9 @@ func setupFluxAggregatorUniverse(t *testing.T, configOptions ...func(cfg *fluxAg
var f fluxAggregatorUniverse
f.evmChainID = *testutils.SimulatedChainID
f.key = key
f.sergey = testutils.MustNewSimTransactor(t)
f.neil = testutils.MustNewSimTransactor(t)
f.ned = testutils.MustNewSimTransactor(t)
f.sergey = evmtestutils.MustNewSimTransactor(t)
f.neil = evmtestutils.MustNewSimTransactor(t)
f.ned = evmtestutils.MustNewSimTransactor(t)
f.nallory = oracleTransactor
genesisData := gethtypes.GenesisAlloc{
f.sergey.From: {Balance: assets.Ether(1000).ToInt()},
Expand Down
31 changes: 16 additions & 15 deletions core/services/keeper/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (

"github.com/smartcontractkit/chainlink-integrations/evm/assets"
"github.com/smartcontractkit/chainlink-integrations/evm/client"
evmtestutils "github.com/smartcontractkit/chainlink-integrations/evm/testutils"
evmtypes "github.com/smartcontractkit/chainlink-integrations/evm/types"
ubig "github.com/smartcontractkit/chainlink-integrations/evm/utils/big"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders"
Expand Down Expand Up @@ -177,11 +178,11 @@ func TestKeeperEthIntegration(t *testing.T) {
nodeAddressEIP55 := evmtypes.EIP55AddressFromAddress(nodeAddress)

// setup blockchain
sergey := testutils.MustNewSimTransactor(t) // owns all the link
steve := testutils.MustNewSimTransactor(t) // registry owner
carrol := testutils.MustNewSimTransactor(t) // client
nelly := testutils.MustNewSimTransactor(t) // other keeper operator 1
nick := testutils.MustNewSimTransactor(t) // other keeper operator 2
sergey := evmtestutils.MustNewSimTransactor(t) // owns all the link
steve := evmtestutils.MustNewSimTransactor(t) // registry owner
carrol := evmtestutils.MustNewSimTransactor(t) // client
nelly := evmtestutils.MustNewSimTransactor(t) // other keeper operator 1
nick := evmtestutils.MustNewSimTransactor(t) // other keeper operator 2
genesisData := types.GenesisAlloc{
sergey.From: {Balance: assets.Ether(1000).ToInt()},
steve.From: {Balance: assets.Ether(1000).ToInt()},
Expand Down Expand Up @@ -332,11 +333,11 @@ func TestKeeperForwarderEthIntegration(t *testing.T) {
nodeAddressEIP55 := evmtypes.EIP55AddressFromAddress(nodeAddress)

// setup blockchain
sergey := testutils.MustNewSimTransactor(t) // owns all the link
steve := testutils.MustNewSimTransactor(t) // registry owner
carrol := testutils.MustNewSimTransactor(t) // client
nelly := testutils.MustNewSimTransactor(t) // other keeper operator 1
nick := testutils.MustNewSimTransactor(t) // other keeper operator 2
sergey := evmtestutils.MustNewSimTransactor(t) // owns all the link
steve := evmtestutils.MustNewSimTransactor(t) // registry owner
carrol := evmtestutils.MustNewSimTransactor(t) // client
nelly := evmtestutils.MustNewSimTransactor(t) // other keeper operator 1
nick := evmtestutils.MustNewSimTransactor(t) // other keeper operator 2
genesisData := types.GenesisAlloc{
sergey.From: {Balance: assets.Ether(1000).ToInt()},
steve.From: {Balance: assets.Ether(1000).ToInt()},
Expand Down Expand Up @@ -493,11 +494,11 @@ func TestMaxPerformDataSize(t *testing.T) {
nodeAddressEIP55 := evmtypes.EIP55AddressFromAddress(nodeAddress)

// setup blockchain
sergey := testutils.MustNewSimTransactor(t) // owns all the link
steve := testutils.MustNewSimTransactor(t) // registry owner
carrol := testutils.MustNewSimTransactor(t) // client
nelly := testutils.MustNewSimTransactor(t) // other keeper operator 1
nick := testutils.MustNewSimTransactor(t) // other keeper operator 2
sergey := evmtestutils.MustNewSimTransactor(t) // owns all the link
steve := evmtestutils.MustNewSimTransactor(t) // registry owner
carrol := evmtestutils.MustNewSimTransactor(t) // client
nelly := evmtestutils.MustNewSimTransactor(t) // other keeper operator 1
nick := evmtestutils.MustNewSimTransactor(t) // other keeper operator 2
genesisData := types.GenesisAlloc{
sergey.From: {Balance: assets.Ether(1000).ToInt()},
steve.From: {Balance: assets.Ether(1000).ToInt()},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/smartcontractkit/chainlink-integrations/evm/client/clienttest"
"github.com/smartcontractkit/chainlink-integrations/evm/heads/headstest"
"github.com/smartcontractkit/chainlink-integrations/evm/logpoller"
evmtestutils "github.com/smartcontractkit/chainlink-integrations/evm/testutils"
"github.com/smartcontractkit/chainlink-integrations/evm/utils"

lpmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks"
Expand Down Expand Up @@ -57,7 +58,7 @@ func commitAndGetBlockTs(ec *client.SimulatedBackendClient) uint64 {
}

func newSim(t *testing.T) (*bind.TransactOpts, *client.SimulatedBackendClient) {
user := testutils.MustNewSimTransactor(t)
user := evmtestutils.MustNewSimTransactor(t)
sim := simulated.NewBackend(map[common.Address]types.Account{
user.From: {
Balance: big.NewInt(0).Mul(big.NewInt(10), big.NewInt(1e18)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import (
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-integrations/evm/client"
evmtestutils "github.com/smartcontractkit/chainlink-integrations/evm/testutils"
"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
)

// NewSimulation returns a client and a simulated backend.
func NewSimulation(t testing.TB) (*bind.TransactOpts, *client.SimulatedBackendClient) {
user := testutils.MustNewSimTransactor(t)
user := evmtestutils.MustNewSimTransactor(t)
simulatedBackend := simulated.NewBackend(types.GenesisAlloc{
user.From: {
Balance: big.NewInt(0).Mul(big.NewInt(3), big.NewInt(1e18)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (

"github.com/smartcontractkit/chainlink-integrations/evm/assets"
"github.com/smartcontractkit/chainlink-integrations/evm/client"
evmtestutils "github.com/smartcontractkit/chainlink-integrations/evm/testutils"
evmtypes "github.com/smartcontractkit/chainlink-integrations/evm/types"
"github.com/smartcontractkit/chainlink-integrations/evm/utils"
"github.com/smartcontractkit/chainlink/v2/core/bridges"
Expand Down Expand Up @@ -167,7 +168,7 @@ type Coordinator struct {
}

func StartNewChainWithContracts(t *testing.T, nClients int) (*bind.TransactOpts, evmtypes.Backend, func() common.Hash, func(), Coordinator, Coordinator, []deployedClientContract, common.Address, *functions_router.FunctionsRouter, *link_token_interface.LinkToken, common.Address, *functions_allow_list.TermsOfServiceAllowList) {
owner := testutils.MustNewSimTransactor(t)
owner := evmtestutils.MustNewSimTransactor(t)
owner.GasPrice = big.NewInt(int64(DefaultGasPrice))
sb := new(big.Int)
sb, _ = sb.SetString("100000000000000000000", 10) // 1 eth
Expand Down
3 changes: 2 additions & 1 deletion core/services/ocr2/plugins/llo/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (
datastreamsllo "github.com/smartcontractkit/chainlink-data-streams/llo"

"github.com/smartcontractkit/chainlink-integrations/evm/assets"
evmtestutils "github.com/smartcontractkit/chainlink-integrations/evm/testutils"
evmtypes "github.com/smartcontractkit/chainlink-integrations/evm/types"
"github.com/smartcontractkit/chainlink-integrations/evm/utils"
ubig "github.com/smartcontractkit/chainlink-integrations/evm/utils/big"
Expand Down Expand Up @@ -85,7 +86,7 @@ func setupBlockchain(t *testing.T) (
*verifier_proxy.VerifierProxy,
common.Address,
) {
steve := testutils.MustNewSimTransactor(t) // config contract deployer and owner
steve := evmtestutils.MustNewSimTransactor(t) // config contract deployer and owner
genesisData := gethtypes.GenesisAlloc{steve.From: {Balance: assets.Ether(1000).ToInt()}}
backend := cltest.NewSimulatedBackend(t, genesisData, ethconfig.Defaults.Miner.GasCeil)
backend.Commit()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/smartcontractkit/chainlink-integrations/evm/client"
"github.com/smartcontractkit/chainlink-integrations/evm/heads/headstest"
"github.com/smartcontractkit/chainlink-integrations/evm/logpoller"
evmtestutils "github.com/smartcontractkit/chainlink-integrations/evm/testutils"

"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/llo-feeds/generated/channel_config_store"
"github.com/smartcontractkit/chainlink/v2/core/internal/cltest"
Expand Down Expand Up @@ -132,7 +133,7 @@ func Test_ChannelDefinitionCache_Integration(t *testing.T) {
const ETHMainnetChainSelector uint64 = 5009297550715157269
orm := llo.NewChainScopedORM(db, ETHMainnetChainSelector)

steve := testutils.MustNewSimTransactor(t) // config contract deployer and owner
steve := evmtestutils.MustNewSimTransactor(t) // config contract deployer and owner
genesisData := types.GenesisAlloc{steve.From: {Balance: assets.Ether(1000).ToInt()}}
backend := cltest.NewSimulatedBackend(t, genesisData, ethconfig.Defaults.Miner.GasCeil)
backend.Commit() // ensure starting block number at least 1
Expand Down
3 changes: 2 additions & 1 deletion core/services/ocr2/plugins/mercury/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import (
datastreamsmercury "github.com/smartcontractkit/chainlink-data-streams/mercury"

"github.com/smartcontractkit/chainlink-integrations/evm/assets"
evmtestutils "github.com/smartcontractkit/chainlink-integrations/evm/testutils"
evmtypes "github.com/smartcontractkit/chainlink-integrations/evm/types"
"github.com/smartcontractkit/chainlink/v2/core/bridges"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/link_token_interface"
Expand Down Expand Up @@ -91,7 +92,7 @@ func detectPanicLogs(t *testing.T, logObservers []*observer.ObservedLogs) {
}

func setupBlockchain(t *testing.T) (*bind.TransactOpts, evmtypes.Backend, *verifier.Verifier, common.Address, func() common.Hash) {
steve := testutils.MustNewSimTransactor(t) // config contract deployer and owner
steve := evmtestutils.MustNewSimTransactor(t) // config contract deployer and owner
genesisData := types.GenesisAlloc{steve.From: {Balance: assets.Ether(1000).ToInt()}}
backend := cltest.NewSimulatedBackend(t, genesisData, ethconfig.Defaults.Miner.GasCeil)
backend.Commit() // ensure starting block number at least 1
Expand Down
Loading

0 comments on commit 1124020

Please sign in to comment.