Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
120582624 | 241 days ago | 0.00172094665891 ETH | ||||
120582624 | 241 days ago | 0.00172094665891 ETH | ||||
120563032 | 242 days ago | 0.000150192597999 ETH | ||||
120563032 | 242 days ago | 0.000150192597999 ETH | ||||
120536978 | 242 days ago | 0.000227980876938 ETH | ||||
120536978 | 242 days ago | 0.000227980876938 ETH | ||||
120487398 | 244 days ago | 0.00009162467119 ETH | ||||
120487398 | 244 days ago | 0.00009162467119 ETH | ||||
120478064 | 244 days ago | 0.000094391587695 ETH | ||||
120478064 | 244 days ago | 0.000094391587695 ETH | ||||
120450949 | 244 days ago | 0.000091768084674 ETH | ||||
120450949 | 244 days ago | 0.000091768084674 ETH | ||||
120445012 | 245 days ago | 0.000118914020001 ETH | ||||
120445012 | 245 days ago | 0.000118914020001 ETH | ||||
120424951 | 245 days ago | 0.000149491349882 ETH | ||||
120424951 | 245 days ago | 0.000149491349882 ETH | ||||
120424488 | 245 days ago | 0.000184821029927 ETH | ||||
120424488 | 245 days ago | 0.000184821029927 ETH | ||||
120424406 | 245 days ago | 0.000149491349882 ETH | ||||
120424406 | 245 days ago | 0.000149491349882 ETH | ||||
120424061 | 245 days ago | 0.000184821029927 ETH | ||||
120424061 | 245 days ago | 0.000184821029927 ETH | ||||
120405934 | 245 days ago | 0.000094125553577 ETH | ||||
120405934 | 245 days ago | 0.000094125553577 ETH | ||||
120393128 | 246 days ago | 0.013884448890068 ETH |
Loading...
Loading
Contract Name:
RecolorHelper
Compiler Version
v0.8.19+commit.7dd6d404
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: LZBL-1.1 // Copyright 2023 LayerZero Labs Ltd. // You may obtain a copy of the License at // https://github.com/LayerZero-Labs/license/blob/main/LICENSE-LZBL-1.1 pragma solidity 0.8.19; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {MessagingFee, MessagingReceipt} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import "../../usdv/interfaces/IUSDV.sol"; import "./interfaces/IRecolorHelper.sol"; /// @notice this contract is a helper to recolor USDV on the way out contract RecolorHelper is IRecolorHelper { using SafeERC20 for IERC20; address public immutable usdv; constructor(address _usdv) { usdv = _usdv; } /// ------ local transfer function ----- /// @dev send USDV into this account and then ATOMICALLY transfer out with color function transferWithColor(address _receiver, uint256 _amount, uint32 _toColor) external override { _transferOutWithColor(_receiver, _amount, _toColor); } /// @dev it requires the caller to approve this contract to spend their USDV function approvedTransferWithColor(address _receiver, uint256 _amount, uint32 _toColor) external override { IERC20(usdv).safeTransferFrom(msg.sender, address(this), _amount); _transferOutWithColor(_receiver, _amount, _toColor); } function _transferOutWithColor(address _receiver, uint256 _amount, uint32 _toColor) internal virtual { // wrapping all balance to the provided color IUSDV(usdv).setDefaultColor(address(this), _toColor); // transfer the usdv out with the provided color IERC20(usdv).safeTransfer(_receiver, _amount); } /// ------ crosschain transfer function transfer function ----- /// @dev send USDV into this account and then ATOMICALLY send across-chain function sendWithColor( IOFT.SendParam calldata _param, uint32 _toColor, bytes calldata _extraOptions, MessagingFee calldata _msgFee, address payable _refundAddress, bytes calldata _composeMsg ) external payable override returns (MessagingReceipt memory) { return _sendWithColor(_param, _toColor, _extraOptions, _msgFee, _refundAddress, _composeMsg); } /// @dev it requires the caller to approve this contract to spend their USDV function approvedSendWithColor( IOFT.SendParam calldata _param, uint32 _toColor, bytes calldata _extraOptions, MessagingFee calldata _msgFee, address payable _refundAddress, bytes calldata _composeMsg ) external payable virtual returns (MessagingReceipt memory) { IERC20(usdv).safeTransferFrom(msg.sender, address(this), _param.amountLD); return _sendWithColor(_param, _toColor, _extraOptions, _msgFee, _refundAddress, _composeMsg); } function _sendWithColor( IOFT.SendParam calldata _param, uint32 _toColor, bytes calldata _extraOptions, MessagingFee calldata _msgFee, address payable _refundAddress, bytes calldata _composeMsg ) internal returns (MessagingReceipt memory msgReceipt) { // wrapping all balance to the provided color IUSDV(usdv).setDefaultColor(address(this), _toColor); // send usdv out with the provided color msgReceipt = IUSDV(usdv).send{value: msg.value}(_param, _extraOptions, _msgFee, _refundAddress, _composeMsg); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import {MessagingFee, MessagingReceipt} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; // @dev unable to inherit ERC20 because the OFTAdapter needs to use this interface as well interface IOFT { struct SendParam { bytes32 to; uint amountLD; uint minAmountLD; uint32 dstEid; } error LDMinusSD(); error AmountSlippage(uint _amountLDSend, uint256 _minAmountLD); event SetInspector(address _inspector); event SendOFT(bytes32 indexed _guid, address indexed _fromAddress, uint _amountLD, bytes _composeMsg); event ReceiveOFT(bytes32 indexed _guid, address indexed _toAddress, uint _amountLD); function token() external view returns (address); function quoteSendFee( SendParam calldata _send, bytes calldata _options, bool _useLZToken, bytes calldata _composeMsg ) external view returns (uint nativeFee, uint lzTokenFee); function send( SendParam calldata _send, bytes calldata _options, MessagingFee calldata _msgFee, address payable _refundAddress, bytes calldata _composeMsg ) external payable returns (MessagingReceipt memory); }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.8.0; struct PacketForQuote { address sender; uint32 dstEid; bytes message; } struct Packet { uint64 nonce; uint32 srcEid; address sender; uint32 dstEid; bytes32 receiver; bytes32 guid; bytes message; } struct Origin { uint32 srcEid; bytes32 sender; uint64 nonce; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.8.0; import "./IMessageLibManager.sol"; import "./IMessagingComposer.sol"; import "./IMessagingChannel.sol"; import "./IMessagingContext.sol"; import {Origin} from "../MessagingStructs.sol"; struct MessagingParams { uint32 dstEid; bytes32 receiver; bytes message; bytes options; } struct MessagingReceipt { bytes32 guid; uint64 nonce; MessagingFee fee; } struct MessagingFee { uint nativeFee; uint lzTokenFee; } interface ILayerZeroEndpointV2 is IMessageLibManager, IMessagingComposer, IMessagingChannel, IMessagingContext { event PacketSent(bytes encodedPayload, bytes options, address sendLibrary); event PacketDelivered(Origin origin, address receiver, bytes32 payloadHash); event PacketReceived(Origin origin, address receiver); event LzReceiveFailed(Origin origin, address receiver, bytes reason); event LayerZeroTokenSet(address token); function quote( address _sender, uint32 _dstEid, bytes calldata _message, bool _payInLzToken, bytes calldata _options ) external view returns (MessagingFee memory); function send( MessagingParams calldata _params, uint _lzTokenFee, address payable _refundAddress ) external payable returns (MessagingReceipt memory); function sendWithAlt( MessagingParams calldata _params, uint _lzTokenFee, uint _altTokenFee ) external returns (MessagingReceipt memory); function deliver(Origin calldata _origin, address _receiver, bytes32 _payloadHash) external; function deliverable(Origin calldata _origin, address _receiveLib, address _receiver) external view returns (bool); function lzReceive( Origin calldata _origin, address _receiver, bytes32 _guid, bytes calldata _message, bytes calldata _extraData ) external payable returns (bool, bytes memory); // oapp can burn messages partially by calling this function with its own business logic if messages are delivered in order function clear(Origin calldata _origin, bytes32 _guid, bytes calldata _message) external; function setLayerZeroToken(address _layerZeroToken) external; function layerZeroToken() external view returns (address); function altFeeToken() external view returns (address); }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.8.0; struct SetConfigParam { uint32 configType; bytes config; } interface IMessageLibManager { struct Timeout { address lib; uint expiry; } event LibraryRegistered(address newLib); event DefaultSendLibrarySet(uint32 eid, address newLib); event DefaultReceiveLibrarySet(uint32 eid, address oldLib, address newLib); event DefaultReceiveLibraryTimeoutSet(uint32 eid, address oldLib, uint expiry); event SendLibrarySet(address sender, uint32 eid, address newLib); event ReceiveLibrarySet(address receiver, uint32 eid, address oldLib, address newLib); event ReceiveLibraryTimoutSet(address receiver, uint32 eid, address oldLib, uint timeout); function registerLibrary(address _lib) external; function isRegisteredLibrary(address _lib) external view returns (bool); function getRegisteredLibraries() external view returns (address[] memory); function setDefaultSendLibrary(uint32 _eid, address _newLib) external; function defaultSendLibrary(uint32 _eid) external view returns (address); function setDefaultReceiveLibrary(uint32 _eid, address _newLib, uint _timeout) external; function defaultReceiveLibrary(uint32 _eid) external view returns (address); function setDefaultReceiveLibraryTimeout(uint32 _eid, address _lib, uint _expiry) external; function defaultReceiveLibraryTimeout(uint32 _eid) external view returns (address lib, uint expiry); function defaultConfig(address _lib, uint32 _eid, uint32 _configType) external view returns (bytes memory); function isSupportedEid(uint32 _eid) external view returns (bool); /// ------------------- OApp interfaces ------------------- function setSendLibrary(uint32 _eid, address _newLib) external; function getSendLibrary(address _sender, uint32 _eid) external view returns (address lib); function isDefaultSendLibrary(address _sender, uint32 _eid) external view returns (bool); function setReceiveLibrary(uint32 _eid, address _newLib, uint _gracePeriod) external; function getReceiveLibrary(address _receiver, uint32 _eid) external view returns (address lib, bool isDefault); function setReceiveLibraryTimeout(uint32 _eid, address _lib, uint _gracePeriod) external; function receiveLibraryTimeout(address _receiver, uint32 _eid) external view returns (address lib, uint expiry); function setConfig(address _lib, uint32 _eid, SetConfigParam[] calldata _params) external; function getConfig( address _oapp, address _lib, uint32 _eid, uint32 _configType ) external view returns (bytes memory config, bool isDefault); function snapshotConfig(address _lib, uint32[] calldata _eids) external; function resetConfig(address _lib, uint32[] calldata _eids) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.8.0; interface IMessagingChannel { event InboundNonceSkipped(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce); function eid() external view returns (uint32); // this is an emergency function if a message can not be delivered for some reasons // required to provide _nextNonce to avoid race condition function skip(uint32 _srcEid, bytes32 _sender, uint64 _nonce) external; function nextGuid(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (bytes32); function inboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64); function outboundNonce(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (uint64); function inboundPayloadHash( address _receiver, uint32 _srcEid, bytes32 _sender, uint64 _nonce ) external view returns (bytes32); function hasPayloadHash( address _receiver, uint32 _srcEid, bytes32 _sender, uint64 _nonce ) external view returns (bool); }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.8.0; interface IMessagingComposer { event ComposedMessageDelivered(address receiver, address composer, bytes32 guid, bytes message); event ComposedMessageReceived(address receiver, address composer, bytes32 guid); event LzComposeFailed(address receiver, address composer, bytes32 guid, bytes reason); function deliverComposedMessage(address _composer, bytes32 _guid, bytes calldata _message) external; function lzCompose( address _receiver, address _composer, bytes32 _guid, bytes calldata _message, bytes calldata _extraData ) external payable returns (bool, bytes memory); }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.8.0; interface IMessagingContext { function isSendingMessage() external view returns (bool); function getSendContext() external view returns (uint32, address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/Address.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; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ 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)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ 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"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ 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"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // 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 cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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); } } }
// SPDX-License-Identifier: LZBL-1.1 // Copyright 2023 LayerZero Labs Ltd. // You may obtain a copy of the License at // https://github.com/LayerZero-Labs/license/blob/main/LICENSE-LZBL-1.1 pragma solidity ^0.8.0; import "@layerzerolabs/lz-evm-oapp-v2/contracts/standards/oft/interfaces/IOFT.sol"; interface IRecolorHelper { /// ------ local transfer function ----- /// @dev send USDV into this account and then ATOMICALLY transfer out with color function transferWithColor(address _receiver, uint256 _amount, uint32 _toColor) external; /// @dev it requires the caller to approve this contract to spend their USDV function approvedTransferWithColor(address _receiver, uint256 _amount, uint32 _toColor) external; /// ------ crosschain transfer function transfer function ----- /// @dev send USDV into this account and then ATOMICALLY send across-chain function sendWithColor( IOFT.SendParam calldata _param, uint32 _toColor, bytes calldata _extraOptions, MessagingFee calldata _msgFee, address payable _refundAddress, bytes calldata _composeMsg ) external payable returns (MessagingReceipt memory); /// @dev it requires the caller to approve this contract to spend their USDV function approvedSendWithColor( IOFT.SendParam calldata _param, uint32 _toColor, bytes calldata _extraOptions, MessagingFee calldata _msgFee, address payable _refundAddress, bytes calldata _composeMsg ) external payable returns (MessagingReceipt memory); }
// SPDX-License-Identifier: LZBL-1.1 // Copyright 2023 LayerZero Labs Ltd. // You may obtain a copy of the License at // https://github.com/LayerZero-Labs/license/blob/main/LICENSE-LZBL-1.1 pragma solidity ^0.8.0; import "@layerzerolabs/lz-evm-oapp-v2/contracts/standards/oft/interfaces/IOFT.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; struct Delta { uint32 color; int64 amount; } struct State { uint32 color; uint64 balance; // config bool blacklisted; uint32 defaultColor; } enum Role { OWNER, OPERATOR, VAULT, MESSAGING, FOUNDATION } interface IUSDV is IOFT, IERC20Upgradeable { error Unauthorized(); error InvalidUser(); error InvalidArgument(); error NotImplemented(); error InsufficientBalance(); error Paused(); error Blacklisted(); error FeeTooHigh(); // role assigment event SetRole(Role role, address addr); event SetColorer(address indexed caller, address indexed user, address colorer); event SetDefaultColor(address indexed caller, address indexed user, uint32 defaultColor); // governance state event SetBlacklist(address indexed user, bool isBlacklisted); event SetPause(bool paused); // cross-chain events event Synced(bytes32 guid, Delta[] deltas); function mint(address _receiver, uint64 _amount, uint32 _color) external; function burn(address _from, uint64 _amount, uint32[] calldata _delta) external returns (Delta[] memory deltas); /// -------- coloring interfaces -------- function setColorer(address _user, address _colorer) external; function setDefaultColor(address _user, uint32 _defaultColor) external; /// -------- governance interfaces -------- function setPause(bool _pause) external; function setRole(Role _role, address _addr) external; /// -------- cross-chain interfaces (non-OFT) -------- function sendAck(bytes32 _guid, address _receiver, uint32 _color, uint64 _amount, uint64 _theta) external; function syncDelta( uint32 _dstEid, uint64 _theta, uint32[] calldata _deficits, uint64 _feeCap, bytes calldata _extraOptions, MessagingFee calldata _msgFee, address payable _refundAddress ) external payable returns (MessagingReceipt memory msgReceipt); function syncDeltaAck(Delta[] calldata _deltas) external; function quoteSyncDeltaFee( uint32 _dstEid, uint32 _numDeficits, bytes calldata _extraOptions, bool _useLzToken ) external view returns (uint nativeFee, uint lzTokenFee); function userStates( address _user ) external view returns (uint32 color, uint64 balance, bool blacklisted, uint32 defaultColor); }
{ "evmVersion": "paris", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 5000 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_usdv","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"components":[{"internalType":"bytes32","name":"to","type":"bytes32"},{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"uint32","name":"dstEid","type":"uint32"}],"internalType":"struct IOFT.SendParam","name":"_param","type":"tuple"},{"internalType":"uint32","name":"_toColor","type":"uint32"},{"internalType":"bytes","name":"_extraOptions","type":"bytes"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"_msgFee","type":"tuple"},{"internalType":"address payable","name":"_refundAddress","type":"address"},{"internalType":"bytes","name":"_composeMsg","type":"bytes"}],"name":"approvedSendWithColor","outputs":[{"components":[{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"fee","type":"tuple"}],"internalType":"struct MessagingReceipt","name":"","type":"tuple"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint32","name":"_toColor","type":"uint32"}],"name":"approvedTransferWithColor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"to","type":"bytes32"},{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"uint32","name":"dstEid","type":"uint32"}],"internalType":"struct IOFT.SendParam","name":"_param","type":"tuple"},{"internalType":"uint32","name":"_toColor","type":"uint32"},{"internalType":"bytes","name":"_extraOptions","type":"bytes"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"_msgFee","type":"tuple"},{"internalType":"address payable","name":"_refundAddress","type":"address"},{"internalType":"bytes","name":"_composeMsg","type":"bytes"}],"name":"sendWithColor","outputs":[{"components":[{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"fee","type":"tuple"}],"internalType":"struct MessagingReceipt","name":"","type":"tuple"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint32","name":"_toColor","type":"uint32"}],"name":"transferWithColor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdv","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b50604051610e31380380610e3183398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051610d7d6100b46000396000818160d5015281816101a5015281816101eb01528181610265015281816103110152818161049701526105220152610d7d6000f3fe60806040526004361061005a5760003560e01c80639420069c116100435780639420069c146100c3578063c5a55dcb1461011c578063f13259d01461013e57600080fd5b80630647493e1461005f57806337156e0d146100b0575b600080fd5b61007261006d366004610993565b61015e565b604080518251815260208084015167ffffffffffffffff16818301529282015180519282019290925291015160608201526080015b60405180910390f35b6100726100be366004610993565b610183565b3480156100cf57600080fd5b506100f77f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100a7565b34801561012857600080fd5b5061013c610137366004610a7f565b6101d1565b005b34801561014a57600080fd5b5061013c610159366004610a7f565b610213565b6101666108c4565b6101768989898989898989610223565b9998505050505050505050565b61018b6108c4565b61016673ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333060208d0135610399565b61021373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333085610399565b61021e83838361045d565b505050565b61022b6108c4565b6040517f4f3e1c5500000000000000000000000000000000000000000000000000000000815230600482015263ffffffff891660248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634f3e1c5590604401600060405180830381600087803b1580156102be57600080fd5b505af11580156102d2573d6000803e3d6000fd5b50506040517f07abceb700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001692506307abceb791503490610356908d908c908c908c908c908c908c90600401610ae8565b60806040518083038185885af1158015610374573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906101769190610bd0565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526104579085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261054b565b50505050565b6040517f4f3e1c5500000000000000000000000000000000000000000000000000000000815230600482015263ffffffff821660248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634f3e1c5590604401600060405180830381600087803b1580156104f057600080fd5b505af1158015610504573d6000803e3d6000fd5b5061021e92505073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169050848461065f565b60006105ad826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166106b59092919063ffffffff16565b90508051600014806105ce5750808060200190518101906105ce9190610cab565b61021e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261021e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016103f3565b60606106c484846000856106cc565b949350505050565b60608247101561075e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610656565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516107879190610cf8565b60006040518083038185875af1925050503d80600081146107c4576040519150601f19603f3d011682016040523d82523d6000602084013e6107c9565b606091505b50915091506107da878383876107e5565b979650505050505050565b6060831561087b5782516000036108745773ffffffffffffffffffffffffffffffffffffffff85163b610874576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610656565b50816106c4565b6106c483838151156108905781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106569190610d14565b604051806060016040528060008019168152602001600067ffffffffffffffff168152602001610907604051806040016040528060008152602001600081525090565b905290565b803563ffffffff8116811461092057600080fd5b919050565b60008083601f84011261093757600080fd5b50813567ffffffffffffffff81111561094f57600080fd5b60208301915083602082850101111561096757600080fd5b9250929050565b73ffffffffffffffffffffffffffffffffffffffff8116811461099057600080fd5b50565b600080600080600080600080888a036101408112156109b157600080fd5b60808112156109bf57600080fd5b8998506109ce60808b0161090c565b975060a08a013567ffffffffffffffff808211156109eb57600080fd5b6109f78d838e01610925565b909950975087915060407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4084011215610a2f57600080fd5b60c08c0196506101008c01359250610a468361096e565b9194506101208b01359180831115610a5d57600080fd5b5050610a6b8b828c01610925565b999c989b5096995094979396929594505050565b600080600060608486031215610a9457600080fd5b8335610a9f8161096e565b925060208401359150610ab46040850161090c565b90509250925092565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b60006101208935835260208a0135602084015260408a0135604084015263ffffffff610b1660608c0161090c565b166060840152806080840152610b2f818401898b610abd565b9050863560a0840152602087013560c084015273ffffffffffffffffffffffffffffffffffffffff861660e0840152828103610100840152610b72818587610abd565b9a9950505050505050505050565b6040805190810167ffffffffffffffff81118282101715610bca577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405290565b60008183036080811215610be357600080fd5b6040516060810167ffffffffffffffff8282108183111715610c2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8160405285518352602086015191508082168214610c4b57600080fd5b50602082015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc083011215610c8157600080fd5b610c89610b80565b6040858101518252606090950151602082015293810193909352509092915050565b600060208284031215610cbd57600080fd5b81518015158114610ccd57600080fd5b9392505050565b60005b83811015610cef578181015183820152602001610cd7565b50506000910152565b60008251610d0a818460208701610cd4565b9190910192915050565b6020815260008251806020840152610d33816040850160208701610cd4565b601f01601f1916919091016040019291505056fea26469706673582212209d8237414b6a000e042f097688f792655a95c9328d9287c408b72cca742e9baf64736f6c63430008130033000000000000000000000000323665443cef804a3b5206103304bd4872ea4253
Deployed Bytecode
0x60806040526004361061005a5760003560e01c80639420069c116100435780639420069c146100c3578063c5a55dcb1461011c578063f13259d01461013e57600080fd5b80630647493e1461005f57806337156e0d146100b0575b600080fd5b61007261006d366004610993565b61015e565b604080518251815260208084015167ffffffffffffffff16818301529282015180519282019290925291015160608201526080015b60405180910390f35b6100726100be366004610993565b610183565b3480156100cf57600080fd5b506100f77f000000000000000000000000323665443cef804a3b5206103304bd4872ea425381565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100a7565b34801561012857600080fd5b5061013c610137366004610a7f565b6101d1565b005b34801561014a57600080fd5b5061013c610159366004610a7f565b610213565b6101666108c4565b6101768989898989898989610223565b9998505050505050505050565b61018b6108c4565b61016673ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000323665443cef804a3b5206103304bd4872ea425316333060208d0135610399565b61021373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000323665443cef804a3b5206103304bd4872ea425316333085610399565b61021e83838361045d565b505050565b61022b6108c4565b6040517f4f3e1c5500000000000000000000000000000000000000000000000000000000815230600482015263ffffffff891660248201527f000000000000000000000000323665443cef804a3b5206103304bd4872ea425373ffffffffffffffffffffffffffffffffffffffff1690634f3e1c5590604401600060405180830381600087803b1580156102be57600080fd5b505af11580156102d2573d6000803e3d6000fd5b50506040517f07abceb700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000323665443cef804a3b5206103304bd4872ea42531692506307abceb791503490610356908d908c908c908c908c908c908c90600401610ae8565b60806040518083038185885af1158015610374573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906101769190610bd0565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526104579085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261054b565b50505050565b6040517f4f3e1c5500000000000000000000000000000000000000000000000000000000815230600482015263ffffffff821660248201527f000000000000000000000000323665443cef804a3b5206103304bd4872ea425373ffffffffffffffffffffffffffffffffffffffff1690634f3e1c5590604401600060405180830381600087803b1580156104f057600080fd5b505af1158015610504573d6000803e3d6000fd5b5061021e92505073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000323665443cef804a3b5206103304bd4872ea4253169050848461065f565b60006105ad826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166106b59092919063ffffffff16565b90508051600014806105ce5750808060200190518101906105ce9190610cab565b61021e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261021e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016103f3565b60606106c484846000856106cc565b949350505050565b60608247101561075e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610656565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516107879190610cf8565b60006040518083038185875af1925050503d80600081146107c4576040519150601f19603f3d011682016040523d82523d6000602084013e6107c9565b606091505b50915091506107da878383876107e5565b979650505050505050565b6060831561087b5782516000036108745773ffffffffffffffffffffffffffffffffffffffff85163b610874576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610656565b50816106c4565b6106c483838151156108905781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106569190610d14565b604051806060016040528060008019168152602001600067ffffffffffffffff168152602001610907604051806040016040528060008152602001600081525090565b905290565b803563ffffffff8116811461092057600080fd5b919050565b60008083601f84011261093757600080fd5b50813567ffffffffffffffff81111561094f57600080fd5b60208301915083602082850101111561096757600080fd5b9250929050565b73ffffffffffffffffffffffffffffffffffffffff8116811461099057600080fd5b50565b600080600080600080600080888a036101408112156109b157600080fd5b60808112156109bf57600080fd5b8998506109ce60808b0161090c565b975060a08a013567ffffffffffffffff808211156109eb57600080fd5b6109f78d838e01610925565b909950975087915060407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4084011215610a2f57600080fd5b60c08c0196506101008c01359250610a468361096e565b9194506101208b01359180831115610a5d57600080fd5b5050610a6b8b828c01610925565b999c989b5096995094979396929594505050565b600080600060608486031215610a9457600080fd5b8335610a9f8161096e565b925060208401359150610ab46040850161090c565b90509250925092565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b60006101208935835260208a0135602084015260408a0135604084015263ffffffff610b1660608c0161090c565b166060840152806080840152610b2f818401898b610abd565b9050863560a0840152602087013560c084015273ffffffffffffffffffffffffffffffffffffffff861660e0840152828103610100840152610b72818587610abd565b9a9950505050505050505050565b6040805190810167ffffffffffffffff81118282101715610bca577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405290565b60008183036080811215610be357600080fd5b6040516060810167ffffffffffffffff8282108183111715610c2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8160405285518352602086015191508082168214610c4b57600080fd5b50602082015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc083011215610c8157600080fd5b610c89610b80565b6040858101518252606090950151602082015293810193909352509092915050565b600060208284031215610cbd57600080fd5b81518015158114610ccd57600080fd5b9392505050565b60005b83811015610cef578181015183820152602001610cd7565b50506000910152565b60008251610d0a818460208701610cd4565b9190910192915050565b6020815260008251806020840152610d33816040850160208701610cd4565b601f01601f1916919091016040019291505056fea26469706673582212209d8237414b6a000e042f097688f792655a95c9328d9287c408b72cca742e9baf64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000323665443cef804a3b5206103304bd4872ea4253
-----Decoded View---------------
Arg [0] : _usdv (address): 0x323665443CEf804A3b5206103304BD4872EA4253
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000323665443cef804a3b5206103304bd4872ea4253
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
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.