Skip to content

Releases: thesixnetwork/six-data-chain-sdk

release-v3.4.0

24 Apr 04:21
Compare
Choose a tag to compare

Add new cosmos module (

  • cosmos stake
  • cosmos distribution
  • cosmos tx
  • six protocol token manager
  • six protocol admin

release-v3.1.1

03 Feb 07:58
Compare
Choose a tag to compare
  • export fee cosmjs

release-v3.1.0

03 Feb 04:12
Compare
Choose a tag to compare
  • update interface
  • auto gas estimate

release-v3.0.0

31 Jan 09:11
Compare
Choose a tag to compare

Update

account module

  • rename function privateKeyToAccount -> mnemonicKeyToAccount
  • add function privateKeyToAccount // can use private key for get account

release-v2.6.0

27 Dec 10:05
Compare
Choose a tag to compare

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

13 Dec 10:09
Compare
Choose a tag to compare
  • update example

release-v2.5.7

08 Dec 14:12
Compare
Choose a tag to compare

update

  • update default prefix 6nft to 6x

release-v2.5.6

01 Dec 08:55
Compare
Choose a tag to compare

typo fix again

release-v2.5.5

01 Dec 08:47
Compare
Choose a tag to compare
  • fix typo

release-v2.5.4

28 Oct 04:42
Compare
Choose a tag to compare
  • fix cache node_module