diff --git a/framework/components/blockchain/anvil.go b/framework/components/blockchain/anvil.go index 174cc1355..4c341be25 100644 --- a/framework/components/blockchain/anvil.go +++ b/framework/components/blockchain/anvil.go @@ -76,6 +76,7 @@ func newAnvil(in *Input) (*Output, error) { Family: "evm", ChainID: in.ChainID, ContainerName: containerName, + Container: c, Nodes: []*Node{ { HostWSUrl: fmt.Sprintf("ws://%s:%s", host, mp.Port()), diff --git a/framework/components/blockchain/besu.go b/framework/components/blockchain/besu.go index 4888f6395..68824ba51 100644 --- a/framework/components/blockchain/besu.go +++ b/framework/components/blockchain/besu.go @@ -100,6 +100,7 @@ func newBesu(in *Input) (*Output, error) { ChainID: in.ChainID, Family: "evm", ContainerName: containerName, + Container: c, Nodes: []*Node{ { HostHTTPUrl: fmt.Sprintf("http://%s:%s", host, mp.Port()), diff --git a/framework/components/blockchain/blockchain.go b/framework/components/blockchain/blockchain.go index 86e7695d8..bf8da961c 100644 --- a/framework/components/blockchain/blockchain.go +++ b/framework/components/blockchain/blockchain.go @@ -2,6 +2,7 @@ package blockchain import ( "fmt" + "github.com/testcontainers/testcontainers-go" ) // Input is a blockchain network configuration params @@ -29,11 +30,12 @@ type Input struct { // Output is a blockchain network output, ChainID and one or more nodes that forms the network type Output struct { - UseCache bool `toml:"use_cache"` - Family string `toml:"family"` - ContainerName string `toml:"container_name"` - ChainID string `toml:"chain_id"` - Nodes []*Node `toml:"nodes"` + UseCache bool `toml:"use_cache"` + Family string `toml:"family"` + ContainerName string `toml:"container_name"` + Container testcontainers.Container `toml:"-"` + ChainID string `toml:"chain_id"` + Nodes []*Node `toml:"nodes"` } // Node represents blockchain node output, URLs required for connection locally and inside docker network diff --git a/framework/components/blockchain/geth.go b/framework/components/blockchain/geth.go index 7b51f951f..74bd28d68 100644 --- a/framework/components/blockchain/geth.go +++ b/framework/components/blockchain/geth.go @@ -214,6 +214,7 @@ func newGeth(in *Input) (*Output, error) { Family: "evm", ChainID: in.ChainID, ContainerName: containerName, + Container: c, Nodes: []*Node{ { HostHTTPUrl: fmt.Sprintf("http://%s:%s", host, mp.Port()), diff --git a/framework/components/blockchain/solana.go b/framework/components/blockchain/solana.go index bb2656d97..47780c1fa 100644 --- a/framework/components/blockchain/solana.go +++ b/framework/components/blockchain/solana.go @@ -143,6 +143,7 @@ func newSolana(in *Input) (*Output, error) { UseCache: true, Family: "solana", ContainerName: containerName, + Container: c, Nodes: []*Node{ { HostWSUrl: fmt.Sprintf("ws://%s:%s", host, in.WSPort),