@@ -25,120 +25,66 @@ Let's get started!
25
25
26
26
** Step 1: Authenticate and Locate Marmalade v2 in Chainweaver**
27
27
28
- To begin, you need to authenticate on Chainweaver. Once you're authenticated,
29
- navigate to the Module Explorer to find the Marmalade v2 contracts.
28
+ First, authenticate yourself on Chainweaver. After authentication, make your way to the Module Explorer and search for the Marmalade V2 contracts.
30
29
31
- In the Module Explorer, search for the following string :
30
+ Specifically, enter this string into the Module Explorer :
32
31
33
32
```
34
- marmalade-v2.ledger
33
+ marmalade-v2.util-v1
35
34
```
36
35
37
- This will locate the Marmalade v2 contracts .
36
+ This leads you to the Marmalade V2 util contract, which boasts easy mint functions for your convenience .
38
37
39
- Once you find the contracts, click on "View" to proceed .
38
+ Once located, select "View" to continue .
40
39
41
- ** Step 2: Create a Token ID **
40
+ ** Step 2: Enter token details **
42
41
43
- ![ Screenshot Placeholder] ( /assets/marmalade/01-create-token-01 .png )
42
+ ![ Screenshot Placeholder] ( /assets/marmalade/1.easy-mint .png )
44
43
45
- ` token-id ` 's in marmalade are hash value of the token information, such as the
46
- uri, policies, precision, and creation guard. You can create the token-id by
47
- clicking on the ` create-token-id ` function, and filling in the token components
48
- listed below
44
+ ``
45
+ We will start by adding the required data for toke creation.
46
+ Click on the ` create-mint-nft ` function, and filling in the token components
47
+ listed below.
49
48
50
- 1 . ** Precision** : Enter ` 0 ` , just like you did when creating the token ID.
51
- 2 . ** URL** : Use the same URI you used when creating the token ID. In our
52
- example, it was ` your-token-uri ` .
53
- 3 . ** Policies** : In this field you can add some of the default or custom
54
- policies that you want to apply to the token. We'll be using an utility
55
- function , ` marmalade-v2.util-v1.create-policies ` to create a ` DEFAULT `
56
- setting token. The DEFAULT refers to tokens with policies,
57
- ` non-fungible-policy ` and ` guard-policy ` , which allows token-owners to add
58
- guards for marmalade functions, and enforce that token is one and
59
- only. 4.** creation-guard** : This guard is not stored but is used to reserve
60
- the ` token-id ` . The guard is required to sign at creation.
49
+ 1 . ** URI** : Enter the off-chain URI that stores the token metadata.
50
+ 2 . ** guard** : This guard will be account guard of the minted token. We need to
51
+ locate the keyset information in the transaction data field, by adding in
52
+ ` (read-keyset "my-keyset") `
61
53
62
- We are not going to submit this transaction, because what we need is the string
63
- value from the ` Preview ` . If you click ` Next ` until you see a ` Submit button ` ,
64
- you'll see the token ID in the preview section. In our example, the ` token-id `
65
- is ` t:YMO4JzGYoQdIIDJHLoGDdOo-Cyin3oCqncT__MAe2qw ` .
54
+ ** Note:** By default, ` create-mint-nft ` mints a non-fungible token without
55
+ any rules programmed. If you wish to choose different policy options, read
56
+ [ advanced tutorial] ( todo ) . For more information on token policies, please refer to the
57
+ [ Marmalade V2 Token Policies] ( https://github.com/kadena-io/marmalade/tree/v2#token-policies )
58
+ documentation on GitHub.
66
59
67
- ** Step 3: Create a Token**
68
60
69
- Once creating a token ID, the next step is to create a token. You can do this by
70
- calling the ` create-token ` function.
61
+ ** Step 3: Add keyset information**
71
62
72
- ![ Screenshot Placeholder] ( /assets/marmalade/01-create-token-02 .png )
63
+ ![ Screenshot Placeholder] ( /assets/marmalade/2.easy-mint .png )
73
64
74
- You can find this function in the same menu as the ` create-token-id ` function.
75
- Click on "Call" to bring up a similar popup as before. In the Parameters screen,
76
- you'll need to enter the following information:
77
-
78
- 1 . ** Token ID** : Fill in the token-id created in step 2.
79
- 2 . ** Precision** : Enter ` 0 ` , just like you did when creating the token ID.
80
- 3 . ** URL** : Use the same URI you used when creating the token ID. In our
81
- example, it was ` your-token-uri ` .
82
- 4 . ** Policies** : Again, we'll use util-v1.DEFAULT as our token policies.
65
+ After filling in token details, click on the "configuration" tab to enter
66
+ keyset information. Enter "my-keyset" as keyset name and click "Create".
67
+ Once this is created, you will see your keysets below it. Please tick the keyset
68
+ that matches the account we have been using for this entire process.
83
69
84
- ** Note:** For more information on token policies, please refer to the
85
- [ Marmalade V2 Token Policies] ( https://github.com/kadena-io/marmalade/tree/v2#token-policies )
86
- documentation on GitHub.
70
+ ** Step 5: Sign Transaction**
87
71
88
- Next, go to the Configuration tab. Like last time, paste your account name and
89
- change the gas settings to match the screenshot below.
72
+ ![ Screenshot Placeholder for Gas Settings] ( /assets/marmalade/4.easy-mint.png )
90
73
91
- In the same tab, click on "Advanced" and add a new keyset. In the field, please
92
- enter ` mint_guard ` and hit "Create".
74
+ Now click on the Sign tab. The boxes refer to the code that you would like to
75
+ scope your signature to. Add the gas payer's public key to the first field,
76
+ and enter "(marmalade-v2.util-v1.UTIL-SIGN)", and select the public key that will
77
+ be minted the token.
93
78
94
- ** Mint Guard** : Mint Guards are an optional field that one of our policies,
95
- ` guard-policy-v1 ` takes in. By adding a ` mint-guard ` at creation, you're adding
96
- a guard that needs to be signed at token minting.
79
+ ** Step 4: Submit to Network**
97
80
98
- Once this is created, you will see your keysets below it. Please tick the keyset
99
- that matches the account we have been using for this entire process.
100
-
101
- ![ Screenshot Placeholder for Gas Settings] ( /assets/marmalade/01-create-token-01.png )
102
-
103
- Then, you can go to the Sign tab and follow the same steps as before.
81
+ ![ Screenshot Placeholder for Gas Settings] ( /assets/marmalade/5.easy-mint.png )
104
82
105
83
Finally, go to the Preview tab and submit your transaction if there are no
106
84
errors. This time, we're submitting the transaction, so you'd need a valid gas
107
85
payer with balance. Wait for the transaction to finish. The server result should
108
86
be true.
109
87
110
- ** Step 4: Mint the Token**
111
-
112
- The final step is to mint the token. You can do this by calling the ` mint `
113
- function.
114
-
115
- ![ Screenshot Placeholder] ( /assets/marmalade/02-mint-token-01.png )
116
-
117
- You can find this function in the same menu as the previous functions. Click on
118
- "Call" to bring up a popup. In the Parameters screen, you'll need to enter the
119
- following information, each on a separate line:
120
-
121
- 1 . ** Token ID** : This is the token ID you received in Step X.
122
- 2 . ** Account Address** : This is the address of the account you have been using.
123
- 3 . ** Guards** : Copy and paste ` (read-keyset "account") ` into this field.
124
- 4 . ** Amount** : Set this to ` 1.0 ` as this is an NFT.
125
-
126
- Next, navigate to the Configuration tab. As before, paste your account name in
127
- the relevant field and check the gas settings. Also, the guard we created should
128
- have carried over, please check this on the Advanced tab.
129
-
130
- Now, navigate to the Sign tab. This time, things will be slightly different. We
131
- need to add new capabilities. On the Grant Capabilities section, there is a plus
132
- button on the right-hand side. Click that to add the first one. Please paste the
133
- following into the first field:
134
-
135
- ``` pact
136
- (marmalade-v2.ledger.MINT "{TOKEN_ACCOUNT_IN_QUOTES}" "{RECIEVER_ACCOUNT IN QUOTES}" 1.0)
137
- ```
138
-
139
- You need to choose a key that you've saved as ` mint_guard ` at step 3, and sign
140
- with that key for successful mint.
141
-
142
- ![ Screenshot Placeholder] ( /assets/marmalade/02-mint-token-02.png )
143
88
144
- Again, go to the Preview tab and submit your transaction if there are no errors!
89
+ You've minted your first NFT on marmalade! Investigate the transaction on
90
+ the [ block explorer] ( explorer.chainweb.com ) , and find your token information.
0 commit comments