Skip to content

Commit

Permalink
Use latest Docker images for integration tests. (#30)
Browse files Browse the repository at this point in the history
* Use flashbots/suave-execution-geth:lastest for suave-enabled chain.
Use latest image for flashbots/suave-geth.

* Allow insucure unlock.

* Add debug panics. Comment out unused NewClient() method.

* Set environment for suave-mevm host in docker-compose.

* Remove environment vars from docker-compose.

* Disable flaky OFA test.

* Remove dead code.
  • Loading branch information
lthibault authored Feb 1, 2024
1 parent bcfdb2a commit de7103c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ lt: lint test

.PHONY: run-integration
run-integration:
go run examples/app-ofa-private/main.go
go run examples/mevm-confidential-store/main.go
go run examples/mevm-is-confidential/main.go
go run examples/onchain-callback/main.go
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.8"

services:
suave-mevm:
image: flashbots/suave-geth:v0.1.0
image: flashbots/suave-geth:latest
command:
- --suave.dev
- --http.addr=0.0.0.0
Expand All @@ -15,7 +15,7 @@ services:
networks:
- suave-net
suave-enabled-chain:
image: flashbots/suave-geth:v0.1.0
image: flashbots/suave-execution-geth:latest
command:
- --dev
- --dev.gaslimit=30000000
Expand All @@ -26,6 +26,7 @@ services:
- --keystore=/keystore/keystore
- --unlock=0xB5fEAfbDD752ad52Afb7e1bD2E40432A485bBB7F
- --password=/keystore/password.txt
- --allow-insecure-unlock
volumes:
- ./suave-enabled-node-keystore:/keystore
ports:
Expand Down
15 changes: 8 additions & 7 deletions framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ func New() *Framework {
log.Fatal(err)
}

kettleRPC, _ := rpc.Dial(config.KettleRPC)
kettleRPC, err := rpc.Dial(config.KettleRPC)
if err != nil {
panic(err)
}

var accounts []common.Address
if err := kettleRPC.Call(&accounts, "eth_kettleAddress"); err != nil {
Expand All @@ -211,7 +214,10 @@ func New() *Framework {

suaveClt := sdk.NewClient(kettleRPC, config.FundedAccount.Priv, accounts[0])

l1RPC, _ := rpc.Dial(config.L1RPC)
l1RPC, err := rpc.Dial(config.L1RPC)
if err != nil {
panic(err)
}
l1Clt := sdk.NewClient(l1RPC, config.FundedAccountL1.Priv, common.Address{})

return &Framework{
Expand Down Expand Up @@ -265,11 +271,6 @@ func (c *Contract) Ref(acct *PrivKey) *Contract {
return cc
}

func (f *Framework) NewClient(acct *PrivKey) *sdk.Client {
rpc, _ := rpc.Dial(f.config.KettleRPC)
return sdk.NewClient(rpc, acct.Priv, f.kettleAddress)
}

func (c *Chain) SignTx(priv *PrivKey, tx *types.LegacyTx) (*types.Transaction, error) {
cltAcct1 := sdk.NewClient(c.rpc, priv.Priv, common.Address{})
signedTxn, err := cltAcct1.SignTxn(tx)
Expand Down

0 comments on commit de7103c

Please sign in to comment.