How to lock a Peperium asset

obi
3 min readJul 4, 2023

--

When Peperium assets were created back in the day, the owner of the asset didn’t always lock the card.
This can result in the owner issuing more supply (aka minting).

The source code of the contracts aren’t verified on etherscan unfortunately (still looking for someone who can help me with that, DM me).

But the OG https://twitter.com/BokkyPooBah had done some work for the RARE Peperium token in the past and included this contract link: https://github.com/bokkypoobah/RAREPeperiumToken/blob/master/contracts/CardToken.sol

Here’s a screenshot from the contract telling us that the owner can execute the “lock()” function to prevent more being minted:

The Peperium contract is almost the same as the Curio Cards contract, see here for a difference between the two (curio on the left, peperium on the right). For an example of the contract code on etherscan check out “Apple” (curio card #1): https://etherscan.io/address/0x6Aa2044C7A0f9e2758EdAE97247B03a0D7e73d6c#code

Ok, back to locking.. Here’s the ABI needed when you’re gonna lock an asset:

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"standard","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"description","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"target","type":"address"},{"name":"mintedAmount","type":"uint256"}],"name":"mintToken","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"ipfs_hash","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"desc","type":"string"}],"name":"setDescription","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isLocked","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"lock","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"initialSupply","type":"uint256"},{"name":"tokenName","type":"string"},{"name":"tokenSymbol","type":"string"},{"name":"tokenDescription","type":"string"},{"name":"ipfsHash","type":"string"}],"payable":false,"type":"constructor"},{"payable":false,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]

Next, you need the contract address of the card you’re going to lock, here’s a spreadsheet with all info: https://docs.google.com/spreadsheets/d/1vd_95vKxMG4UWv6VLEXbEnZkY2GauZhd9mzBbzFkSCU/edit#gid=0

For example “PEPESTREET” (Series 1, Card 2), contract address “0x51b41e61B654EA852679E374171F08f35119e255”

Now you have these 2, go to https://www.myetherwallet.com/wallet/interact
Connect the wallet that owns this contract and fill in the contract address and the ABI, like this (and click “Interact”)

Now, on the next screen, you can select all the functions in the contract:

You can execute the “isLocked” function which returns the locked status:

So when you’re the owner of this contract, you can execute the “lock” function (click “write”):

When done, you can verify it when calling the isLocked function again:

--

--

No responses yet