CelsiusX
Search…
Wrapped Asset Contract Functionality

Minting

The current minting protocol provides insight into the process that underlies many core functions of wrapped tokens and the isomorphic proof of reserve as a whole. Specifically, functions that enable minting to a target chain or withdrawing from a vault incorporate a secondary oracle check to ensure that there are enough tokens in reserve and that tokens don't get undercollateralized, respectively.
1
function mint(address account, uint256 amount) returns (bool)
Copied!
msg.sender: the account that supplies the asset
account: the address to which the tokens will be minted
RETURN: true on success

Burning

The burn function enables the asset on the wrapped chain to be burned, removing it from circulation.
1
function burn(address account, uint256 amount) returns (bool)
Copied!
msg.sender: the account that owns the asset
account: the address from which the tokens will be burned
RETURN: true on success

Revoking Tokens

The administrator can remove tokens from any address and optionally send the removed tokens to a different address.
1
function revoke(address from, uint256 amount) returns (bool)
2
function revokeToAddress(address from, address to, uint256 amount) returns (bool)
Copied!
from: the account from which the tokens will be revoked
to: the address to which the tokens will be moved
amount: the amount of tokens to be revoked
RETURN: true on success

Whitelisting

The whitelist suite of functions enable keeping track of whitelists and, for admins, updating the entries. The whitelists are used to check if the sender and receiver are configured to allow a transfer. An address can only be a member of a single whitelist at a time.
1
function checkWhitelistAllowed(address sender, address receiver) returns (bool)
Copied!
sender: the sender's address
receiver: the receiver's address
RETURN: true on success or no whitelists enabled
1
function addToWhitelist(address addressToAdd, uint8 whitelist)
2
function removeFromWhitelist(address addressToRemove)
Copied!
addressToAdd: the address to be added to the whitelist
whitelist: specific whitelist to be added onto
addressToRemove: address to be removed (no whitelist name required since addresses can only be on a single whitelist)

Blacklisting

The blacklist suite of functions work analagously to whitelists, allowing users to keep track of blacklists and, for admins, updating the entries. The blacklists are used to check if the sender and receiver are configured to allow a transfer. An address can only be a member of a single blacklist at a time.
1
function checkBlacklistAllowed(address sender, address receiver) returns (bool)
Copied!
sender: the sender's address
receiver: the receiver's address
RETURN: true on success or no blacklists enabled
1
function addToBlacklist(address addressToAdd)
2
function removeFromBlacklist(address addressToRemove)
Copied!
addressToAdd: the address to be added to the whitelist
addressToRemove: addres to be removed