Skip to content

Commit

Permalink
feat: icon cosmos integration (#146)
Browse files Browse the repository at this point in the history
* feat: update icon and wasm contracts for ibc setup

* feat: implement methods to deploy wasm contracts

* feat: implement contract mehtods for icon ibc

* feat: update contract deployment for ibc setup

* chore: update code

* feat: update main.star file

* chore:update code

* feat: update contract deployment

* chore: add relay service for icon to cosmos

* feat: update comos constants

* feat: update cosmos relayer for icon to cosmos

* fix: remove typos from code

* feat; update keystore for relay setup

* chore: update main

* feat: update relay setup for icon comsos

* feat: add relay start command

* fix: rly start command

* chore: update icon-ibc-relay image version

* fix: contract setup archway

* fix: remove debug print statements

* feat: update relay start command

* fix: error when node already running

* fix: help falg for archway chain command

* feat: update bridge

* feat: update cosmos package for icon archway

* chore: bump versions of dive and kurtosis sdk

* fix: typo in user output

* feat: update service file writes

* chore: remove print statemet

---------

Co-authored-by: Prathiksha-Nataraja <[email protected]>
Co-authored-by: Shanith K K <[email protected]>
  • Loading branch information
3 people authored Aug 28, 2023
1 parent 1898a40 commit 54e8d23
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 31 deletions.
10 changes: 6 additions & 4 deletions cli/commands/chain/types/archway.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ func NewArchwayCmd(diveContext *common.DiveContext) *cobra.Command {

common.WriteToServiceFile(runResponse.ServiceName, *runResponse)

diveContext.StopSpinner("Archyway Node Started. Please find service details in current working directory(services.json)")
diveContext.StopSpinner("Archway Node Started. Please find service details in current working directory(services.json)")
},
}
archwayCmd.Flags().StringVarP(&config, "config", "c", "", "provide config to start archway node ")
archwayCmd.Flags().StringVarP(&config, "config", "c", "", "path to custom config json file to start archway node ")

return archwayCmd
}
Expand Down Expand Up @@ -170,12 +170,14 @@ func runArchwayWithDefaultServiceConfig(diveContext *common.DiveContext, enclave

}

nodeServiceResponseData, _, _, err := diveContext.GetSerializedData(nodeServiceResponse)
nodeServiceResponseData, services, skippedInstructions, err := diveContext.GetSerializedData(nodeServiceResponse)
if err != nil {

return "", err
diveContext.StopServices(services)
diveContext.FatalError("Starlark Run Failed", err.Error())

}
diveContext.CheckInstructionSkipped(skippedInstructions, "Archway Node Already Running")

return nodeServiceResponseData, nil
}
2 changes: 1 addition & 1 deletion cli/common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package common
var DiveLogs bool

// !!!!!!!!!!! DO NOT UPDATE! WILL BE UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
var DiveVersion = "v0.0.8-beta"
var DiveVersion = "v0.0.9-beta"

const (
DiveEnclave = "dive"
Expand Down
36 changes: 11 additions & 25 deletions cli/common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,42 +212,28 @@ func WriteToServiceFile(serviceName string, data DiveserviceResponse) error {
return err
}

if len(jsonDataFromFile) != 0 {
_, ok := jsonDataFromFile[serviceName]
if !ok {
jsonDataFromFile[serviceName] = &data
dataTowrite, err := json.Marshal(jsonDataFromFile)
if err != nil {
return err
}

_, err = file.WriteAt(dataTowrite, 0)

if err != nil {
return err
}

return nil
}

if len(jsonDataFromFile) == 0 {
jsonDataFromFile = Services{}
}
newServices := Services{}

newServices[serviceName] = &data
var dataToWrite []byte

dataTowrite, err := json.Marshal(newServices)
if err != nil {
return err
_, ok := jsonDataFromFile[serviceName]
if !ok {
jsonDataFromFile[serviceName] = &data
dataToWrite, err = json.Marshal(jsonDataFromFile)
if err != nil {
return err
}
}

_, err = file.Write(dataTowrite)
_, err = file.Write(dataToWrite)

if err != nil {
return err
}

return nil

}

func ReadServiceJsonFile() (Services, error) {
Expand Down
2 changes: 1 addition & 1 deletion cli/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/briandowns/spinner v1.23.0
github.com/fatih/color v1.15.0
github.com/google/go-github v17.0.0+incompatible
github.com/kurtosis-tech/kurtosis/api/golang v0.82.5
github.com/kurtosis-tech/kurtosis/api/golang v0.82.6
github.com/kurtosis-tech/stacktrace v0.0.0-20211028211901-1c67a77b5409
github.com/natefinch/lumberjack v2.0.0+incompatible
github.com/sirupsen/logrus v1.9.3
Expand Down

0 comments on commit 54e8d23

Please sign in to comment.