Source Code
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ERC20Module
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "../interfaces/IERC6551Executable.sol";
import "../interfaces/IPackModule.sol";
/**
* @title ERC20Module
* @dev This contract is a module for handling ERC20 tokens in packs.
*/
contract ERC20Module is IPackModule {
//
uint256 public constant CALL_OPERATION = 0; // Only call operations are supported for ERC6551
uint256 public constant CALL_VALUE = 0; // No value is sent with the call
/**
* @dev Struct to hold data for tokens on creation of a pack.
* @param tokenAddress The address of the ERC20 token.
* @param amount The amount of the token to be included in the pack.
*/
struct OnCreateData {
address tokenAddress;
uint256 amount;
}
/**
* @dev Struct to hold data for tokens on revocation of a pack.
* @param tokenAddress The address of the ERC20 token.
*/
struct OnRevokeData {
address tokenAddress;
}
/**
* @dev Struct to hold data for tokens on claim of a pack.
* @param tokenAddress The address of the ERC20 token.
*/
struct OnClaimData {
address tokenAddress;
}
// Lifecycle functions
/**
* @dev Function to handle token transfers on creation of a pack.
* @param account The address of the account creating the pack.
* @param additionalData The data for the tokens to be included in the pack.
*/
function onCreate(
uint256 /* tokenId */,
address account,
bytes calldata additionalData
) external payable override {
// unpack data
OnCreateData[] memory tokensData = abi.decode(
additionalData,
(OnCreateData[])
);
// Iterate over the array of TokenData objects
for (uint256 i = 0; i < tokensData.length; i++) {
OnCreateData memory tokenData = tokensData[i];
SafeERC20.safeTransferFrom(
IERC20(tokenData.tokenAddress),
msg.sender,
account,
tokenData.amount
);
}
return;
}
/**
* @dev Function to handle token transfers on opening of a pack.
* @param account The address of the account opening the pack.
* @param claimer The address of the account claiming the pack.
* @param additionalData The data for the tokens to be claimed from the pack.
*/
function onOpen(
uint256 /* tokenId */,
address account,
address claimer,
bytes calldata additionalData
) external override {
// unpack data
OnClaimData[] memory tokensData = abi.decode(
additionalData,
(OnClaimData[])
);
// Iterate over the array of TokenData objects
for (uint256 i = 0; i < tokensData.length; i++) {
OnClaimData memory tokenData = tokensData[i];
uint256 balance = IERC20(tokenData.tokenAddress).balanceOf(account);
IERC6551Executable(payable(account)).execute(
tokenData.tokenAddress,
CALL_VALUE,
abi.encodeWithSignature(
"transfer(address,uint256)",
claimer,
balance
),
CALL_OPERATION
);
}
return;
}
/**
* @dev Function to handle token transfers on revocation of a pack.
* @param account The address of the account revoking the pack.
* @param additionalData The data for the tokens to be revoked from the pack.
*/
function onRevoke(
uint256 /* tokenId */,
address account,
bytes calldata additionalData
) external override {
// unpack data
OnRevokeData[] memory tokensData = abi.decode(
additionalData,
(OnRevokeData[])
);
// Iterate over the array of TokenData objects
for (uint256 i = 0; i < tokensData.length; i++) {
OnRevokeData memory tokenData = tokensData[i];
uint256 balance = IERC20(tokenData.tokenAddress).balanceOf(account);
IERC6551Executable(payable(account)).execute(
tokenData.tokenAddress,
CALL_VALUE,
abi.encodeWithSignature(
"transfer(address,uint256)",
msg.sender,
balance
),
CALL_OPERATION
);
}
return;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.20;
/**
* @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.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
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].
*
* CAUTION: See Security Considerations above.
*/
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 v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @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 value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../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 An operation with an ERC20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, 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);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @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.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @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);
if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @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(token).code.length > 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @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 or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* 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.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @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`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) 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 FailedInnerCall();
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @dev the ERC-165 identifier for this interface is `0x74420f4c`
interface IERC6551Executable {
/**
* @dev Executes a low-level operation if the caller is a valid signer on the account
*
* Reverts and bubbles up error if operation fails
*
* @param to The target address of the operation
* @param value The Ether value to be sent to the target
* @param data The encoded operation calldata
* @param operation A value indicating the type of operation to perform
*
* Accounts implementing this interface MUST accept the following operation parameter values:
* - 0 = CALL
* - 1 = DELEGATECALL
* - 2 = CREATE
* - 3 = CREATE2
*
* Accounts implementing this interface MAY support additional operations or restrict a signer's
* ability to execute certain operations
*
* @return The result of the operation
*/
function execute(
address to,
uint256 value,
bytes calldata data,
uint256 operation
) external payable returns (bytes memory);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface IPackModule {
// Lifecycle functions
function onCreate(
uint256 tokenId,
address account,
bytes calldata additionalData
) external payable;
function onOpen(
uint256 tokenId,
address account,
address claimer,
bytes calldata additionalData
) external;
function onRevoke(
uint256 tokenId,
address account,
bytes calldata additionalData
) external;
}{
"evmVersion": "paris",
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"CALL_OPERATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CALL_VALUE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes","name":"additionalData","type":"bytes"}],"name":"onCreate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"claimer","type":"address"},{"internalType":"bytes","name":"additionalData","type":"bytes"}],"name":"onOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes","name":"additionalData","type":"bytes"}],"name":"onRevoke","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b5061131a806100206000396000f3fe60806040526004361061004a5760003560e01c806315a3966f1461004f5780631d19868814610078578063c56d786e146100a3578063d3f43c78146100bf578063f37e724e146100ea575b600080fd5b34801561005b57600080fd5b506100766004803603810190610071919061095d565b610113565b005b34801561008457600080fd5b5061008d61030e565b60405161009a91906109f4565b60405180910390f35b6100bd60048036038101906100b89190610a0f565b610313565b005b3480156100cb57600080fd5b506100d4610381565b6040516100e191906109f4565b60405180910390f35b3480156100f657600080fd5b50610111600480360381019061010c9190610a0f565b610386565b005b600082828101906101249190610c13565b905060005b815181101561030557600082828151811061014757610146610c5c565b5b602002602001015190506000816000015173ffffffffffffffffffffffffffffffffffffffff166370a08231896040518263ffffffff1660e01b81526004016101909190610c9a565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610cca565b90508773ffffffffffffffffffffffffffffffffffffffff166374420f4c836000015160008a85604051602401610209929190610cf7565b6040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060006040518563ffffffff1660e01b81526004016102a79493929190610d9f565b6000604051808303816000875af11580156102c6573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906102ef9190610e91565b50505080806102fd90610f09565b915050610129565b50505050505050565b600081565b600082828101906103249190611064565b905060005b815181101561037957600082828151811061034757610346610c5c565b5b60200260200101519050610365816000015133888460200151610580565b50808061037190610f09565b915050610329565b505050505050565b600081565b6000828281019061039791906111ac565b905060005b81518110156105785760008282815181106103ba576103b9610c5c565b5b602002602001015190506000816000015173ffffffffffffffffffffffffffffffffffffffff166370a08231886040518263ffffffff1660e01b81526004016104039190610c9a565b602060405180830381865afa158015610420573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104449190610cca565b90508673ffffffffffffffffffffffffffffffffffffffff166374420f4c83600001516000338560405160240161047c929190610cf7565b6040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060006040518563ffffffff1660e01b815260040161051a9493929190610d9f565b6000604051808303816000875af1158015610539573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906105629190610e91565b505050808061057090610f09565b91505061039c565b505050505050565b6105fc848573ffffffffffffffffffffffffffffffffffffffff166323b872dd8686866040516024016105b5939291906111f5565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610602565b50505050565b600061062d828473ffffffffffffffffffffffffffffffffffffffff1661069990919063ffffffff16565b905060008151141580156106525750808060200190518101906106509190611264565b155b1561069457826040517f5274afe700000000000000000000000000000000000000000000000000000000815260040161068b9190610c9a565b60405180910390fd5b505050565b60606106a7838360006106af565b905092915050565b6060814710156106f657306040517fcd7860590000000000000000000000000000000000000000000000000000000081526004016106ed9190610c9a565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16848660405161071f91906112cd565b60006040518083038185875af1925050503d806000811461075c576040519150601f19603f3d011682016040523d82523d6000602084013e610761565b606091505b509150915061077186838361077c565b925050509392505050565b6060826107915761078c8261080b565b610803565b600082511480156107b9575060008473ffffffffffffffffffffffffffffffffffffffff163b145b156107fb57836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016107f29190610c9a565b60405180910390fd5b819050610804565b5b9392505050565b60008151111561081e5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61087781610864565b811461088257600080fd5b50565b6000813590506108948161086e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006108c58261089a565b9050919050565b6108d5816108ba565b81146108e057600080fd5b50565b6000813590506108f2816108cc565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261091d5761091c6108f8565b5b8235905067ffffffffffffffff81111561093a576109396108fd565b5b60208301915083600182028301111561095657610955610902565b5b9250929050565b6000806000806000608086880312156109795761097861085a565b5b600061098788828901610885565b9550506020610998888289016108e3565b94505060406109a9888289016108e3565b935050606086013567ffffffffffffffff8111156109ca576109c961085f565b5b6109d688828901610907565b92509250509295509295909350565b6109ee81610864565b82525050565b6000602082019050610a0960008301846109e5565b92915050565b60008060008060608587031215610a2957610a2861085a565b5b6000610a3787828801610885565b9450506020610a48878288016108e3565b935050604085013567ffffffffffffffff811115610a6957610a6861085f565b5b610a7587828801610907565b925092505092959194509250565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610acc82610a83565b810181811067ffffffffffffffff82111715610aeb57610aea610a94565b5b80604052505050565b6000610afe610850565b9050610b0a8282610ac3565b919050565b600067ffffffffffffffff821115610b2a57610b29610a94565b5b602082029050602081019050919050565b600080fd5b600060208284031215610b5657610b55610b3b565b5b610b606020610af4565b90506000610b70848285016108e3565b60008301525092915050565b6000610b8f610b8a84610b0f565b610af4565b90508083825260208201905060208402830185811115610bb257610bb1610902565b5b835b81811015610bdb5780610bc78882610b40565b845260208401935050602081019050610bb4565b5050509392505050565b600082601f830112610bfa57610bf96108f8565b5b8135610c0a848260208601610b7c565b91505092915050565b600060208284031215610c2957610c2861085a565b5b600082013567ffffffffffffffff811115610c4757610c4661085f565b5b610c5384828501610be5565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b610c94816108ba565b82525050565b6000602082019050610caf6000830184610c8b565b92915050565b600081519050610cc48161086e565b92915050565b600060208284031215610ce057610cdf61085a565b5b6000610cee84828501610cb5565b91505092915050565b6000604082019050610d0c6000830185610c8b565b610d1960208301846109e5565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d5a578082015181840152602081019050610d3f565b60008484015250505050565b6000610d7182610d20565b610d7b8185610d2b565b9350610d8b818560208601610d3c565b610d9481610a83565b840191505092915050565b6000608082019050610db46000830187610c8b565b610dc160208301866109e5565b8181036040830152610dd38185610d66565b9050610de260608301846109e5565b95945050505050565b600080fd5b600067ffffffffffffffff821115610e0b57610e0a610a94565b5b610e1482610a83565b9050602081019050919050565b6000610e34610e2f84610df0565b610af4565b905082815260208101848484011115610e5057610e4f610deb565b5b610e5b848285610d3c565b509392505050565b600082601f830112610e7857610e776108f8565b5b8151610e88848260208601610e21565b91505092915050565b600060208284031215610ea757610ea661085a565b5b600082015167ffffffffffffffff811115610ec557610ec461085f565b5b610ed184828501610e63565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610f1482610864565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610f4657610f45610eda565b5b600182019050919050565b600067ffffffffffffffff821115610f6c57610f6b610a94565b5b602082029050602081019050919050565b600060408284031215610f9357610f92610b3b565b5b610f9d6040610af4565b90506000610fad848285016108e3565b6000830152506020610fc184828501610885565b60208301525092915050565b6000610fe0610fdb84610f51565b610af4565b9050808382526020820190506040840283018581111561100357611002610902565b5b835b8181101561102c57806110188882610f7d565b845260208401935050604081019050611005565b5050509392505050565b600082601f83011261104b5761104a6108f8565b5b813561105b848260208601610fcd565b91505092915050565b60006020828403121561107a5761107961085a565b5b600082013567ffffffffffffffff8111156110985761109761085f565b5b6110a484828501611036565b91505092915050565b600067ffffffffffffffff8211156110c8576110c7610a94565b5b602082029050602081019050919050565b6000602082840312156110ef576110ee610b3b565b5b6110f96020610af4565b90506000611109848285016108e3565b60008301525092915050565b6000611128611123846110ad565b610af4565b9050808382526020820190506020840283018581111561114b5761114a610902565b5b835b81811015611174578061116088826110d9565b84526020840193505060208101905061114d565b5050509392505050565b600082601f830112611193576111926108f8565b5b81356111a3848260208601611115565b91505092915050565b6000602082840312156111c2576111c161085a565b5b600082013567ffffffffffffffff8111156111e0576111df61085f565b5b6111ec8482850161117e565b91505092915050565b600060608201905061120a6000830186610c8b565b6112176020830185610c8b565b61122460408301846109e5565b949350505050565b60008115159050919050565b6112418161122c565b811461124c57600080fd5b50565b60008151905061125e81611238565b92915050565b60006020828403121561127a5761127961085a565b5b60006112888482850161124f565b91505092915050565b600081905092915050565b60006112a782610d20565b6112b18185611291565b93506112c1818560208601610d3c565b80840191505092915050565b60006112d9828461129c565b91508190509291505056fea2646970667358221220a58783b4f27f45a30c69b5afb0cb6de4f039245b303ece78c858b3c38f0bc3cf64736f6c63430008140033
Deployed Bytecode
0x60806040526004361061004a5760003560e01c806315a3966f1461004f5780631d19868814610078578063c56d786e146100a3578063d3f43c78146100bf578063f37e724e146100ea575b600080fd5b34801561005b57600080fd5b506100766004803603810190610071919061095d565b610113565b005b34801561008457600080fd5b5061008d61030e565b60405161009a91906109f4565b60405180910390f35b6100bd60048036038101906100b89190610a0f565b610313565b005b3480156100cb57600080fd5b506100d4610381565b6040516100e191906109f4565b60405180910390f35b3480156100f657600080fd5b50610111600480360381019061010c9190610a0f565b610386565b005b600082828101906101249190610c13565b905060005b815181101561030557600082828151811061014757610146610c5c565b5b602002602001015190506000816000015173ffffffffffffffffffffffffffffffffffffffff166370a08231896040518263ffffffff1660e01b81526004016101909190610c9a565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610cca565b90508773ffffffffffffffffffffffffffffffffffffffff166374420f4c836000015160008a85604051602401610209929190610cf7565b6040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060006040518563ffffffff1660e01b81526004016102a79493929190610d9f565b6000604051808303816000875af11580156102c6573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906102ef9190610e91565b50505080806102fd90610f09565b915050610129565b50505050505050565b600081565b600082828101906103249190611064565b905060005b815181101561037957600082828151811061034757610346610c5c565b5b60200260200101519050610365816000015133888460200151610580565b50808061037190610f09565b915050610329565b505050505050565b600081565b6000828281019061039791906111ac565b905060005b81518110156105785760008282815181106103ba576103b9610c5c565b5b602002602001015190506000816000015173ffffffffffffffffffffffffffffffffffffffff166370a08231886040518263ffffffff1660e01b81526004016104039190610c9a565b602060405180830381865afa158015610420573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104449190610cca565b90508673ffffffffffffffffffffffffffffffffffffffff166374420f4c83600001516000338560405160240161047c929190610cf7565b6040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060006040518563ffffffff1660e01b815260040161051a9493929190610d9f565b6000604051808303816000875af1158015610539573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906105629190610e91565b505050808061057090610f09565b91505061039c565b505050505050565b6105fc848573ffffffffffffffffffffffffffffffffffffffff166323b872dd8686866040516024016105b5939291906111f5565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610602565b50505050565b600061062d828473ffffffffffffffffffffffffffffffffffffffff1661069990919063ffffffff16565b905060008151141580156106525750808060200190518101906106509190611264565b155b1561069457826040517f5274afe700000000000000000000000000000000000000000000000000000000815260040161068b9190610c9a565b60405180910390fd5b505050565b60606106a7838360006106af565b905092915050565b6060814710156106f657306040517fcd7860590000000000000000000000000000000000000000000000000000000081526004016106ed9190610c9a565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16848660405161071f91906112cd565b60006040518083038185875af1925050503d806000811461075c576040519150601f19603f3d011682016040523d82523d6000602084013e610761565b606091505b509150915061077186838361077c565b925050509392505050565b6060826107915761078c8261080b565b610803565b600082511480156107b9575060008473ffffffffffffffffffffffffffffffffffffffff163b145b156107fb57836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016107f29190610c9a565b60405180910390fd5b819050610804565b5b9392505050565b60008151111561081e5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61087781610864565b811461088257600080fd5b50565b6000813590506108948161086e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006108c58261089a565b9050919050565b6108d5816108ba565b81146108e057600080fd5b50565b6000813590506108f2816108cc565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261091d5761091c6108f8565b5b8235905067ffffffffffffffff81111561093a576109396108fd565b5b60208301915083600182028301111561095657610955610902565b5b9250929050565b6000806000806000608086880312156109795761097861085a565b5b600061098788828901610885565b9550506020610998888289016108e3565b94505060406109a9888289016108e3565b935050606086013567ffffffffffffffff8111156109ca576109c961085f565b5b6109d688828901610907565b92509250509295509295909350565b6109ee81610864565b82525050565b6000602082019050610a0960008301846109e5565b92915050565b60008060008060608587031215610a2957610a2861085a565b5b6000610a3787828801610885565b9450506020610a48878288016108e3565b935050604085013567ffffffffffffffff811115610a6957610a6861085f565b5b610a7587828801610907565b925092505092959194509250565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610acc82610a83565b810181811067ffffffffffffffff82111715610aeb57610aea610a94565b5b80604052505050565b6000610afe610850565b9050610b0a8282610ac3565b919050565b600067ffffffffffffffff821115610b2a57610b29610a94565b5b602082029050602081019050919050565b600080fd5b600060208284031215610b5657610b55610b3b565b5b610b606020610af4565b90506000610b70848285016108e3565b60008301525092915050565b6000610b8f610b8a84610b0f565b610af4565b90508083825260208201905060208402830185811115610bb257610bb1610902565b5b835b81811015610bdb5780610bc78882610b40565b845260208401935050602081019050610bb4565b5050509392505050565b600082601f830112610bfa57610bf96108f8565b5b8135610c0a848260208601610b7c565b91505092915050565b600060208284031215610c2957610c2861085a565b5b600082013567ffffffffffffffff811115610c4757610c4661085f565b5b610c5384828501610be5565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b610c94816108ba565b82525050565b6000602082019050610caf6000830184610c8b565b92915050565b600081519050610cc48161086e565b92915050565b600060208284031215610ce057610cdf61085a565b5b6000610cee84828501610cb5565b91505092915050565b6000604082019050610d0c6000830185610c8b565b610d1960208301846109e5565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d5a578082015181840152602081019050610d3f565b60008484015250505050565b6000610d7182610d20565b610d7b8185610d2b565b9350610d8b818560208601610d3c565b610d9481610a83565b840191505092915050565b6000608082019050610db46000830187610c8b565b610dc160208301866109e5565b8181036040830152610dd38185610d66565b9050610de260608301846109e5565b95945050505050565b600080fd5b600067ffffffffffffffff821115610e0b57610e0a610a94565b5b610e1482610a83565b9050602081019050919050565b6000610e34610e2f84610df0565b610af4565b905082815260208101848484011115610e5057610e4f610deb565b5b610e5b848285610d3c565b509392505050565b600082601f830112610e7857610e776108f8565b5b8151610e88848260208601610e21565b91505092915050565b600060208284031215610ea757610ea661085a565b5b600082015167ffffffffffffffff811115610ec557610ec461085f565b5b610ed184828501610e63565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610f1482610864565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610f4657610f45610eda565b5b600182019050919050565b600067ffffffffffffffff821115610f6c57610f6b610a94565b5b602082029050602081019050919050565b600060408284031215610f9357610f92610b3b565b5b610f9d6040610af4565b90506000610fad848285016108e3565b6000830152506020610fc184828501610885565b60208301525092915050565b6000610fe0610fdb84610f51565b610af4565b9050808382526020820190506040840283018581111561100357611002610902565b5b835b8181101561102c57806110188882610f7d565b845260208401935050604081019050611005565b5050509392505050565b600082601f83011261104b5761104a6108f8565b5b813561105b848260208601610fcd565b91505092915050565b60006020828403121561107a5761107961085a565b5b600082013567ffffffffffffffff8111156110985761109761085f565b5b6110a484828501611036565b91505092915050565b600067ffffffffffffffff8211156110c8576110c7610a94565b5b602082029050602081019050919050565b6000602082840312156110ef576110ee610b3b565b5b6110f96020610af4565b90506000611109848285016108e3565b60008301525092915050565b6000611128611123846110ad565b610af4565b9050808382526020820190506020840283018581111561114b5761114a610902565b5b835b81811015611174578061116088826110d9565b84526020840193505060208101905061114d565b5050509392505050565b600082601f830112611193576111926108f8565b5b81356111a3848260208601611115565b91505092915050565b6000602082840312156111c2576111c161085a565b5b600082013567ffffffffffffffff8111156111e0576111df61085f565b5b6111ec8482850161117e565b91505092915050565b600060608201905061120a6000830186610c8b565b6112176020830185610c8b565b61122460408301846109e5565b949350505050565b60008115159050919050565b6112418161122c565b811461124c57600080fd5b50565b60008151905061125e81611238565b92915050565b60006020828403121561127a5761127961085a565b5b60006112888482850161124f565b91505092915050565b600081905092915050565b60006112a782610d20565b6112b18185611291565b93506112c1818560208601610d3c565b80840191505092915050565b60006112d9828461129c565b91508190509291505056fea2646970667358221220a58783b4f27f45a30c69b5afb0cb6de4f039245b303ece78c858b3c38f0bc3cf64736f6c63430008140033
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.