UA
Unit of Account (UA) is a USDC-backed token used as the unit of account accross Increment
Methods
DEFAULT_ADMIN_ROLE
Returns
_0
bytes32
undefined
EMERGENCY_ADMIN
Returns
_0
bytes32
undefined
GOVERNANCE
Returns
_0
bytes32
undefined
addReserveToken
Parameters
newReserveToken
contract IERC20Metadata
undefined
tokenMintCap
uint256
undefined
allowance
Parameters
_0
address
undefined
_1
address
undefined
Returns
_0
uint256
undefined
approve
Sets amount
as the allowance of spender
over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
Parameters
spender
address
undefined
amount
uint256
undefined
Returns
_0
bool
undefined
balanceOf
Parameters
_0
address
undefined
Returns
_0
uint256
undefined
changeReserveTokenMaxMintCap
Parameters
token
contract IERC20Metadata
undefined
newMintCap
uint256
undefined
decimals
Returns
_0
uint8
undefined
getNumReserveTokens
Return the number of reserve tokens
Returns
_0
uint256
Number of reserve tokens
getReserveToken
Get details of a reserve token
Parameters
tokenIdx
uint256
Index of the reserve token to get details from
Returns
_0
IUA.ReserveToken
undefined
getRoleAdmin
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
role
bytes32
undefined
Returns
_0
bytes32
undefined
grantRole
Grants role
to account
. If account
had not been already granted role
, emits a {RoleGranted} event. Requirements: - the caller must have role
's admin role. May emit a {RoleGranted} event.
Parameters
role
bytes32
undefined
account
address
undefined
hasRole
Returns true
if account
has been granted role
.
Parameters
role
bytes32
undefined
account
address
undefined
Returns
_0
bool
undefined
initialReserveToken
Returns
_0
contract IERC20Metadata
undefined
isEmergencyAdmin
Parameters
account
address
undefined
Returns
_0
bool
undefined
isGovernor
Parameters
account
address
undefined
Returns
_0
bool
undefined
mintWithReserve
Mint UA with a whitelisted token
Parameters
token
contract IERC20Metadata
Address of the reserve token to mint UA with
amount
uint256
Amount of reserve token. Might not be 18 decimals
name
Returns
_0
string
undefined
pause
paused
Returns true if the contract is paused, and false otherwise.
Returns
_0
bool
undefined
renounceRole
Revokes role
from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked role
, emits a {RoleRevoked} event. Requirements: - the caller must be account
. May emit a {RoleRevoked} event.
Parameters
role
bytes32
undefined
account
address
undefined
revokeRole
Revokes role
from account
. If account
had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must have role
's admin role. May emit a {RoleRevoked} event.
Parameters
role
bytes32
undefined
account
address
undefined
supportsInterface
See {IERC165-supportsInterface}.
Parameters
interfaceId
bytes4
undefined
Returns
_0
bool
undefined
symbol
Returns
_0
string
undefined
totalSupply
Returns
_0
uint256
undefined
transfer
Moves amount
tokens from the caller's account to to
. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
Parameters
to
address
undefined
amount
uint256
undefined
Returns
_0
bool
undefined
transferFrom
Moves amount
tokens from from
to to
using the allowance mechanism. amount
is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
Parameters
from
address
undefined
to
address
undefined
amount
uint256
undefined
Returns
_0
bool
undefined
unpause
withdraw
Burn UA in exchange of a whitelisted token
Parameters
token
contract IERC20Metadata
Address of whitelisted reserve token to withdraw in
amount
uint256
UA amount. 18 decimals
Events
Approval
Parameters
owner indexed
address
undefined
spender indexed
address
undefined
value
uint256
undefined
Paused
Parameters
account
address
undefined
ReserveTokenAdded
Emitted when new reserve token is added
Parameters
newToken indexed
contract IERC20Metadata
undefined
numReserveTokens
uint256
undefined
ReserveTokenMaxMintCapUpdated
Emitted when the max mint cap of a reserve token is updated
Parameters
token indexed
contract IERC20Metadata
undefined
newMintCap
uint256
undefined
RoleAdminChanged
Parameters
role indexed
bytes32
undefined
previousAdminRole indexed
bytes32
undefined
newAdminRole indexed
bytes32
undefined
RoleGranted
Parameters
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
RoleRevoked
Parameters
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
Transfer
Parameters
from indexed
address
undefined
to indexed
address
undefined
value
uint256
undefined
Unpaused
Parameters
account
address
undefined
Errors
UA_ExcessiveTokenMintCapReached
Emitted when the UA amount to mint with the token exceed the max cap of this token
UA_ReserveTokenAlreadyAssigned
Emitted when the proposed reserve token is already registered
UA_ReserveTokenZeroAddress
Emitted when the proposed reserve token address is equal to the zero address
UA_UnsupportedReserveToken
Emitted when the token provided isn't supported by UA as a reserve token
Last updated