0chain/gosdk

new wasm functions: `newAllocationTokensToLock` and `updateAllocationTokensToLock`

boddumanohar opened this issue · 2 comments

newAllocationTokensToLock --> given an new allocation request, the parameters should be exactly same as a newallocation and should return the minimum no of tokens to lock in writepool

https://github.com/0chain/0chain/blob/e0abd961d628fa65c87746f21b3f5467b0e0c62b/code/go/0chain.net/smartcontract/storagesc/models.go#L849-L862

newAllocationTokensToLock --> given an update allocation request, the parameters should be exactly same as updateallocation and should return the minimum no of tokens to lock in writepool

https://github.com/0chain/0chain/blob/e0abd961d628fa65c87746f21b3f5467b0e0c62b/code/go/0chain.net/smartcontract/storagesc/models.go#L849-L887

getAllocationMinLock can be used for get min lock tokens for new allocation. I'll add the new endpoint for getting min lock requirements for updating allocation.