Contract Overview
Balance:
0 MATIC
Token:
My Name Tag:
Not Available
Txn Hash |
Method
|
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0xd8737a894ebf6ca2c293b8f92df4b1b85b7e5ad36f86602d6bdc7b867b449947 | 0x60a03461 | 33789282 | 60 days 10 hrs ago | 0x612ef87bfcd858687160294b0effaca0cba342e2 | IN | Create: Disperse | 0 MATIC | 0.001353564014 |
[ Download CSV Export ]
Latest 12 internal transactions
[ Download CSV Export ]
Contract Source Code Verified (Exact Match)
Contract Name:
Disperse
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./interfaces/IDisperse.sol"; import "./libraries/SwapUtils.sol"; contract Disperse is IDisperse { using SafeERC20 for IERC20; using Address for address payable; address public immutable sgProxy; mapping(address => mapping(address => uint256)) public balances; constructor(address _sgProxy) { sgProxy = _sgProxy; } receive() external payable {} function onReceiveERC20( address token, address to, uint256 amount ) external { if (msg.sender != sgProxy) revert InvalidProxy(); if (token == address(0)) revert InvalidToken(); balances[token][to] += amount; emit OnReceiveERC20(token, to, amount); } function sgProxyReceive( address srcFrom, address token, uint256 amount, bytes calldata data ) external { if (msg.sender != sgProxy) revert InvalidProxy(); ( address tokenOut, address swapTo, bytes memory swapData, address[] memory recipients, uint256[] memory amounts ) = abi.decode(data, (address, address, bytes, address[], uint256[])); _disperse(token, amount, tokenOut, swapTo, swapData, recipients, amounts, srcFrom); emit SgProxyReceive(srcFrom, token, amount, data); } function withdraw( address token, address to, uint256 amount ) external { if (amount > balances[token][msg.sender]) revert InsufficientBalance(); balances[token][msg.sender] -= amount; IERC20(token).safeTransfer(to, amount); emit Withdraw(token, to, amount); } function disperse(DisperseParams calldata params) external { IERC20(params.tokenIn).safeTransferFrom(msg.sender, address(this), params.amountIn); _disperse( params.tokenIn, params.amountIn, params.tokenOut, params.swapTo, params.swapData, params.recipients, params.amounts, msg.sender ); } function disperseIntrinsic(DisperseParams calldata params) external { if (params.amountIn > balances[params.tokenIn][msg.sender]) revert InsufficientBalance(); balances[params.tokenIn][msg.sender] -= params.amountIn; _disperse( params.tokenIn, params.amountIn, params.tokenOut, params.swapTo, params.swapData, params.recipients, params.amounts, msg.sender ); } function _disperse( address tokenIn, uint256 amountIn, address tokenOut, address swapTo, bytes memory swapData, address[] memory recipients, uint256[] memory amounts, address refundAddress ) internal { uint256 length = recipients.length; if (length != amounts.length) revert InvalidParams(); if (swapTo != address(0)) { SwapUtils.swapERC20(tokenIn, amountIn, swapTo, swapData, tokenIn != tokenOut, refundAddress); } if (tokenOut == address(0)) { for (uint256 i; i < length; ) { uint256 amount = amounts[i]; if (amount > 0) { payable(recipients[i]).sendValue(amount); } unchecked { ++i; } } } else { for (uint256 i; i < length; ) { uint256 amount = amounts[i]; if (amount > 0) { IERC20(tokenOut).safeTransfer(recipients[i], amount); } unchecked { ++i; } } uint256 balanceTokenOut = IERC20(tokenOut).balanceOf(address(this)); if (balanceTokenOut > 0) { IERC20(tokenOut).safeTransfer(refundAddress, balanceTokenOut); } } uint256 balance = address(this).balance; if (balance > 0) { payable(refundAddress).sendValue(balance); } } }
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; library SwapUtils { using SafeERC20 for IERC20; using Address for address payable; error SwapFailure(bytes reason); function swapNative( uint256 amount, address to, bytes memory data ) internal { (bool ok, bytes memory reason) = to.call{value: amount}(data); if (!ok) revert SwapFailure(reason); } function swapERC20( address token, uint256 amount, address to, bytes memory data, bool sweep, address refundAddress ) internal { IERC20(token).approve(to, amount); (bool ok, bytes memory reason) = to.call(data); if (!ok) revert SwapFailure(reason); IERC20(token).approve(to, 0); if (sweep) { uint256 balance = IERC20(token).balanceOf(address(this)); if (balance > 0) { IERC20(token).safeTransfer(refundAddress, balance); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IStargateProxyReceiver.sol"; interface IDisperse is IStargateProxyReceiver { error InvalidToken(); error InsufficientBalance(); error InvalidParams(); error InvalidSwapData(); event Disperse(address indexed token, address[] recipients, uint256[] amounts); event Withdraw(address indexed token, address indexed to, uint256 amount); struct DisperseParams { uint256 amountIn; address tokenIn; address tokenOut; address swapTo; bytes swapData; address[] recipients; uint256[] amounts; address refundAddress; } function withdraw( address token, address to, uint256 amount ) external; function disperse(DisperseParams calldata params) external; function disperseIntrinsic(DisperseParams calldata params) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20Receiver.sol"; interface IStargateProxyReceiver is IERC20Receiver { error InvalidProxy(); event SgProxyReceive(address indexed srcFrom, address indexed token, uint256 amount, bytes data); function sgProxy() external view returns (address); function sgProxyReceive( address srcFrom, address token, uint256 amount, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20Receiver { event OnReceiveERC20(address indexed token, address indexed to, uint256 amount); function onReceiveERC20( address token, address to, uint256 amount ) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
[{"inputs":[{"internalType":"address","name":"_sgProxy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InvalidParams","type":"error"},{"inputs":[],"name":"InvalidProxy","type":"error"},{"inputs":[],"name":"InvalidSwapData","type":"error"},{"inputs":[],"name":"InvalidToken","type":"error"},{"inputs":[{"internalType":"bytes","name":"reason","type":"bytes"}],"name":"SwapFailure","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address[]","name":"recipients","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"Disperse","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"OnReceiveERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"srcFrom","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"SgProxyReceive","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"address","name":"swapTo","type":"address"},{"internalType":"bytes","name":"swapData","type":"bytes"},{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"refundAddress","type":"address"}],"internalType":"struct IDisperse.DisperseParams","name":"params","type":"tuple"}],"name":"disperse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"address","name":"swapTo","type":"address"},{"internalType":"bytes","name":"swapData","type":"bytes"},{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"refundAddress","type":"address"}],"internalType":"struct IDisperse.DisperseParams","name":"params","type":"tuple"}],"name":"disperseIntrinsic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"onReceiveERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sgProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"srcFrom","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"sgProxyReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a03461007857601f610fe738819003918201601f19168301916001600160401b0383118484101761007d5780849260209460405283398101031261007857516001600160a01b038116810361007857608052604051610f53908161009482396080518181816102e00152818161046001526105280152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe60806040818152600480361015610021575b505050361561001f57600080fd5b005b600092833560e01c908162e97a1e14610557575080631efc020014610513578063248ff46d1461044157806344ab9e631461026d5780638f41aa6014610162578063c23f001f146101165763d9caed120361001157346101125761008436610667565b9360018060a01b0380931693848752866020528187203388526020528187205486116101045750916020917f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9385885287845280882033895284528088206100ed8882546107e3565b90556100fa878388610806565b519586521693a380f35b9051631e9acf1760e31b8152fd5b8280fd5b50503461015e578060031936011261015e5780602092610134610627565b61013c61063d565b6001600160a01b03918216835282865283832091168252845220549051908152f35b5080fd5b5091903461015e57610173366105ef565b90602082016001600160a01b0361018982610a5a565b16908335918351906323b872dd60e01b60208301523360248301523060448301528360648301526064825260a0820182811067ffffffffffffffff82111761025a576101f0610247946101eb610235958998956101f8956102579c9b52610861565b610a5a565b948601610a5a565b61020460608701610a5a565b916102516102156080890189610a6e565b96909861023f61022860a0830183610aa1565b98909260c0810190610aa1565b9b909936916106f0565b96369161073f565b9533983691610795565b95610b01565b80f35b634e487b7160e01b885260418952602488fd5b503461011257608036600319011261011257610287610627565b9161029061063d565b906044356064359067ffffffffffffffff9485831161043d573660238401121561043d578281013595808711610439576024840195878501966024880197368911610435576001600160a01b03947f00000000000000000000000000000000000000000000000000000000000000008616330361042757508660a09103126104235761031b81610653565b9061032860448801610653565b98606488013585811161041b5788018160438201121561041b5781816044602461035594013591016106f0565b94608489013581811161041f5789018260438201121561041f57828160446024610382940135910161073f565b9860a481013591821161041f57018160438201121561041b577f306e52e696725536abdc0fb4d86f0b2106da283c10c503b14d71eb0d31f0d3b69a60609988978f93968f978a6103df6103ea988360446024859601359101610795565b951691168c8a610b01565b81885198899788528060208901528701528686013783880185018a905216961694601f01601f19168101030190a380f35b8d80fd5b8e80fd5b8a80fd5b8851632e7973df60e21b8152fd5b8b80fd5b8880fd5b8780fd5b5090346101125761045136610667565b90936001600160a01b039391927f0000000000000000000000000000000000000000000000000000000000000000851633036105045784169384156104f557848752866020528287209516948587526020528186208054918483018093116104e2575055519081527f0ed72cefdd96310ec050a1853b2182f0fcad7eb150d77b40cd9ec741adffd75190602090a380f35b634e487b7160e01b885260119052602487fd5b50905163c1ab6dc160e01b8152fd5b509051632e7973df60e21b8152fd5b50503461015e578160031936011261015e57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b8483853461011257610568366105ef565b803594909260208401916001600160a01b0391908261058685610a5a565b168752866020528487203388526020528487205488116105e357505061025794956101f86101f084610235946105be61024797610a5a565b168a5289602052868a20338b52602052868a206105dc8582546107e3565b9055610a5a565b631e9acf1760e31b8152fd5b60031990602081830112610622576004359167ffffffffffffffff83116106225782610100920301126106225760040190565b600080fd5b600435906001600160a01b038216820361062257565b602435906001600160a01b038216820361062257565b35906001600160a01b038216820361062257565b6060906003190112610622576001600160a01b0390600435828116810361062257916024359081168103610622579060443590565b90601f8019910116810190811067ffffffffffffffff8211176106be57604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff81116106be57601f01601f191660200190565b9291926106fc826106d4565b9161070a604051938461069c565b829481845281830111610622578281602093846000960137010152565b67ffffffffffffffff81116106be5760051b60200190565b929161074a82610727565b91610758604051938461069c565b829481845260208094019160051b810192831161062257905b82821061077e5750505050565b83809161078a84610653565b815201910190610771565b92916107a082610727565b916107ae604051938461069c565b829481845260208094019160051b810192831161062257905b8282106107d45750505050565b813581529083019083016107c7565b919082039182116107f057565b634e487b7160e01b600052601160045260246000fd5b60405163a9059cbb60e01b60208201526001600160a01b039290921660248301526044808301939093529181526108479161084260648361069c565b610861565b565b90816020910312610622575180151581036106225790565b60408051908101916001600160a01b031667ffffffffffffffff8311828410176106be576108d1926040526000806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af16108cb61094d565b9161097d565b805190816108de57505050565b82806108ee938301019101610849565b156108f65750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b3d15610978573d9061095e826106d4565b9161096c604051938461069c565b82523d6000602084013e565b606090565b919290156109df5750815115610991575090565b3b1561099a5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156109f25750805190602001fd5b60405162461bcd60e51b815260206004820152908190610a16906024830190610a1a565b0390fd5b919082519283825260005b848110610a46575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201610a25565b356001600160a01b03811681036106225790565b903590601e1981360301821215610622570180359067ffffffffffffffff82116106225760200191813603831361062257565b903590601e1981360301821215610622570180359067ffffffffffffffff821161062257602001918160051b3603831361062257565b8051821015610aeb5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b94939190959284519584518703610e30576001600160a01b039788948386169283610c68575b5050505050168015600014610b93575060005b838110610b5c57505050505b479081610b5257505050565b6108479216610e42565b80610b6960019284610ad7565b5180610b77575b5001610b3a565b610b8d9087610b868488610ad7565b5116610e42565b38610b70565b92919060005b838110610c3057505050506040516370a0823160e01b8152306004820152602081602481855afa908115610c2457600091610bf0575b508381610bdf575b505050610b46565b610be892610806565b388083610bd7565b906020823d8211610c1c575b81610c096020938361069c565b81010312610c1957505138610bcf565b80fd5b3d9150610bfc565b6040513d6000823e3d90fd5b80610c3d60019284610ad7565b5180610c4b575b5001610b99565b610c629088610c5a8488610ad7565b511688610806565b38610c44565b6040805163095ea7b360e01b8082526001600160a01b038816600483015260248201959095529697919091169590946020946000949390929091908681604481898d5af18015610e2657918693918493610e09575b50828883519301915af1610ccf61094d565b9015610de7575084519182526004820152816024820152828160448185895af18015610ddd57908a969594939291610db0575b508585168403610d13575b80610b27565b82516370a0823160e01b815230600482015294955092939192908083602481885afa938415610da55750908995949392918193610d6c575b5050508881610d5b575b81610d0d565b610d6492610806565b388088610d55565b829495965080929193503d8311610d9e575b610d88818361069c565b81010312610c1957509086929151388080610d4b565b503d610d7e565b51913d9150823e3d90fd5b610dcf90833d8511610dd6575b610dc7818361069c565b810190610849565b5038610d02565b503d610dbd565b84513d84823e3d90fd5b84610a168751928392630c369d2560e01b845260048401526024830190610a1a565b610e1f90893d8b11610dd657610dc7818361069c565b5038610cbd565b88513d88823e3d90fd5b604051635435b28960e11b8152600490fd5b814710610ed8576000918291829182916001600160a01b03165af1610e6561094d565b5015610e6d57565b60405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606490fdfea2646970667358221220b3fdd226b15af31f0300b91f2528a26ace052a89e2037cf4d4b52cb2edfb491a64736f6c6343000811003300000000000000000000000090aa8dc70eec71bc104ea5f002e6251f5aa24580
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000090aa8dc70eec71bc104ea5f002e6251f5aa24580
-----Decoded View---------------
Arg [0] : _sgProxy (address): 0x90aa8dc70eec71bc104ea5f002e6251f5aa24580
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000090aa8dc70eec71bc104ea5f002e6251f5aa24580
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|