PRC-20
The Basics
PRC-20 is a token inscription protocol on Polygon. The protocol's state is determined by sequentially indexing all Polygon transactions. This standard is a modified version of the Ethscription protocol, adapted to account for the unique circumstances and history of inscription activities on the Polygon network.
POLScription start block height: 46203695
Deploy
Note: Only deploy operations initiated by Externally Owned Accounts (EOAs) are considered valid.
Deploy From EOAs
https://polygonscan.com/tx/0x32268efc55fa082d90b5a9c968e97c42678f365f5ec2f8d29fbc3c36171c2a75
data:,{"p":"prc-20","op":"deploy","tick":"pols","max":"2100000000000000","lim":"100000000"}
Param | IsRequired | Description |
---|---|---|
p | Y | POLScription, strictly to 'prc-20' |
op | Y | Operation type: deploy |
tick | Y | Token name |
max | Y | Total token supply |
lim | Y | Mint token quantity limit max%lim=0 |
Mint
Note: Only mint operations initiated by Externally Owned Accounts (EOAs) are considered valid.
Mint From EOAs
The transaction hash of the transaction in which a POLScription was created is that POLScription's unique inscription id.
The recipient of the creation transaction is the POLScription's initial owner. The sender of the creation transaction is the POLScription's creator.
TxValue needs to be 0.
https://polygonscan.com/tx/0x7a0afb65ffe35f53ede9f3641f0f40e34138ad1c5074de2ca330527932de9444
data:,{"p":"prc-20","op":"mint","tick":"pols","amt":"100000000"}
Param | IsRequired | Description |
---|---|---|
p | Y | POLScription, strictly to 'prc-20' |
op | Y | Operation type: mint |
tick | Y | Token name |
amt | Y | Mint lim, must equal to the lim of deploy operation |
Transfer
The protocol defines for each POLScription a list of valid POLScription transfers. This list is ordered first by block number, then transaction index, then log index (in the case the transfer was triggered by an event).
Single Transferring From EOAs
Any Ethereum transaction whose input data is a POLScription id as defined above is a valid POLScription transfer, provided the transaction sender is the POLScription's owner. Because internal transactions from smart contracts do not have input data, this method only works for EOAs.
Example:
https://polygonscan.com/tx/0x5e7e894bf46df4f82322f8629c8c1f17609d36b18fdf90648ba9bb306104a77d
0x5ba39d9c463ae47a8e4a1147d13da71a326832727c7e9ff8633dcad81c9dc206
Batch Transferring From EOAs, Under ESIP-5
Example: https://polygonscan.com/tx/0x475f9f6ac76039f6a86763af1328e0aee7fea46344795b3e09877f38726150d0
If the input data of a transaction (without its leading 0x
) is a sequence of 1 or more valid POLScription ids (without their leading 0x
), that transaction will constitute a valid transfer for each POLScription that is owned by the transaction's creator. Read more.
Transferring From Smart Contracts, Under ESIP-1
If a contract emits ethscriptions_protocol_TransferEthscription
(signature below), the protocol should register a valid POLScription transfer from the emitting contract to recipient
of the ethscription
with id ethscriptionId
, provided the emitting contract owns that POLScription when emitting the event.
Transferring From Smart Contracts, Under ESIP-2
If a contract emits ethscriptions_protocol_TransferEthscriptionForPreviousOwner
, the protocol should register a valid POLScription transfer from the emitting contract to recipient
of the POLScription with id ethscriptionId
, provided:
- The emitting contract owns the POLScription with id
ethscriptionId
when it emits the event - The POLScription's previous owner was
previousOwner
.
Updated 4 months ago