Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
TradeRewardImplementation
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import './TradeRewardStorage.sol'; import '../library/ETHAndERC20.sol'; contract TradeRewardImplementation is TradeRewardStorage { using ETHAndERC20 for address; event UpdateTraderReward(address account, uint256 cumulativeReward, uint256 cumulativeClaimed); event UpdateRefererReward(address account, uint256 cumulativeReward, uint256 cumulativeClaimed); event ClaimTraderReward(address account, uint256 cumulativeClaimed, uint256 amount); event ClaimRefererReward(address account, uint256 cumulativeClaimed, uint256 amount); address public immutable tokenB0; modifier _onlyOperator_() { require(msg.sender == operator, 'Only operator'); _; } constructor (address tokenB0_) { tokenB0 = tokenB0_; } //================================================================================ function getTraderReward(address account) external view returns (RewardInfo memory) { return _traderRewards[account]; } function getRefererReward(address account) external view returns (RewardInfo memory) { return _refererRewards[account]; } function getOperator() external view returns (address) { return operator; } //================================================================================ function setOperator(address operator_) external _onlyAdmin_ { operator = operator_; } function emergencyWithdraw(address token, address to) external _onlyAdmin_ { token.transferOut(to, token.balanceOfThis()); } //================================================================================ function updateTraderReward(address[] memory accounts, uint256[] memory cumulativeRewards) external _onlyOperator_ { require(accounts.length == cumulativeRewards.length, 'Invalid input length'); for (uint256 i = 0; i < accounts.length; i++) { address account = accounts[i]; uint256 cumulativeReward = cumulativeRewards[i]; require(cumulativeReward >= _traderRewards[account].cumulativeReward, 'Cumulative reward cannot decrease'); _traderRewards[account].cumulativeReward = cumulativeReward; emit UpdateTraderReward(account, cumulativeReward, _traderRewards[account].cumulativeClaimed); } } function updateRefererReward(address[] memory accounts, uint256[] memory cumulativeRewards) external _onlyOperator_ { require(accounts.length == cumulativeRewards.length, 'Invalid input length'); for (uint256 i = 0; i < accounts.length; i++) { address account = accounts[i]; uint256 cumulativeReward = cumulativeRewards[i]; require(cumulativeReward >= _refererRewards[account].cumulativeReward, 'Cumulative reward cannot decrease'); _refererRewards[account].cumulativeReward = cumulativeReward; emit UpdateRefererReward(account, cumulativeReward, _refererRewards[account].cumulativeClaimed); } } //================================================================================ function claimTraderReward(address account) external { RewardInfo storage reward = _traderRewards[account]; uint256 amount = reward.cumulativeReward - reward.cumulativeClaimed; require(amount > 0, 'No reward to claim'); require(tokenB0.balanceOfThis() >= amount, 'Insufficient tokenB0'); reward.cumulativeClaimed = reward.cumulativeReward; tokenB0.transferOut(account, amount); emit ClaimTraderReward(account, reward.cumulativeClaimed, amount); } function claimRefererReward(address account) external { RewardInfo storage reward = _refererRewards[account]; uint256 amount = reward.cumulativeReward - reward.cumulativeClaimed; require(amount > 0, 'No reward to claim'); require(tokenB0.balanceOfThis() >= amount, 'Insufficient tokenB0'); reward.cumulativeClaimed = reward.cumulativeReward; tokenB0.transferOut(account, amount); emit ClaimRefererReward(account, reward.cumulativeClaimed, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/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. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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 (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/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; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.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)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ 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"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ 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"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/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 <0.9.0; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; /// Library for operating ERC20 and ETH in one logic /// ETH is represented by address: 0x0000000000000000000000000000000000000001 library ETHAndERC20 { using SafeERC20 for IERC20; error SendEthFail(); error WrongTokenInAmount(); error WrongTokenOutAmount(); function decimals(address token) internal view returns (uint8) { return token == address(1) ? 18 : IERC20Metadata(token).decimals(); } // @notice Get the balance of ERC20 tokens or Ether held by this contract function balanceOfThis(address token) internal view returns (uint256) { return token == address(1) ? address(this).balance : IERC20(token).balanceOf(address(this)); } function approveMax(address token, address spender) internal { if (token != address(1)) { uint256 allowance = IERC20(token).allowance(address(this), spender); if (allowance != type(uint256).max) { if (allowance != 0) { IERC20(token).safeApprove(spender, 0); } IERC20(token).safeApprove(spender, type(uint256).max); } } } function unapprove(address token, address spender) internal { if (token != address(1)) { uint256 allowance = IERC20(token).allowance(address(this), spender); if (allowance != 0) { IERC20(token).safeApprove(spender, 0); } } } // @notice Transfer ERC20 tokens or Ether from 'from' to this contract function transferIn(address token, address from, uint256 amount) internal { if (token == address(1)) { if (amount != msg.value) { revert WrongTokenInAmount(); } } else { uint256 balance1 = balanceOfThis(token); IERC20(token).safeTransferFrom(from, address(this), amount); uint256 balance2 = balanceOfThis(token); if (balance2 != balance1 + amount) { revert WrongTokenInAmount(); } } } // @notice Transfer ERC20 tokens or Ether from this contract to 'to' function transferOut(address token, address to, uint256 amount) internal { uint256 balance1 = balanceOfThis(token); if (token == address(1)) { (bool success, ) = payable(to).call{value: amount}(''); if (!success) { revert SendEthFail(); } } else { IERC20(token).safeTransfer(to, amount); } uint256 balance2 = balanceOfThis(token); if (balance1 != balance2 + amount) { revert WrongTokenOutAmount(); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import '../utils/Admin.sol'; import '../utils/Implementation.sol'; abstract contract TradeRewardStorage is Admin, Implementation { address internal operator; struct RewardInfo { uint256 cumulativeReward; uint256 cumulativeClaimed; } // smart account => reward info mapping (address => RewardInfo) internal _traderRewards; // smart account => reward info mapping (address => RewardInfo) internal _refererRewards; }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; abstract contract Admin { error OnlyAdmin(); event NewAdmin(address newAdmin); address public admin; modifier _onlyAdmin_() { if (msg.sender != admin) { revert OnlyAdmin(); } _; } constructor () { admin = msg.sender; emit NewAdmin(admin); } /** * @notice Set a new admin for the contract. * @dev This function allows the current admin to assign a new admin address without performing any explicit verification. * It's the current admin's responsibility to ensure that the 'newAdmin' address is correct and secure. * @param newAdmin The address of the new admin. */ function setAdmin(address newAdmin) external _onlyAdmin_ { admin = newAdmin; emit NewAdmin(newAdmin); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import './Admin.sol'; abstract contract Implementation is Admin { event NewImplementation(address newImplementation); address public implementation; // @notice Set a new implementation address for the contract function setImplementation(address newImplementation) external _onlyAdmin_ { implementation = newImplementation; emit NewImplementation(newImplementation); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"tokenB0_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"OnlyAdmin","type":"error"},{"inputs":[],"name":"SendEthFail","type":"error"},{"inputs":[],"name":"WrongTokenOutAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"cumulativeClaimed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimRefererReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"cumulativeClaimed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimTraderReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"NewAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"}],"name":"NewImplementation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"cumulativeReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cumulativeClaimed","type":"uint256"}],"name":"UpdateRefererReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"cumulativeReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cumulativeClaimed","type":"uint256"}],"name":"UpdateTraderReward","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimRefererReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimTraderReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getOperator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getRefererReward","outputs":[{"components":[{"internalType":"uint256","name":"cumulativeReward","type":"uint256"},{"internalType":"uint256","name":"cumulativeClaimed","type":"uint256"}],"internalType":"struct TradeRewardStorage.RewardInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getTraderReward","outputs":[{"components":[{"internalType":"uint256","name":"cumulativeReward","type":"uint256"},{"internalType":"uint256","name":"cumulativeClaimed","type":"uint256"}],"internalType":"struct TradeRewardStorage.RewardInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"setImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator_","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenB0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"cumulativeRewards","type":"uint256[]"}],"name":"updateRefererReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"cumulativeRewards","type":"uint256[]"}],"name":"updateTraderReward","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b5060405161131138038061131183398101604081905261002f91610088565b600080546001600160a01b031916339081179091556040519081527f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c9060200160405180910390a16001600160a01b03166080526100b8565b60006020828403121561009a57600080fd5b81516001600160a01b03811681146100b157600080fd5b9392505050565b6080516112226100ef600039600081816101e201528181610347015281816103cd015281816108fb015261098101526112226000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063b3ab15fb1161008c578063d784d42611610066578063d784d4261461023d578063e7f43c6814610250578063f851a44014610261578063f861f5861461027457600080fd5b8063b3ab15fb14610204578063b4b4c69e14610217578063b9e6176d1461022a57600080fd5b80636382d9ad116100c85780636382d9ad146101a4578063704b6c02146101b75780637d4d826f146101ca578063b016ec9c146101dd57600080fd5b80633ddb5123146100ef57806344505f33146101045780635c60da1b14610179575b600080fd5b6101026100fd366004610e86565b6102c9565b005b610159610112366004610e86565b6040805180820190915260008082526020820152506001600160a01b0316600090815260046020908152604091829020825180840190935280548352600101549082015290565b604080518251815260209283015192810192909252015b60405180910390f35b60015461018c906001600160a01b031681565b6040516001600160a01b039091168152602001610170565b6101026101b2366004610ea8565b610438565b6101026101c5366004610e86565b61048e565b6101026101d8366004610fb1565b61050e565b61018c7f000000000000000000000000000000000000000000000000000000000000000081565b610102610212366004610e86565b6106a4565b610102610225366004610fb1565b6106f1565b610102610238366004610e86565b610882565b61010261024b366004610e86565b6109df565b6002546001600160a01b031661018c565b60005461018c906001600160a01b031681565b610159610282366004610e86565b6040805180820190915260008082526020820152506001600160a01b0316600090815260036020908152604091829020825180840190935280548352600101549082015290565b6001600160a01b0381166000908152600460205260408120600181015481549192916102f59190611087565b9050600081116103415760405162461bcd60e51b81526020600482015260126024820152714e6f2072657761726420746f20636c61696d60701b60448201526064015b60405180910390fd5b806103747f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610a58565b10156103b95760405162461bcd60e51b81526020600482015260146024820152730496e73756666696369656e7420746f6b656e42360641b6044820152606401610338565b815460018301556103f46001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483610ae0565b7f62cc808ccb84f351c1368aafe5189225689b6902c9f27111f7acba29155587f18383600101548360405161042b9392919061109a565b60405180910390a1505050565b6000546001600160a01b0316331461046357604051634755657960e01b815260040160405180910390fd5b61048a81610479846001600160a01b0316610a58565b6001600160a01b0385169190610ae0565b5050565b6000546001600160a01b031633146104b957604051634755657960e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c906020015b60405180910390a150565b6002546001600160a01b031633146105585760405162461bcd60e51b815260206004820152600d60248201526c27b7363c9037b832b930ba37b960991b6044820152606401610338565b80518251146105a05760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840d2dce0eae840d8cadccee8d60631b6044820152606401610338565b60005b825181101561069f5760008382815181106105c0576105c06110bb565b6020026020010151905060008383815181106105de576105de6110bb565b6020026020010151905060036000836001600160a01b03166001600160a01b03168152602001908152602001600020600001548110156106305760405162461bcd60e51b8152600401610338906110d1565b6001600160a01b038216600090815260036020526040908190208281556001015490517ff3b596f549f7eb96d3f409d0f373e9e67daccbd356ea9f0488c48ebf149da5bd91610682918591859161109a565b60405180910390a15050808061069790611112565b9150506105a3565b505050565b6000546001600160a01b031633146106cf57604051634755657960e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b0316331461073b5760405162461bcd60e51b815260206004820152600d60248201526c27b7363c9037b832b930ba37b960991b6044820152606401610338565b80518251146107835760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840d2dce0eae840d8cadccee8d60631b6044820152606401610338565b60005b825181101561069f5760008382815181106107a3576107a36110bb565b6020026020010151905060008383815181106107c1576107c16110bb565b6020026020010151905060046000836001600160a01b03166001600160a01b03168152602001908152602001600020600001548110156108135760405162461bcd60e51b8152600401610338906110d1565b6001600160a01b038216600090815260046020526040908190208281556001015490517fadac00490a52aa87f180c4c66c66ac712f704e8b71f041157a83b83de8c8ffba91610865918591859161109a565b60405180910390a15050808061087a90611112565b915050610786565b6001600160a01b0381166000908152600360205260408120600181015481549192916108ae9190611087565b9050600081116108f55760405162461bcd60e51b81526020600482015260126024820152714e6f2072657761726420746f20636c61696d60701b6044820152606401610338565b806109287f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610a58565b101561096d5760405162461bcd60e51b81526020600482015260146024820152730496e73756666696369656e7420746f6b656e42360641b6044820152606401610338565b815460018301556109a86001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483610ae0565b7f1d36dc73345a78f9923738eee56bfda2f00836cff2adb9b5f41569dc59aa781e8383600101548360405161042b9392919061109a565b6000546001600160a01b03163314610a0a57604051634755657960e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f6b70829fcbe4891157f7a7496f9870927de3c8237adbe9cd39bae09b7382c40990602001610503565b60006001600160a01b038216600114610ad8576040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610aaf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad3919061112b565b610ada565b475b92915050565b6000610aeb84610a58565b90506000196001600160a01b03851601610b79576000836001600160a01b03168360405160006040518083038185875af1925050503d8060008114610b4c576040519150601f19603f3d011682016040523d82523d6000602084013e610b51565b606091505b5050905080610b735760405163e277d13760e01b815260040160405180910390fd5b50610b8d565b610b8d6001600160a01b0385168484610bca565b6000610b9885610a58565b9050610ba48382611144565b8214610bc35760405163f4d4667360e01b815260040160405180910390fd5b5050505050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649084015261069f92869291600091610c5a918516908490610cda565b9050805160001480610c7b575080806020019051810190610c7b9190611157565b61069f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610338565b6060610ce98484600085610cf1565b949350505050565b606082471015610d525760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610338565b600080866001600160a01b03168587604051610d6e919061119d565b60006040518083038185875af1925050503d8060008114610dab576040519150601f19603f3d011682016040523d82523d6000602084013e610db0565b606091505b5091509150610dc187838387610dcc565b979650505050505050565b60608315610e3b578251600003610e34576001600160a01b0385163b610e345760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610338565b5081610ce9565b610ce98383815115610e505781518083602001fd5b8060405162461bcd60e51b815260040161033891906111b9565b80356001600160a01b0381168114610e8157600080fd5b919050565b600060208284031215610e9857600080fd5b610ea182610e6a565b9392505050565b60008060408385031215610ebb57600080fd5b610ec483610e6a565b9150610ed260208401610e6a565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610f1a57610f1a610edb565b604052919050565b600067ffffffffffffffff821115610f3c57610f3c610edb565b5060051b60200190565b600082601f830112610f5757600080fd5b81356020610f6c610f6783610f22565b610ef1565b82815260059290921b84018101918181019086841115610f8b57600080fd5b8286015b84811015610fa65780358352918301918301610f8f565b509695505050505050565b60008060408385031215610fc457600080fd5b823567ffffffffffffffff80821115610fdc57600080fd5b818501915085601f830112610ff057600080fd5b81356020611000610f6783610f22565b82815260059290921b8401810191818101908984111561101f57600080fd5b948201945b838610156110445761103586610e6a565b82529482019490820190611024565b9650508601359250508082111561105a57600080fd5b5061106785828601610f46565b9150509250929050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610ada57610ada611071565b6001600160a01b039390931683526020830191909152604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60208082526021908201527f43756d756c6174697665207265776172642063616e6e6f7420646563726561736040820152606560f81b606082015260800190565b60006001820161112457611124611071565b5060010190565b60006020828403121561113d57600080fd5b5051919050565b80820180821115610ada57610ada611071565b60006020828403121561116957600080fd5b81518015158114610ea157600080fd5b60005b8381101561119457818101518382015260200161117c565b50506000910152565b600082516111af818460208701611179565b9190910192915050565b60208152600082518060208401526111d8816040850160208701611179565b601f01601f1916919091016040019291505056fea2646970667358221220bf4270d57bcc52f3b680c08d529470573c48f01f3861b0aa6f79dd6b40ee1e4f64736f6c6343000814003300000000000000000000000029219dd400f2bf60e5a23d13be72b486d4038894
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063b3ab15fb1161008c578063d784d42611610066578063d784d4261461023d578063e7f43c6814610250578063f851a44014610261578063f861f5861461027457600080fd5b8063b3ab15fb14610204578063b4b4c69e14610217578063b9e6176d1461022a57600080fd5b80636382d9ad116100c85780636382d9ad146101a4578063704b6c02146101b75780637d4d826f146101ca578063b016ec9c146101dd57600080fd5b80633ddb5123146100ef57806344505f33146101045780635c60da1b14610179575b600080fd5b6101026100fd366004610e86565b6102c9565b005b610159610112366004610e86565b6040805180820190915260008082526020820152506001600160a01b0316600090815260046020908152604091829020825180840190935280548352600101549082015290565b604080518251815260209283015192810192909252015b60405180910390f35b60015461018c906001600160a01b031681565b6040516001600160a01b039091168152602001610170565b6101026101b2366004610ea8565b610438565b6101026101c5366004610e86565b61048e565b6101026101d8366004610fb1565b61050e565b61018c7f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d403889481565b610102610212366004610e86565b6106a4565b610102610225366004610fb1565b6106f1565b610102610238366004610e86565b610882565b61010261024b366004610e86565b6109df565b6002546001600160a01b031661018c565b60005461018c906001600160a01b031681565b610159610282366004610e86565b6040805180820190915260008082526020820152506001600160a01b0316600090815260036020908152604091829020825180840190935280548352600101549082015290565b6001600160a01b0381166000908152600460205260408120600181015481549192916102f59190611087565b9050600081116103415760405162461bcd60e51b81526020600482015260126024820152714e6f2072657761726420746f20636c61696d60701b60448201526064015b60405180910390fd5b806103747f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d40388946001600160a01b0316610a58565b10156103b95760405162461bcd60e51b81526020600482015260146024820152730496e73756666696369656e7420746f6b656e42360641b6044820152606401610338565b815460018301556103f46001600160a01b037f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d4038894168483610ae0565b7f62cc808ccb84f351c1368aafe5189225689b6902c9f27111f7acba29155587f18383600101548360405161042b9392919061109a565b60405180910390a1505050565b6000546001600160a01b0316331461046357604051634755657960e01b815260040160405180910390fd5b61048a81610479846001600160a01b0316610a58565b6001600160a01b0385169190610ae0565b5050565b6000546001600160a01b031633146104b957604051634755657960e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c906020015b60405180910390a150565b6002546001600160a01b031633146105585760405162461bcd60e51b815260206004820152600d60248201526c27b7363c9037b832b930ba37b960991b6044820152606401610338565b80518251146105a05760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840d2dce0eae840d8cadccee8d60631b6044820152606401610338565b60005b825181101561069f5760008382815181106105c0576105c06110bb565b6020026020010151905060008383815181106105de576105de6110bb565b6020026020010151905060036000836001600160a01b03166001600160a01b03168152602001908152602001600020600001548110156106305760405162461bcd60e51b8152600401610338906110d1565b6001600160a01b038216600090815260036020526040908190208281556001015490517ff3b596f549f7eb96d3f409d0f373e9e67daccbd356ea9f0488c48ebf149da5bd91610682918591859161109a565b60405180910390a15050808061069790611112565b9150506105a3565b505050565b6000546001600160a01b031633146106cf57604051634755657960e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b0316331461073b5760405162461bcd60e51b815260206004820152600d60248201526c27b7363c9037b832b930ba37b960991b6044820152606401610338565b80518251146107835760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840d2dce0eae840d8cadccee8d60631b6044820152606401610338565b60005b825181101561069f5760008382815181106107a3576107a36110bb565b6020026020010151905060008383815181106107c1576107c16110bb565b6020026020010151905060046000836001600160a01b03166001600160a01b03168152602001908152602001600020600001548110156108135760405162461bcd60e51b8152600401610338906110d1565b6001600160a01b038216600090815260046020526040908190208281556001015490517fadac00490a52aa87f180c4c66c66ac712f704e8b71f041157a83b83de8c8ffba91610865918591859161109a565b60405180910390a15050808061087a90611112565b915050610786565b6001600160a01b0381166000908152600360205260408120600181015481549192916108ae9190611087565b9050600081116108f55760405162461bcd60e51b81526020600482015260126024820152714e6f2072657761726420746f20636c61696d60701b6044820152606401610338565b806109287f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d40388946001600160a01b0316610a58565b101561096d5760405162461bcd60e51b81526020600482015260146024820152730496e73756666696369656e7420746f6b656e42360641b6044820152606401610338565b815460018301556109a86001600160a01b037f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d4038894168483610ae0565b7f1d36dc73345a78f9923738eee56bfda2f00836cff2adb9b5f41569dc59aa781e8383600101548360405161042b9392919061109a565b6000546001600160a01b03163314610a0a57604051634755657960e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f6b70829fcbe4891157f7a7496f9870927de3c8237adbe9cd39bae09b7382c40990602001610503565b60006001600160a01b038216600114610ad8576040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610aaf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad3919061112b565b610ada565b475b92915050565b6000610aeb84610a58565b90506000196001600160a01b03851601610b79576000836001600160a01b03168360405160006040518083038185875af1925050503d8060008114610b4c576040519150601f19603f3d011682016040523d82523d6000602084013e610b51565b606091505b5050905080610b735760405163e277d13760e01b815260040160405180910390fd5b50610b8d565b610b8d6001600160a01b0385168484610bca565b6000610b9885610a58565b9050610ba48382611144565b8214610bc35760405163f4d4667360e01b815260040160405180910390fd5b5050505050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649084015261069f92869291600091610c5a918516908490610cda565b9050805160001480610c7b575080806020019051810190610c7b9190611157565b61069f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610338565b6060610ce98484600085610cf1565b949350505050565b606082471015610d525760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610338565b600080866001600160a01b03168587604051610d6e919061119d565b60006040518083038185875af1925050503d8060008114610dab576040519150601f19603f3d011682016040523d82523d6000602084013e610db0565b606091505b5091509150610dc187838387610dcc565b979650505050505050565b60608315610e3b578251600003610e34576001600160a01b0385163b610e345760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610338565b5081610ce9565b610ce98383815115610e505781518083602001fd5b8060405162461bcd60e51b815260040161033891906111b9565b80356001600160a01b0381168114610e8157600080fd5b919050565b600060208284031215610e9857600080fd5b610ea182610e6a565b9392505050565b60008060408385031215610ebb57600080fd5b610ec483610e6a565b9150610ed260208401610e6a565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610f1a57610f1a610edb565b604052919050565b600067ffffffffffffffff821115610f3c57610f3c610edb565b5060051b60200190565b600082601f830112610f5757600080fd5b81356020610f6c610f6783610f22565b610ef1565b82815260059290921b84018101918181019086841115610f8b57600080fd5b8286015b84811015610fa65780358352918301918301610f8f565b509695505050505050565b60008060408385031215610fc457600080fd5b823567ffffffffffffffff80821115610fdc57600080fd5b818501915085601f830112610ff057600080fd5b81356020611000610f6783610f22565b82815260059290921b8401810191818101908984111561101f57600080fd5b948201945b838610156110445761103586610e6a565b82529482019490820190611024565b9650508601359250508082111561105a57600080fd5b5061106785828601610f46565b9150509250929050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610ada57610ada611071565b6001600160a01b039390931683526020830191909152604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60208082526021908201527f43756d756c6174697665207265776172642063616e6e6f7420646563726561736040820152606560f81b606082015260800190565b60006001820161112457611124611071565b5060010190565b60006020828403121561113d57600080fd5b5051919050565b80820180821115610ada57610ada611071565b60006020828403121561116957600080fd5b81518015158114610ea157600080fd5b60005b8381101561119457818101518382015260200161117c565b50506000910152565b600082516111af818460208701611179565b9190910192915050565b60208152600082518060208401526111d8816040850160208701611179565b601f01601f1916919091016040019291505056fea2646970667358221220bf4270d57bcc52f3b680c08d529470573c48f01f3861b0aa6f79dd6b40ee1e4f64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000029219dd400f2bf60e5a23d13be72b486d4038894
-----Decoded View---------------
Arg [0] : tokenB0_ (address): 0x29219dd400f2Bf60E5a23d13Be72B486D4038894
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000029219dd400f2bf60e5a23d13be72b486d4038894
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.