> For the complete documentation index, see [llms.txt](https://lunarspace.gitbook.io/lunarspace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lunarspace.gitbook.io/lunarspace/derp/web3-stack/derp-launchpad/derp.frontend/derp-sbt-contract.md).

# dERP SBT Contract

Controlled dPASS Minting

***Lunarspace created a 'soulbound token' or SBT that is used for access control. This token is called the dPASS.***

The dERP SBT Contract is used to manage the creation, minting and control of the dPASS tokens. The contract uses the mint message to mint a new dPASS token, which requires the input of the owner of the token, and an optional input of ***‘token\_uri’***. The ***‘add\_minter’*** message is used to add a minter to the contract, which is a user who is authorized to mint new dPASS tokens. This message requires the input of minter which is the address of the user who will be added as minter. The ***‘remove\_minter’*** message is used to remove a minter from the contract, which is a user who is no longer authorized to mint new dERP SBT tokens. This message also requires the ***"address"*** of the user to be passed as a parameter in the object.

The ***‘enable\_admin’*** message type is used to grant admin privileges to a user. This message also requires the ***"address"*** of the user to be passed as a parameter in the object.

## Token Management

The dERP SBT Contract is focused on the management of the dERP tokens (SBT). The instantiate message type takes in three required parameters: admin, name, and symbol. The admin parameter is a string that represents the admin address of the SBT, the name parameter is a string that represents the name of the SBT, and the symbol parameter is a string that represents the symbol of the SBT.

The execute message type in the dERP SBT Contract contains three options: **‘mint’**, ***‘add\_minter’*** and ***‘remove\_minter’***.

* ***'mint'*** message type: used to mint new tokens and requires an object with the owner parameter, which is a string representing the address of the token owner and an optional ***‘token\_uri’*** parameter, which is a string representing the Universal Resource Identifier (URI) of the token.
* ***‘add\_minter’*** message type: used to add a minter address and requires an object with the minter parameter, which is a string representing the minter's address.
* ***‘remove\_minter’*** message type: used to remove a minter address and requires an object with the minter parameter, which is a string representing the minter's address.

## Querying&#x20;

The query message type in the dERP SBT Contract contains two options: ***‘holds\_sbt’*** and ***‘owner\_of’***. The ***‘holds\_sbt’*** message type is used to check if an address holds a certain amount of SBT and requires an object with the ***‘addr’*** parameter, which is a string representing the address. The ***‘owner\_of’*** message type is used to check the owner of a certain token ID and requires an object with the ***‘token\_id’*** parameter, which is an integer representing the token ID.

The dERP SBT Contract includes the ***"total\_supply"*** query which returns the total number of tokens that have been minted. The ***"balance\_of"*** query takes an ***"addr"*** parameter, which is the address of a user, and returns the number of tokens that user holds. The ***"owner\_of"*** query takes a ***"token\_id"*** parameter, which is the unique identifier of a token, and returns the address of the owner of that token.
