Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
Contract Name:
GasSwap
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "./EIP712MetaTransaction.sol"; import "./ISolarRouter.sol"; import "./IToken.sol"; contract GasSwap is Ownable, EIP712MetaTransaction("GasSwap", "2") { address public immutable WMOVR = 0x98878B06940aE243284CA214f92Bb71a2b032B8A; struct Transformation { uint32 _uint32; bytes _bytes; } ISolarRouter public solarRouter; address public feeAddress; uint256 public feePercent = 100; //1% mapping(address => bool) public tokenWhitelist; constructor(address router) { solarRouter = ISolarRouter(router); } receive() external payable { require(Address.isContract(msgSender()), "REVERT_EOA_DEPOSIT"); } function whitelistToken(address tokenAddress, bool whitelisted) external onlyOwner { require(Address.isContract(tokenAddress), "NO_CONTRACT_AT_ADDRESS"); tokenWhitelist[tokenAddress] = whitelisted; } function changeFeePercent(uint256 newFeePercent) external onlyOwner { require(feePercent >= 0 && feePercent < 10000, "INVALID_FEE_PERCENT"); feePercent = newFeePercent; } function changeFeeAddress(address newFeeAddress) external onlyOwner { feeAddress = newFeeAddress; } function changeRouter(address newTarget) external onlyOwner { require(Address.isContract(newTarget), "NO_CONTRACT_AT_ADDRESS"); solarRouter = ISolarRouter(newTarget); } function withdrawToken(IToken token, uint256 amount) external onlyOwner { token.transfer(msg.sender, amount); } // Transfer ETH held by this contract to the sender/owner. function withdrawETH(uint256 amount) external onlyOwner { payable(msg.sender).transfer(amount); } // Swaps ERC20->MOVR tokens function swap(bytes calldata swapCallData) external returns (uint256) { ( uint256 amountIn, uint256 amountOutMin, address[] memory path, , uint256 deadline, uint8 v, bytes32 r, bytes32 s ) = abi.decode( swapCallData, ( uint256, uint256, address[], address, uint256, uint8, bytes32, bytes32 ) ); require(path[path.length - 1] == WMOVR, "INVALID_OUTPUT_TOKEN"); require(tokenWhitelist[path[0]] == true, "INVALID_INPUT_TOKEN"); IToken sellToken = IToken(path[0]); sellToken.permit( msgSender(), address(this), amountIn, deadline, v, r, s ); sellToken.transferFrom(msgSender(), address(this), amountIn); uint256 beforeSwapBalance = address(this).balance; sellToken.approve(address(solarRouter), amountIn); solarRouter.swapExactTokensForETH( amountIn, amountOutMin, path, address(this), deadline ); uint256 tradeBalance = address(this).balance - beforeSwapBalance; uint256 amount = ((tradeBalance * 10000) - (tradeBalance * feePercent)) / 10000; uint256 fee = tradeBalance - amount; if (feeAddress != address(0)) { payable(feeAddress).transfer(fee); } payable(msgSender()).transfer(amount); return amount; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../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. * * By default, the owner account will be the one that deploys the contract. 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; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "./EIP712Base.sol"; contract EIP712MetaTransaction is EIP712Base { bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( bytes( "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" ) ); event MetaTransactionExecuted( address userAddress, address payable relayerAddress, bytes functionSignature ); mapping(address => uint256) private nonces; /* * Meta transaction structure. * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas * He should call the desired function directly in that case. */ struct MetaTransaction { uint256 nonce; address from; bytes functionSignature; } constructor(string memory name, string memory version) EIP712Base(name, version) {} function convertBytesToBytes4(bytes memory inBytes) internal pure returns (bytes4 outBytes4) { if (inBytes.length == 0) { return 0x0; } assembly { outBytes4 := mload(add(inBytes, 32)) } } function executeMetaTransaction( address userAddress, bytes memory functionSignature, bytes32 sigR, bytes32 sigS, uint8 sigV ) public payable returns (bytes memory) { bytes4 destinationFunctionSig = convertBytesToBytes4(functionSignature); require( destinationFunctionSig != msg.sig, "functionSignature can not be of executeMetaTransaction method" ); MetaTransaction memory metaTx = MetaTransaction({ nonce: nonces[userAddress], from: userAddress, functionSignature: functionSignature }); require( verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match" ); nonces[userAddress] += 1; // Append userAddress at the end to extract it from calling context (bool success, bytes memory returnData) = address(this).call( abi.encodePacked(functionSignature, userAddress) ); require(success, "Function call not successful"); emit MetaTransactionExecuted( userAddress, payable(msg.sender), functionSignature ); return returnData; } function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) { return keccak256( abi.encode( META_TRANSACTION_TYPEHASH, metaTx.nonce, metaTx.from, keccak256(metaTx.functionSignature) ) ); } function getNonce(address user) external view returns (uint256 nonce) { nonce = nonces[user]; } function verify( address user, MetaTransaction memory metaTx, bytes32 sigR, bytes32 sigS, uint8 sigV ) internal view returns (bool) { address signer = ecrecover( toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS ); require(signer != address(0), "Invalid signature"); return signer == user; } function msgSender() internal view returns (address sender) { if (msg.sender == address(this)) { bytes memory array = msg.data; uint256 index = msg.data.length; assembly { // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. sender := and( mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff ) } } else { sender = msg.sender; } return sender; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; interface ISolarRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETHWithPermit( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountToken, uint256 amountETH); function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapTokensForExactTokens( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function swapTokensForExactETH( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactTokensForETH( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapETHForExactTokens( uint256 amountOut, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function quote( uint256 amountA, uint256 reserveA, uint256 reserveB ) external pure returns (uint256 amountB); function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut, uint256 fee ) external pure returns (uint256 amountOut); function getAmountIn( uint256 amountOut, uint256 reserveIn, uint256 reserveOut, uint256 fee ) external pure returns (uint256 amountIn); function getAmountsOut( uint256 amountIn, address[] calldata path, uint256 fee ) external view returns (uint256[] memory amounts); function getAmountsIn( uint256 amountOut, address[] calldata path, uint256 fee ) external view returns (uint256[] memory amounts); function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol"; interface IToken is IERC20, IERC20Permit {}
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @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 pragma solidity ^0.8.7; contract EIP712Base { struct EIP712Domain { string name; string version; address verifyingContract; bytes32 salt; } bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( bytes( "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" ) ); bytes32 internal domainSeparator; constructor(string memory name, string memory version) { domainSeparator = keccak256( abi.encode( EIP712_DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(version)), address(this), bytes32(getChainID()) ) ); } function getChainID() internal view returns (uint256 id) { assembly { id := chainid() } } function getDomainSeparator() private view returns (bytes32) { return domainSeparator; } /** * Accept message hash and returns hash message in EIP712 compatible form * So that it can be used to recover signer from signature signed using EIP712 formatted data * https://eips.ethereum.org/EIPS/eip-712 * "\\x19" makes the encoding deterministic * "\\x01" is the version byte to make it compatible to EIP-191 */ function toTypedMessageHash(bytes32 messageHash) internal view returns (bytes32) { return keccak256( abi.encodePacked("\x19\x01", getDomainSeparator(), messageHash) ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 999999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
[{"inputs":[{"internalType":"address","name":"router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","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":[],"name":"WMOVR","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newFeeAddress","type":"address"}],"name":"changeFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFeePercent","type":"uint256"}],"name":"changeFeePercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTarget","type":"address"}],"name":"changeRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"solarRouter","outputs":[{"internalType":"contract ISolarRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"swapCallData","type":"bytes"}],"name":"swap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"bool","name":"whitelisted","type":"bool"}],"name":"whitelistToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IToken","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a06040527f98878b06940ae243284ca214f92bb71a2b032b8a00000000000000000000000060805260646005553480156200003a57600080fd5b50604051620022ae380380620022ae8339810160408190526200005d91620001c4565b604051806040016040528060078152602001660476173537761760cc1b815250604051806040016040528060018152602001601960f91b8152508181620000b3620000ad6200016c60201b60201c565b62000170565b6040518060800160405280604f81526020016200225f604f9139805190602001208280519060200120828051906020012030620000f5620001c060201b60201c565b60408051602081019690965285019390935260608401919091526001600160a01b0316608083015260a082015260c00160408051808303601f1901815291905280516020909101206001555050600380546001600160a01b0319166001600160a01b03949094169390931790925550620001f69050565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b4690565b600060208284031215620001d757600080fd5b81516001600160a01b0381168114620001ef57600080fd5b9392505050565b60805160601c6120436200021c600039600081816101f50152610c3701526120436000f3fe6080604052600436106101125760003560e01c8063627dd56a116100a557806380f490a8116100745780639e281a98116100595780639e281a98146103fd578063f14210a61461041d578063f2fde38b1461043d57600080fd5b806380f490a8146103a55780638da5cb5b146103d257600080fd5b8063627dd56a1461031a578063715018a61461033a578063753d75631461034f5780637fd6f15c1461038f57600080fd5b80632d0335ab116100e15780632d0335ab1461025c578063340ac20f146102ad57806334eddf3e146102cd57806341275358146102ed57600080fd5b80630c53c51c1461019a5780630ffb1d8b146101c35780631467d58b146101e3578063285e14061461023c57600080fd5b366101955761012861012261045d565b3b151590565b610193576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5245564552545f454f415f4445504f534954000000000000000000000000000060448201526064015b60405180910390fd5b005b600080fd5b6101ad6101a83660046118e3565b6104c7565b6040516101ba9190611d25565b60405180910390f35b3480156101cf57600080fd5b506101936101de3660046118aa565b6107e7565b3480156101ef57600080fd5b506102177f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ba565b34801561024857600080fd5b50610193610257366004611886565b610926565b34801561026857600080fd5b5061029f610277366004611886565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b6040519081526020016101ba565b3480156102b957600080fd5b506101936102c8366004611886565b6109ee565b3480156102d957600080fd5b506101936102e8366004611b25565b610b1e565b3480156102f957600080fd5b506004546102179073ffffffffffffffffffffffffffffffffffffffff1681565b34801561032657600080fd5b5061029f610335366004611a87565b610c11565b34801561034657600080fd5b5061019361121d565b34801561035b57600080fd5b5061037f61036a366004611886565b60066020526000908152604090205460ff1681565b60405190151581526020016101ba565b34801561039b57600080fd5b5061029f60055481565b3480156103b157600080fd5b506003546102179073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103de57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610217565b34801561040957600080fd5b50610193610418366004611af9565b6112aa565b34801561042957600080fd5b50610193610438366004611b25565b6113d6565b34801561044957600080fd5b50610193610458366004611886565b611488565b6000333014156104c157600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505036015173ffffffffffffffffffffffffffffffffffffffff1691506104c49050565b50335b90565b606060006104d4866115b8565b90506000357fffffffff00000000000000000000000000000000000000000000000000000000908116908216141561058e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f66756e6374696f6e5369676e61747572652063616e206e6f74206265206f662060448201527f657865637574654d6574615472616e73616374696f6e206d6574686f64000000606482015260840161018a565b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff8916600081815260026020908152908490205483528201529081018790526105d888828888886115d4565b610664576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d61746360448201527f6800000000000000000000000000000000000000000000000000000000000000606482015260840161018a565b73ffffffffffffffffffffffffffffffffffffffff8816600090815260026020526040812080546001929061069a908490611e36565b9091555050604051600090819030906106b9908b908d90602001611c99565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526106f191611c7d565b6000604051808303816000865af19150503d806000811461072e576040519150601f19603f3d011682016040523d82523d6000602084013e610733565b606091505b50915091508161079f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604482015260640161018a565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b8a338b6040516107d293929190611ce3565b60405180910390a19998505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610868576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018a565b813b6108d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e4f5f434f4e54524143545f41545f4144445245535300000000000000000000604482015260640161018a565b73ffffffffffffffffffffffffffffffffffffffff91909116600090815260066020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018a565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018a565b803b610ad7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e4f5f434f4e54524143545f41545f4144445245535300000000000000000000604482015260640161018a565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018a565b61271060055410610c0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e56414c49445f4645455f50455243454e5400000000000000000000000000604482015260640161018a565b600555565b600080808080808080610c26898b018b611b3e565b9750975097509750509650965096507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168560018751610c7b9190611ec6565b81518110610c8b57610c8b611f3c565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614610d10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f494e56414c49445f4f55545055545f544f4b454e000000000000000000000000604482015260640161018a565b6006600086600081518110610d2757610d27611f3c565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040016000205460ff161515600114610dc6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e56414c49445f494e5055545f544f4b454e00000000000000000000000000604482015260640161018a565b600085600081518110610ddb57610ddb611f3c565b602002602001015190508073ffffffffffffffffffffffffffffffffffffffff1663d505accf610e0961045d565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152306024820152604481018b90526064810188905260ff8716608482015260a4810186905260c4810185905260e401600060405180830381600087803b158015610e9a57600080fd5b505af1158015610eae573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff166323b872dd610ed661045d565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152306024820152604481018b9052606401602060405180830381600087803b158015610f4957600080fd5b505af1158015610f5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f819190611a6a565b506003546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9182166004820152602481018a9052479183169063095ea7b390604401602060405180830381600087803b158015610ff757600080fd5b505af115801561100b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102f9190611a6a565b506003546040517f18cbafe500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906318cbafe59061108e908c908c908c9030908d90600401611d38565b600060405180830381600087803b1580156110a857600080fd5b505af11580156110bc573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261110291908101906119cd565b50600061110f8247611ec6565b90506000612710600554836111249190611e89565b61113084612710611e89565b61113a9190611ec6565b6111449190611e4e565b905060006111528284611ec6565b60045490915073ffffffffffffffffffffffffffffffffffffffff16156111bc5760045460405173ffffffffffffffffffffffffffffffffffffffff9091169082156108fc029083906000818181858888f193505050501580156111ba573d6000803e3d6000fd5b505b6111c461045d565b73ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015611209573d6000803e3d6000fd5b50909e9d5050505050505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461129e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018a565b6112a8600061171b565b565b60005473ffffffffffffffffffffffffffffffffffffffff16331461132b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018a565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810182905273ffffffffffffffffffffffffffffffffffffffff83169063a9059cbb90604401602060405180830381600087803b15801561139957600080fd5b505af11580156113ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d19190611a6a565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018a565b604051339082156108fc029083906000818181858888f19350505050158015611484573d6000803e3d6000fd5b5050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611509576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018a565b73ffffffffffffffffffffffffffffffffffffffff81166115ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161018a565b6115b58161171b565b50565b60008151600014156115cc57506000919050565b506020015190565b60008060016115ea6115e588611790565b61181a565b6040805160008152602081018083529290925260ff861690820152606081018790526080810186905260a0016020604051602081039080840390855afa158015611638573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166116e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c6964207369676e6174757265000000000000000000000000000000604482015260640161018a565b8673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161491505095945050505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000604051806080016040528060438152602001611fcb60439139805160209182012083518483015160408087015180519086012090516117fd9501938452602084019290925273ffffffffffffffffffffffffffffffffffffffff166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b600061182560015490565b6040517f190100000000000000000000000000000000000000000000000000000000000060208201526022810191909152604281018390526062016117fd565b803561187081611f9a565b919050565b803560ff8116811461187057600080fd5b60006020828403121561189857600080fd5b81356118a381611f9a565b9392505050565b600080604083850312156118bd57600080fd5b82356118c881611f9a565b915060208301356118d881611fbc565b809150509250929050565b600080600080600060a086880312156118fb57600080fd5b853561190681611f9a565b945060208681013567ffffffffffffffff8082111561192457600080fd5b818901915089601f83011261193857600080fd5b81358181111561194a5761194a611f6b565b61197a847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611dc3565b91508082528a8482850101111561199057600080fd5b808484018584013760008482840101525080965050505060408601359250606086013591506119c160808701611875565b90509295509295909350565b600060208083850312156119e057600080fd5b825167ffffffffffffffff8111156119f757600080fd5b8301601f81018513611a0857600080fd5b8051611a1b611a1682611e12565b611dc3565b80828252848201915084840188868560051b8701011115611a3b57600080fd5b600094505b83851015611a5e578051835260019490940193918501918501611a40565b50979650505050505050565b600060208284031215611a7c57600080fd5b81516118a381611fbc565b60008060208385031215611a9a57600080fd5b823567ffffffffffffffff80821115611ab257600080fd5b818501915085601f830112611ac657600080fd5b813581811115611ad557600080fd5b866020828501011115611ae757600080fd5b60209290920196919550909350505050565b60008060408385031215611b0c57600080fd5b8235611b1781611f9a565b946020939093013593505050565b600060208284031215611b3757600080fd5b5035919050565b600080600080600080600080610100898b031215611b5b57600080fd5b883597506020808a0135975060408a013567ffffffffffffffff811115611b8157600080fd5b8a01601f81018c13611b9257600080fd5b8035611ba0611a1682611e12565b8082825284820191508484018f868560051b8701011115611bc057600080fd5b600094505b83851015611bec578035611bd881611f9a565b835260019490940193918501918501611bc5565b50809a505050505050611c0160608a01611865565b945060808901359350611c1660a08a01611875565b925060c0890135915060e089013590509295985092959890939650565b60008151808452611c4b816020860160208601611edd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251611c8f818460208701611edd565b9190910192915050565b60008351611cab818460208801611edd565b60609390931b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169190920190815260140192915050565b600073ffffffffffffffffffffffffffffffffffffffff808616835280851660208401525060606040830152611d1c6060830184611c33565b95945050505050565b6020815260006118a36020830184611c33565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d9557845173ffffffffffffffffffffffffffffffffffffffff1683529383019391830191600101611d63565b505073ffffffffffffffffffffffffffffffffffffffff969096166060850152505050608001529392505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611e0a57611e0a611f6b565b604052919050565b600067ffffffffffffffff821115611e2c57611e2c611f6b565b5060051b60200190565b60008219821115611e4957611e49611f0d565b500190565b600082611e84577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611ec157611ec1611f0d565b500290565b600082821015611ed857611ed8611f0d565b500390565b60005b83811015611ef8578181015183820152602001611ee0565b83811115611f07576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff811681146115b557600080fd5b80151581146115b557600080fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a26469706673582212207a01f3224c09627a0ec9851fd85c710f932e45cd0e475ecd01e2c3d0bfd42a8664736f6c63430008070033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c7429000000000000000000000000aa30ef758139ae4a7f798112902bf6d65612045f
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000aa30ef758139ae4a7f798112902bf6d65612045f
-----Decoded View---------------
Arg [0] : router (address): 0xaa30ef758139ae4a7f798112902bf6d65612045f
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000aa30ef758139ae4a7f798112902bf6d65612045f
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.