Policy Workflow Step 25

Next, we click on the β€œmint_events”, and then add a mint action by clicking on the β€œTokens” drop-down in the top navigation bar and selecting the β€œMint” action.

Select the token you want to mint from the token drop down.

You can use the rule field to enter minting calculations that are specific to your policy. We define the Rule to be 1, meaning we will mint exactly the number of tokens defined in the MRV schema multiplied by 1.

Then we click on the β€œSave” button on the left side in the top navigation bar.

Programmatically this workflow step looks like this:

    //Minting
    {
      //"mintDocumentBlock" - receives the VC from the previous block and mints based on the rule[s].
      "blockType": "mintDocumentBlock",
      "tag": "mint_token",
      //"tokenId" - ID of the token
      // User should be previously linked with token.
      "tokenId": "0.0.26063342",
      // Rules under which the number of tokens is calculated. Math operations are supported, e.g. the following:
      //  data = { amount: 2 }
      //  rule = "amount * 10"
      // will result in 20 tokens.
      "rule": "1",
      "uiMetaData": {}
    }
  ]
}

Last updated