From 61655a7a93dd9f6cbc38e756be9c6008da8df1f5 Mon Sep 17 00:00:00 2001 From: AstaFrode Date: Mon, 5 Aug 2024 17:00:41 +0800 Subject: [PATCH] update sdk (#279) --- cmd/console/claim.go | 2 +- cmd/console/exit.go | 2 +- cmd/console/increase.go | 4 ++-- cmd/console/run.go | 2 +- cmd/console/update.go | 2 +- cmd/console/withdraw.go | 2 +- configs/config.go | 12 +++++------- go.mod | 2 +- go.sum | 4 ++-- pkg/confile/confile.go | 8 +++++--- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/cmd/console/claim.go b/cmd/console/claim.go index da5ed920..09dc8817 100644 --- a/cmd/console/claim.go +++ b/cmd/console/claim.go @@ -55,7 +55,7 @@ func Command_Claim_Runfunc(cmd *cobra.Command, args []string) { } defer cli.Close() - err = cli.InitExtrinsicsName() + err = cli.InitExtrinsicsNameForMiner() if err != nil { out.Err("The rpc address does not match the software version, please check the rpc address.") os.Exit(1) diff --git a/cmd/console/exit.go b/cmd/console/exit.go index 8bd33f51..1c42a96b 100644 --- a/cmd/console/exit.go +++ b/cmd/console/exit.go @@ -54,7 +54,7 @@ func Command_Exit_Runfunc(cmd *cobra.Command, args []string) { } defer cli.Close() - err = cli.InitExtrinsicsName() + err = cli.InitExtrinsicsNameForMiner() if err != nil { out.Err("The rpc address does not match the software version, please check the rpc address.") os.Exit(1) diff --git a/cmd/console/increase.go b/cmd/console/increase.go index fcc5d2db..4e41ea95 100644 --- a/cmd/console/increase.go +++ b/cmd/console/increase.go @@ -90,7 +90,7 @@ func increaseStakingCmd_Runfunc(cmd *cobra.Command, args []string) { } defer cli.Close() - err = cli.InitExtrinsicsName() + err = cli.InitExtrinsicsNameForMiner() if err != nil { out.Err("The rpc address does not match the software version, please check the rpc address.") os.Exit(1) @@ -152,7 +152,7 @@ func increaseSpaceCmd_Runfunc(cmd *cobra.Command, args []string) { } defer cli.Close() - err = cli.InitExtrinsicsName() + err = cli.InitExtrinsicsNameForMiner() if err != nil { out.Err("The rpc address does not match the software version, please check the rpc address.") os.Exit(1) diff --git a/cmd/console/run.go b/cmd/console/run.go index ec85eb8e..afe9f2d2 100644 --- a/cmd/console/run.go +++ b/cmd/console/run.go @@ -84,7 +84,7 @@ func runCmd(cmd *cobra.Command, args []string) { } defer cli.Close() - err = cli.InitExtrinsicsName() + err = cli.InitExtrinsicsNameForMiner() if err != nil { out.Err("The rpc address does not match the software version, please check the rpc address.") os.Exit(1) diff --git a/cmd/console/update.go b/cmd/console/update.go index 4b7e45db..6d5b7d98 100644 --- a/cmd/console/update.go +++ b/cmd/console/update.go @@ -81,7 +81,7 @@ func updateEarningsAccount(cmd *cobra.Command) { } defer cli.Close() - err = cli.InitExtrinsicsName() + err = cli.InitExtrinsicsNameForMiner() if err != nil { out.Err("The rpc address does not match the software version, please check the rpc address.") os.Exit(1) diff --git a/cmd/console/withdraw.go b/cmd/console/withdraw.go index 766da55d..88915f95 100644 --- a/cmd/console/withdraw.go +++ b/cmd/console/withdraw.go @@ -38,7 +38,7 @@ func Command_Withdraw_Runfunc(cmd *cobra.Command, args []string) { } defer cli.Close() - err = cli.InitExtrinsicsName() + err = cli.InitExtrinsicsNameForMiner() if err != nil { out.Err("The rpc address does not match the software version, please check the rpc address.") os.Exit(1) diff --git a/configs/config.go b/configs/config.go index 0268d763..8a26d9e0 100644 --- a/configs/config.go +++ b/configs/config.go @@ -10,26 +10,24 @@ package configs import "time" const ( + // TokenTCESS = 1000000000000000000 // the time to wait for the event, in seconds TimeToWaitEvent = time.Duration(time.Second * 30) - // Default config file + // default config file DefaultConfigFile = "conf.yaml" // DefaultWorkspace = "/" // DefaultServicePort = 4001 // - DefaultRpcAddr = "wss://testnet-rpc.cess.cloud/ws/" - + DefaultRpcAddr = "wss://testnet-rpc.cess.network/ws/" // - DefaultBootNodeAddr = "_dnsaddr.boot-miner-testnet.cess.cloud" + DefaultBootNodeAddr = "_dnsaddr.boot-miner-testnet.cess.network" // - DefaultDeossAddr = "https://deoss-pub-gateway.cess.cloud/" - + DefaultDeossAddr = "https://deoss-pub-gateway.cess.network/" // MinTagFileSize = 600000 - // FileMode = 0755 ) diff --git a/go.mod b/go.mod index 5fdbb7c4..992432e6 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21 toolchain go1.21.12 require ( - github.com/CESSProject/cess-go-sdk v0.6.1 + github.com/CESSProject/cess-go-sdk v0.6.2-0.20240805070224-ca5be6963b49 github.com/CESSProject/cess_pois v0.5.15 github.com/CESSProject/p2p-go v0.4.0 github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce diff --git a/go.sum b/go.sum index 4002ff11..0e074329 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,8 @@ dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/CESSProject/cess-go-sdk v0.6.1 h1:ZjrpoSjBbLv+Eqpsq03qEQkehL3hG/AQuVPEk7cUah0= -github.com/CESSProject/cess-go-sdk v0.6.1/go.mod h1:L5IDeS2ydsdgtdybzhWk9fIdBsDkU2XrQyo5mrWHkdQ= +github.com/CESSProject/cess-go-sdk v0.6.2-0.20240805070224-ca5be6963b49 h1:6a58IgBudMSK0YsRvdxDsNgAPqyowfrrgKCXfQ5IP6I= +github.com/CESSProject/cess-go-sdk v0.6.2-0.20240805070224-ca5be6963b49/go.mod h1:L5IDeS2ydsdgtdybzhWk9fIdBsDkU2XrQyo5mrWHkdQ= github.com/CESSProject/cess_pois v0.5.15 h1:oQH8xEtxVzB+SeI+gNS6iSeFgjb/xDAsmgyuoF3al28= github.com/CESSProject/cess_pois v0.5.15/go.mod h1:rztEZjjG+MbKzVgh5WtQcZc/7ZDkBvDNABc7Em8BKPc= github.com/CESSProject/p2p-go v0.4.0 h1:Eh8SJ6aFoLLsl0rr9+bmgs82fi/nHHa8xWF58IcsnLo= diff --git a/pkg/confile/confile.go b/pkg/confile/confile.go index 83467cd5..d282797e 100644 --- a/pkg/confile/confile.go +++ b/pkg/confile/confile.go @@ -23,10 +23,12 @@ import ( const DefaultProfile = "conf.yaml" const TempleteProfile = `# The rpc endpoint of the chain node Rpc: - - "wss://testnet-rpc.cess.cloud/ws/" + # testnet + - "wss://testnet-rpc.cess.network/ws/" # Bootstrap Nodes Boot: - - "_dnsaddr.boot-miner-testnet.cess.cloud" + # testnet + - "_dnsaddr.boot-miner-testnet.cess.network" # Signature account mnemonic Mnemonic: "" # Staking account @@ -36,7 +38,7 @@ StakingAcc: "" # earnings account EarningsAcc: "" # Service workspace -Workspace: / +Workspace: "" # P2P communication port Port: 4001 # Maximum space used, the unit is GiB