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

Fix/refactor zboxcore mobilesdk fixes #1633

Open
wants to merge 100 commits into
base: sprint-1.19
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
6232578
expose GetBlobbers method.
yash10019coder Oct 4, 2024
41d74b3
expose GetStorageConfig method.
yash10019coder Oct 4, 2024
a663839
expose ConvertToValue method.
yash10019coder Oct 4, 2024
dae2ef2
Merge branch 'fix/refactor-zboxcore' of github.com:0chain/gosdk into …
yash10019coder Oct 4, 2024
9e6cc0a
exposed staking, unstaking and collect reward methods for miners, sha…
yash10019coder Oct 4, 2024
e2d9cbd
expose GetStakePoolUserInfo.
yash10019coder Oct 4, 2024
e3c8286
Fix
Jayashsatolia403 Oct 5, 2024
43ae0c1
Setup auth
Jayashsatolia403 Oct 6, 2024
0798c08
fix: fixed restriction setup
YarikRevich Sep 29, 2024
9129f74
fix: fixed bugs
YarikRevich Sep 30, 2024
7c80f4c
fix: fixed bugs
YarikRevich Oct 2, 2024
d9a4d8a
fix: fixed bugs
YarikRevich Oct 2, 2024
9c757d4
fix: fixed bugs
YarikRevich Oct 3, 2024
7c937b1
fix: fixed bugs
YarikRevich Oct 5, 2024
5d61294
Fix
Jayashsatolia403 Oct 6, 2024
84b4833
add docs for expose GetStakePoolUserInfo method.
yash10019coder Oct 7, 2024
eb98429
expose VerifyTransaction method.
yash10019coder Oct 7, 2024
90b641f
expose GetTransactions method in gosdk.
yash10019coder Oct 10, 2024
73c00c0
expose GetFeesTable method.
yash10019coder Oct 10, 2024
a7179c2
fix: error initializing sdk.
yash10019coder Oct 10, 2024
9fe872f
Merge branch 'fix/refactor-zboxcore' of github.com:0chain/gosdk into …
yash10019coder Oct 11, 2024
a5fb305
fix: GetTransactions method.
yash10019coder Oct 14, 2024
7d9c82f
fix: init_node.go network initialization.
yash10019coder Oct 14, 2024
9bd0b1c
Merge branch 'fix/refactor-zboxcore' of github.com:0chain/gosdk into …
yash10019coder Oct 14, 2024
e271ce6
fix: sdk not initialized error for zboxcore methods.
yash10019coder Oct 14, 2024
270e868
refactor: add provider type field in StakePoolDelegatePoolInfo.
yash10019coder Oct 14, 2024
e7d3f0f
debug: mobile build flagsin mobilesdk/sdk.go.
yash10019coder Oct 14, 2024
f6e55b8
debug: playground script.
yash10019coder Oct 14, 2024
6a7efd5
refactor: combined blobber and miner/sharder user stake pool info.
yash10019coder Oct 14, 2024
fb7a466
go mod tidy
yash10019coder Oct 14, 2024
d6696c7
fix: add provider id in StakePoolDelegatePoolInfo.
yash10019coder Oct 14, 2024
ceb0b37
expose: GetConfig method.
yash10019coder Oct 14, 2024
79e1bd8
remove faucet method from mobilesdk.
yash10019coder Oct 14, 2024
884e4e6
Merge branch 'fix/refactor-zboxcore' of github.com:0chain/gosdk into …
yash10019coder Oct 16, 2024
6658cc4
fix: InitStorageSDK method error.
yash10019coder Oct 16, 2024
d80d6fe
refactor: add custom fees to all of the mobilesdk methods for staking…
yash10019coder Oct 16, 2024
1d1b9cc
refactor: add fees in sendZCN.
yash10019coder Oct 16, 2024
fe4c8bc
fix: wasmsdk send token to pass fee parameter.
yash10019coder Oct 16, 2024
dd34eee
expose: client.Sign
yash10019coder Oct 20, 2024
7cef159
Merge branch 'fix/refactor-zboxcore' into fix/refactor-zboxcore-mobil…
Jayashsatolia403 Oct 20, 2024
6370ea7
Merge branch 'fix/refactor-zboxcore' into fix/refactor-zboxcore-mobil…
Jayashsatolia403 Oct 21, 2024
a5a3f5f
Merge branch 'sprint-1.18' of github.com:0chain/gosdk into fix/refact…
yash10019coder Oct 22, 2024
ed290f3
fix mobilesdk methods.
yash10019coder Oct 22, 2024
619b640
Merge branch 'sprint-1.18' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Oct 22, 2024
45b4d5e
fix: send txn pass fee mobilesdk.
yash10019coder Oct 22, 2024
4ad5e70
nit fix.
yash10019coder Oct 22, 2024
d890a2b
Merge branch 'sprint-1.18' of github.com:0chain/gosdk into fix/refact…
yash10019coder Oct 23, 2024
5c6115c
fix: zwalletcli build error.
yash10019coder Oct 23, 2024
fb9d904
go mod tidy.
yash10019coder Oct 23, 2024
d5453c4
Merge branch 'sprint-1.18' of github.com:0chain/gosdk into fix/refact…
yash10019coder Oct 24, 2024
1b26dce
fix errors after merge conflicts.
yash10019coder Oct 24, 2024
ce60981
fix: lint.
yash10019coder Oct 24, 2024
fa89c88
fix: CreateThumbnail method.
yash10019coder Oct 24, 2024
0aabfae
Merge branch 'sprint-1.18' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Oct 25, 2024
4d44f83
Merge branch 'sprint-1.18' into fix/refactor-zboxcore-mobilesdk-fixes
Jayashsatolia403 Oct 27, 2024
3ff9be1
revert network config changes.
yash10019coder Oct 27, 2024
e9fbde1
Merge branch 'sprint-1.18' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Oct 28, 2024
6313913
nit fix init_node.go
yash10019coder Oct 28, 2024
d148f0b
Merge branch 'sprint-1.18' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Oct 28, 2024
e20c598
remove: withParams in get_data.go unused
yash10019coder Nov 1, 2024
6f87297
add: mobile build flags in mobilesdk/../sdk.go
yash10019coder Nov 1, 2024
7e7b313
fix: sanitize inputs in SignRequest mobilesdk method.
yash10019coder Nov 1, 2024
1ac888b
Merge branch 'sprint-1.18' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Nov 1, 2024
8c6721d
revert: play.go
yash10019coder Nov 1, 2024
03f3b2c
Merge branch 'sprint-1.18' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Nov 2, 2024
08f4c98
Merge branch 'sprint-1.18' into fix/refactor-zboxcore-mobilesdk-fixes
Jayashsatolia403 Nov 2, 2024
cdda18e
fix: add input sanitization for RedeemFreeStorage method in mobilesdk…
yash10019coder Nov 4, 2024
9c5b214
Merge branch 'sprint-1.18' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Nov 4, 2024
54dfae0
refactor: using methods for staking, unstaking and collect rewards fr…
yash10019coder Nov 4, 2024
4531ab2
expose: GetBlobberByID
yash10019coder Nov 4, 2024
57e739c
Merge branch 'sprint-1.18' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Nov 6, 2024
ac55873
Merge branch 'sprint-1.18' into fix/refactor-zboxcore-mobilesdk-fixes
Jayashsatolia403 Nov 11, 2024
be79089
fix: add registerkmszauth server
yash10019coder Nov 11, 2024
a5a6d02
Merge branch 'sprint-1.18' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Nov 12, 2024
f11ea45
Merge branch 'sprint-1.18' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Nov 12, 2024
a7b8d9a
Merge branch 'staging' into fix/refactor-zboxcore-mobilesdk-fixes
Jayashsatolia403 Nov 13, 2024
15f0fd2
feat: add StorageSCCollectReward in execute_transactions.go
yash10019coder Nov 14, 2024
2235178
Merge branch 'staging' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Nov 14, 2024
8e6844b
Fix authCommon for mobile
peterlimg Nov 15, 2024
33e1ec2
Add get allocationsOfClient
peterlimg Nov 17, 2024
6353377
Merge branch 'staging' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Dec 26, 2024
00b4ba9
fix: duplicate method in wallet_base.go.
yash10019coder Dec 26, 2024
b67cf80
fix: wasmsdk build.
yash10019coder Dec 27, 2024
95d0a90
go mod tidy.
yash10019coder Dec 27, 2024
4a427c3
Merge branch 'staging' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Jan 23, 2025
b5f50f0
nit fix.
yash10019coder Jan 23, 2025
1e90546
fix wasm build.
yash10019coder Jan 23, 2025
560bb5a
go mod tidy
yash10019coder Jan 23, 2025
2144ad9
nit fix.
yash10019coder Jan 23, 2025
1249fca
change runner to github runners.
yash10019coder Jan 23, 2025
f81125d
Merge branch 'staging' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Jan 23, 2025
2f25a34
Merge branch 'sprint-1.19' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Jan 23, 2025
797102f
Merge branch 'sprint-1.19' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Jan 24, 2025
f673b4b
Fix
peterlimg Jan 31, 2025
0f6a9e2
Merge branch 'sprint-1.19' into fix/mobile-sdk-peter
peterlimg Jan 31, 2025
3dbfd06
Fix build error
peterlimg Jan 31, 2025
965a3cc
Merge branch 'sprint-1.19' into fix/refactor-zboxcore-mobilesdk-fixes
yash10019coder Feb 13, 2025
abc7cc3
fix zcncore/get_data.go
yash10019coder Feb 15, 2025
ed14691
go mod tidy
yash10019coder Feb 16, 2025
f157030
nit fix unit tests.
yash10019coder Feb 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions core/client/init_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (n *Node) ShouldUpdateNetwork() (bool, *conf.Network, error) {
if err != nil {
return false, nil, err
}
network, err := GetNetwork(n.clientCtx)
network, err := GetNetwork(n.clientCtx, cfg.BlockWorker)
Jayashsatolia403 marked this conversation as resolved.
Show resolved Hide resolved
if err != nil {
logging.Error("Failed to get network details ", zap.Error(err), zap.String("block_worker", cfg.BlockWorker))
return false, nil, err
Expand Down Expand Up @@ -126,10 +126,7 @@ func Init(ctx context.Context, cfg conf.Config) error {
// set default value for options if unset
setOptionsDefaultValue(&cfg)

//init packages
conf.InitClientConfig(&cfg)

network, err := GetNetwork(ctx)
network, err := GetNetwork(ctx, cfg.BlockWorker)
if err != nil {
logging.Error("Failed to get network details ", zap.Error(err), zap.Any("block_worker", cfg.BlockWorker))
return err
Expand All @@ -144,6 +141,8 @@ func Init(ctx context.Context, cfg conf.Config) error {
clientCtx: ctx,
}

//init packages
conf.InitClientConfig(&cfg)
InitCache(nodeClient.sharders)

// update Network periodically
Expand Down Expand Up @@ -181,12 +180,8 @@ func GetNode() (*Node, error) {
}

// GetNetwork gets current network details from 0chain network.
func GetNetwork(ctx context.Context) (*conf.Network, error) {
cfg, err := conf.GetClientConfig()
if err != nil {
return nil, err
}
networkUrl := cfg.BlockWorker + "/network"
func GetNetwork(ctx context.Context, blockWorker string) (*conf.Network, error) {
Jayashsatolia403 marked this conversation as resolved.
Show resolved Hide resolved
networkUrl := blockWorker + "/network"
networkGetCtx, networkGetCancelCtx := context.WithTimeout(ctx, 60*time.Second)
defer networkGetCancelCtx()
req, err := util.NewHTTPGetRequestContext(networkGetCtx, networkUrl)
Expand Down
2 changes: 1 addition & 1 deletion core/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package version

const VERSIONSTR = "v1.17.9-218-g7b354b71"
const VERSIONSTR = "v1.17.9-237-g90b641fe"
21 changes: 20 additions & 1 deletion mobilesdk/sdk/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
coreTransaction "github.com/0chain/gosdk/core/transaction"
"math"
"strconv"
"strings"
Expand Down Expand Up @@ -71,8 +72,10 @@ func Init(chainConfigJson string) error {
cfg := conf.Config{}
err := json.Unmarshal([]byte(chainConfigJson), &cfg)
if err != nil {
return err
return errors.WithMessage(err, "failed to unmarshal chain config")
}
l.Logger.Info("InitSDK chain config")
l.Logger.Info(cfg)
return client.Init(context.Background(), cfg)
}

Expand Down Expand Up @@ -358,6 +361,11 @@ func (s *StorageSDK) GetVersion() string {
return version.VERSIONSTR
}

// GetVersion getting current version for gomobile lib
func GetVersion() string {
return version.VERSIONSTR
}

// UpdateAllocation update allocation settings with new expiry and size
// - size: size of space reserved on blobbers
// - extend: extend allocation
Expand Down Expand Up @@ -385,6 +393,17 @@ func (s *StorageSDK) GetBlobbersList() (string, error) {
return string(retBytes), nil
}

// GetStorageConfig get storage config
// configType: storage_sc_config, miners_sc_globals, miner_sc_configs
func GetStorageConfig(configType string) ([]byte, error) {
configBytes, err := coreTransaction.GetConfig(configType)
retBytes, err := json.Marshal(configBytes)
if err != nil {
return nil, err
}
return retBytes, nil
}

// GetAllocations return back list of allocations for the wallet
// Extracted from main method, bcz of class fields
func GetAllocations() (string, error) {
Expand Down
238 changes: 238 additions & 0 deletions mobilesdk/zcn/execute_transactions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
package zcn

import (
"encoding/json"
"errors"
"github.com/0chain/gosdk/zcncore"
)

// MinerStakePoolLock locks the stake pool for the miner.
// # Inputs
// - providerId: provider id
// - lock: lock amount
func MinerStakePoolLock(providerId string, lock int64) ([]byte, error) {
if tokenValidation(lock) != nil {
return nil, tokenValidation(lock)
}

_, _, _, txn, err := zcncore.MinerSCLock(providerId, zcncore.ProviderMiner, uint64(lock))

if err != nil {
return nil, errors.New("Error in MinerSCLock: " + err.Error())
}

byteTxn, err := json.Marshal(txn)
if err != nil {
return nil, errors.New("Error in Encoding txn: " + err.Error())
}
return byteTxn, nil
}

// MinerStakePoolUnlock unlocks the stake pool for the miner.
// # Inputs
// - providerId: provider id
func MinerStakePoolUnlock(providerId string) ([]byte, error) {
_, _, _, txn, err := zcncore.MinerSCUnlock(providerId, zcncore.ProviderMiner)

if err != nil {
return nil, errors.New("Error in MinerSCUnlock: " + err.Error())
}
byteTxn, err := json.Marshal(txn)
if err != nil {
return nil, errors.New("Error in Encoding txn: " + err.Error())
}
return byteTxn, nil
}

// MinerCollectReward collects the reward from the miner smart contract.
// # Inputs
// - providerId: provider id
func MinerCollectReward(providerId string) ([]byte, error) {
_, _, _, txn, err := zcncore.MinerSCCollectReward(providerId, zcncore.ProviderMiner)

if err != nil {
return nil, errors.New("Error in MinerSCCollectReward: " + err.Error())
}
byteTxn, err := json.Marshal(txn)
if err != nil {
return nil, errors.New("Error in Encoding txn: " + err.Error())
}
return byteTxn, nil
}

// BlobberStakePoolLock locks the stake pool for the blobber.
// # Inputs
// - providerId: provider id
// - lock: lock amount
func BlobberStakePoolLock(providerId string, lock int64) ([]byte, error) {
if tokenValidation(lock) != nil {
return nil, tokenValidation(lock)
}

_, _, _, txn, err := zcncore.StorageSCStakePoolLock(providerId, zcncore.ProviderBlobber, uint64(lock))

if err != nil {
return nil, errors.New("Error in BlobberSCLock: " + err.Error())
}

byteTxn, err := json.Marshal(txn)
if err != nil {
return nil, errors.New("Error in Encoding txn: " + err.Error())
}
return byteTxn, nil
}

// BlobberStakePoolUnlock unlocks the stake pool for the blobber.
// # Inputs
// - providerId: provider id
func BlobberStakePoolUnlock(providerId string) ([]byte, error) {
_, _, _, txn, err := zcncore.StorageSCStakePoolUnlock(providerId, zcncore.ProviderBlobber)

if err != nil {
return nil, errors.New("Error in BlobberSCUnlock: " + err.Error())
}
byteTxn, err := json.Marshal(txn)
if err != nil {
return nil, errors.New("Error in Encoding txn: " + err.Error())
}
return byteTxn, nil
}

// BlobberCollectReward locks the stake pool for the blobber.
// # Inputs
// - providerId: provider id
func BlobberCollectReward(providerId string) ([]byte, error) {
_, _, _, txn, err := zcncore.StorageSCCollectReward(providerId, zcncore.ProviderBlobber)

if err != nil {
return nil, errors.New("Error in BlobberSCCollectReward: " + err.Error())
}
byteTxn, err := json.Marshal(txn)
if err != nil {
return nil, errors.New("Error in Encoding txn: " + err.Error())
}
return byteTxn, nil
}

// SharderStakePoolLock locks the stake pool for the sharder.
// # Inputs
// - providerId: provider id
// - lock: lock amount
func SharderStakePoolLock(providerId string, lock int64) ([]byte, error) {
if tokenValidation(lock) != nil {
return nil, tokenValidation(lock)
}

_, _, _, txn, err := zcncore.MinerSCLock(providerId, zcncore.ProviderSharder, uint64(lock))

if err != nil {
return nil, errors.New("Error in SharderSCLock: " + err.Error())
}

byteTxn, err := json.Marshal(txn)
if err != nil {
return nil, errors.New("Error in Encoding txn: " + err.Error())
}
return byteTxn, nil
}

// SharderStakePoolUnlock unlocks the stake pool for the sharder.
// # Inputs
// - providerId: provider id
func SharderStakePoolUnlock(providerId string) ([]byte, error) {
_, _, _, txn, err := zcncore.MinerSCUnlock(providerId, zcncore.ProviderSharder)

if err != nil {
return nil, errors.New("Error in SharderSCUnlock: " + err.Error())
}
byteTxn, err := json.Marshal(txn)
if err != nil {
return nil, errors.New("Error in Encoding txn: " + err.Error())
}
return byteTxn, nil
}

func SharderCollectReward(providerId string) ([]byte, error) {
_, _, _, txn, err := zcncore.MinerSCCollectReward(providerId, zcncore.ProviderSharder)

if err != nil {
return nil, errors.New("Error in SharderSCCollectReward: " + err.Error())
}
byteTxn, err := json.Marshal(txn)
if err != nil {
return nil, errors.New("Error in Encoding txn: " + err.Error())
}
return byteTxn, nil
}

func SendZCN(senderClientId string, tokens int64, description string) ([]byte, error) {
if tokenValidation(tokens) != nil {
return nil, tokenValidation(tokens)

}

_, _, _, txn, err := zcncore.Send(senderClientId, uint64(tokens), description)

if err != nil {
return nil, errors.New("Error in SendZCN: " + err.Error())
}
byteTxn, err := json.Marshal(txn)
if err != nil {
return nil, errors.New("Error in Encoding txn: " + err.Error())
}
return byteTxn, nil

}

// Faucet sends tokens to the user.
// # Inputs
// - tokens: tokens to send
// - input: input
func Faucet(tokens int64, input string) ([]byte, error) {
Jayashsatolia403 marked this conversation as resolved.
Show resolved Hide resolved
if tokenValidation(tokens) != nil {
return nil, tokenValidation(tokens)
}

_, _, _, txn, err := zcncore.Faucet(uint64(tokens), input)

if err != nil {
return nil, errors.New("Error in Faucet: " + err.Error())
}
byteTxn, err := json.Marshal(txn)
if err != nil {
return nil, errors.New("Error in Encoding txn: " + err.Error())
}
return byteTxn, nil
}

// VerifyTransaction verifies the transaction.
// # Inputs
// - hash: hash of the transaction
func VerifyTransaction(hash string) ([]byte, error) {
txn, err := zcncore.VerifyTransaction(hash)
if err != nil {
return nil, errors.New("Error in VerifyTransaction: " + err.Error())
}
byteTxn, err := json.Marshal(txn)
if err != nil {
return nil, errors.New("Error in Encoding txn: " + err.Error())
}
return byteTxn, nil
}

func tokenValidation(tokens int64) error {
if tokens <= 0 {
return errors.New("negative or zero tokens not allowed")
}
return nil
}

func getProviderType(providerType int) zcncore.Provider {
switch providerType {
case 0:
return zcncore.ProviderMiner
case 1:
return zcncore.ProviderSharder
}
return zcncore.ProviderMiner
}
13 changes: 13 additions & 0 deletions zboxcore/sdk/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,19 @@ func getBlobbersInternal(active, stakable bool, limit, offset int) (bs []*Blobbe
return wrap.Nodes, nil
}

func GetBlobbersPaged(active, stakable bool, limit, offset int) ([]*Blobber, error) {
if !client.IsSDKInitialized() {
return nil, sdkNotInitialized
}

blobbers, err := getBlobbersInternal(active, stakable, limit, offset)
if err != nil {
return nil, err
}

return blobbers, nil
}

// GetBlobbers returns list of blobbers.
// - active: if true then only active blobbers are returned
// - stakable: if true then only stakable blobbers are returned
Expand Down
24 changes: 24 additions & 0 deletions zcncore/execute_transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,26 @@ func MinerSCKill(providerId string, providerType Provider) (hash, out string, no

}

func StorageSCStakePoolLock(providerId string, providerType Provider, lock uint64) (hash, out string, nonce int64, txn *transaction.Transaction, err error) {
return transaction.SmartContractTxnValue(StorageSmartContractAddress, transaction.SmartContractTxnData{
Name: transaction.STORAGESC_STAKE_POOL_LOCK,
InputArgs: &stakePoolRequest{
ProviderID: providerId,
ProviderType: providerType,
},
}, lock)
}

func StorageSCStakePoolUnlock(providerId string, providerType Provider) (hash, out string, nonce int64, txn *transaction.Transaction, err error) {
return transaction.SmartContractTxn(StorageSmartContractAddress, transaction.SmartContractTxnData{
Name: transaction.STORAGESC_STAKE_POOL_UNLOCK,
InputArgs: &stakePoolRequest{
ProviderID: providerId,
ProviderType: providerType,
},
})
}

func StorageSCCollectReward(providerId string, providerType Provider) (hash, out string, nonce int64, txn *transaction.Transaction, err error) {
return transaction.SmartContractTxn(StorageSmartContractAddress, transaction.SmartContractTxnData{
Name: transaction.STORAGESC_COLLECT_REWARD,
Expand Down Expand Up @@ -215,3 +235,7 @@ func Faucet(tokens uint64, input string) (hash, out string, nonce int64, txn *tr
InputArgs: input,
}, tokens)
}

func VerifyTransaction(hash string) (txn *transaction.Transaction, err error) {
return transaction.VerifyTransaction(hash)
}
Loading