Skip to content

Commit

Permalink
expose getSkatePoolInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
boddumanohar committed Mar 13, 2023
1 parent 1c48cc6 commit 2d5bc92
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/version/version.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

//====== THIS IS AUTOGENERATED FILE. DO NOT MODIFY ========

package version
const VERSIONSTR = "v1.8.13-14-gc7fcc2a5"

const VERSIONSTR = "v1.8.13-67-gea230fef"
11 changes: 11 additions & 0 deletions wasmsdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,17 @@ unlocks tokens on a provider

> returns time where the tokens can be unlocked
### zcn.sdk.getSkatePoolInfo

get the details of the stakepool associated with provider
**Input**:

> [providerType](https://github.com/0chain/gosdk/blob/bc96f54e68a68ef5d757428b9c4153405ebe4163/zboxcore/sdk/sdk.go#L1186-L1194) int, providerID string
**Output**:

> [sdk.StakePoolInfo](https://github.com/0chain/gosdk/blob/2ec97a9bb116db166e31c0207971282e7008d22c/zboxcore/sdk/sdk.go#L263-L275), err
### zcn.sdk.getWalletBalance

get wallet balance
Expand Down
10 changes: 10 additions & 0 deletions wasmsdk/allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,16 @@ func unlockStakePool(providerType int, providerID, fee string) (int64, error) {
return unstake, err
}

func getSkatePoolInfo(providerType int, providerID string) (*sdk.StakePoolInfo, error) {

info, err := sdk.GetStakePoolInfo(sdk.ProviderType(providerType), providerID)

if err != nil {
return nil, err
}
return info, err
}

// GetReadPoolInfo is to get information about the read pool for the allocation
func getReadPoolInfo(clientID string) (*sdk.ReadPool, error) {
readPool, err := sdk.GetReadPoolInfo(clientID)
Expand Down
1 change: 1 addition & 0 deletions wasmsdk/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ func main() {
"getReadPoolInfo": getReadPoolInfo,
"lockStakePool": lockStakePool,
"lockWritePool": lockWritePool,
"getSkatePoolInfo": getSkatePoolInfo,
"unlockStakePool": unlockStakePool,
"decodeAuthTicket": decodeAuthTicket,

Expand Down

0 comments on commit 2d5bc92

Please sign in to comment.