Skip to content

Commit

Permalink
revert cli --ignore-checks usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sreuland committed Nov 2, 2023
1 parent 48ed3c1 commit b3f39c3
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions features/dapp_develop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,22 @@ func compileContract(contractExamplesSubPath string, contractWorkingDirectory st
func deployContract(compiledContractFileName string, contractWorkingDirectory string, contractExamplesSubPath string, installedContractId string, e2eConfig *e2e.E2EConfig) (string, error) {
var envCmd *cmd.Cmd

// Always use --ignore-checks since system-test will use contracts compiled with RC versions of the Soroban Rust SDK.
if installedContractId != "" {
envCmd = cmd.NewCmd("soroban",
"contract",
"deploy",
"--wasm-hash", installedContractId,
"--rpc-url", e2eConfig.TargetNetworkRPCURL,
"--source", e2eConfig.TargetNetworkSecretKey,
"--network-passphrase", e2eConfig.TargetNetworkPassPhrase,
"--ignore-checks")
"--network-passphrase", e2eConfig.TargetNetworkPassPhrase)
} else {
envCmd = cmd.NewCmd("soroban",
"contract",
"deploy",
"--wasm", fmt.Sprintf("./%s/%s/target/wasm32-unknown-unknown/release/%s", contractWorkingDirectory, contractExamplesSubPath, compiledContractFileName),
"--rpc-url", e2eConfig.TargetNetworkRPCURL,
"--source", e2eConfig.TargetNetworkSecretKey,
"--network-passphrase", e2eConfig.TargetNetworkPassPhrase,
"--ignore-checks")
"--network-passphrase", e2eConfig.TargetNetworkPassPhrase)
}

status, stdOut, err := e2e.RunCommand(envCmd, e2eConfig)
Expand All @@ -77,14 +74,12 @@ func deployContract(compiledContractFileName string, contractWorkingDirectory st
}

func deployContractUsingConfigParams(compiledContractFileName string, contractWorkingDirectory string, contractExamplesSubPath string, identityName string, networkConfigName string, e2eConfig *e2e.E2EConfig) (string, error) {
// Always use --ignore-checks since system-test will use contracts compiled with RC versions of the Soroban Rust SDK.
envCmd := cmd.NewCmd("soroban",
"contract",
"deploy",
"--wasm", fmt.Sprintf("./%s/%s/target/wasm32-unknown-unknown/release/%s", contractWorkingDirectory, contractExamplesSubPath, compiledContractFileName),
"--network", networkConfigName,
"--source", identityName,
"--ignore-checks")
"--source", identityName)

status, stdOut, err := e2e.RunCommand(envCmd, e2eConfig)

Expand All @@ -101,15 +96,13 @@ func deployContractUsingConfigParams(compiledContractFileName string, contractWo

// returns the installed contract id
func installContract(compiledContractFileName string, contractWorkingDirectory string, contractExamplesSubPath string, e2eConfig *e2e.E2EConfig) (string, error) {
// Always use --ignore-checks since system-test will use contracts compiled with RC versions of the Soroban Rust SDK.
envCmd := cmd.NewCmd("soroban",
"contract",
"install",
"--wasm", fmt.Sprintf("./%s/%s/target/wasm32-unknown-unknown/release/%s", contractWorkingDirectory, contractExamplesSubPath, compiledContractFileName),
"--rpc-url", e2eConfig.TargetNetworkRPCURL,
"--source", e2eConfig.TargetNetworkSecretKey,
"--network-passphrase", e2eConfig.TargetNetworkPassPhrase,
"--ignore-checks")
"--network-passphrase", e2eConfig.TargetNetworkPassPhrase)

status, stdOut, err := e2e.RunCommand(envCmd, e2eConfig)

Expand Down

0 comments on commit b3f39c3

Please sign in to comment.