Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(stakepool): added lock_period and locked_at #272

Merged
merged 11 commits into from
Jul 30, 2022
3 changes: 3 additions & 0 deletions cmd/stakepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func printStakePoolInfo(info *sdk.StakePoolInfo) {
fmt.Println(" status: ", dp.Status)
fmt.Println(" round_created: ", dp.RoundCreated)
fmt.Println(" unstake: ", dp.UnStake)
fmt.Println(" staked_at: ", dp.StakedAt.String())
}
}
// settings
Expand Down Expand Up @@ -64,6 +65,7 @@ func printStakePoolUserInfo(info *sdk.StakePoolUserInfo) {
fmt.Println(" status: ", dp.Status)
fmt.Println(" round_created: ", dp.RoundCreated)
fmt.Println(" unstake: ", dp.UnStake)
fmt.Println(" staked_at: ", dp.StakedAt.String())
}
}
}
Expand Down Expand Up @@ -259,6 +261,7 @@ func init() {
"tokens to lock, required")
spLock.PersistentFlags().Float64("fee", 0.0,
"transaction fee, default 0")

spLock.MarkFlagRequired("tokens")
spLock.MarkFlagRequired("blobber_id")

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/0chain/errors v1.0.3
github.com/0chain/gosdk v1.8.5
github.com/0chain/gosdk v1.8.6-0.20220718002742-1d56de3eb9db
github.com/icza/bitio v1.1.0
github.com/olekukonko/tablewriter v0.0.5
github.com/spf13/cobra v1.4.0
Expand Down Expand Up @@ -64,4 +64,4 @@ require (
)

// temporary, for development
// replace github.com/0chain/gosdk => ../gosdk
//replace github.com/0chain/gosdk => ../gosdk
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
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.5 h1:vZGart1W3pijEF3mhGk3d4CBsrRo4iqLxORY7rRkIP4=
github.com/0chain/gosdk v1.8.5/go.mod h1:JeaXA7gbncHoYbKixUnM58+7S2E9z7IKYY+fV0IQJ/o=
github.com/0chain/gosdk v1.8.6-0.20220718002742-1d56de3eb9db h1:174q/1MxP7yQHdZknBsbKvRW/93i5vhRJruz9P/wrR0=
github.com/0chain/gosdk v1.8.6-0.20220718002742-1d56de3eb9db/go.mod h1:JeaXA7gbncHoYbKixUnM58+7S2E9z7IKYY+fV0IQJ/o=
github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM=
github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I=
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo=
Expand Down