Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 10688578 | 371 days ago | IN | 0 ETH | 0.0002857 |
Loading...
Loading
Contract Name:
AugustusFeeVault
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.22; // Contracts import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; // Interfaces import { IAugustusFeeVault } from "../interfaces/IAugustusFeeVault.sol"; import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol"; // Libraries import { ERC20Utils } from "../libraries/ERC20Utils.sol"; /// @title Augstus Fee Vault /// @notice Allows partners to collect fees stored in the vault, and allows augustus contracts to register fees contract AugustusFeeVault is IAugustusFeeVault, Ownable { /*////////////////////////////////////////////////////////////// LIBRARIES //////////////////////////////////////////////////////////////*/ using ERC20Utils for IERC20; /*////////////////////////////////////////////////////////////// VARIABLES //////////////////////////////////////////////////////////////*/ /// @dev A mapping of augustus contract addresses to their approval status mapping(address augustus => bool approved) public augustusContracts; // @dev Mapping of fee tokens to stored fee amounts mapping(address account => mapping(IERC20 token => uint256 amount)) public fees; // @dev Mapping of fee tokens to allocated fee amounts mapping(IERC20 token => uint256 amount) public allocatedFees; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor(address[] memory _augustusContracts) Ownable(msg.sender) { // Set augustus verifier contracts for (uint256 i = 0; i < _augustusContracts.length; i++) { augustusContracts[_augustusContracts[i]] = true; emit AugustusApprovalSet(_augustusContracts[i], true); } } /*////////////////////////////////////////////////////////////// MODIFIERS //////////////////////////////////////////////////////////////*/ /// @dev Modifier to check if the caller is an approved augustus contract modifier onlyApprovedAugustus() { if (!augustusContracts[msg.sender]) { revert UnauthorizedCaller(); } _; } /// @dev Verifies that the withdraw amount is not zero modifier validAmount(uint256 amount) { // Check if amount is zero if (amount == 0) { revert InvalidWithdrawAmount(); } _; } /*////////////////////////////////////////////////////////////// PUBLIC //////////////////////////////////////////////////////////////*/ /// @inheritdoc IAugustusFeeVault function withdrawSomeERC20( IERC20 token, uint256 amount, address recipient ) public validAmount(amount) returns (bool success) { /// Check recipient recipient = _checkRecipient(recipient); // Update fees mapping _updateFees(token, msg.sender, amount); // Transfer tokens to recipient token.safeTransfer(recipient, amount); // Return success return true; } /// @inheritdoc IAugustusFeeVault function getUnallocatedFees(IERC20 token) public view returns (uint256 unallocatedFees) { // Get the allocated fees for the given token uint256 allocatedFee = allocatedFees[token]; // Get the balance of the given token uint256 balance = token.getBalance(address(this)); // If the balance is bigger than the allocated fee, then the unallocated fees should // be equal to the balance minus the allocated fee if (balance > allocatedFee) { // Set the unallocated fees to the balance minus the allocated fee unallocatedFees = balance - allocatedFee; } } /*/////////////////////////////////////////////////////////////// EXTERNAL //////////////////////////////////////////////////////////////*/ /// @inheritdoc IAugustusFeeVault function batchWithdrawSomeERC20( IERC20[] calldata tokens, uint256[] calldata amounts, address recipient ) external returns (bool success) { // Check if the length of the tokens and amounts arrays are the same if (tokens.length != amounts.length) { revert InvalidParameterLength(); } // Loop through the tokens and amounts arrays for (uint256 i; i < tokens.length; ++i) { // Collect fees for the given token if (!withdrawSomeERC20(tokens[i], amounts[i], recipient)) { // Revert if collect fails revert BatchCollectFailed(); } } // Return success return true; } /// @inheritdoc IAugustusFeeVault function withdrawAllERC20(IERC20 token, address recipient) public returns (bool success) { // Check recipient recipient = _checkRecipient(recipient); // Get the total fees for msg.sender in the given token uint256 totalBalance = fees[msg.sender][token]; // Make sure the amount is not zero if (totalBalance == 0) { revert InvalidWithdrawAmount(); } // Update fees mapping _updateFees(token, msg.sender, totalBalance); // Transfer tokens to recipient token.safeTransfer(recipient, totalBalance); // Return success return true; } /// @inheritdoc IAugustusFeeVault function batchWithdrawAllERC20(IERC20[] calldata tokens, address recipient) external returns (bool success) { // Loop through the tokens array for (uint256 i; i < tokens.length; ++i) { // Collect all fees for the given token if (!withdrawAllERC20(tokens[i], recipient)) { // Revert if withdrawAllERC20 fails revert BatchCollectFailed(); } } // Return success return true; } /// @inheritdoc IAugustusFeeVault function registerFee(address account, IERC20 token, uint256 fee) external onlyApprovedAugustus { // Get the unallocated fees for the given token uint256 unallocatedFees = getUnallocatedFees(token); // Make sure the fee is not bigger than the unallocated fees if (fee > unallocatedFees) { // If it is, set the fee to the unallocated fees fee = unallocatedFees; } // Update the fees mapping fees[account][token] += fee; // Update the allocated fees mapping allocatedFees[token] += fee; } /// @inheritdoc IAugustusFeeVault function setAugustusApproval(address augustus, bool approved) external onlyOwner { // Set the approval status for the given augustus contract augustusContracts[augustus] = approved; // Emit an event emit AugustusApprovalSet(augustus, approved); } function getBalance(IERC20 token, address partner) external view returns (uint256 feeBalance) { // Get the fees for the given token and partner return fees[partner][token]; } /// @inheritdoc IAugustusFeeVault function batchGetBalance( IERC20[] calldata tokens, address partner ) external view returns (uint256[] memory feeBalances) { // Initialize the feeBalances array feeBalances = new uint256[](tokens.length); // Loop through the tokens array for (uint256 i; i < tokens.length; ++i) { // Get the fees for the given token and partner feeBalances[i] = fees[partner][tokens[i]]; } } /*////////////////////////////////////////////////////////////// PRIVATE //////////////////////////////////////////////////////////////*/ /// @notice Update fees and allocatedFees for a given token and claimer /// @param token The token to update the fees for /// @param claimer The address to withdraw the fees for /// @param withdrawAmount The amount of fees to withdraw function _updateFees(IERC20 token, address claimer, uint256 withdrawAmount) private { // get the fees for the claimer uint256 feesForClaimer = fees[claimer][token]; // revert if withdraw amount is bigger than the fees for the claimer if (withdrawAmount > feesForClaimer) { revert InvalidWithdrawAmount(); } // update the allocated fees allocatedFees[token] -= withdrawAmount; // update the fees for the claimer fees[claimer][token] -= withdrawAmount; } /// @notice Check if recipient is zero address and set it to msg sender if it is, otherwise return recipient /// @param recipient The recipient address /// @return recipient The updated recipient address function _checkRecipient(address recipient) private view returns (address) { // Allow arbitray recipient unless it is zero address if (recipient == address(0)) { recipient = msg.sender; } // Return recipient return recipient; } /*////////////////////////////////////////////////////////////// RECEIVE //////////////////////////////////////////////////////////////*/ /// @notice Reverts if the caller is one of the following: // - 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 receive() external payable { address addr = msg.sender; // solhint-disable-next-line no-inline-assembly assembly ("memory-safe") { if iszero(extcodesize(addr)) { revert(0, 0) } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// 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 pragma solidity 0.8.22; // Interfaces import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol"; /// @title IAugustusFeeVault /// @notice Interface for the AugustusFeeVault contract interface IAugustusFeeVault { /*////////////////////////////////////////////////////////////// ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Error emitted when withdraw amount is zero or exceeds the stored amount error InvalidWithdrawAmount(); /// @notice Error emmitted when caller is not an approved augustus contract error UnauthorizedCaller(); /// @notice Error emitted when an invalid parameter length is passed error InvalidParameterLength(); /// @notice Error emitted when batch withdraw fails error BatchCollectFailed(); /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ /// @notice Emitted when an augustus contract approval status is set /// @param augustus The augustus contract address /// @param approved The approval status event AugustusApprovalSet(address indexed augustus, bool approved); /*////////////////////////////////////////////////////////////// COLLECT //////////////////////////////////////////////////////////////*/ /// @notice Allows partners to withdraw fees allocated to them and stored in the vault /// @param token The token to withdraw fees in /// @param amount The amount of fees to withdraw /// @param recipient The address to send the fees to /// @return success Whether the transfer was successful or not function withdrawSomeERC20(IERC20 token, uint256 amount, address recipient) external returns (bool success); /// @notice Allows partners to withdraw all fees allocated to them and stored in the vault for a given token /// @param token The token to withdraw fees in /// @param recipient The address to send the fees to /// @return success Whether the transfer was successful or not function withdrawAllERC20(IERC20 token, address recipient) external returns (bool success); /// @notice Allows partners to withdraw all fees allocated to them and stored in the vault for multiple tokens /// @param tokens The tokens to withdraw fees i /// @param recipient The address to send the fees to /// @return success Whether the transfer was successful or not function batchWithdrawAllERC20(IERC20[] calldata tokens, address recipient) external returns (bool success); /// @notice Allows partners to withdraw fees allocated to them and stored in the vault /// @param tokens The tokens to withdraw fees in /// @param amounts The amounts of fees to withdraw /// @param recipient The address to send the fees to /// @return success Whether the transfer was successful or not function batchWithdrawSomeERC20( IERC20[] calldata tokens, uint256[] calldata amounts, address recipient ) external returns (bool success); /*////////////////////////////////////////////////////////////// BALANCE GETTERS //////////////////////////////////////////////////////////////*/ /// @notice Get the balance of a given token for a given partner /// @param token The token to get the balance of /// @param partner The partner to get the balance for /// @return feeBalance The balance of the given token for the given partner function getBalance(IERC20 token, address partner) external view returns (uint256 feeBalance); /// @notice Get the balances of a given partner for multiple tokens /// @param tokens The tokens to get the balances of /// @param partner The partner to get the balances for /// @return feeBalances The balances of the given tokens for the given partner function batchGetBalance( IERC20[] calldata tokens, address partner ) external view returns (uint256[] memory feeBalances); /// @notice Returns the unallocated fees for a given token /// @param token The token to get the unallocated fees for /// @return unallocatedFees The unallocated fees for the given token function getUnallocatedFees(IERC20 token) external view returns (uint256 unallocatedFees); /*////////////////////////////////////////////////////////////// OWNER //////////////////////////////////////////////////////////////*/ /// @notice Register fees for a given account and token, only callable by approved augustus contracts /// @param account The account to register the fees for /// @param token The token to register the fees for /// @param fee The amount of fees to register function registerFee(address account, IERC20 token, uint256 fee) external; /// @notice Sets the augustus contract approval status /// @param augustus The augustus contract address /// @param approved The approval status function setAugustusApproval(address augustus, bool approved) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.22; // Interfaces import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol"; /// @title ERC20Utils /// @notice Optimized functions for ERC20 tokens library ERC20Utils { /*////////////////////////////////////////////////////////////// ERRORS //////////////////////////////////////////////////////////////*/ error IncorrectEthAmount(); error PermitFailed(); error TransferFromFailed(); error TransferFailed(); error ApprovalFailed(); /*////////////////////////////////////////////////////////////// CONSTANTS //////////////////////////////////////////////////////////////*/ IERC20 internal constant ETH = IERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE); /*////////////////////////////////////////////////////////////// APPROVE //////////////////////////////////////////////////////////////*/ /// @dev Vendored from Solady by @vectorized - SafeTransferLib.approveWithRetry /// https://github.com/Vectorized/solady/src/utils/SafeTransferLib.sol#L325 /// Instead of approving a specific amount, this function approves for uint256(-1) (type(uint256).max). function approve(IERC20 token, address to) internal { // solhint-disable-next-line no-inline-assembly assembly ("memory-safe") { mstore(0x14, to) // Store the `to` argument. mstore(0x34, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) // Store the `amount` // argument (type(uint256).max). mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. // Perform the approval, retrying upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) ) ) { mstore(0x34, 0) // Store 0 for the `amount`. mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. pop(call(gas(), token, 0, 0x10, 0x44, codesize(), 0x00)) // Reset the approval. mstore(0x34, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) // Store // type(uint256).max for the `amount`. // Retry the approval, reverting upon failure. if iszero( and( or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) ) ) { mstore(0, 0x8164f84200000000000000000000000000000000000000000000000000000000) // store the selector (error ApprovalFailed()) revert(0, 4) // revert with error selector } } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /*////////////////////////////////////////////////////////////// PERMIT //////////////////////////////////////////////////////////////*/ /// @dev Executes an ERC20 permit and reverts if it fails function permit(IERC20 token, bytes calldata data) internal returns (uint256 success) { // solhint-disable-next-line no-inline-assembly assembly ("memory-safe") { // check the permit length switch data.length // 32 * 7 = 224 EIP2612 Permit case 224 { let x := mload(64) // get the free memory pointer mstore(x, 0xd505accf00000000000000000000000000000000000000000000000000000000) // store the selector // function permit(address owner, address spender, uint256 // amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) calldatacopy(add(x, 4), data.offset, 224) // store the args success := call(gas(), token, 0, x, 228, 0, 32) // call ERC20 permit if success { switch returndatasize() // check the return data size case 0 { success := gt(extcodesize(token), 0) } default { success := and(gt(returndatasize(), 31), eq(mload(0), 1)) } } if iszero(success) { mstore(0, 0xb78cb0dd00000000000000000000000000000000000000000000000000000000) // store the selector // (error PermitFailed()) revert(0, 4) } } // 32 * 8 = 256 DAI-Style Permit case 256 { let x := mload(64) // get the free memory pointer mstore(x, 0x8fcbaf0c00000000000000000000000000000000000000000000000000000000) // store the selector // function permit(address holder, address spender, uint256 // nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s) calldatacopy(add(x, 4), data.offset, 256) // store the args success := call(gas(), token, 0, x, 260, 0, 32) // call ERC20 Legacy permit if success { switch returndatasize() // check the return data size case 0 { success := gt(extcodesize(token), 0) } default { success := and(gt(returndatasize(), 31), eq(mload(0), 1)) } } if iszero(success) { mstore(0, 0xb78cb0dd00000000000000000000000000000000000000000000000000000000) // store the selector // (error PermitFailed()) revert(0, 4) } } default { mstore(0, 0xb78cb0dd00000000000000000000000000000000000000000000000000000000) // store the selector // (error PermitFailed()) revert(0, 4) } } } /*////////////////////////////////////////////////////////////// ETH //////////////////////////////////////////////////////////////*/ /// @dev Returns 1 if the token is ETH, 0 if not ETH function isETH(IERC20 token, uint256 amount) internal view returns (uint256 fromETH) { // solhint-disable-next-line no-inline-assembly assembly ("memory-safe") { // If token is ETH if eq(token, 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) { // if msg.value is not equal to fromAmount, then revert if xor(amount, callvalue()) { mstore(0, 0x8b6ebb4d00000000000000000000000000000000000000000000000000000000) // store the selector // (error IncorrectEthAmount()) revert(0, 4) // revert with error selector } // return 1 if ETH fromETH := 1 } // If token is not ETH if xor(token, 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) { // if msg.value is not equal to 0, then revert if gt(callvalue(), 0) { mstore(0, 0x8b6ebb4d00000000000000000000000000000000000000000000000000000000) // store the selector // (error IncorrectEthAmount()) revert(0, 4) // revert with error selector } } } // return 0 if not ETH } /*////////////////////////////////////////////////////////////// TRANSFER //////////////////////////////////////////////////////////////*/ /// @dev Executes transfer and reverts if it fails, works for both ETH and ERC20 transfers function safeTransfer(IERC20 token, address recipient, uint256 amount) internal returns (bool success) { // solhint-disable-next-line no-inline-assembly assembly { switch eq(token, 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) // ETH case 1 { // transfer ETH // Cap gas at 10000 to avoid reentrancy success := call(10000, recipient, amount, 0, 0, 0, 0) } // ERC20 default { let x := mload(64) // get the free memory pointer mstore(x, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) // store the selector // (function transfer(address recipient, uint256 amount)) mstore(add(x, 4), recipient) // store the recipient mstore(add(x, 36), amount) // store the amount success := call(gas(), token, 0, x, 68, 0, 32) // call transfer if success { switch returndatasize() // check the return data size case 0 { success := gt(extcodesize(token), 0) } default { success := and(gt(returndatasize(), 31), eq(mload(0), 1)) } } } if iszero(success) { mstore(0, 0x90b8ec1800000000000000000000000000000000000000000000000000000000) // store the selector // (error TransferFailed()) revert(0, 4) // revert with error selector } } } /*////////////////////////////////////////////////////////////// TRANSFER FROM //////////////////////////////////////////////////////////////*/ /// @dev Executes transferFrom and reverts if it fails function safeTransferFrom( IERC20 srcToken, address sender, address recipient, uint256 amount ) internal returns (bool success) { // solhint-disable-next-line no-inline-assembly assembly { let x := mload(64) // get the free memory pointer mstore(x, 0x23b872dd00000000000000000000000000000000000000000000000000000000) // store the selector // (function transferFrom(address sender, address recipient, // uint256 amount)) mstore(add(x, 4), sender) // store the sender mstore(add(x, 36), recipient) // store the recipient mstore(add(x, 68), amount) // store the amount success := call(gas(), srcToken, 0, x, 100, 0, 32) // call transferFrom if success { switch returndatasize() // check the return data size case 0 { success := gt(extcodesize(srcToken), 0) } default { success := and(gt(returndatasize(), 31), eq(mload(0), 1)) } } if iszero(success) { mstore(x, 0x7939f42400000000000000000000000000000000000000000000000000000000) // store the selector // (error TransferFromFailed()) revert(x, 4) // revert with error selector } } } /*////////////////////////////////////////////////////////////// BALANCE //////////////////////////////////////////////////////////////*/ /// @dev Returns the balance of an account, works for both ETH and ERC20 tokens function getBalance(IERC20 token, address account) internal view returns (uint256 balanceOf) { // solhint-disable-next-line no-inline-assembly assembly { switch eq(token, 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) // ETH case 1 { balanceOf := balance(account) } // ERC20 default { let x := mload(64) // get the free memory pointer mstore(x, 0x70a0823100000000000000000000000000000000000000000000000000000000) // store the selector // (function balanceOf(address account)) mstore(add(x, 4), account) // store the account let success := staticcall(gas(), token, x, 36, x, 32) // call balanceOf if success { balanceOf := mload(x) } // load the balance } } } }
{ "viaIR": true, "metadata": { "bytecodeHash": "none" }, "optimizer": { "enabled": true, "runs": 1000000 }, "evmVersion": "shanghai", "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":"_augustusContracts","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BatchCollectFailed","type":"error"},{"inputs":[],"name":"InvalidParameterLength","type":"error"},{"inputs":[],"name":"InvalidWithdrawAmount","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"UnauthorizedCaller","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"augustus","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"AugustusApprovalSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"allocatedFees","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"augustus","type":"address"}],"name":"augustusContracts","outputs":[{"internalType":"bool","name":"approved","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20[]","name":"tokens","type":"address[]"},{"internalType":"address","name":"partner","type":"address"}],"name":"batchGetBalance","outputs":[{"internalType":"uint256[]","name":"feeBalances","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20[]","name":"tokens","type":"address[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"batchWithdrawAllERC20","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"batchWithdrawSomeERC20","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"fees","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"partner","type":"address"}],"name":"getBalance","outputs":[{"internalType":"uint256","name":"feeBalance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"getUnallocatedFees","outputs":[{"internalType":"uint256","name":"unallocatedFees","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"registerFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"augustus","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setAugustusApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"withdrawAllERC20","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"withdrawSomeERC20","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
604060806040523462000196576200116f90813803806200002081620001ae565b9384398201906020918284820312620001965783516001600160401b039485821162000196570181601f82011215620001965780519485116200019a578460051b90848062000071818501620001ae565b80988152019282010192831162000196578401905b828210620001755750505033156200015d575f8054336001600160a01b03198216811783556001600160a01b039290918316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a35f5b84518110156200014d578082620000f960019388620001d4565b51165f5281808652845f208160ff198254161790557f6e22534cd7ba9ac690c8291d348b7cd994a6753f153ed57cd0a24dd720ae2d0486856200013d858b620001d4565b5116928751908152a201620000df565b604051610f719081620001fe8239f35b604051631e4fbdf760e01b81525f6004820152602490fd5b81516001600160a01b03811681036200019657815290840190840162000086565b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b6040519190601f01601f191682016001600160401b038111838210176200019a57604052565b8051821015620001e95760209160051b010190565b634e487b7160e01b5f52603260045260245ffdfe60806040526004361015610022575b3615610018575f80fd5b610020610d4f565b005b5f3560e01c80633ea6f51114610111578063715018a61461010c5780638da5cb5b146101075780638f79528c146101025780639b9ac2cb146100fd578063ae11c7f8146100f8578063b0a65b17146100f3578063bbedcc40146100ee578063d1f4354b146100e9578063d2ea29c0146100e4578063d4fac45d146100df578063e20b52d9146100da578063f2fde38b146100d5578063f89abe8c146100d05763ffcc41ee0361000e57610a00565b6109b3565b6108d1565b610865565b61080c565b610741565b610623565b6105a9565b6104a4565b6103c8565b6102e9565b610289565b610239565b61019f565b610138565b73ffffffffffffffffffffffffffffffffffffffff81160361013457565b5f80fd5b346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345773ffffffffffffffffffffffffffffffffffffffff60043561018881610116565b165f526003602052602060405f2054604051908152f35b34610134575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610134576101d5610d58565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610134575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013457602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b346101345760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345760206102df6004356102c981610116565b604435906102d682610116565b60243590610b25565b6040519015158152f35b346101345760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013457602061037960043561032981610116565b73ffffffffffffffffffffffffffffffffffffffff6024359161034b83610116565b165f526002835260405f209073ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b54604051908152f35b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6040910112610134576004356103b881610116565b906024356103c581610116565b90565b346101345760206102df6103db36610382565b90610b78565b9181601f840112156101345782359167ffffffffffffffff8311610134576020808501948460051b01011161013457565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc820112610134576004359067ffffffffffffffff82116101345761045b916004016103e1565b90916024356103c581610116565b60209060206040818301928281528551809452019301915f5b828110610490575050505090565b835185529381019392810192600101610482565b34610134576104b236610412565b90916104bd83610bf9565b60405193907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090601f018116850167ffffffffffffffff8111868210176105a45760405281855261050d82610bf9565b013660208601375f5b81811061052f576040518061052b8782610469565b0390f35b60019061059261055d8673ffffffffffffffffffffffffffffffffffffffff165f52600260205260405f2090565b61057061056b848789610c3e565b610c53565b73ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b5461059d8288610c5d565b5201610516565b610bcc565b34610134576105b736610412565b5f9291925b8381106105ce57602060405160018152f35b6105ec826105dd838787610c3e565b356105e781610116565b610b78565b156105f9576001016105bc565b60046040517f3439313b000000000000000000000000000000000000000000000000000000008152fd5b346101345760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345760043561065e81610116565b6024359061066b82610116565b60443591335f52600160205260ff60405f20541615610717578261068e82610c9e565b80911161070f575b5073ffffffffffffffffffffffffffffffffffffffff8092165f5260026020526106e18160405f209073ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b80549084820180921161070a5755165f52600360205260405f20805491820180921161070a5755005b610c71565b92505f610696565b60046040517f5c427cd9000000000000000000000000000000000000000000000000000000008152fd5b346101345760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345760043561077c81610116565b6024359081151580920361013457602073ffffffffffffffffffffffffffffffffffffffff7f6e22534cd7ba9ac690c8291d348b7cd994a6753f153ed57cd0a24dd720ae2d04926107cb610d58565b1692835f526001825260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8316179055604051908152a2005b3461013457602061037973ffffffffffffffffffffffffffffffffffffffff61083436610382565b919091165f526002835260405f209073ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345773ffffffffffffffffffffffffffffffffffffffff6004356108b581610116565b165f526001602052602060ff60405f2054166040519015158152f35b346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345760043561090c81610116565b610914610d58565b73ffffffffffffffffffffffffffffffffffffffff809116908115610983575f54827fffffffffffffffffffffffff00000000000000000000000000000000000000008216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b60246040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f6004820152fd5b346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345760206109f86004356109f381610116565b610c9e565b604051908152f35b346101345760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013457600467ffffffffffffffff813581811161013457610a519036906004016103e1565b9160243590811161013457610a6a9036906004016103e1565b9060443590610a7882610116565b828503610afb575f5b858110610a945760405160018152602090f35b610ac6610ac284610aa6848a8a610c3e565b35610ab081610116565b610abb858988610c3e565b3590610b25565b1590565b610ad257600101610a81565b866040517f3439313b000000000000000000000000000000000000000000000000000000008152fd5b60046040517fc0375efc000000000000000000000000000000000000000000000000000000008152fd5b8115610b4e57610b37610b4893610da8565b90610b43833383610dcc565b610e96565b50600190565b60046040517fdb73cdf0000000000000000000000000000000000000000000000000000000008152fd5b90610b8290610da8565b335f526002602052610bb58260405f209073ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b54908115610b4e57610b4892610b43833383610dcc565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b67ffffffffffffffff81116105a45760051b60200190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b9190811015610c4e5760051b0190565b610c11565b356103c581610116565b8051821015610c4e5760209160051b010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b905f9173ffffffffffffffffffffffffffffffffffffffff81165f52600360205260405f20545f9173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8114600114610d46576020602491604051928380927f70a082310000000000000000000000000000000000000000000000000000000082523060048301525afa610d3d575b505b808211610d2d575050565b90809293500390811161070a5790565b5191505f610d20565b50479150610d22565b333b1561013457565b73ffffffffffffffffffffffffffffffffffffffff5f54163303610d7857565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b73ffffffffffffffffffffffffffffffffffffffff811615610dc75790565b503390565b73ffffffffffffffffffffffffffffffffffffffff8083165f526002602052610e168260405f209073ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b548411610b4e5781165f52600360205260405f2080549284840393841161070a57610e8793610e64925573ffffffffffffffffffffffffffffffffffffffff165f52600260205260405f2090565b9073ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b805491820391821161070a5755565b929173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8414600114610f505760446020925f92604051917fa9059cbb0000000000000000000000000000000000000000000000000000000083526004830152602482015282865af19182610f2b575b505b8115610f0357565b7f90b8ec18000000000000000000000000000000000000000000000000000000005f5260045ffd5b9091503d15610f47575060015f5114601f3d1116905b5f610ef9565b3b151590610f41565b5f809394508092918192612710f190610efb56fea164736f6c6343000816000a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361015610022575b3615610018575f80fd5b610020610d4f565b005b5f3560e01c80633ea6f51114610111578063715018a61461010c5780638da5cb5b146101075780638f79528c146101025780639b9ac2cb146100fd578063ae11c7f8146100f8578063b0a65b17146100f3578063bbedcc40146100ee578063d1f4354b146100e9578063d2ea29c0146100e4578063d4fac45d146100df578063e20b52d9146100da578063f2fde38b146100d5578063f89abe8c146100d05763ffcc41ee0361000e57610a00565b6109b3565b6108d1565b610865565b61080c565b610741565b610623565b6105a9565b6104a4565b6103c8565b6102e9565b610289565b610239565b61019f565b610138565b73ffffffffffffffffffffffffffffffffffffffff81160361013457565b5f80fd5b346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345773ffffffffffffffffffffffffffffffffffffffff60043561018881610116565b165f526003602052602060405f2054604051908152f35b34610134575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610134576101d5610d58565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610134575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013457602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b346101345760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345760206102df6004356102c981610116565b604435906102d682610116565b60243590610b25565b6040519015158152f35b346101345760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013457602061037960043561032981610116565b73ffffffffffffffffffffffffffffffffffffffff6024359161034b83610116565b165f526002835260405f209073ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b54604051908152f35b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6040910112610134576004356103b881610116565b906024356103c581610116565b90565b346101345760206102df6103db36610382565b90610b78565b9181601f840112156101345782359167ffffffffffffffff8311610134576020808501948460051b01011161013457565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc820112610134576004359067ffffffffffffffff82116101345761045b916004016103e1565b90916024356103c581610116565b60209060206040818301928281528551809452019301915f5b828110610490575050505090565b835185529381019392810192600101610482565b34610134576104b236610412565b90916104bd83610bf9565b60405193907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090601f018116850167ffffffffffffffff8111868210176105a45760405281855261050d82610bf9565b013660208601375f5b81811061052f576040518061052b8782610469565b0390f35b60019061059261055d8673ffffffffffffffffffffffffffffffffffffffff165f52600260205260405f2090565b61057061056b848789610c3e565b610c53565b73ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b5461059d8288610c5d565b5201610516565b610bcc565b34610134576105b736610412565b5f9291925b8381106105ce57602060405160018152f35b6105ec826105dd838787610c3e565b356105e781610116565b610b78565b156105f9576001016105bc565b60046040517f3439313b000000000000000000000000000000000000000000000000000000008152fd5b346101345760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345760043561065e81610116565b6024359061066b82610116565b60443591335f52600160205260ff60405f20541615610717578261068e82610c9e565b80911161070f575b5073ffffffffffffffffffffffffffffffffffffffff8092165f5260026020526106e18160405f209073ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b80549084820180921161070a5755165f52600360205260405f20805491820180921161070a5755005b610c71565b92505f610696565b60046040517f5c427cd9000000000000000000000000000000000000000000000000000000008152fd5b346101345760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345760043561077c81610116565b6024359081151580920361013457602073ffffffffffffffffffffffffffffffffffffffff7f6e22534cd7ba9ac690c8291d348b7cd994a6753f153ed57cd0a24dd720ae2d04926107cb610d58565b1692835f526001825260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8316179055604051908152a2005b3461013457602061037973ffffffffffffffffffffffffffffffffffffffff61083436610382565b919091165f526002835260405f209073ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345773ffffffffffffffffffffffffffffffffffffffff6004356108b581610116565b165f526001602052602060ff60405f2054166040519015158152f35b346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345760043561090c81610116565b610914610d58565b73ffffffffffffffffffffffffffffffffffffffff809116908115610983575f54827fffffffffffffffffffffffff00000000000000000000000000000000000000008216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b60246040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f6004820152fd5b346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345760206109f86004356109f381610116565b610c9e565b604051908152f35b346101345760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013457600467ffffffffffffffff813581811161013457610a519036906004016103e1565b9160243590811161013457610a6a9036906004016103e1565b9060443590610a7882610116565b828503610afb575f5b858110610a945760405160018152602090f35b610ac6610ac284610aa6848a8a610c3e565b35610ab081610116565b610abb858988610c3e565b3590610b25565b1590565b610ad257600101610a81565b866040517f3439313b000000000000000000000000000000000000000000000000000000008152fd5b60046040517fc0375efc000000000000000000000000000000000000000000000000000000008152fd5b8115610b4e57610b37610b4893610da8565b90610b43833383610dcc565b610e96565b50600190565b60046040517fdb73cdf0000000000000000000000000000000000000000000000000000000008152fd5b90610b8290610da8565b335f526002602052610bb58260405f209073ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b54908115610b4e57610b4892610b43833383610dcc565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b67ffffffffffffffff81116105a45760051b60200190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b9190811015610c4e5760051b0190565b610c11565b356103c581610116565b8051821015610c4e5760209160051b010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b905f9173ffffffffffffffffffffffffffffffffffffffff81165f52600360205260405f20545f9173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8114600114610d46576020602491604051928380927f70a082310000000000000000000000000000000000000000000000000000000082523060048301525afa610d3d575b505b808211610d2d575050565b90809293500390811161070a5790565b5191505f610d20565b50479150610d22565b333b1561013457565b73ffffffffffffffffffffffffffffffffffffffff5f54163303610d7857565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b73ffffffffffffffffffffffffffffffffffffffff811615610dc75790565b503390565b73ffffffffffffffffffffffffffffffffffffffff8083165f526002602052610e168260405f209073ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b548411610b4e5781165f52600360205260405f2080549284840393841161070a57610e8793610e64925573ffffffffffffffffffffffffffffffffffffffff165f52600260205260405f2090565b9073ffffffffffffffffffffffffffffffffffffffff165f5260205260405f2090565b805491820391821161070a5755565b929173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8414600114610f505760446020925f92604051917fa9059cbb0000000000000000000000000000000000000000000000000000000083526004830152602482015282865af19182610f2b575b505b8115610f0357565b7f90b8ec18000000000000000000000000000000000000000000000000000000005f5260045ffd5b9091503d15610f47575060015f5114601f3d1116905b5f610ef9565b3b151590610f41565b5f809394508092918192612710f190610efb56fea164736f6c6343000816000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 29.72% | $6.8 | 38.6913 | $263.1 | |
ETH | 28.55% | $0.99996 | 252.7124 | $252.7 | |
ETH | 16.37% | $0.999791 | 144.9123 | $144.88 | |
ETH | 9.65% | $1,939.09 | 0.0441 | $85.44 | |
ETH | 0.67% | $0.000013 | 468,569.0304 | $5.89 | |
ETH | 0.37% | $3.24 | 1.0167 | $3.29 | |
ETH | 0.32% | $0.513102 | 5.5185 | $2.83 | |
ETH | 0.27% | $0.052783 | 45.2782 | $2.39 | |
ETH | 0.22% | $0.99981 | 1.9847 | $1.98 | |
ETH | 0.19% | $77.42 | 0.0213 | $1.65 | |
ETH | 0.18% | $0.000061 | 26,103.6951 | $1.59 | |
ETH | 0.11% | $0.018581 | 51.914 | $0.9646 | |
ETH | 0.11% | $1,934.89 | 0.00048952 | $0.9471 | |
ETH | 0.10% | $6.35 | 0.1398 | $0.8874 | |
BSC | 2.54% | $6.88 | 3.2639 | $22.46 | |
BSC | 1.74% | $0.999963 | 15.4366 | $15.44 | |
BSC | 0.89% | $0.000007 | 1,081,312.5108 | $7.85 | |
BSC | 0.25% | $0.003995 | 547.1218 | $2.19 | |
BSC | 0.24% | $1.3 | 1.6167 | $2.11 | |
BSC | 0.21% | $620.66 | 0.00299112 | $1.86 | |
BSC | 0.06% | $0.006532 | 76.6072 | $0.5004 | |
BSC | 0.05% | $0.000013 | 38,058.4723 | $0.4786 | |
BSC | 0.02% | $0.999829 | 0.1602 | $0.1601 | |
POL | 2.16% | $171.21 | 0.1119 | $19.16 | |
POL | 0.78% | $83,233 | 0.00008331 | $6.93 | |
POL | 0.68% | $13.97 | 0.4322 | $6.04 | |
POL | 0.38% | $3.25 | 1.0279 | $3.34 | |
POL | 0.38% | $0.269793 | 12.3728 | $3.34 | |
POL | 0.32% | $0.999963 | 2.7961 | $2.8 | |
POL | 0.30% | $1,937.49 | 0.00134955 | $2.61 | |
POL | 0.29% | $0.094824 | 27.1461 | $2.57 | |
POL | 0.17% | $0.212363 | 7.2421 | $1.54 | |
POL | 0.11% | $0.3605 | 2.7929 | $1.01 | |
POL | 0.10% | $0.240075 | 3.6906 | $0.886 | |
POL | 0.08% | $0.431738 | 1.5797 | $0.682 | |
POL | 0.04% | $0.000013 | 31,564.1243 | $0.3977 | |
POL | 0.03% | $0.000065 | 4,306.7753 | $0.2799 | |
POL | 0.02% | $0.99975 | 0.1788 | $0.1787 | |
OP | 0.73% | $0.999966 | 6.4187 | $6.42 | |
OP | 0.02% | $1,935.99 | 0.00010141 | $0.1963 | |
OP | <0.01% | $1,939.09 | 0.000000000000000001 | <$0.000001 | |
ARB | 0.32% | $0.999967 | 2.846 | $2.85 | |
ARB | 0.12% | $83,231 | 0.00001261 | $1.05 | |
ARB | 0.02% | $0.999793 | 0.1451 | $0.145 | |
ARB | 0.02% | $1,937.43 | 0.00007321 | $0.1418 | |
ARB | <0.01% | $1,939.11 | 0.000000808211 | $0.001567 | |
AVAX | 0.09% | $0.999879 | 0.765 | $0.7649 | |
AVAX | 0.03% | $1 | 0.2513 | $0.2512 | |
AVAX | <0.01% | $19.02 | 0.00147261 | $0.028008 | |
BASE | <0.01% | $1,939.48 | 0.00002299 | $0.044581 |
Loading...
Loading
Loading...
Loading
[ 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.