Source Code
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Cross-Chain Transactions
Loading...
Loading
Contract Name:
L1QuitCreditorReceiverConverter
Compiler Version
v0.8.26+commit.8a97fa7a
Contract Source Code (Solidity)
/**
*Submitted for verification at fraxscan.com on 2024-07-30
*/
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.8.0;
// node_modules/@openzeppelin/contracts/security/ReentrancyGuard.sol
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
// node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev 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.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev 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.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
// node_modules/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
// node_modules/@openzeppelin/contracts/utils/Address.sol
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// src/contracts/Miscellany/FraxFarmQuitCreditor/ICrossDomainMessenger.sol
interface ICrossDomainMessenger {
function MESSAGE_VERSION() external view returns (uint16);
function MIN_GAS_CALLDATA_OVERHEAD() external view returns (uint64);
function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR() external view returns (uint64);
function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR() external view returns (uint64);
function OTHER_MESSENGER() external view returns (address);
function RELAY_CALL_OVERHEAD() external view returns (uint64);
function RELAY_CONSTANT_OVERHEAD() external view returns (uint64);
function RELAY_GAS_CHECK_BUFFER() external view returns (uint64);
function RELAY_RESERVED_GAS() external view returns (uint64);
function baseGas(bytes memory _message, uint32 _minGasLimit) external pure returns (uint64);
function failedMessages(bytes32) external view returns (bool);
function initialize() external;
function l1CrossDomainMessenger() external view returns (address);
function messageNonce() external view returns (uint256);
function paused() external view returns (bool);
function relayMessage(
uint256 _nonce,
address _sender,
address _target,
uint256 _value,
uint256 _minGasLimit,
bytes memory _message
) external;
function sendMessage(address _target, bytes memory _message, uint32 _minGasLimit) external;
function successfulMessages(bytes32) external view returns (bool);
function version() external view returns (string memory);
function xDomainMessageSender() external view returns (address);
}
// src/contracts/Miscellany/FraxFarmQuitCreditor/IExponentialPriceOracle.sol
interface IExponentialPriceOracle {
function getPrices() external view returns (bool _isBadData, uint256 _priceLow, uint256 _priceHigh);
function priceEnd() external view returns (uint256);
function pricePerShare() external view returns (uint256 _price);
function priceStart() external view returns (uint256);
function timeEnd() external view returns (uint256);
function timeStart() external view returns (uint256);
}
// src/contracts/Miscellany/OwnedV2.sol
// https://docs.synthetix.io/contracts/Owned
contract OwnedV2 {
error OwnerCannotBeZero();
error InvalidOwnershipAcceptance();
error OnlyOwner();
address public owner;
address public nominatedOwner;
constructor(address _owner) {
// require(_owner != address(0), "Owner address cannot be 0");
if (_owner == address(0)) revert OwnerCannotBeZero();
owner = _owner;
emit OwnerChanged(address(0), _owner);
}
function nominateNewOwner(address _owner) external onlyOwner {
nominatedOwner = _owner;
emit OwnerNominated(_owner);
}
function acceptOwnership() external {
// require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
if (msg.sender != nominatedOwner) revert InvalidOwnershipAcceptance();
emit OwnerChanged(owner, nominatedOwner);
owner = nominatedOwner;
nominatedOwner = address(0);
}
modifier onlyOwner() {
// require(msg.sender == owner, "Only the contract owner may perform this action");
if (msg.sender != owner) revert OnlyOwner();
_;
}
event OwnerNominated(address newOwner);
event OwnerChanged(address oldOwner, address newOwner);
}
// node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
// src/contracts/Miscellany/FraxFarmQuitCreditor/L1QuitCreditorReceiverConverter.sol
// ====================================================================
// | ______ _______ |
// | / _____________ __ __ / ____(_____ ____ _____ ________ |
// | / /_ / ___/ __ `| |/_/ / /_ / / __ \/ __ `/ __ \/ ___/ _ \ |
// | / __/ / / / /_/ _> < / __/ / / / / / /_/ / / / / /__/ __/ |
// | /_/ /_/ \__,_/_/|_| /_/ /_/_/ /_/\__,_/_/ /_/\___/\___/ |
// | |
// ====================================================================
// ================= L1QuitCreditorReceiverConverter ==================
// ====================================================================
// Accepts an L1 message from an Ethereum Mainnet FraxFarmQuitCreditor_XXX and converts the provided USD value to another token
// Frax Finance: https://github.com/FraxFinance
// Primary Author(s)
// Travis Moore: https://github.com/FortisFortuna
// Reviewer(s) / Contributor(s)
// Dennis: https://github.com/denett
/// @notice Accepts an L1 message from an Ethereum Mainnet FraxFarmQuitCreditor_XXX and converts the provided USD value to another token
contract L1QuitCreditorReceiverConverter is ReentrancyGuard, OwnedV2 {
// STATE VARIABLES
// ===================================================
/// @notice Fraxtal CrossDomainMessenger
ICrossDomainMessenger public messenger = ICrossDomainMessenger(0x4200000000000000000000000000000000000007);
/// @notice Address of the L1 FraxFarmQuitCreditor_XXX
address public quitCreditorAddress;
/// @notice Token that the L1 USD credit is being exchanged for
IERC20 public conversionToken;
/// @notice Manually set conversion price (USDe18 per 1e18 conversion token)
uint256 public conversionPrice;
/// @notice Used for testing
mapping(address pinger => Ping lastPing) public lastPingReceived;
// STRUCTS
// ===================================================
/// @notice Ping used for testing purposes
/// @param sourceTs Timestamp the ping was triggered on Ethereum
/// @param fraxtalTs Timestamp the ping was received on this contract
struct Ping {
uint256 sourceTs;
uint256 fraxtalTs;
}
// MODIFIERS
// ===================================================
modifier correctSender() {
// Make sure the direct msg.sender is the messenger
if (msg.sender != address(messenger)) revert BadSender();
// Make sure that the caller on L1 was the FraxFarmQuitCreditor_XXX
if (messenger.xDomainMessageSender() != quitCreditorAddress) revert BadXDomainMessageSender();
_;
}
// CONSTRUCTOR
// ===================================================
/// @notice Constructor
/// @param _owner The owner of the contract
/// @param _quitCreditor Address of the L1 FraxFarmQuitCreditor_XXX
/// @param _conversionToken Token being converted to
/// @param _conversionPrice Price of the conversion token, in E18 USD
constructor(
address _owner,
address _quitCreditor,
address _conversionToken,
uint256 _conversionPrice
) OwnedV2(_owner) {
quitCreditorAddress = _quitCreditor;
conversionToken = IERC20(_conversionToken);
conversionPrice = _conversionPrice;
}
// PUBLIC FUNCTIONS
// ===================================================
/// @notice Used to test connectivity. Receives a dummy message from Ethereum
/// @param _pinger Original pinger on Ethereum
/// @param _sourceTs Time the ping was sent on Ethereum
function receivePing(address _pinger, uint256 _sourceTs) external nonReentrant correctSender {
// Mark when the last ping was received
lastPingReceived[_pinger] = Ping(_sourceTs, block.timestamp);
emit PingReceived(_pinger, _sourceTs, block.timestamp);
}
/// @notice Processes the L1-originating message from the FraxFarmQuitCreditor_XXX
/// @param _originalStaker Address of the original farmer who held the position
/// @param _recipient Recipient for the newly converted tokens
/// @param _usdCredit The USD value that should be converted into the conversion token
function processMessage(
address _originalStaker,
address _recipient,
uint256 _usdCredit
) external nonReentrant correctSender returns (uint256 _convTknOut) {
// Do the conversion
_convTknOut = (_usdCredit * 1e18) / conversionPrice;
// Send out the tokens
SafeERC20.safeTransfer(conversionToken, _recipient, _convTknOut);
emit MessageProcessed(_originalStaker, _recipient, _usdCredit, _convTknOut);
}
// RESTRICTED FUNCTIONS
// ===================================================
/// @notice Allows the owner to recover any ERC20
/// @param tokenAddress The address of the token to recover
/// @param tokenAmount The amount of the token to recover
function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner {
SafeERC20.safeTransfer(IERC20(tokenAddress), msg.sender, tokenAmount);
}
/// @notice Set the price of the conversion token, in E18 USD
/// @param _newConversionPrice The new conversion price
function setConversionPrice(uint256 _newConversionPrice) external onlyOwner {
conversionPrice = _newConversionPrice;
}
/// @notice Set the address for the L1 FraxFarmQuitCreditor_XXX
/// @param _newQuitCreditorAddress The new address for the L1 FraxFarmQuitCreditor_XXX
function setQuitCreditorAddress(address _newQuitCreditorAddress) external onlyOwner {
quitCreditorAddress = _newQuitCreditorAddress;
}
// ERRORS
// ===================================================
/// @notice Only the CrossDomainMessenger should be the sender
error BadSender();
/// @notice Only the FraxFarmQuitCreditor_XXX should be the messenger.xDomainMessageSender()
error BadXDomainMessageSender();
// EVENTS
// ===================================================
/// @notice When the ping from L1 was received
/// @param sender The msg.sender that triggered the ping on the FraxFarmQuitCreditor_XXX
/// @param sourceTs Ethereum time the ping was received
/// @param fraxtalTs Fraxtal time the ping was received
event PingReceived(address indexed sender, uint256 sourceTs, uint256 fraxtalTs);
/// @notice When the crediting message from the L1 FraxFarmQuitCreditor_XXX was processed
/// @param originalStaker Address of the original farmer who held the position
/// @param recipient Recipient for the newly converted tokens
/// @param usdCredit Amount of USD credit processed
/// @param convTknOut Conversion token output amount to the recipient
event MessageProcessed(
address indexed originalStaker,
address indexed recipient,
uint256 usdCredit,
uint256 convTknOut
);
/// @notice When ERC20 tokens were recovered
/// @param token Token address
/// @param amount Amount of tokens collected
event RecoveredERC20(address token, uint256 amount);
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_quitCreditor","type":"address"},{"internalType":"address","name":"_conversionToken","type":"address"},{"internalType":"uint256","name":"_conversionPrice","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BadSender","type":"error"},{"inputs":[],"name":"BadXDomainMessageSender","type":"error"},{"inputs":[],"name":"InvalidOwnershipAcceptance","type":"error"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[],"name":"OwnerCannotBeZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"originalStaker","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"usdCredit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"convTknOut","type":"uint256"}],"name":"MessageProcessed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"sourceTs","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fraxtalTs","type":"uint256"}],"name":"PingReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RecoveredERC20","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"conversionPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"conversionToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pinger","type":"address"}],"name":"lastPingReceived","outputs":[{"internalType":"uint256","name":"sourceTs","type":"uint256"},{"internalType":"uint256","name":"fraxtalTs","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messenger","outputs":[{"internalType":"contract ICrossDomainMessenger","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_originalStaker","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_usdCredit","type":"uint256"}],"name":"processMessage","outputs":[{"internalType":"uint256","name":"_convTknOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"quitCreditorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_pinger","type":"address"},{"internalType":"uint256","name":"_sourceTs","type":"uint256"}],"name":"receivePing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newConversionPrice","type":"uint256"}],"name":"setConversionPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newQuitCreditorAddress","type":"address"}],"name":"setQuitCreditorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
6080604052600380546001600160a01b031916734200000000000000000000000000000000000007179055348015610035575f80fd5b506040516111513803806111518339810160408190526100549161012d565b60015f55836001600160a01b03811661008057604051639b15e16f60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b038316908117909155604080515f815260208101929092527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a150600480546001600160a01b039485166001600160a01b031991821617909155600580549390941692169190911790915560065550610175565b80516001600160a01b0381168114610128575f80fd5b919050565b5f805f8060808587031215610140575f80fd5b61014985610112565b935061015760208601610112565b925061016560408601610112565b6060959095015193969295505050565b610fcf806101825f395ff3fe608060405234801561000f575f80fd5b50600436106100e5575f3560e01c80638980f11f11610088578063a61721ac11610063578063a61721ac1461020d578063a7a5324814610248578063ab219c4a1461025b578063b7184b681461026e575f80fd5b80638980f11f146101c35780638cda6c45146101d65780638da5cb5b146101ed575f80fd5b806353166ecf116100c357806353166ecf1461015b57806353a47bb71461017b57806379ba50971461019b5780637ed2cb27146101a3575f80fd5b8063144911ad146100e95780631627540c146100fe5780633cb747bf14610111575b5f80fd5b6100fc6100f7366004610de2565b610281565b005b6100fc61010c366004610de2565b610319565b6003546101319073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6005546101319073ffffffffffffffffffffffffffffffffffffffff1681565b6002546101319073ffffffffffffffffffffffffffffffffffffffff1681565b6100fc6103e3565b6004546101319073ffffffffffffffffffffffffffffffffffffffff1681565b6100fc6101d1366004610dfd565b6104d8565b6101df60065481565b604051908152602001610152565b6001546101319073ffffffffffffffffffffffffffffffffffffffff1681565b61023361021b366004610de2565b60076020525f90815260409020805460019091015482565b60408051928352602083019190915201610152565b6101df610256366004610e27565b610538565b6100fc610269366004610dfd565b6107a3565b6100fc61027c366004610e65565b6109ce565b60015473ffffffffffffffffffffffffffffffffffffffff1633146102d2576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff16331461036a576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229060200160405180910390a150565b60025473ffffffffffffffffffffffffffffffffffffffff163314610434576040517fd74b334e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546002546040805173ffffffffffffffffffffffffffffffffffffffff93841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160028054600180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b60015473ffffffffffffffffffffffffffffffffffffffff163314610529576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610534823383610a24565b5050565b5f60025f54036105a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60025f5560035473ffffffffffffffffffffffffffffffffffffffff1633146105fe576040517ff9b5d12d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60048054600354604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416949390921692636e296e459282820192602092908290030181865afa158015610671573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106959190610e7c565b73ffffffffffffffffffffffffffffffffffffffff16146106e2576040517f3148944300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006546106f783670de0b6b3a7640000610e97565b6107019190610ed9565b6005549091506107289073ffffffffffffffffffffffffffffffffffffffff168483610a24565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fd6d83c7e7e134e3b46a31613602e12af6a895cc707b1abd6f55f98dfc5ec7a2f8484604051610790929190918252602082015260400190565b60405180910390a360015f559392505050565b60025f540361080e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105a0565b60025f5560035473ffffffffffffffffffffffffffffffffffffffff163314610863576040517ff9b5d12d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60048054600354604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416949390921692636e296e459282820192602092908290030181865afa1580156108d6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108fa9190610e7c565b73ffffffffffffffffffffffffffffffffffffffff1614610947576040517f3148944300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051808201825282815242602080830182815273ffffffffffffffffffffffffffffffffffffffff87165f8181526007845286902094518555905160019094019390935583518581529081019190915290917f872ee393cb8a15e359df7de4088b3de854cb7aaeff6cdc4efd471f92e6bf8f34910160405180910390a2505060015f55565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a1f576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600655565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610ab1908490610ab6565b505050565b5f610b17826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610bc19092919063ffffffff16565b805190915015610ab15780806020019051810190610b359190610f11565b610ab1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016105a0565b6060610bcf84845f85610bd9565b90505b9392505050565b606082471015610c6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016105a0565b73ffffffffffffffffffffffffffffffffffffffff85163b610ce9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a0565b5f808673ffffffffffffffffffffffffffffffffffffffff168587604051610d119190610f30565b5f6040518083038185875af1925050503d805f8114610d4b576040519150601f19603f3d011682016040523d82523d5f602084013e610d50565b606091505b5091509150610d60828286610d6b565b979650505050505050565b60608315610d7a575081610bd2565b825115610d8a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a09190610f46565b73ffffffffffffffffffffffffffffffffffffffff81168114610ddf575f80fd5b50565b5f60208284031215610df2575f80fd5b8135610bd281610dbe565b5f8060408385031215610e0e575f80fd5b8235610e1981610dbe565b946020939093013593505050565b5f805f60608486031215610e39575f80fd5b8335610e4481610dbe565b92506020840135610e5481610dbe565b929592945050506040919091013590565b5f60208284031215610e75575f80fd5b5035919050565b5f60208284031215610e8c575f80fd5b8151610bd281610dbe565b8082028115828204841417610ed3577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b92915050565b5f82610f0c577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215610f21575f80fd5b81518015158114610bd2575f80fd5b5f82518060208501845e5f920191825250919050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168401019150509291505056fea26469706673582212206599203d0b8e04f9a0e10bbbe30a45d0e8bab69c36e3d979234e7dc634fbb1ca64736f6c634300081a0033000000000000000000000000c4eb45d80dc1f079045e75d5d55de8ed1c1090e60000000000000000000000000f9f5f734e666b498517ca1681dfc2e08228454a000000000000000000000000f1e2b576af4c6a7ee966b14c810b772391e921530000000000000000000000000000000000000000000000000b04dacb0fa90000
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106100e5575f3560e01c80638980f11f11610088578063a61721ac11610063578063a61721ac1461020d578063a7a5324814610248578063ab219c4a1461025b578063b7184b681461026e575f80fd5b80638980f11f146101c35780638cda6c45146101d65780638da5cb5b146101ed575f80fd5b806353166ecf116100c357806353166ecf1461015b57806353a47bb71461017b57806379ba50971461019b5780637ed2cb27146101a3575f80fd5b8063144911ad146100e95780631627540c146100fe5780633cb747bf14610111575b5f80fd5b6100fc6100f7366004610de2565b610281565b005b6100fc61010c366004610de2565b610319565b6003546101319073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6005546101319073ffffffffffffffffffffffffffffffffffffffff1681565b6002546101319073ffffffffffffffffffffffffffffffffffffffff1681565b6100fc6103e3565b6004546101319073ffffffffffffffffffffffffffffffffffffffff1681565b6100fc6101d1366004610dfd565b6104d8565b6101df60065481565b604051908152602001610152565b6001546101319073ffffffffffffffffffffffffffffffffffffffff1681565b61023361021b366004610de2565b60076020525f90815260409020805460019091015482565b60408051928352602083019190915201610152565b6101df610256366004610e27565b610538565b6100fc610269366004610dfd565b6107a3565b6100fc61027c366004610e65565b6109ce565b60015473ffffffffffffffffffffffffffffffffffffffff1633146102d2576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff16331461036a576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229060200160405180910390a150565b60025473ffffffffffffffffffffffffffffffffffffffff163314610434576040517fd74b334e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546002546040805173ffffffffffffffffffffffffffffffffffffffff93841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160028054600180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b60015473ffffffffffffffffffffffffffffffffffffffff163314610529576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610534823383610a24565b5050565b5f60025f54036105a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60025f5560035473ffffffffffffffffffffffffffffffffffffffff1633146105fe576040517ff9b5d12d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60048054600354604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416949390921692636e296e459282820192602092908290030181865afa158015610671573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106959190610e7c565b73ffffffffffffffffffffffffffffffffffffffff16146106e2576040517f3148944300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006546106f783670de0b6b3a7640000610e97565b6107019190610ed9565b6005549091506107289073ffffffffffffffffffffffffffffffffffffffff168483610a24565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fd6d83c7e7e134e3b46a31613602e12af6a895cc707b1abd6f55f98dfc5ec7a2f8484604051610790929190918252602082015260400190565b60405180910390a360015f559392505050565b60025f540361080e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105a0565b60025f5560035473ffffffffffffffffffffffffffffffffffffffff163314610863576040517ff9b5d12d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60048054600354604080517f6e296e45000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416949390921692636e296e459282820192602092908290030181865afa1580156108d6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108fa9190610e7c565b73ffffffffffffffffffffffffffffffffffffffff1614610947576040517f3148944300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051808201825282815242602080830182815273ffffffffffffffffffffffffffffffffffffffff87165f8181526007845286902094518555905160019094019390935583518581529081019190915290917f872ee393cb8a15e359df7de4088b3de854cb7aaeff6cdc4efd471f92e6bf8f34910160405180910390a2505060015f55565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a1f576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600655565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610ab1908490610ab6565b505050565b5f610b17826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610bc19092919063ffffffff16565b805190915015610ab15780806020019051810190610b359190610f11565b610ab1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016105a0565b6060610bcf84845f85610bd9565b90505b9392505050565b606082471015610c6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016105a0565b73ffffffffffffffffffffffffffffffffffffffff85163b610ce9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a0565b5f808673ffffffffffffffffffffffffffffffffffffffff168587604051610d119190610f30565b5f6040518083038185875af1925050503d805f8114610d4b576040519150601f19603f3d011682016040523d82523d5f602084013e610d50565b606091505b5091509150610d60828286610d6b565b979650505050505050565b60608315610d7a575081610bd2565b825115610d8a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a09190610f46565b73ffffffffffffffffffffffffffffffffffffffff81168114610ddf575f80fd5b50565b5f60208284031215610df2575f80fd5b8135610bd281610dbe565b5f8060408385031215610e0e575f80fd5b8235610e1981610dbe565b946020939093013593505050565b5f805f60608486031215610e39575f80fd5b8335610e4481610dbe565b92506020840135610e5481610dbe565b929592945050506040919091013590565b5f60208284031215610e75575f80fd5b5035919050565b5f60208284031215610e8c575f80fd5b8151610bd281610dbe565b8082028115828204841417610ed3577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b92915050565b5f82610f0c577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215610f21575f80fd5b81518015158114610bd2575f80fd5b5f82518060208501845e5f920191825250919050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168401019150509291505056fea26469706673582212206599203d0b8e04f9a0e10bbbe30a45d0e8bab69c36e3d979234e7dc634fbb1ca64736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c4eb45d80dc1f079045e75d5d55de8ed1c1090e60000000000000000000000000f9f5f734e666b498517ca1681dfc2e08228454a000000000000000000000000f1e2b576af4c6a7ee966b14c810b772391e921530000000000000000000000000000000000000000000000000b04dacb0fa90000
-----Decoded View---------------
Arg [0] : _owner (address): 0xC4EB45d80DC1F079045E75D5d55de8eD1c1090E6
Arg [1] : _quitCreditor (address): 0x0f9f5f734e666b498517cA1681Dfc2e08228454a
Arg [2] : _conversionToken (address): 0xF1e2b576aF4C6a7eE966b14C810b772391e92153
Arg [3] : _conversionPrice (uint256): 794000000000000000
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000c4eb45d80dc1f079045e75d5d55de8ed1c1090e6
Arg [1] : 0000000000000000000000000f9f5f734e666b498517ca1681dfc2e08228454a
Arg [2] : 000000000000000000000000f1e2b576af4c6a7ee966b14c810b772391e92153
Arg [3] : 0000000000000000000000000000000000000000000000000b04dacb0fa90000
Deployed Bytecode Sourcemap
25897:6177:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30435:148;;;;;;:::i;:::-;;:::i;:::-;;19321:141;;;;;;:::i;:::-;;:::i;26105:106::-;;;;;;;;;;;;630:42:1;618:55;;;600:74;;588:2;573:18;26105:106:0;;;;;;;;26392:29;;;;;;;;;19031;;;;;;;;;19470:354;;;:::i;26280:34::-;;;;;;;;;29826:172;;;;;;:::i;:::-;;:::i;26512:30::-;;;;;;;;;1679:25:1;;;1667:2;1652:18;26512:30:0;1533:177:1;19004:20:0;;;;;;;;;26585:64;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;1889:25:1;;;1945:2;1930:18;;1923:34;;;;1862:18;26585:64:0;1715:248:1;29058:486:0;;;;;;:::i;:::-;;:::i;28429:288::-;;;;;;:::i;:::-;;:::i;30134:132::-;;;;;;:::i;:::-;;:::i;30435:148::-;19975:5;;;;19961:10;:19;19957:43;;19989:11;;;;;;;;;;;;;;19957:43;30530:19:::1;:45:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;30435:148::o;19321:141::-;19975:5;;;;19961:10;:19;19957:43;;19989:11;;;;;;;;;;;;;;19957:43;19393:14:::1;:23:::0;;;::::1;;::::0;::::1;::::0;;::::1;::::0;;;19432:22:::1;::::0;600:74:1;;;19432:22:0::1;::::0;588:2:1;573:18;19432:22:0::1;;;;;;;19321:141:::0;:::o;19470:354::-;19643:14;;;;19629:10;:28;19625:69;;19666:28;;;;;;;;;;;;;;19625:69;19723:5;;19730:14;;19710:35;;;19723:5;;;;2886:74:1;;19730:14:0;;;;2991:2:1;2976:18;;2969:83;19710:35:0;;2859:18:1;19710:35:0;;;;;;;19764:14;;;;19756:22;;;;;;19764:14;;;19756:22;;;;19789:27;;;19470:354::o;29826:172::-;19975:5;;;;19961:10;:19;19957:43;;19989:11;;;;;;;;;;;;;;19957:43;29921:69:::1;29951:12;29966:10;29978:11;29921:22;:69::i;:::-;29826:172:::0;;:::o;29058:486::-;29226:19;1866:1;2464:7;;:19;2456:63;;;;;;;3265:2:1;2456:63:0;;;3247:21:1;3304:2;3284:18;;;3277:30;3343:33;3323:18;;;3316:61;3394:18;;2456:63:0;;;;;;;;;1866:1;2597:7;:18;27215:9:::1;::::0;::::1;;27193:10;:32;27189:56;;27234:11;;;;;;;;;;;;;;27189:56;27375:19;::::0;;27339:9:::1;::::0;:32:::1;::::0;;;;;;;27375:19:::1;::::0;;::::1;::::0;27339:9;;;::::1;::::0;:30:::1;::::0;:32;;::::1;::::0;::::1;::::0;;;;;;;:9;:32:::1;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:55;;;27335:93;;27403:25;;;;;;;;;;;;;;27335:93;29324:15:::2;::::0;29303:17:::2;:10:::0;29316:4:::2;29303:17;:::i;:::-;29302:37;;;;:::i;:::-;29407:15;::::0;29288:51;;-1:-1:-1;29384:64:0::2;::::0;29407:15:::2;;29424:10:::0;29288:51;29384:22:::2;:64::i;:::-;29500:10;29466:70;;29483:15;29466:70;;;29512:10;29524:11;29466:70;;;;;;1889:25:1::0;;;1945:2;1930:18;;1923:34;1877:2;1862:18;;1715:248;29466:70:0::2;;;;;;;;1822:1:::0;2776:7;:22;29058:486;;-1:-1:-1;;;29058:486:0:o;28429:288::-;1866:1;2464:7;;:19;2456:63;;;;;;;3265:2:1;2456:63:0;;;3247:21:1;3304:2;3284:18;;;3277:30;3343:33;3323:18;;;3316:61;3394:18;;2456:63:0;3063:355:1;2456:63:0;1866:1;2597:7;:18;27215:9:::1;::::0;::::1;;27193:10;:32;27189:56;;27234:11;;;;;;;;;;;;;;27189:56;27375:19;::::0;;27339:9:::1;::::0;:32:::1;::::0;;;;;;;27375:19:::1;::::0;;::::1;::::0;27339:9;;;::::1;::::0;:30:::1;::::0;:32;;::::1;::::0;::::1;::::0;;;;;;;:9;:32:::1;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:55;;;27335:93;;27403:25;;;;;;;;;;;;;;27335:93;28610:32:::2;::::0;;;;::::2;::::0;;;;;28626:15:::2;28610:32;::::0;;::::2;::::0;;;28582:25:::2;::::0;::::2;-1:-1:-1::0;28582:25:0;;;:16:::2;:25:::0;;;;;:60;;;;;;::::2;::::0;;::::2;::::0;;;;28660:49;;1889:25:1;;;1930:18;;;1923:34;;;;28582:25:0;;28660:49:::2;::::0;1862:18:1;28660:49:0::2;;;;;;;-1:-1:-1::0;;1822:1:0;2776:7;:22;28429:288::o;30134:132::-;19975:5;;;;19961:10;:19;19957:43;;19989:11;;;;;;;;;;;;;;19957:43;30221:15:::1;:37:::0;30134:132::o;20821:211::-;20965:58;;;4489:42:1;4477:55;;20965:58:0;;;4459:74:1;4549:18;;;;4542:34;;;20965:58:0;;;;;;;;;;4432:18:1;;;;20965:58:0;;;;;;;;;;20988:23;20965:58;;;20938:86;;20958:5;;20938:19;:86::i;:::-;20821:211;;;:::o;23888:716::-;24312:23;24338:69;24366:4;24338:69;;;;;;;;;;;;;;;;;24346:5;24338:27;;;;:69;;;;;:::i;:::-;24422:17;;24312:95;;-1:-1:-1;24422:21:0;24418:179;;24519:10;24508:30;;;;;;;;;;;;:::i;:::-;24500:85;;;;;;;5071:2:1;24500:85:0;;;5053:21:1;5110:2;5090:18;;;5083:30;5149:34;5129:18;;;5122:62;5220:12;5200:18;;;5193:40;5250:19;;24500:85:0;4869:406:1;11969:229:0;12106:12;12138:52;12160:6;12168:4;12174:1;12177:12;12138:21;:52::i;:::-;12131:59;;11969:229;;;;;;:::o;13089:510::-;13259:12;13317:5;13292:21;:30;;13284:81;;;;;;;5482:2:1;13284:81:0;;;5464:21:1;5521:2;5501:18;;;5494:30;5560:34;5540:18;;;5533:62;5631:8;5611:18;;;5604:36;5657:19;;13284:81:0;5280:402:1;13284:81:0;9519:19;;;;13376:60;;;;;;;5889:2:1;13376:60:0;;;5871:21:1;5928:2;5908:18;;;5901:30;5967:31;5947:18;;;5940:59;6016:18;;13376:60:0;5687:353:1;13376:60:0;13450:12;13464:23;13491:6;:11;;13510:5;13517:4;13491:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13449:73;;;;13540:51;13557:7;13566:10;13578:12;13540:16;:51::i;:::-;13533:58;13089:510;-1:-1:-1;;;;;;;13089:510:0:o;15775:762::-;15925:12;15954:7;15950:580;;;-1:-1:-1;15985:10:0;15978:17;;15950:580;16099:17;;:21;16095:424;;16347:10;16341:17;16408:15;16395:10;16391:2;16387:19;16380:44;16095:424;16490:12;16483:20;;;;;;;;;;;:::i;14:154:1:-;100:42;93:5;89:54;82:5;79:65;69:93;;158:1;155;148:12;69:93;14:154;:::o;173:247::-;232:6;285:2;273:9;264:7;260:23;256:32;253:52;;;301:1;298;291:12;253:52;340:9;327:23;359:31;384:5;359:31;:::i;1161:367::-;1229:6;1237;1290:2;1278:9;1269:7;1265:23;1261:32;1258:52;;;1306:1;1303;1296:12;1258:52;1345:9;1332:23;1364:31;1389:5;1364:31;:::i;:::-;1414:5;1492:2;1477:18;;;;1464:32;;-1:-1:-1;;;1161:367:1:o;1968:508::-;2045:6;2053;2061;2114:2;2102:9;2093:7;2089:23;2085:32;2082:52;;;2130:1;2127;2120:12;2082:52;2169:9;2156:23;2188:31;2213:5;2188:31;:::i;:::-;2238:5;-1:-1:-1;2295:2:1;2280:18;;2267:32;2308:33;2267:32;2308:33;:::i;:::-;1968:508;;2360:7;;-1:-1:-1;;;2440:2:1;2425:18;;;;2412:32;;1968:508::o;2481:226::-;2540:6;2593:2;2581:9;2572:7;2568:23;2564:32;2561:52;;;2609:1;2606;2599:12;2561:52;-1:-1:-1;2654:23:1;;2481:226;-1:-1:-1;2481:226:1:o;3423:251::-;3493:6;3546:2;3534:9;3525:7;3521:23;3517:32;3514:52;;;3562:1;3559;3552:12;3514:52;3594:9;3588:16;3613:31;3638:5;3613:31;:::i;3679:322::-;3752:9;;;3783;;3800:15;;;3794:22;;3780:37;3770:225;;3851:77;3848:1;3841:88;3952:4;3949:1;3942:15;3980:4;3977:1;3970:15;3770:225;3679:322;;;;:::o;4006:274::-;4046:1;4072;4062:189;;4107:77;4104:1;4097:88;4208:4;4205:1;4198:15;4236:4;4233:1;4226:15;4062:189;-1:-1:-1;4265:9:1;;4006:274::o;4587:277::-;4654:6;4707:2;4695:9;4686:7;4682:23;4678:32;4675:52;;;4723:1;4720;4713:12;4675:52;4755:9;4749:16;4808:5;4801:13;4794:21;4787:5;4784:32;4774:60;;4830:1;4827;4820:12;6045:301;6174:3;6212:6;6206:13;6258:6;6251:4;6243:6;6239:17;6234:3;6228:37;6320:1;6284:16;;6309:13;;;-1:-1:-1;6284:16:1;6045:301;-1:-1:-1;6045:301:1:o;6351:477::-;6500:2;6489:9;6482:21;6463:4;6532:6;6526:13;6575:6;6570:2;6559:9;6555:18;6548:34;6634:6;6629:2;6621:6;6617:15;6612:2;6601:9;6597:18;6591:50;6690:1;6685:2;6676:6;6665:9;6661:22;6657:31;6650:42;6819:2;6749:66;6744:2;6736:6;6732:15;6728:88;6717:9;6713:104;6709:113;6701:121;;;6351:477;;;;:::o
Swarm Source
ipfs://6599203d0b8e04f9a0e10bbbe30a45d0e8bab69c36e3d979234e7dc634fbb1ca
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in FRAX
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.