uwu-token-v1-1-0
The uwu-token-v1-1-0
contract is a fungible token implementation compatible with the SIP-010 standard. It functions as the primary token minted and burnt by the uwu-factory-v1-1-0
contract. The token is minted when users deposit STX as collateral into the uwu-factory-v1-1-0
contract and borrow UWU against it, and burnt when users deposit UWU.
Data Storage
These structures allow the contract to maintain its state, track information, and ensure data consistency throughout the contract's lifecycle.
CONTRACT_OWNER
A constant representing the principal authorized to make parameter changes to the contract. The CONTRACT_OWNER
can only issue changes to the oracle proxy (unless frozen) and update token metadata. The CONTRACT_OWNER
is not authorized to perform any other actions.
token-uri
A data variable that stores a link to the metadata associated with the token, including the token's name, symbol, description, and image.
Public Functions
These functions are accessible by external contracts or users, enabling interaction with the contract and state modification.
set-token-uri
A public function, callable by the contract owner, that updates the token URI associated with the token.
transfer
A public function that enables the transfer of a specified amount of tokens from the sender to a recipient, with an optional memo parameter.
mint
A public function that mints a specified amount of tokens to a principal. This function can only be called by the uwu-factory-v1-1-0
contract.
burn
A public function that burns a specified amount of tokens from a principal. This function can only be called by the uwu-factory-v1-1-0
contract.
Private Functions
These functions are accessible only within the contract they are defined in, providing encapsulation and preventing external access to specific functionality.
This contract does not contain any private functions
Read-only Functions
These functions do not modify the contract's state and are used for querying or retrieving data. They can be called by external contracts or users but will not change the underlying state.
get-name
A read-only function that returns the token's name.
get-symbol
A read-only function that returns the token's symbol.
get-decimals
A read-only function that returns the token's number of decimals.
get-total-supply
A read-only function that returns the current total supply of tokens.
get-balance
A read-only function that returns the token balance of a specified principal.
get-token-uri
A read-only function that returns the token URI associated with the token.
Last updated