Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions book/src/framework/components/blockchains/sui.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ API is available on [localhost:9000](http://localhost:9000)
type = "sui"
image = "mysten/sui-tools:mainnet" # if omitted default is mysten/sui-tools:devnet
contracts_dir = "$your_dir"
image_platform = "linux/amd64" # default one
```

## Usage
Expand Down
1 change: 1 addition & 0 deletions framework/.changeset/v0.9.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Sui image platform param
3 changes: 3 additions & 0 deletions framework/components/blockchain/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ type Input struct {
// GAPv2 specific params
HostNetworkMode bool `toml:"host_network_mode"`
CertificatesPath string `toml:"certificates_path"`

// Optional params
ImagePlatform *string `toml:"image_platform"`
}

// Output is a blockchain network output, ChainID and one or more nodes that forms the network
Expand Down
8 changes: 7 additions & 1 deletion framework/components/blockchain/sui.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ func newSui(in *Input) (*Output, error) {

bindPort := fmt.Sprintf("%s/tcp", in.Port)

// default to amd64, unless otherwise specified
imagePlatform := "linux/amd64"
if in.ImagePlatform != nil {
imagePlatform = *in.ImagePlatform
}

req := testcontainers.ContainerRequest{
Image: in.Image,
ExposedPorts: []string{in.Port, DefaultFaucetPort},
Expand All @@ -112,7 +118,7 @@ func newSui(in *Input) (*Output, error) {
h.PortBindings = framework.MapTheSamePort(bindPort, DefaultFaucetPort)
framework.ResourceLimitsFunc(h, in.ContainerResources)
},
ImagePlatform: "linux/amd64",
ImagePlatform: imagePlatform,
Env: map[string]string{
"RUST_LOG": "off,sui_node=info",
},
Expand Down
Loading