dRamp Contract
Contract Roles
Admin (onlyAdmin)
An admin of the contract
DevAddr (onlyDev)
The contract owner
Global Parameters
mintFee
uint256
Fee charged by the dRamp for minting tokens
burnFee
uint256
Fee charged by the dRamp for burning tokens
badgeId
uint256
ID of any badge attached to the dRamp
salePrice
uint256
Sale Price of a token market in the dRamp
soldAccounts
uint256
The number of token markets sold by the dRamp
automatic
bool
Automatically burn and mint tokens
_ve
Address
The collection address attached to the dRamp
Token Market Parameters
status
RampStatus { Pending,
Open,
Close
}
Records the state of the token market
tokenId
uint256
The attached token ID from the collection attached to the dRamp
bountyId
uint256
The bounty attached to the token market
profileId
uint256
The profile attached to the token market
badgeId
uint256
The badge attached to the token market
minted
uint256
The amount of tokens minted by the token market
burnt
uint256
The amount of tokens burnt by the token market
salePrice
uint256
The sale price of the token market. This parameter is null for token markets that are not for sale
maxParters
uint256
The number of partners authorized on a token market.
cap
uint256
A cap on the tax taken by the dRamp on minting and burning operations. This parameter is null for token markets that don't have a cap on their taxes
Functions
updateAdmin - DevAddr
The owner can add/remove other administrators to/from the contract
createProtocol - Admin
This function adds a token market on your dRamp enabling it to mint or burn that token. You can only add approved tokens. The list of approved tokens is available on the page previous to this.
You can also attach a token from the collection attached to the dRamp to enable you to regain your admin privileges in the event you lose access to your wallet but still have the token. The collection address is the _ve parameter which is the last value returned by the getParams function
updateProtocol - Admin
This function updates parameters of a token market on your dRamp. You can use the _close parameter to close the token market.
deleteProtocol - Admin
This function the market associated to the specified token. This is only possible when the token market has burnt as many of the token as it has minted and there is not bounty currently associated with it
mint - Admin
This function enables users to mint tokens from a token market. It's only callable by the dRamp's Admin or Payswap's Admin. The
withdraw - Admin
This withdraws available tokens from the dRamp.
updateIndividualProtocol - Anyone
This function updates parameters of a token market on a dRamp but can be called by anyone who owns to associated token id. You can use the _close parameter to close the token market.
burn - Anyone
This function enables users to burn tokens from a token market
claimPendingRevenue - Anyone
This function enables token market partners to claim their pending revenue on the token market
unlockBounty - Anyone
This function deattaches a bounty from a token market
checkIdentityProof - Anyone
This function checks that an identity token passes membership identity requirements on the associated channel/collection
updateBounty - Anyone
This function enables users to attach a bounty to a token market
addPartner - Anyone
This function enables users to partner with a token market and help it become overcollateralized which is necessary for it to become elligible to mint tokens
buyAccount - Anyone
This function enables users to purchase a token market
buyRamp - Anyone
This function enables users to purchase an entire dRamp. It requires its salePrice to be above 0 though.
updateProfile & updateDevTokenId & updateBadgeId & updateDevFromToken - Anyone
If the Owner needs to change the ownership of the contract, they can call this function.
Last updated
Was this helpful?