Skip to content

Commit

Permalink
update gosdk, fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Kishan-Dhakan committed Sep 10, 2023
1 parent 7ec8656 commit 8c1bc55
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions cmd/auth-register.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,18 @@ func registerAuthorizerInChain(bc *zcnbridge.BridgeClient, args ...*Arg) {

trx, err := transaction.AddAuthorizer(context.Background(), input)
if err != nil {
log.Fatal(err, "failed to add authorizer with transaction: '%s'", trx.Hash)
log.Fatal(err, "failed to add authorizer with transaction: '%s'", trx.GetHash())
}

log.Printf("Authorizer submitted OK... " + trx.Hash)
log.Printf("Starting verification: " + trx.Hash)
log.Printf("Authorizer submitted OK... " + trx.GetHash())
log.Printf("Starting verification: " + trx.GetHash())

err = trx.Verify(context.Background())
if err != nil {
if strings.Contains(err.Error(), "already exists") {
ExitWithError("Authorizer has already been added to 0Chain... Continue")
} else {
ExitWithError(errors.Wrapf(err, "failed to verify transaction: '%s'", trx.Hash))
ExitWithError(errors.Wrapf(err, "failed to verify transaction: '%s'", trx.GetHash()))
}
}
}
6 changes: 3 additions & 3 deletions cmd/bridge-burn-zcn.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ func commandBurnZCN(b *zcnbridge.BridgeClient, args ...*Arg) {
fmt.Println("Starting burn transaction")
transaction, err := b.BurnZCN(context.Background(), zcncore.ConvertToValue(amount), 0)
if err == nil {
fmt.Printf("Submitted burn transaction %s\n", transaction.Hash)
fmt.Printf("Submitted burn transaction %s\n", transaction.GetHash())
} else {
ExitWithError(err)
}

fmt.Printf("Starting transaction verification %s\n", transaction.Hash)
fmt.Printf("Starting transaction verification %s\n", transaction.GetHash())
err = transaction.Verify(context.Background())
if err != nil {
ExitWithError(err)
}

fmt.Printf("Transaction completed successfully: %s\n", transaction.Hash)
fmt.Printf("Transaction completed successfully: %s\n", transaction.GetHash())
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module github.com/0chain/zwalletcli

require (
github.com/0chain/gosdk v1.8.18-0.20230903070813-70b7f1ad22c8
github.com/0chain/gosdk v1.10.1-0.20230909235127-c53c7c9812a3
github.com/ethereum/go-ethereum v1.10.26
github.com/icza/bitio v1.1.0
github.com/olekukonko/tablewriter v0.0.5
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ github.com/0chain/common v0.0.6-0.20230127095721-8df4d1d72565 h1:z+DtCR8mBsjPnEs
github.com/0chain/common v0.0.6-0.20230127095721-8df4d1d72565/go.mod h1:UyDC8Qyl5z9lGkCnf9RHJPMektnFX8XtCJZHXCCVj8E=
github.com/0chain/errors v1.0.3 h1:QQZPFxTfnMcRdt32DXbzRQIfGWmBsKoEdszKQDb0rRM=
github.com/0chain/errors v1.0.3/go.mod h1:xymD6nVgrbgttWwkpSCfLLEJbFO6iHGQwk/yeSuYkIc=
github.com/0chain/gosdk v1.8.18-0.20230903070813-70b7f1ad22c8 h1:8nLz88/MpgMK0wDAgPFI00g+o/QHcTo5tGPc5Uey9fA=
github.com/0chain/gosdk v1.8.18-0.20230903070813-70b7f1ad22c8/go.mod h1:3NKNYzmnMIYqZwwwOgZwMmTW1DT1ZUAmKyVPmYQOiT4=
github.com/0chain/gosdk v1.10.1-0.20230909235127-c53c7c9812a3 h1:l6UjIpWE/udt3LbxQHAGU/+8vLPrVflXZkUKr8+1/1M=
github.com/0chain/gosdk v1.10.1-0.20230909235127-c53c7c9812a3/go.mod h1:/AYFyM6A7rBWk/AoAy/oClmNnpdznvA9d7ND2rhSGJI=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Luzifer/go-openssl/v3 v3.1.0 h1:QqKqo6kYXGGUsvtUoCpRZm8lHw+jDfhbzr36gVj+/gw=
Expand Down Expand Up @@ -207,7 +207,7 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T
github.com/herumi/bls-go-binary v1.31.0 h1:L1goQ2tMtGgpXCg5AwHAdJQpLs/pfnWWEc3Wog6OhmI=
github.com/herumi/bls-go-binary v1.31.0/go.mod h1:O4Vp1AfR4raRGwFeQpr9X/PQtncEicMoOe6BQt1oX0Y=
github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao=
github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o=
github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c h1:DZfsyhDK1hnSS5lH8l+JggqzEleHteTYfutAiVlSUM8=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
Expand Down Expand Up @@ -329,7 +329,7 @@ github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+F
github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8=
github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U=
github.com/urfave/cli/v2 v2.24.1 h1:/QYYr7g0EhwXEML8jO+8OYt5trPnLHS0p3mrgExJ5NU=
github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa h1:5SqCsI/2Qya2bCzK15ozrqo2sZxkh0FHynJZOTVoV6Q=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down

0 comments on commit 8c1bc55

Please sign in to comment.