Skip to content

Commit fd21984

Browse files
author
ggobugi27
committed
remove outdated information, add easy minting guide
1 parent 414fcd3 commit fd21984

File tree

5 files changed

+42
-240
lines changed

5 files changed

+42
-240
lines changed

packages/apps/docs/src/pages/marmalade/architecture/index.md

+6-9
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ The introduction of the multi-policy model in Marmalade V2, with the inclusion
1313
of middleware contracts like quote-manager and policy-manager, aims to enhance
1414
the user experience by simplifying token creation and management.
1515

16-
![Screenshot Placeholder](/assets/marmalade/architecture.png)
17-
1816
## Ledger
1917

2018
The ledger functions as the primary contract responsible for user interaction,
@@ -46,9 +44,9 @@ Manager provides below.
4644
In Marmalade v1, fixed-quote-policy served as an example for handling the
4745
fungible transfers at sales. With the upgrade to Marmalade V2, we have
4846
integrated this fungible transfer feature inside the Policy Manager, which
49-
includes various interactions between the Policy Manager, and sale contracts.
50-
This allows secure escrowed transfers, creative auctions, guaranteed royalties,
51-
and standardized processes within marketplaces.
47+
includes various interactions between the Policy Manager, policies, and
48+
sale contracts. This allows secure escrowed transfers, creative auctions,
49+
guaranteed royalties, and standardized processes within marketplaces.
5250

5351
**Escrows**
5452

@@ -63,12 +61,11 @@ quoted price from the buyer to an escrow account, disburses a portion of the
6361
reserved fees to the policies, and then remits the remaining quoted price to the
6462
seller.
6563

64+
6665
## Sale Whitelists
6766

68-
The main feature of the sale contracts is that the function controls the final price
69-
of the quote. By managing safe sale contracts, we can provide Marmalade users a
70-
safe way to participate in various sale features such as creative auctions,
71-
while also guaranteeing royalty payout.
67+
The Sale Contract is a contract responsible for updating quotes, thereby allowing
68+
auction system.
7269

7370
**Offical GitHub Link**:
7471
https://github.com/kadena-io/marmalade/blob/v2/test-marmalade-v2.md

packages/apps/docs/src/pages/marmalade/architecture/policies.md

-10
This file was deleted.

packages/apps/docs/src/pages/marmalade/marmalade-v1/migrating-from-v1-to-v2.md

-44
This file was deleted.

packages/apps/docs/src/pages/marmalade/quick-start/easy-mint.md

-87
This file was deleted.

packages/apps/docs/src/pages/marmalade/quick-start/index.md

+36-90
Original file line numberDiff line numberDiff line change
@@ -25,120 +25,66 @@ Let's get started!
2525

2626
**Step 1: Authenticate and Locate Marmalade v2 in Chainweaver**
2727

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.
3029

31-
In the Module Explorer, search for the following string:
30+
Specifically, enter this string into the Module Explorer:
3231

3332
```
34-
marmalade-v2.ledger
33+
marmalade-v2.util-v1
3534
```
3635

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.
3837

39-
Once you find the contracts, click on "View" to proceed.
38+
Once located, select "View" to continue.
4039

41-
**Step 2: Create a Token ID**
40+
**Step 2: Enter token details**
4241

43-
![Screenshot Placeholder](/assets/marmalade/01-create-token-01.png)
42+
![Screenshot Placeholder](/assets/marmalade/1.easy-mint.png)
4443

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.
4948

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")`
6153

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.
6659

67-
**Step 3: Create a Token**
6860

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**
7162

72-
![Screenshot Placeholder](/assets/marmalade/01-create-token-02.png)
63+
![Screenshot Placeholder](/assets/marmalade/2.easy-mint.png)
7364

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.
8369

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**
8771

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)
9073

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.
9378

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**
9780

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)
10482

10583
Finally, go to the Preview tab and submit your transaction if there are no
10684
errors. This time, we're submitting the transaction, so you'd need a valid gas
10785
payer with balance. Wait for the transaction to finish. The server result should
10886
be true.
10987

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)
14388

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

Comments
 (0)