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

add utils.tx.encodeStructTypeTags #28

Merged
merged 2 commits into from Jun 27, 2021
Merged

add utils.tx.encodeStructTypeTags #28

merged 2 commits into from Jun 27, 2021

Conversation

wk3368
Copy link
Collaborator

@wk3368 wk3368 commented Jun 27, 2021

  1. add utils.tx.encodeStructTypeTags: while generating ScriptFunction, we need to encode a string array into a TypeTag array
  2. add 2 test cases
  3. update the existing associated codes
  4. modify CHANGELOG
  5. bump version to 1.3.0

demo 1:

 [ '0x1::STC::STC' ]

  [
    {
      "Struct": {
        "address": "0x1",
        "module": "STC",
        "name": "STC",
        "type_params": []
      }
    }
  ]

demo2:

  [
    '0x1::STC::STC',
    '0x1::OnChainConfigDao::OnChainConfigUpdate<0x1::TransactionPublishOption::TransactionPublishOption>'
  ]


  [
    {
      "Struct": {
        "address": "0x1",
        "module": "STC",

        "name": "STC",
        "type_params": []
      }
    },
    {
      "Struct": {
        "address": "0x1",
        "module": "OnChainConfigDao",
        "name": "OnChainConfigUpdate",
        "type_params": [
          {
            "Struct": {
              "address": "0x1",
              "module": "TransactionPublishOption",
              "name": "TransactionPublishOption",
              "type_params": []
            }
          }
        ]
      }
    }
  ]

@wk3368 wk3368 requested review from nanne007 and tarvos21 June 27, 2021 04:07
@wk3368 wk3368 merged commit 282d1a6 into master Jun 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants