File tree Expand file tree Collapse file tree 5 files changed +12
-5
lines changed
framework/components/blockchain Expand file tree Collapse file tree 5 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ func defaultAnvil(in *Input) {
2525// newAnvil deploy foundry anvil node
2626func newAnvil (in * Input ) (* Output , error ) {
2727 defaultAnvil (in )
28- req := baseRequest (in , false )
28+ req := baseRequest (in , WithoutWsEndpoint )
2929
3030 req .Image = in .Image
3131 req .AlwaysPullImage = in .PullImage
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ RUN curl -L https://raw.githubusercontent.com/matter-labs/foundry-zksync/main/in
4343// see: https://foundry-book.zksync.io/getting-started/installation#using-foundry-with-docker
4444func newAnvilZksync (in * Input ) (* Output , error ) {
4545 defaultAnvilZksync (in )
46- req := baseRequest (in , false )
46+ req := baseRequest (in , WithoutWsEndpoint )
4747
4848 tempDir , err := os .MkdirTemp ("." , "anvil-zksync-dockercontext" )
4949 if err != nil {
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ func defaultBesu(in *Input) {
2323
2424func newBesu (in * Input ) (* Output , error ) {
2525 defaultBesu (in )
26- req := baseRequest (in , true )
26+ req := baseRequest (in , WithWsEndpoint )
2727
2828 req .Image = in .Image
2929 req .AlwaysPullImage = in .PullImage
Original file line number Diff line number Diff line change @@ -13,7 +13,14 @@ import (
1313 "github.com/smartcontractkit/chainlink-testing-framework/framework"
1414)
1515
16- func baseRequest (in * Input , useWS bool ) testcontainers.ContainerRequest {
16+ type ExposeWs = bool
17+
18+ const (
19+ WithWsEndpoint ExposeWs = true
20+ WithoutWsEndpoint ExposeWs = false
21+ )
22+
23+ func baseRequest (in * Input , useWS ExposeWs ) testcontainers.ContainerRequest {
1724 containerName := framework .DefaultTCName ("blockchain-node" )
1825 bindPort := fmt .Sprintf ("%s/tcp" , in .Port )
1926 exposedPorts := []string {bindPort }
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ func defaultGeth(in *Input) {
7878
7979func newGeth (in * Input ) (* Output , error ) {
8080 defaultGeth (in )
81- req := baseRequest (in , false )
81+ req := baseRequest (in , WithoutWsEndpoint )
8282 defaultCmd := []string {
8383 "--http.corsdomain=*" ,
8484 "--http.vhosts=*" ,
You can’t perform that action at this time.
0 commit comments