vBase
ERC20 token traded on the CryptoSwap pool
Methods
DEFAULT_ADMIN_ROLE
Returns
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
EMERGENCY_ADMIN
Returns
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
GOVERNANCE
Returns
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
aggregator
Returns
Name | Type | Description |
---|---|---|
_0 | contract AggregatorV3Interface | undefined |
allowance
Parameters
Name | Type | Description |
---|---|---|
_0 | address | undefined |
_1 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_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
Name | Type | Description |
---|---|---|
spender | address | undefined |
amount | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
balanceOf
Parameters
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
burn
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | undefined |
decimals
Returns
Name | Type | Description |
---|---|---|
_0 | uint8 | undefined |
getIndexPrice
Returns
Name | Type | Description |
---|---|---|
_0 | int256 | undefined |
getRoleAdmin
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
gracePeriod
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | 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
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
hasRole
Returns true
if account
has been granted role
.
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
heartBeat
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
isEmergencyAdmin
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
isGovernor
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
mint
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | undefined |
name
Returns
Name | Type | Description |
---|---|---|
_0 | string | undefined |
perp
Returns
Name | Type | Description |
---|---|---|
_0 | address | 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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
sequencerUptimeFeed
Returns
Name | Type | Description |
---|---|---|
_0 | contract AggregatorV3Interface | undefined |
setGracePeriod
Parameters
Name | Type | Description |
---|---|---|
newGracePeriod | uint256 | undefined |
setHeartBeat
Parameters
Name | Type | Description |
---|---|---|
newHeartBeat | uint256 | undefined |
setSequencerUptimeFeed
Parameters
Name | Type | Description |
---|---|---|
newSequencerUptimeFeed | contract AggregatorV3Interface | undefined |
supportsInterface
See {IERC165-supportsInterface}.
Parameters
Name | Type | Description |
---|---|---|
interfaceId | bytes4 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
symbol
Returns
Name | Type | Description |
---|---|---|
_0 | string | undefined |
totalSupply
Returns
Name | Type | Description |
---|---|---|
_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
Name | Type | Description |
---|---|---|
to | address | undefined |
amount | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_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
Name | Type | Description |
---|---|---|
from | address | undefined |
to | address | undefined |
amount | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
transferPerpOwner
Transfer perp
accountCan only be used at deployment as Perpetual can't transfer ownership afterwards
Parameters
Name | Type | Description |
---|---|---|
recipient | address | Account granted |
Events
Approval
Parameters
Name | Type | Description |
---|---|---|
owner | address | undefined |
spender | address | undefined |
value | uint256 | undefined |
GracePeriodUpdated
Emitted when grace period is updated
Parameters
Name | Type | Description |
---|---|---|
newGracePeriod | uint256 | undefined |
HeartBeatUpdated
Emitted when oracle heart beat is updated
Parameters
Name | Type | Description |
---|---|---|
newHeartBeat | uint256 | undefined |
PerpOwnerTransferred
Parameters
Name | Type | Description |
---|---|---|
sender | address | undefined |
recipient | address | undefined |
RoleAdminChanged
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
previousAdminRole | bytes32 | undefined |
newAdminRole | bytes32 | undefined |
RoleGranted
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
sender | address | undefined |
RoleRevoked
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
sender | address | undefined |
SequencerUptimeFeedUpdated
Emitted when sequencer uptime feed is updated
Parameters
Name | Type | Description |
---|---|---|
newSequencerUptimeFeed | contract AggregatorV3Interface | undefined |
Transfer
Parameters
Name | Type | Description |
---|---|---|
from | address | undefined |
to | address | undefined |
value | uint256 | undefined |
Errors
PerpOwnable_NotOwner
Emitted when the sender is not perp
PerpOwnable_TransferZeroAddress
Emitted when the proposed address is equal to the zero address
VBase_DataNotFresh
Emitted when the latest round's data is older than the oracle's max refresh time
VBase_GracePeriodNotOver
Emitted when Zksync sequencer hasn't been back up for long enough
VBase_IncorrectGracePeriod
Emitted when proposed grace period is outside of the bounds
VBase_IncorrectHeartBeat
Emitted when the proposed heart beat is less than 1 sec second
VBase_InsufficientPrecision
Emitted when the proposed aggregators decimals are less than PRECISION
VBase_InvalidRoundPrice
Emitted when the latest round's price is invalid
VBase_InvalidRoundTimestamp
Emitted when the latest round is incomplete
VBase_SequencerDown
Emitted when Zksync sequencer is down
VBase_SequencerUptimeFeedZeroAddress
Emitted when proposed sequencer uptime feed address is equal to the zero address
Last updated