FRAX

Ethereum ERC-20 Token 瀏覽鏈

0x853d955acef822db058eb8505911ed77f175b99e

Solidity v0.6.11+commit.5ef660b1

Fungible token following the ERC-20 standard.

🤖
透過你的 AI 查詢此合約
參考: frax-eth 0x853d955acef822db058eb8505911ed77f175b99e
範例提示詞: "Tell me the current state of frax-eth"
還沒有接入 AI?→ mcp.smarts.md · 瀏覽鏈

管理與風險

誰能修改規則?

Detected role based controls from the verified ABI.

Role Based

概覽

讀取函式
39
寫入函式
29
事件
7

讀取函式

Block #25,493,709 · just now
COLLATERAL_RATIO_PAUSER() view → 0xb25402418ad555013210365a422f9f1206b2dd00719998db06f8a1fbe014641b

Return the role identifier used to authorize pausing collateral ratio updates.✨ AI

回傳值

名稱 類型 描述
bytes32 A bytes32 role identifier representing the COLLATERAL_RATIO_PAUSER permission.✨ AI
DEFAULT_ADMIN_ADDRESS() view → 0xa448833bece66fd8803ac0c390936c79b5fd6edf

Returns the contract's default admin address.✨ AI

回傳值

名稱 類型 描述
address The address currently set as the default admin for contract-level permissions.✨ AI
DEFAULT_ADMIN_ROLE() view → 0x0000000000000000000000000000000000000000000000000000000000000000

Returns the bytes32 identifier for the contract's DEFAULT_ADMIN_ROLE.✨ AI

回傳值

名稱 類型 描述
bytes32 bytes32 identifier for the DEFAULT_ADMIN_ROLE used by the contract's access control.✨ AI
allowance(owner: address, spender: address) view

Returns the remaining number of tokens that spender is allowed to transfer from owner.✨ AI

開發者: See {IERC20-allowance}.

參數

名稱 類型 描述
owner address Address that owns the tokens.✨ AI
spender address Address approved to spend the owner's tokens.✨ AI

回傳值

名稱 類型 描述
uint256 Remaining token allowance (uint256) that spender can transfer from owner.✨ AI
balanceOf(account: address) view

Returns the FRAX token balance for the specified account.✨ AI

開發者: See {IERC20-balanceOf}.

參數

名稱 類型 描述
account address Account address whose FRAX balance will be retrieved.✨ AI

回傳值

名稱 類型 描述
uint256 The account's FRAX token balance, expressed in the token's smallest units.✨ AI
collateral_ratio_paused() view → true

Indicates whether collateral ratio adjustments are currently paused.✨ AI

回傳值

名稱 類型 描述
bool True if collateral ratio updates are paused; false if they are active.✨ AI
controller_address() view → 0x0000000000000000000000000000000000000000

Returns the controller contract address that manages FRAX protocol controls.✨ AI

回傳值

名稱 類型 描述
address The controller contract address used to manage protocol parameters and access controls.✨ AI
creator_address() view → 0x234d953a9404bf9dbc3b526271d440cd2870bcd2

Return the contract's creator address.✨ AI

回傳值

名稱 類型 描述
address The address recorded as this contract's creator.✨ AI
decimals() view → 18

Returns the token's number of decimal places.✨ AI

開發者: Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.

回傳值

名稱 類型 描述
uint8 uint8: the number of decimals used for token display and calculation precision.✨ AI
eth_usd_consumer_address() view → 0xba6c6eac41a24f9d39032513f66d738b3559f15a

Returns the address of the ETH/USD price feed consumer contract.✨ AI

回傳值

名稱 類型 描述
address The address of the contract used to consume ETH/USD oracle price data.✨ AI
eth_usd_price() view → 1,751,531,020

Get the current ETH/USD price used by the contract.✨ AI

回傳值

名稱 類型 描述
uint256 Current ETH price denominated in USD as an unsigned integer using the contract's internal price precision.✨ AI
frax_eth_oracle_address() view → 0x2a6ddd9401b14d0443d0738b8a78fd5b99829a80

Returns the address of the FRAX/ETH price oracle used by the contract.✨ AI

回傳值

名稱 類型 描述
address The oracle contract address that provides the FRAX/ETH price.✨ AI
frax_info() view reverted

Return eight protocol-specific unsigned integers summarizing on-chain FRAX state.✨ AI

開發者: Meanings of each field are defined in the contract source; interpret the returned values per that code.✨ AI

回傳值

名稱 類型 描述
uint256 First: protocol-specific uint256 (field 1 from frax_info); interpret via contract source.✨ AI
uint256 Second: protocol-specific uint256 (field 2 from frax_info); interpret via contract source.✨ AI
uint256 Third: protocol-specific uint256 (field 3 from frax_info); interpret via contract source.✨ AI
uint256 Fourth: protocol-specific uint256 (field 4 from frax_info); interpret via contract source.✨ AI
uint256 Fifth: protocol-specific uint256 (field 5 from frax_info); interpret via contract source.✨ AI
uint256 Sixth: protocol-specific uint256 (field 6 from frax_info); interpret via contract source.✨ AI
uint256 Seventh: protocol-specific uint256 (field 7 from frax_info); interpret via contract source.✨ AI
uint256 Eighth: protocol-specific uint256 (field 8 from frax_info); interpret via contract source.✨ AI
frax_pools(address) view

Return whether the given address is a registered FRAX pool.✨ AI

參數

名稱 類型 描述
address

回傳值

名稱 類型 描述
bool True if the address is a registered FRAX pool, false otherwise.✨ AI
frax_pools_array(uint256) view

Return the pool contract address at the given index in the FRAX pools list.✨ AI

參數

名稱 類型 描述
uint256

回傳值

名稱 類型 描述
address The pool contract address stored at the specified index.✨ AI
frax_price() view reverted

Returns the current FRAX price used by the protocol.✨ AI

回傳值

名稱 類型 描述
uint256 The current FRAX price as a uint256 in the contract's internal units.✨ AI
frax_step() view → 2,500

Returns the current protocol adjustment step used for incremental peg or rate changes.✨ AI

回傳值

名稱 類型 描述
uint256 The step value (uint256) used in protocol adjustment calculations.✨ AI
fxs_address() view → 0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0

Returns the address of the FXS token contract used by the system.✨ AI

回傳值

名稱 類型 描述
address The address of the FXS (governance) ERC-20 token contract.✨ AI
fxs_eth_oracle_address() view → 0x3b11da52030420c663d263ad4415a8a02e5f8cf8

Returns the address of the FXS/ETH price oracle used by this contract.✨ AI

回傳值

名稱 類型 描述
address The address of the FXS/ETH oracle contract.✨ AI
fxs_price() view reverted

Get the current FXS token price used by the protocol.✨ AI

回傳值

名稱 類型 描述
uint256 The current FXS price as a uint256, scaled by the contract's price precision (e.g., 1e18).✨ AI
genesis_supply() view → 2,000,000,000,000,000,000,000,000

Return the genesis supply of FRAX tokens.✨ AI

回傳值

名稱 類型 描述
uint256 The total FRAX supply created at genesis, expressed in the token's smallest unit (wei).✨ AI
getRoleAdmin(role: bytes32) view

Returns the admin role that controls the specified role.✨ AI

開發者: Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.

參數

名稱 類型 描述
role bytes32 The role identifier to query, provided as a bytes32 value.✨ AI

回傳值

名稱 類型 描述
bytes32 The bytes32 identifier of the admin role that can grant or revoke the specified role.✨ AI
getRoleMember(role: bytes32, index: uint256) view

Return the address of the account assigned to the given role at the specified index.✨ AI

開發者: Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.

參數

名稱 類型 描述
role bytes32 Role identifier (bytes32) to query.✨ AI
index uint256 Zero-based index within the role's member set.✨ AI

回傳值

名稱 類型 描述
address Address of the role member at the given index.✨ AI
getRoleMemberCount(role: bytes32) view

Return the number of accounts assigned to the specified role.✨ AI

開發者: Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.

參數

名稱 類型 描述
role bytes32 Role identifier (bytes32) to count members for.✨ AI

回傳值

名稱 類型 描述
uint256 Number of accounts that currently hold the specified role.✨ AI
globalCollateralValue() view → 518,732,234,932,821,417,854,576,275

Get the total value of collateral backing the FRAX system.✨ AI

回傳值

名稱 類型 描述
uint256 Total collateral value expressed in the protocol's base unit (wei).✨ AI
global_collateral_ratio() view → 945,000

Return the protocol's current global collateral ratio.✨ AI

回傳值

名稱 類型 描述
uint256 The current global collateral ratio as a uint256, expressed using the contract's collateral ratio precision.✨ AI
hasRole(role: bytes32, account: address) view

Checks whether a given account has the specified role.✨ AI

開發者: Returns `true` if `account` has been granted `role`.

參數

名稱 類型 描述
role bytes32 Role identifier as a bytes32 value (e.g., keccak256 of role name).✨ AI
account address Address of the account to check for the role.✨ AI

回傳值

名稱 類型 描述
bool True if the account has the role, false otherwise.✨ AI
last_call_time() view → 1,687,208,423

Returns the Unix timestamp of the last recorded contract call that updated the contract state.✨ AI

回傳值

名稱 類型 描述
uint256 Unix timestamp (seconds since Unix epoch) of the last recorded contract call that changed state.✨ AI
minting_fee() view → 9,500

Returns the current minting fee applied when creating new FRAX tokens.✨ AI

回傳值

名稱 類型 描述
uint256 The current minting fee rate as a uint256 in the contract's internal fee units.✨ AI
name() view → Frax

Return the human-readable name used to identify this ERC-20 token.✨ AI

開發者: Returns the name of the token.

回傳值

名稱 類型 描述
string The token's name string, a human-readable identifier (for example: "Frax").✨ AI
owner_address() view → 0xb1748c79709f4ba2dd82834b8c82d4a505003f27

回傳值

名稱 類型 描述
address
price_band() view → 10,000

回傳值

名稱 類型 描述
uint256
price_target() view → 980,000

回傳值

名稱 類型 描述
uint256
redemption_fee() view → 4,500

回傳值

名稱 類型 描述
uint256
refresh_cooldown() view → 3,600

回傳值

名稱 類型 描述
uint256
symbol() view → FRAX
開發者: Returns the symbol of the token, usually a shorter version of the name.

回傳值

名稱 類型 描述
string
timelock_address() view → 0x8412ebf45bac1b340bbe8f318b928c466c4e39ca

回傳值

名稱 類型 描述
address
totalSupply() view → 239,570,045.87 FRAX
開發者: See {IERC20-totalSupply}.

回傳值

名稱 類型 描述
uint256
weth_address() view → 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

回傳值

名稱 類型 描述
address

寫入函式

addPool(pool_address: address) nonpayable

參數

名稱 類型 描述
pool_address address
approve(spender: address, amount: uint256) nonpayable
開發者: See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.approve(address spender, uint256 amount)

參數

名稱 類型 描述
spender address
amount uint256

回傳值

名稱 類型 描述
bool
burn(amount: uint256) nonpayable
開發者: Destroys `amount` tokens from the caller. See {ERC20-_burn}.

參數

名稱 類型 描述
amount uint256
burnFrom(account: address, amount: uint256) nonpayable
開發者: Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for `accounts`'s tokens of at least `amount`.

參數

名稱 類型 描述
account address
amount uint256
decreaseAllowance(spender: address, subtractedValue: uint256) nonpayable
開發者: Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.

參數

名稱 類型 描述
spender address
subtractedValue uint256

回傳值

名稱 類型 描述
bool
grantRole(role: bytes32, account: address) nonpayable
開發者: 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.

參數

名稱 類型 描述
role bytes32
account address
increaseAllowance(spender: address, addedValue: uint256) nonpayable
開發者: Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.

參數

名稱 類型 描述
spender address
addedValue uint256

回傳值

名稱 類型 描述
bool
pool_burn_from(b_address: address, b_amount: uint256) nonpayable

參數

名稱 類型 描述
b_address address
b_amount uint256
pool_mint(m_address: address, m_amount: uint256) nonpayable

參數

名稱 類型 描述
m_address address
m_amount uint256
refreshCollateralRatio() nonpayable
removePool(pool_address: address) nonpayable

參數

名稱 類型 描述
pool_address address
renounceRole(role: bytes32, account: address) nonpayable
開發者: 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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.

參數

名稱 類型 描述
role bytes32
account address
revokeRole(role: bytes32, account: address) nonpayable
開發者: Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.

參數

名稱 類型 描述
role bytes32
account address
setController(_controller_address: address) nonpayable

參數

名稱 類型 描述
_controller_address address
setETHUSDOracle(_eth_usd_consumer_address: address) nonpayable

參數

名稱 類型 描述
_eth_usd_consumer_address address
setFRAXEthOracle(_frax_oracle_addr: address, _weth_address: address) nonpayable

參數

名稱 類型 描述
_frax_oracle_addr address
_weth_address address
setFXSAddress(_fxs_address: address) nonpayable

參數

名稱 類型 描述
_fxs_address address
setFXSEthOracle(_fxs_oracle_addr: address, _weth_address: address) nonpayable

參數

名稱 類型 描述
_fxs_oracle_addr address
_weth_address address
setFraxStep(_new_step: uint256) nonpayable

參數

名稱 類型 描述
_new_step uint256
setMintingFee(min_fee: uint256) nonpayable

參數

名稱 類型 描述
min_fee uint256
setOwner(_owner_address: address) nonpayable

參數

名稱 類型 描述
_owner_address address
setPriceBand(_price_band: uint256) nonpayable

參數

名稱 類型 描述
_price_band uint256
setPriceTarget(_new_price_target: uint256) nonpayable

參數

名稱 類型 描述
_new_price_target uint256
setRedemptionFee(red_fee: uint256) nonpayable

參數

名稱 類型 描述
red_fee uint256
setRefreshCooldown(_new_cooldown: uint256) nonpayable

參數

名稱 類型 描述
_new_cooldown uint256
setTimelock(new_timelock: address) nonpayable

參數

名稱 類型 描述
new_timelock address
toggleCollateralRatio() nonpayable
transfer(recipient: address, amount: uint256) nonpayable
開發者: See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.

參數

名稱 類型 描述
recipient address
amount uint256

回傳值

名稱 類型 描述
bool
transferFrom(sender: address, recipient: address, amount: uint256) nonpayable
開發者: See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for `sender`'s tokens of at least `amount`.

參數

名稱 類型 描述
sender address
recipient address
amount uint256

回傳值

名稱 類型 描述
bool

事件

Approval(owner: address, spender: address, value: uint256)
名稱 類型 已索引 描述
owner address
spender address
value uint256
FRAXBurned(from: address, to: address, amount: uint256)
名稱 類型 已索引 描述
from address
to address
amount uint256
FRAXMinted(from: address, to: address, amount: uint256)
名稱 類型 已索引 描述
from address
to address
amount uint256
RoleAdminChanged(role: bytes32, previousAdminRole: bytes32, newAdminRole: bytes32)
名稱 類型 已索引 描述
role bytes32
previousAdminRole bytes32
newAdminRole bytes32
RoleGranted(role: bytes32, account: address, sender: address)
名稱 類型 已索引 描述
role bytes32
account address
sender address
RoleRevoked(role: bytes32, account: address, sender: address)
名稱 類型 已索引 描述
role bytes32
account address
sender address
Transfer(from: address, to: address, value: uint256)
名稱 類型 已索引 描述
from address
to address
value uint256