Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 8,670 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 21591399 | 6 hrs ago | IN | 0 ETH | 0.00037757 | ||||
Transfer | 21589353 | 13 hrs ago | IN | 0.012 ETH | 0.00034901 | ||||
Claim | 21587040 | 21 hrs ago | IN | 0 ETH | 0.00035406 | ||||
Transfer | 21586372 | 23 hrs ago | IN | 0.061 ETH | 0.00015429 | ||||
Transfer | 21581952 | 38 hrs ago | IN | 0.055 ETH | 0.00021037 | ||||
Transfer | 21581574 | 39 hrs ago | IN | 0.07 ETH | 0.0005045 | ||||
Transfer | 21581300 | 40 hrs ago | IN | 0.002 ETH | 0.00091023 | ||||
Transfer | 21581280 | 40 hrs ago | IN | 0.3 ETH | 0.00111458 | ||||
Claim | 21581175 | 40 hrs ago | IN | 0 ETH | 0.00163094 | ||||
Transfer | 21581097 | 41 hrs ago | IN | 0.33 ETH | 0.00035798 | ||||
Transfer | 21581043 | 41 hrs ago | IN | 0.015 ETH | 0.00029163 | ||||
Claim | 21580955 | 41 hrs ago | IN | 0 ETH | 0.00077167 | ||||
Transfer | 21577608 | 2 days ago | IN | 0.0047 ETH | 0.00010188 | ||||
Claim | 21577124 | 2 days ago | IN | 0 ETH | 0.00040543 | ||||
Transfer | 21575032 | 2 days ago | IN | 0.015 ETH | 0.00029744 | ||||
Transfer | 21574927 | 2 days ago | IN | 0.04 ETH | 0.0005392 | ||||
Transfer | 21574775 | 2 days ago | IN | 0.8 ETH | 0.00041211 | ||||
Transfer | 21574108 | 2 days ago | IN | 0.009 ETH | 0.00029999 | ||||
Transfer | 21574063 | 2 days ago | IN | 0.02545408 ETH | 0.00031569 | ||||
Transfer | 21574036 | 2 days ago | IN | 0.05 ETH | 0.000358 | ||||
Transfer | 21574009 | 2 days ago | IN | 0.004 ETH | 0.00033922 | ||||
Transfer | 21573893 | 2 days ago | IN | 0.024 ETH | 0.0003385 | ||||
Transfer | 21573780 | 2 days ago | IN | 0.004 ETH | 0.00048989 | ||||
Transfer | 21573747 | 2 days ago | IN | 0.05142 ETH | 0.00055231 | ||||
Transfer | 21573551 | 2 days ago | IN | 0.005 ETH | 0.000734 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
21591399 | 6 hrs ago | 0.0264 ETH | ||||
21587040 | 21 hrs ago | 3.11943759 ETH | ||||
21581175 | 40 hrs ago | 0.75660135 ETH | ||||
21580955 | 41 hrs ago | 0.2 ETH | ||||
21577124 | 2 days ago | 0.3918099 ETH | ||||
21567604 | 3 days ago | 0.045 ETH | ||||
21564879 | 3 days ago | 1.321 ETH | ||||
21562725 | 4 days ago | 0.024 ETH | ||||
21562720 | 4 days ago | 0.119 ETH | ||||
21523979 | 9 days ago | 0.30253233 ETH | ||||
21523576 | 9 days ago | 0.03 ETH | ||||
21502834 | 12 days ago | 0.04871795 ETH | ||||
21497160 | 13 days ago | 0.16151002 ETH | ||||
21494444 | 13 days ago | 0.002 ETH | ||||
21481592 | 15 days ago | 0.08 ETH | ||||
21481378 | 15 days ago | 0.07 ETH | ||||
21475253 | 16 days ago | 0.30654797 ETH | ||||
21473254 | 16 days ago | 0.0052 ETH | ||||
21473185 | 16 days ago | 0.035 ETH | ||||
21466396 | 17 days ago | 0.03 ETH | ||||
21460249 | 18 days ago | 0.50079937 ETH | ||||
21443057 | 20 days ago | 1.8527617 ETH | ||||
21442544 | 21 days ago | 0.3242554 ETH | ||||
21439236 | 21 days ago | 0.0125 ETH | ||||
21433442 | 22 days ago | 0.28970631 ETH |
Loading...
Loading
Contract Name:
ApolloxExchangeTreasury
Compiler Version
v0.8.13+commit.abaa5c0e
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.11; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; pragma experimental ABIEncoderV2; contract ApolloxExchangeTreasury is Ownable { using SafeERC20 for IERC20; event ReceiveEther(address sender, uint amount); event Claimed(uint256 indexed id, address indexed to, bool isETH, address currency, uint256 amount, uint256 deadline); event TransferToCounterParty(bool isETH, address currency, uint256 amount); event Paused(); event Unpaused(); event NewTruthHolder(address oldTruthHolder, address newTruthHolder); event NewOperator(address oldOperator, address newOperator); event NewCounterParty(address oldCounterParty, address newCounterParty); event AddCurrency(address indexed currency); event RemoveCurrency(address indexed currency); bool public paused; address public truthHolder; address public operator; address payable public counterParty; mapping(address => bool) public supportCurrency; mapping(uint => uint) public claimHistory; modifier notPaused() { require(!paused, "paused"); _; } modifier onlyOperator() { require(msg.sender == operator, "only operator can call"); _; } constructor (address truthHolder_, address operator_, address payable counterParty_) { paused = false; truthHolder = truthHolder_; operator = operator_; counterParty = counterParty_; } // This function is called for plain Ether transfers receive() external payable { if (msg.value > 0) { emit ReceiveEther(msg.sender, msg.value); } } function _transfer(address payable to, bool isETH, address currency, uint amount) internal { if(isETH) { require(address(this).balance >= amount, "not enough ether balance"); require(to.send(amount), "ether transfer failed"); } else { IERC20 token = IERC20(currency); uint balance = token.balanceOf(address(this)); require(balance >= amount, "not enough currency balance"); token.safeTransfer(to, amount); } } function transferToCounterParty(bool isETH, address currency, uint amount) external onlyOperator { _transfer(counterParty, isETH, currency, amount); emit TransferToCounterParty(isETH, currency, amount); } function claim(bytes calldata message, bytes calldata signature) external notPaused { address signer = source(message, signature); require(signer == truthHolder, "only accept truthHolder signed message"); (uint256 id, address payable to, bool isETH, address currency, uint256 amount, uint256 deadline) = abi.decode(message, (uint256, address, bool, address, uint256, uint256)); require(claimHistory[id] == 0, "already claimed"); require(isETH || supportCurrency[currency], "currency not support"); require(block.timestamp < deadline, "already passed deadline"); claimHistory[id] = block.number; _transfer(to, isETH, currency, amount); emit Claimed(id, to, isETH, currency, amount, deadline); } function source(bytes memory message, bytes memory signature) public pure returns (address) { bytes32 hash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", keccak256(message))); return ECDSA.recover(hash, signature); } function _pause() external onlyOwner { paused = true; emit Paused(); } function _unpause() external onlyOwner { paused = false; emit Unpaused(); } function _changeTruthHolder(address newTruthHolder) external onlyOwner { address oldHolder = truthHolder; truthHolder = newTruthHolder; emit NewTruthHolder(oldHolder, newTruthHolder); } function _setOperator(address newOperator) external onlyOwner { address oldOperator = operator; operator = newOperator; emit NewOperator(oldOperator, newOperator); } function _setCounterParty(address payable newCounterParty) external onlyOwner { address payable oldCounterParty = counterParty; counterParty = newCounterParty; emit NewCounterParty(oldCounterParty, newCounterParty); } function _addCurrency(address currency) external onlyOwner { supportCurrency[currency] = true; emit AddCurrency(currency); } function _removeCurrency(address currency) external onlyOwner { delete supportCurrency[currency]; emit RemoveCurrency(currency); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) 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 // OpenZeppelin Contracts (last updated v4.5.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 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); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // 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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.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)); } } /** * @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.5.0) (token/ERC20/IERC20.sol) 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 `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); /** * @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 // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) 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() { _transferOwnership(_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 { _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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _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); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"truthHolder_","type":"address"},{"internalType":"address","name":"operator_","type":"address"},{"internalType":"address payable","name":"counterParty_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"currency","type":"address"}],"name":"AddCurrency","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"bool","name":"isETH","type":"bool"},{"indexed":false,"internalType":"address","name":"currency","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldCounterParty","type":"address"},{"indexed":false,"internalType":"address","name":"newCounterParty","type":"address"}],"name":"NewCounterParty","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOperator","type":"address"},{"indexed":false,"internalType":"address","name":"newOperator","type":"address"}],"name":"NewOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldTruthHolder","type":"address"},{"indexed":false,"internalType":"address","name":"newTruthHolder","type":"address"}],"name":"NewTruthHolder","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"},{"anonymous":false,"inputs":[],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReceiveEther","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"currency","type":"address"}],"name":"RemoveCurrency","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isETH","type":"bool"},{"indexed":false,"internalType":"address","name":"currency","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferToCounterParty","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"currency","type":"address"}],"name":"_addCurrency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTruthHolder","type":"address"}],"name":"_changeTruthHolder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"_pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"currency","type":"address"}],"name":"_removeCurrency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newCounterParty","type":"address"}],"name":"_setCounterParty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOperator","type":"address"}],"name":"_setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"_unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimHistory","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"counterParty","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"source","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supportCurrency","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":"bool","name":"isETH","type":"bool"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferToCounterParty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"truthHolder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162001984380380620019848339810160408190526200003491620000f8565b6200003f336200008f565b6000805460ff60a01b19169055600180546001600160a01b039485166001600160a01b0319918216179091556002805493851693821693909317909255600380549190931691161790556200014c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620000f557600080fd5b50565b6000806000606084860312156200010e57600080fd5b83516200011b81620000df565b60208501519093506200012e81620000df565b60408501519092506200014181620000df565b809150509250925092565b611828806200015c6000396000f3fe6080604052600436106101185760003560e01c80638da5cb5b116100a0578063dc6a677011610064578063dc6a677014610339578063f2fde38b14610369578063f3da6cbd14610389578063f6dd2353146103c4578063fc8234cb146103e457600080fd5b80638da5cb5b1461029b578063a720969f146102b9578063b0ff3542146102d9578063b19a1a9a146102f9578063be27b22c1461031957600080fd5b8063482a6193116100e7578063482a6193146101f5578063570ca735146102155780635c975abb14610235578063715018a61461026657806389c9e1ac1461027b57600080fd5b80632c453bdf146101635780632f7f5d57146101a0578063320b2ad9146101c05780634694f573146101d557600080fd5b3661015e57341561015c57604080513381523460208201527ff32a9f77675fd5917534c7746608fd3e309eac68fbdcbf5925e24ca97a704396910160405180910390a15b005b600080fd5b34801561016f57600080fd5b50600354610183906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101ac57600080fd5b5061015c6101bb366004611431565b6103f9565b3480156101cc57600080fd5b5061015c610478565b3480156101e157600080fd5b5061015c6101f0366004611431565b6104de565b34801561020157600080fd5b506101836102103660046114f1565b610551565b34801561022157600080fd5b50600254610183906001600160a01b031681565b34801561024157600080fd5b5060005461025690600160a01b900460ff1681565b6040519015158152602001610197565b34801561027257600080fd5b5061015c6105c2565b34801561028757600080fd5b5061015c610296366004611563565b6105f8565b3480156102a757600080fd5b506000546001600160a01b0316610183565b3480156102c557600080fd5b50600154610183906001600160a01b031681565b3480156102e557600080fd5b5061015c6102f4366004611431565b6106b3565b34801561030557600080fd5b5061015c610314366004611431565b61073f565b34801561032557600080fd5b5061015c6103343660046115e6565b6107c3565b34801561034557600080fd5b50610256610354366004611431565b60046020526000908152604090205460ff1681565b34801561037557600080fd5b5061015c610384366004611431565b610a93565b34801561039557600080fd5b506103b66103a4366004611652565b60056020526000908152604090205481565b604051908152602001610197565b3480156103d057600080fd5b5061015c6103df366004611431565b610b2e565b3480156103f057600080fd5b5061015c610bb2565b6000546001600160a01b0316331461042c5760405162461bcd60e51b81526004016104239061166b565b60405180910390fd5b6001600160a01b038116600081815260046020526040808220805460ff19166001179055517ff88c7d248b10f4863d05e905ad1600e215e7325bf269bbf15543144b398f98029190a250565b6000546001600160a01b031633146104a25760405162461bcd60e51b81526004016104239061166b565b6000805460ff60a01b1916600160a01b1781556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e7529190a1565b6000546001600160a01b031633146105085760405162461bcd60e51b81526004016104239061166b565b6001600160a01b038116600081815260046020526040808220805460ff19169055517f4f9b3b949c96fbaab8b8e7139142528afae2f88b4774065e609ca06a2e4f4aab9190a250565b600080838051906020012060405160200161059891907f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b6040516020818303038152906040528051906020012090506105ba8184610c12565b949350505050565b6000546001600160a01b031633146105ec5760405162461bcd60e51b81526004016104239061166b565b6105f66000610c36565b565b6002546001600160a01b0316331461064b5760405162461bcd60e51b81526020600482015260166024820152751bdb9b1e481bdc195c985d1bdc8818d85b8818d85b1b60521b6044820152606401610423565b600354610663906001600160a01b0316848484610c86565b6040805184151581526001600160a01b03841660208201529081018290527f33278ebf7b841e996e09580bfa7a0279c875902fe042c3d102a8d051c30dc7339060600160405180910390a1505050565b6000546001600160a01b031633146106dd5760405162461bcd60e51b81526004016104239061166b565b600280546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527ff1e04d73c4304b5ff164f9d10c7473e2a1593b740674a6107975e2a7001c1e5c91015b60405180910390a15050565b6000546001600160a01b031633146107695760405162461bcd60e51b81526004016104239061166b565b600380546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f100ee7bc9f90ed0d187ec16b9532449ca9eee13c1d00463b5759a771c1b49fb49101610733565b600054600160a01b900460ff16156108065760405162461bcd60e51b81526020600482015260066024820152651c185d5cd95960d21b6044820152606401610423565b600061087b85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152925087915086908190840183828082843760009201919091525061055192505050565b6001549091506001600160a01b038083169116146108ea5760405162461bcd60e51b815260206004820152602660248201527f6f6e6c7920616363657074207472757468486f6c646572207369676e6564206d60448201526565737361676560d01b6064820152608401610423565b600080808080806108fd8a8c018c6116a0565b600086815260056020526040902054959b509399509197509550935091501561095a5760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b6044820152606401610423565b838061097e57506001600160a01b03831660009081526004602052604090205460ff165b6109c15760405162461bcd60e51b815260206004820152601460248201527318dd5c9c995b98de481b9bdd081cdd5c1c1bdc9d60621b6044820152606401610423565b804210610a105760405162461bcd60e51b815260206004820152601760248201527f616c72656164792070617373656420646561646c696e650000000000000000006044820152606401610423565b6000868152600560205260409020439055610a2d85858585610c86565b6040805185151581526001600160a01b038581166020830152918101849052606081018390529086169087907fbdf2c3f6edfac9e3d933ce8519d4cafffb974eb01531df50efe58090b4b1fd909060800160405180910390a35050505050505050505050565b6000546001600160a01b03163314610abd5760405162461bcd60e51b81526004016104239061166b565b6001600160a01b038116610b225760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610423565b610b2b81610c36565b50565b6000546001600160a01b03163314610b585760405162461bcd60e51b81526004016104239061166b565b600180546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f81b88ce749f5ea02a8cec52c72adf48d4bae4bb5c855faaae1a248b327ff00ca9101610733565b6000546001600160a01b03163314610bdc5760405162461bcd60e51b81526004016104239061166b565b6000805460ff60a01b191681556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d169339190a1565b6000806000610c218585610e26565b91509150610c2e81610e94565b509392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8215610d4a5780471015610cdc5760405162461bcd60e51b815260206004820152601860248201527f6e6f7420656e6f7567682065746865722062616c616e636500000000000000006044820152606401610423565b6040516001600160a01b0385169082156108fc029083906000818181858888f19350505050610d455760405162461bcd60e51b8152602060048201526015602482015274195d1a195c881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610423565b610e20565b6040516370a0823160e01b815230600482015282906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610d93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db79190611705565b905082811015610e095760405162461bcd60e51b815260206004820152601b60248201527f6e6f7420656e6f7567682063757272656e63792062616c616e636500000000006044820152606401610423565b610e1d6001600160a01b038316878561104a565b50505b50505050565b6000808251604103610e5c5760208301516040840151606085015160001a610e50878285856110a1565b94509450505050610e8d565b8251604003610e855760208301516040840151610e7a86838361118e565b935093505050610e8d565b506000905060025b9250929050565b6000816004811115610ea857610ea861171e565b03610eb05750565b6001816004811115610ec457610ec461171e565b03610f115760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610423565b6002816004811115610f2557610f2561171e565b03610f725760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610423565b6003816004811115610f8657610f8661171e565b03610fde5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610423565b6004816004811115610ff257610ff261171e565b03610b2b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610423565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261109c9084906111c7565b505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156110d85750600090506003611185565b8460ff16601b141580156110f057508460ff16601c14155b156111015750600090506004611185565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611155573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661117e57600060019250925050611185565b9150600090505b94509492505050565b6000806001600160ff1b038316816111ab60ff86901c601b611734565b90506111b9878288856110a1565b935093505050935093915050565b600061121c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112999092919063ffffffff16565b80519091501561109c578080602001905181019061123a919061175a565b61109c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610423565b60606112a884846000856112b2565b90505b9392505050565b6060824710156113135760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610423565b6001600160a01b0385163b61136a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610423565b600080866001600160a01b0316858760405161138691906117a3565b60006040518083038185875af1925050503d80600081146113c3576040519150601f19603f3d011682016040523d82523d6000602084013e6113c8565b606091505b50915091506113d88282866113e3565b979650505050505050565b606083156113f25750816112ab565b8251156114025782518084602001fd5b8160405162461bcd60e51b815260040161042391906117bf565b6001600160a01b0381168114610b2b57600080fd5b60006020828403121561144357600080fd5b81356112ab8161141c565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261147557600080fd5b813567ffffffffffffffff808211156114905761149061144e565b604051601f8301601f19908116603f011681019082821181831017156114b8576114b861144e565b816040528381528660208588010111156114d157600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561150457600080fd5b823567ffffffffffffffff8082111561151c57600080fd5b61152886838701611464565b9350602085013591508082111561153e57600080fd5b5061154b85828601611464565b9150509250929050565b8015158114610b2b57600080fd5b60008060006060848603121561157857600080fd5b833561158381611555565b925060208401356115938161141c565b929592945050506040919091013590565b60008083601f8401126115b657600080fd5b50813567ffffffffffffffff8111156115ce57600080fd5b602083019150836020828501011115610e8d57600080fd5b600080600080604085870312156115fc57600080fd5b843567ffffffffffffffff8082111561161457600080fd5b611620888389016115a4565b9096509450602087013591508082111561163957600080fd5b50611646878288016115a4565b95989497509550505050565b60006020828403121561166457600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008060008060008060c087890312156116b957600080fd5b8635955060208701356116cb8161141c565b945060408701356116db81611555565b935060608701356116eb8161141c565b9598949750929560808101359460a0909101359350915050565b60006020828403121561171757600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fd5b6000821982111561175557634e487b7160e01b600052601160045260246000fd5b500190565b60006020828403121561176c57600080fd5b81516112ab81611555565b60005b8381101561179257818101518382015260200161177a565b83811115610e205750506000910152565b600082516117b5818460208701611777565b9190910192915050565b60208152600082518060208401526117de816040850160208701611777565b601f01601f1916919091016040019291505056fea2646970667358221220b9e80d1c2f7794a261c296f10332fe39dc94c36eb5a038fb8f6393522aa4ae6064736f6c634300080d0033000000000000000000000000a6cb831648e9f813a5040bee28d00f13fc1b474600000000000000000000000076f1dc0652ecc94be75c448358a5b2cf78cc2e6900000000000000000000000076f1dc0652ecc94be75c448358a5b2cf78cc2e69
Deployed Bytecode
0x6080604052600436106101185760003560e01c80638da5cb5b116100a0578063dc6a677011610064578063dc6a677014610339578063f2fde38b14610369578063f3da6cbd14610389578063f6dd2353146103c4578063fc8234cb146103e457600080fd5b80638da5cb5b1461029b578063a720969f146102b9578063b0ff3542146102d9578063b19a1a9a146102f9578063be27b22c1461031957600080fd5b8063482a6193116100e7578063482a6193146101f5578063570ca735146102155780635c975abb14610235578063715018a61461026657806389c9e1ac1461027b57600080fd5b80632c453bdf146101635780632f7f5d57146101a0578063320b2ad9146101c05780634694f573146101d557600080fd5b3661015e57341561015c57604080513381523460208201527ff32a9f77675fd5917534c7746608fd3e309eac68fbdcbf5925e24ca97a704396910160405180910390a15b005b600080fd5b34801561016f57600080fd5b50600354610183906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101ac57600080fd5b5061015c6101bb366004611431565b6103f9565b3480156101cc57600080fd5b5061015c610478565b3480156101e157600080fd5b5061015c6101f0366004611431565b6104de565b34801561020157600080fd5b506101836102103660046114f1565b610551565b34801561022157600080fd5b50600254610183906001600160a01b031681565b34801561024157600080fd5b5060005461025690600160a01b900460ff1681565b6040519015158152602001610197565b34801561027257600080fd5b5061015c6105c2565b34801561028757600080fd5b5061015c610296366004611563565b6105f8565b3480156102a757600080fd5b506000546001600160a01b0316610183565b3480156102c557600080fd5b50600154610183906001600160a01b031681565b3480156102e557600080fd5b5061015c6102f4366004611431565b6106b3565b34801561030557600080fd5b5061015c610314366004611431565b61073f565b34801561032557600080fd5b5061015c6103343660046115e6565b6107c3565b34801561034557600080fd5b50610256610354366004611431565b60046020526000908152604090205460ff1681565b34801561037557600080fd5b5061015c610384366004611431565b610a93565b34801561039557600080fd5b506103b66103a4366004611652565b60056020526000908152604090205481565b604051908152602001610197565b3480156103d057600080fd5b5061015c6103df366004611431565b610b2e565b3480156103f057600080fd5b5061015c610bb2565b6000546001600160a01b0316331461042c5760405162461bcd60e51b81526004016104239061166b565b60405180910390fd5b6001600160a01b038116600081815260046020526040808220805460ff19166001179055517ff88c7d248b10f4863d05e905ad1600e215e7325bf269bbf15543144b398f98029190a250565b6000546001600160a01b031633146104a25760405162461bcd60e51b81526004016104239061166b565b6000805460ff60a01b1916600160a01b1781556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e7529190a1565b6000546001600160a01b031633146105085760405162461bcd60e51b81526004016104239061166b565b6001600160a01b038116600081815260046020526040808220805460ff19169055517f4f9b3b949c96fbaab8b8e7139142528afae2f88b4774065e609ca06a2e4f4aab9190a250565b600080838051906020012060405160200161059891907f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b6040516020818303038152906040528051906020012090506105ba8184610c12565b949350505050565b6000546001600160a01b031633146105ec5760405162461bcd60e51b81526004016104239061166b565b6105f66000610c36565b565b6002546001600160a01b0316331461064b5760405162461bcd60e51b81526020600482015260166024820152751bdb9b1e481bdc195c985d1bdc8818d85b8818d85b1b60521b6044820152606401610423565b600354610663906001600160a01b0316848484610c86565b6040805184151581526001600160a01b03841660208201529081018290527f33278ebf7b841e996e09580bfa7a0279c875902fe042c3d102a8d051c30dc7339060600160405180910390a1505050565b6000546001600160a01b031633146106dd5760405162461bcd60e51b81526004016104239061166b565b600280546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527ff1e04d73c4304b5ff164f9d10c7473e2a1593b740674a6107975e2a7001c1e5c91015b60405180910390a15050565b6000546001600160a01b031633146107695760405162461bcd60e51b81526004016104239061166b565b600380546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f100ee7bc9f90ed0d187ec16b9532449ca9eee13c1d00463b5759a771c1b49fb49101610733565b600054600160a01b900460ff16156108065760405162461bcd60e51b81526020600482015260066024820152651c185d5cd95960d21b6044820152606401610423565b600061087b85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152925087915086908190840183828082843760009201919091525061055192505050565b6001549091506001600160a01b038083169116146108ea5760405162461bcd60e51b815260206004820152602660248201527f6f6e6c7920616363657074207472757468486f6c646572207369676e6564206d60448201526565737361676560d01b6064820152608401610423565b600080808080806108fd8a8c018c6116a0565b600086815260056020526040902054959b509399509197509550935091501561095a5760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b6044820152606401610423565b838061097e57506001600160a01b03831660009081526004602052604090205460ff165b6109c15760405162461bcd60e51b815260206004820152601460248201527318dd5c9c995b98de481b9bdd081cdd5c1c1bdc9d60621b6044820152606401610423565b804210610a105760405162461bcd60e51b815260206004820152601760248201527f616c72656164792070617373656420646561646c696e650000000000000000006044820152606401610423565b6000868152600560205260409020439055610a2d85858585610c86565b6040805185151581526001600160a01b038581166020830152918101849052606081018390529086169087907fbdf2c3f6edfac9e3d933ce8519d4cafffb974eb01531df50efe58090b4b1fd909060800160405180910390a35050505050505050505050565b6000546001600160a01b03163314610abd5760405162461bcd60e51b81526004016104239061166b565b6001600160a01b038116610b225760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610423565b610b2b81610c36565b50565b6000546001600160a01b03163314610b585760405162461bcd60e51b81526004016104239061166b565b600180546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f81b88ce749f5ea02a8cec52c72adf48d4bae4bb5c855faaae1a248b327ff00ca9101610733565b6000546001600160a01b03163314610bdc5760405162461bcd60e51b81526004016104239061166b565b6000805460ff60a01b191681556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d169339190a1565b6000806000610c218585610e26565b91509150610c2e81610e94565b509392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8215610d4a5780471015610cdc5760405162461bcd60e51b815260206004820152601860248201527f6e6f7420656e6f7567682065746865722062616c616e636500000000000000006044820152606401610423565b6040516001600160a01b0385169082156108fc029083906000818181858888f19350505050610d455760405162461bcd60e51b8152602060048201526015602482015274195d1a195c881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610423565b610e20565b6040516370a0823160e01b815230600482015282906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610d93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db79190611705565b905082811015610e095760405162461bcd60e51b815260206004820152601b60248201527f6e6f7420656e6f7567682063757272656e63792062616c616e636500000000006044820152606401610423565b610e1d6001600160a01b038316878561104a565b50505b50505050565b6000808251604103610e5c5760208301516040840151606085015160001a610e50878285856110a1565b94509450505050610e8d565b8251604003610e855760208301516040840151610e7a86838361118e565b935093505050610e8d565b506000905060025b9250929050565b6000816004811115610ea857610ea861171e565b03610eb05750565b6001816004811115610ec457610ec461171e565b03610f115760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610423565b6002816004811115610f2557610f2561171e565b03610f725760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610423565b6003816004811115610f8657610f8661171e565b03610fde5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610423565b6004816004811115610ff257610ff261171e565b03610b2b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610423565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261109c9084906111c7565b505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156110d85750600090506003611185565b8460ff16601b141580156110f057508460ff16601c14155b156111015750600090506004611185565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611155573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661117e57600060019250925050611185565b9150600090505b94509492505050565b6000806001600160ff1b038316816111ab60ff86901c601b611734565b90506111b9878288856110a1565b935093505050935093915050565b600061121c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112999092919063ffffffff16565b80519091501561109c578080602001905181019061123a919061175a565b61109c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610423565b60606112a884846000856112b2565b90505b9392505050565b6060824710156113135760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610423565b6001600160a01b0385163b61136a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610423565b600080866001600160a01b0316858760405161138691906117a3565b60006040518083038185875af1925050503d80600081146113c3576040519150601f19603f3d011682016040523d82523d6000602084013e6113c8565b606091505b50915091506113d88282866113e3565b979650505050505050565b606083156113f25750816112ab565b8251156114025782518084602001fd5b8160405162461bcd60e51b815260040161042391906117bf565b6001600160a01b0381168114610b2b57600080fd5b60006020828403121561144357600080fd5b81356112ab8161141c565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261147557600080fd5b813567ffffffffffffffff808211156114905761149061144e565b604051601f8301601f19908116603f011681019082821181831017156114b8576114b861144e565b816040528381528660208588010111156114d157600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561150457600080fd5b823567ffffffffffffffff8082111561151c57600080fd5b61152886838701611464565b9350602085013591508082111561153e57600080fd5b5061154b85828601611464565b9150509250929050565b8015158114610b2b57600080fd5b60008060006060848603121561157857600080fd5b833561158381611555565b925060208401356115938161141c565b929592945050506040919091013590565b60008083601f8401126115b657600080fd5b50813567ffffffffffffffff8111156115ce57600080fd5b602083019150836020828501011115610e8d57600080fd5b600080600080604085870312156115fc57600080fd5b843567ffffffffffffffff8082111561161457600080fd5b611620888389016115a4565b9096509450602087013591508082111561163957600080fd5b50611646878288016115a4565b95989497509550505050565b60006020828403121561166457600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008060008060008060c087890312156116b957600080fd5b8635955060208701356116cb8161141c565b945060408701356116db81611555565b935060608701356116eb8161141c565b9598949750929560808101359460a0909101359350915050565b60006020828403121561171757600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fd5b6000821982111561175557634e487b7160e01b600052601160045260246000fd5b500190565b60006020828403121561176c57600080fd5b81516112ab81611555565b60005b8381101561179257818101518382015260200161177a565b83811115610e205750506000910152565b600082516117b5818460208701611777565b9190910192915050565b60208152600082518060208401526117de816040850160208701611777565b601f01601f1916919091016040019291505056fea2646970667358221220b9e80d1c2f7794a261c296f10332fe39dc94c36eb5a038fb8f6393522aa4ae6064736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a6cb831648e9f813a5040bee28d00f13fc1b474600000000000000000000000076f1dc0652ecc94be75c448358a5b2cf78cc2e6900000000000000000000000076f1dc0652ecc94be75c448358a5b2cf78cc2e69
-----Decoded View---------------
Arg [0] : truthHolder_ (address): 0xA6Cb831648E9f813a5040Bee28D00f13fc1b4746
Arg [1] : operator_ (address): 0x76F1dc0652ecC94BE75c448358A5b2cF78cC2e69
Arg [2] : counterParty_ (address): 0x76F1dc0652ecC94BE75c448358A5b2cF78cC2e69
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000a6cb831648e9f813a5040bee28d00f13fc1b4746
Arg [1] : 00000000000000000000000076f1dc0652ecc94be75c448358a5b2cf78cc2e69
Arg [2] : 00000000000000000000000076f1dc0652ecc94be75c448358a5b2cf78cc2e69
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 51.39% | $0.99995 | 1,268,290.8905 | $1,268,227.48 | |
ETH | Ether (ETH) | 36.35% | $3,308.31 | 271.1099 | $896,915.88 |
ETH | 12.09% | $0.99994 | 298,253.7434 | $298,235.85 | |
ETH | 0.10% | $0.995143 | 2,491.9236 | $2,479.82 | |
ETH | <0.01% | $0.000844 | 1,000 | $0.8443 | |
ARB | 0.07% | $0.999946 | 1,667.1551 | $1,667.07 | |
ARB | <0.01% | $0.99995 | 16 | $16 | |
ARB | <0.01% | $3,308.2 | 0.003 | $9.92 | |
BASE | <0.01% | $3,308.31 | 0.0204 | $67.57 |
Loading...
Loading
[ Download: CSV Export ]
[ 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.