From 8c1bc55ae69bdd54203c2206de94addacd9f2894 Mon Sep 17 00:00:00 2001 From: Kishan Dhakan Date: Sun, 10 Sep 2023 12:19:30 +0100 Subject: [PATCH] update gosdk, fix errors --- cmd/auth-register.go | 8 ++++---- cmd/bridge-burn-zcn.go | 6 +++--- go.mod | 2 +- go.sum | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/auth-register.go b/cmd/auth-register.go index 98d10a44..8cd209ed 100644 --- a/cmd/auth-register.go +++ b/cmd/auth-register.go @@ -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())) } } } diff --git a/cmd/bridge-burn-zcn.go b/cmd/bridge-burn-zcn.go index c3e810fd..660a12e7 100644 --- a/cmd/bridge-burn-zcn.go +++ b/cmd/bridge-burn-zcn.go @@ -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()) } diff --git a/go.mod b/go.mod index c8e38a58..bbc1b626 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 0a8da6eb..24f1480b 100644 --- a/go.sum +++ b/go.sum @@ -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= @@ -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= @@ -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=