-
Notifications
You must be signed in to change notification settings - Fork 30
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
Methods mig to zbox #1685
base: sprint-1.18
Are you sure you want to change the base?
Methods mig to zbox #1685
Conversation
Sprint 1.18
Add method for wasm type
core/client/set.go
Outdated
@@ -324,6 +326,7 @@ func InitSDK(walletJSON string, | |||
return err | |||
} | |||
SetSdkInitialized(true) | |||
node.SetIsWasm(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't force it for everyone using gosdk.
Set it in wasm initialisation and mobile initialisation (we need to use it on mobile as well, perhaps change the name to something resonable).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This InitSdk method is being called from both sdks only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it is called from other repos using gosdk as well. We need to get it in input. Gosdk is used in 0box, blobber, CLIs and 0chain. Everywhere it can't use 0box.
zcncore/get_data.go
Outdated
@@ -177,7 +181,7 @@ func GetMinerSCNodeInfo(id string) ([]byte, error) { | |||
return nil, err | |||
} | |||
|
|||
return client.MakeSCRestAPICall(MinerSmartContractAddress, GET_MINERSC_NODE, Params{ | |||
return node.MakeSCRestAPICallToSharder(MinerSmartContractAddress, GET_MINERSC_NODE, Params{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not use 0box calls here? If not why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not used by any sdk (wasm or mobile).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zcncore/get_data.go
Outdated
} | ||
|
||
func GetMiners(active, stakable bool, limit, offset int) ([]byte, error) { | ||
if err := CheckConfig(); err != nil { | ||
return nil, err | ||
} | ||
|
||
return client.MakeSCRestAPICall(MinerSmartContractAddress, GET_MINERSC_MINERS, Params{ | ||
return node.MakeSCRestAPICallToSharder(MinerSmartContractAddress, GET_MINERSC_MINERS, Params{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SAA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still we can use "MakeSCRestAPICall" to protect in future. It will not create any problem right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not implemented in zbox
zcncore/get_data.go
Outdated
@@ -213,7 +220,7 @@ func GetSharders(active, stakable bool, limit, offset int) ([]byte, error) { | |||
return nil, err | |||
} | |||
|
|||
return client.MakeSCRestAPICall(MinerSmartContractAddress, GET_MINERSC_SHARDERS, Params{ | |||
return node.MakeSCRestAPICallToSharder(MinerSmartContractAddress, GET_MINERSC_SHARDERS, Params{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here and in multiple places in same file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same reason
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes
Fixes
Tests
Tasks to complete before merging PR:
Associated PRs (Link as appropriate):