Comment on page
Quickstart
We can deploy a token that supports the derc-20 divisible protocol like the previous deploy/mint erc-20 etch.
{
"p": "erc-20",
"op": "deploy",
"tick": "etch",
"max": "21000000",
"lim": "1000",
"dlim": "1" // optional, minimum amount limit per div, default 1, dlim <= lim
}
In the deploy ethscription, we added an optional field dlim, which indicates the smallest unit that token can be divided into. The default value is 1. We expect it to be an integer not less than 1, but dlim must be less than lim.
{
"p": "erc-20",
"op": "mint",
"tick": "etch",
"id": "1",
"amt": "1000"
}
{
"p": "derc-20",
"op": "div",
"eid": "0xd66f...2ab614f" // divided erc-20 mint ethscription id
"id": "1", // divide id, range [1 - mint amt/dlim]
"amt": "10" // divide amount, range [dlim - mint amt]
}
Key | Required | Description |
---|---|---|
p | yes | Protocol: derc-20 case-insensitive. Represents the ethscription divide protocol. |
op | yes | Operation: div |
eid | yes | The ethscription id you want to divide |
id | yes | Identifier: divide number. |
amt | yes | The amount of divide ethscription |
When eid is divided, the available balance of eid ethscription will be less amt. The div ethscription will have a transferable balance of amt amount.
The ethscription splitting is recursive, and the divided ethscriptions can be further divided.
{
"p":"derc-20",
"op":"mg",
"inputs":[
"0xd66f...2ab614f",
"0x7880...8acb78d"
],
"output": "0x28d6...6dab8" // optional, merge to the specified ethscription, and generate a new ethscription by default
}
Key | Required | Description |
---|---|---|
p | yes | Protocol: derc-20 case-insensitive. Represents the ethscription divide protocol. |
op | yes | Operation: mg |
inputs | yes | Ethscriptions to be merged |
output | no | The amount of the merged ethscription is transferred to the output ethscription, if not set, transfers to the mg ethscription |
After the ethscriptions in the inputs are merged all available balance will be transferred to the output ethscription or the mg ethscription.
Note: Merged input ethscriptions cannot be used again.
Last modified 3mo ago