Releases: thesixnetwork/six-data-chain-sdk
Releases · thesixnetwork/six-data-chain-sdk
release-v3.4.0
Add new cosmos module (
- cosmos stake
- cosmos distribution
- cosmos tx
- six protocol token manager
- six protocol admin
release-v3.1.1
- export fee cosmjs
release-v3.1.0
- update interface
- auto gas estimate
release-v3.0.0
Update
account module
- rename function privateKeyToAccount -> mnemonicKeyToAccount
- add function privateKeyToAccount // can use private key for get account
release-v2.6.0
Migration Guide
MsgPerformActionByAdmin
FROM: (v2.5.8)
interface MsgPerformActionByAdmin {
creator: string;
nft_schema_code: string;
tokenId: string;
action: string;
ref_id: string;
}
TO: (v2.6.0)
interface ActionParameter {
name: string;
value: string;
}
interface MsgPerformActionByAdmin {
creator: string;
nft_schema_code: string;
tokenId: string;
action: string;
ref_id: string;
parameters: ActionParameter[];
}
How to migrate
FROM: (v2.5.8)
const msg = await rpcClient.msgPerformActionByAdmin({
creator: address,
nft_schema_code: "buakaw99",
tokenId: "2",
action: "use10percentdiscount",
ref_id: "1",
});
To: (v2.6.0) :
const msg = await rpcClient.msgPerformActionByAdmin({
creator: address,
nft_schema_code: "buakaw99",
tokenId: "2",
action: "use10percentdiscount",
ref_id: "1",
parameters: [],
});
in order to add new action to schema you have to add parameters to the action and set the value to empty array or you can set new parameters
file: new-action.json
FROM: (v2.5.8)
{
"name": "new_action",
"desc": "booooooost",
"disable": false,
"when": "meta.GetBoolean('checked_in') == true",
"then": ["meta.SetNumber('points', meta.GetNumber('points') + 10000)"]
}
To: (v2.6.0) :
{
"name": "new_action",
"desc": "booooooost",
"disable": false,
"params": [],
"when": "meta.GetBoolean('started') == true",
"then": ["meta.SetNumber('points', meta.GetNumber('points') + 10000)"]
}
or
{
"name": "new_action",
"desc": "booooooost",
"disable": false,
"params": [
{
"name": "param1",
"desc": "Param1",
"data_type": "number",
"required": true,
"default_value": "10"
}
],
"when": "meta.GetBoolean('started') == true",
"then": [
"meta.SetNumber('points', meta.GetNumber('points') - params['param1'].GetNumber())"
]
}
New Features
- Build in function
- meta.TransferNumber => transfer number from one key to another
- meta.SetDisplayArribute => set display attribute (typo will fix in next version and set to 'SetDisplayAttribute'')
- meta.GetBlockHeight => get current block height
- meta.GetUTCBlockTimestamp => get current block timestamp
- meta.GetBlockTimestampByZone => get current block timestamp by zone
- meta.BlockTimeUTCBefore => check block time and return true/false
- meta.BlockTimeUTCAfter => check block time after and return true/false
- meta.BlockTimeBeforeByZone => check block time before by zone and return true/false
- meta.BlockTimeAfterByZone => check block time after by zone and return true/false
For more information please check here
release-v2.5.8
- update example
release-v2.5.7
update
- update default prefix 6nft to 6x
release-v2.5.6
typo fix again
release-v2.5.5
- fix typo
release-v2.5.4
- fix cache node_module