Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 23 from a total of 23 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Init Swap | 19710619 | 200 days ago | IN | 0 ETH | 0.00169484 | ||||
Execute Swap | 18842177 | 322 days ago | IN | 0 ETH | 0.00670824 | ||||
Execute Swap | 18749313 | 335 days ago | IN | 0 ETH | 0.0052085 | ||||
Execute Swap | 18537146 | 365 days ago | IN | 0 ETH | 0.00744664 | ||||
Execute Swap | 18392406 | 385 days ago | IN | 0 ETH | 0.0017393 | ||||
Execute Swap | 18392319 | 385 days ago | IN | 0 ETH | 0.00258142 | ||||
Execute Swap | 18392220 | 385 days ago | IN | 0 ETH | 0.00166442 | ||||
Execute Swap | 18364902 | 389 days ago | IN | 0 ETH | 0.00111127 | ||||
Execute Swap | 18340410 | 392 days ago | IN | 0 ETH | 0.00053797 | ||||
Init Swap | 18340352 | 392 days ago | IN | 0 ETH | 0.00148991 | ||||
Execute Swap | 18335313 | 393 days ago | IN | 0 ETH | 0.00183461 | ||||
Init Swap | 18335294 | 393 days ago | IN | 0 ETH | 0.00318804 | ||||
Execute Swap | 18293813 | 399 days ago | IN | 0 ETH | 0.0006339 | ||||
Execute Swap | 18080457 | 429 days ago | IN | 0 ETH | 0.00123416 | ||||
Init Swap | 18078952 | 429 days ago | IN | 0 ETH | 0.00620467 | ||||
Init Swap | 17978858 | 443 days ago | IN | 0 ETH | 0.01149186 | ||||
Init Swap | 17463734 | 515 days ago | IN | 0 ETH | 0.00479056 | ||||
Execute Swap | 16860280 | 600 days ago | IN | 0 ETH | 0.0017352 | ||||
Init Swap | 16855028 | 601 days ago | IN | 0 ETH | 0.00421154 | ||||
Init Swap | 16335039 | 674 days ago | IN | 0 ETH | 0.00624992 | ||||
Cancel Swap | 16296395 | 679 days ago | IN | 0 ETH | 0.00130108 | ||||
Init Swap | 16294514 | 680 days ago | IN | 0 ETH | 0.00400318 | ||||
0x60806040 | 15523826 | 788 days ago | IN | 0 ETH | 0.01746042 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
HedgeyDAOSwap
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: BUSL-1.1 pragma solidity 0.8.13; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './libraries/TransferHelper.sol'; import './libraries/NFTHelper.sol'; /** @title This contract is specially designed for DAO to DAO swaps * The purpose of this is to make it easy for DAO_A with tokenA to swap an exact amount of tokens with DAO_B for tokenB * The Swap has an initiator and an executor * The initiator is delivering tokenA and amountA in exchange for amountB of tokenB with the executor DAO * The initiator sets up the swap parameters, ie tokens to be exchanged, amounts, and other DAO * The executor confirms and executes the swap * If something is wrong the initiator can cancel the swap anytime unless the executor has already executed it * The swaps may lock the tokens or swap them unlocked. If they are locking, the DAOs will utilize the Hedgeys NFT contract * to perform the locking of the tokens, which has a single vesting cliff date when the tokens can unlock for each DAO */ contract HedgeyDAOSwap is ReentrancyGuard { /// @notice id counters to map each struct uint256 public swapId; /// @notice this is the Swap struct, the definition of a Swap defined by the following /// @param tokenA is the address of the tokens that the initiator DAO will be delivering (and executor DAO will receive) /// @param tokenB is the address of the tokens that the executor DAO will be deliveriny (and the initiator DAO will receive) /// @param amountA is the amount of tokenA that the initiator DAO will deliver (and the amount executor will receive) /// @param amountB is the amount of tokenB that the executor DAO will deliver (and the amount the initiator will receive) /// @param unlockDate is the block timestamp for when the tokens will unlock. if this is set to 0 or anything in the past the tokens will not be locked upon swap /// @param initiator is the initiator DAO address who will initialize the swap and will deliver amountA of tokenA /// @param executor is the executor DAO address that will execute the swap and deliver amountB of tokenB /// @param nftLocker is an address of the Hedgeys NFT contract that will lock the tokens IF the unlock date is in the future struct Swap { address tokenA; address tokenB; uint256 amountA; uint256 amountB; uint256 unlockDate; address initiator; address executor; address nftLocker; } /// @notice mapping of the swapIDs to the struct Swap - made public so the executor can confirm accuracy of swap prior to execution mapping(uint256 => Swap) public swaps; /// @notice event of the new swap being initialized event NewSwap( uint256 indexed id, address tokenA, address tokenB, uint256 amountA, uint256 amountB, uint256 unlockDate, address indexed initiator, address indexed executor, address nftLocker ); /// @notice event of when a swap is executed and completed event SwapExecuted(uint256 indexed id); /// @notice event of when a swap has been cancelled event SwapCancelled(uint256 indexed id); /// @notice function to initialize the swap - with all of the parameters /// @dev the DAO performing this function automatically becomes the initiator DAO /// @param tokenA is the token address that the DAO calling this function will be delivering. /// ...The initiator needs to ensure sufficient allowance has been set for tokenA of amountA with this contract /// ... as the amountA of tokenA will be pulled into this contract to be held until execution or cancellation /// @param tokenB is the token address of the DAO that will exexute the swap /// @param amountA is the amount of tokenA that will be swapped and will be pulled into this contract to be held until execution /// @param amountB is the amount of tokenB that will be swapped - it is transferred during the execution step & function /// @param unlockDate is the date in which tokens will be unlocked, denominated as block timestamp. /// ... if the tokens are not to be locked, then the initiator should just use 0 for this parameter /// @param executor is the executor DAO address - only the executor address will be able to execute this swap /// @param nftLocker IF the tokens are to be locked, this is the address of the Hedgeys NFTs that will lock the tokens /// @dev for more information on the correct address for the Hedgey NFTs pls visit the github repo readme at https://github.com/hedgey-finance/NFT_OTC_Core /// @dev this function will emit the New Swap event, and then create a Swap struct held in storage - mapped to the next index swapId function initSwap( address tokenA, address tokenB, uint256 amountA, uint256 amountB, uint256 unlockDate, address executor, address nftLocker ) external nonReentrant { require(tokenA != address(0x0) && tokenB != address(0x0), "token address issue"); require(executor != address(0x0), "executor cannot be zero address"); require(amountA > 0 && amountB > 0, "amounts cannot be 0"); if(unlockDate > block.timestamp) require(nftLocker != address(0x0), "nft locker cannot be zero"); TransferHelper.transferTokens(tokenA, msg.sender, address(this), amountA); emit NewSwap(swapId, tokenA, tokenB, amountA, amountB, unlockDate, msg.sender, executor, nftLocker); swaps[swapId++] = Swap(tokenA, tokenB, amountA, amountB, unlockDate, msg.sender, executor, nftLocker); } /// @notice this is the function that actually executes the swap /// @param _swapId is the swapId that is mapped to the specific Swap struct in storage /// @dev only the Executor DAO of the swap can call this function /// @dev for security the Swap struct in storage is immediately deleted so it cannot be executed twice /// @dev The swap is executed where amountA of tokenA is delivered to the Executor DAO /// ... and amountB of tokenB is delivered to the Initiator DAO /// ... if the swap requires the tokens to be locked, then amountB of tokenB will be pulled into this address first /// ... and then amountB of tokenB will be locked in an NFT minted to Initiator DAO /// ... and then amountA of tokenA will be locked in an NFT minted to the Executor DAO /// @dev this function emits a SwapExecuted event for tracking the swap function executeSwap(uint256 _swapId) external nonReentrant { Swap memory swap = swaps[_swapId]; require(msg.sender == swap.executor, "only executor"); delete swaps[_swapId]; if (swap.unlockDate > block.timestamp) { TransferHelper.transferTokens(swap.tokenB, swap.executor, address(this), swap.amountB); NFTHelper.lockTokens(swap.nftLocker, swap.initiator, swap.tokenB, swap.amountB, swap.unlockDate); NFTHelper.lockTokens(swap.nftLocker, swap.executor, swap.tokenA, swap.amountA, swap.unlockDate); } else { TransferHelper.transferTokens(swap.tokenB, swap.executor, swap.initiator, swap.amountB); TransferHelper.withdrawTokens(swap.tokenA, swap.executor, swap.amountA); } emit SwapExecuted(_swapId); } /// @notice this function will cancel a swap that has been initiated but not executed yet /// @param _swapId is the swapId that is mapped to the specific Swap struct stored in storage /// @dev only the initiator of the swap can call this function /// @dev this function will delete the Swap stored in storage ///... and then withdraw the amountA of tokenA back to the initiator /// @dev this function emits a SwapCancelled event function cancelSwap(uint256 _swapId) external nonReentrant { Swap memory swap = swaps[_swapId]; require(msg.sender == swap.initiator, "only initiator"); delete swaps[_swapId]; TransferHelper.withdrawTokens(swap.tokenA, swap.initiator, swap.amountA); emit SwapCancelled(_swapId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.13; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import '../interfaces/IWeth.sol'; /// @notice Library to help safely transfer tokens and handle ETH wrapping and unwrapping of WETH library TransferHelper { using SafeERC20 for IERC20; /// @notice Internal function used for standard ERC20 transferFrom method /// @notice it contains a pre and post balance check /// @notice as well as a check on the msg.senders balance /// @param token is the address of the ERC20 being transferred /// @param from is the remitting address /// @param to is the location where they are being delivered function transferTokens( address token, address from, address to, uint256 amount ) internal { uint256 priorBalance = IERC20(token).balanceOf(address(to)); require(IERC20(token).balanceOf(from) >= amount, 'THL01'); SafeERC20.safeTransferFrom(IERC20(token), from, to, amount); uint256 postBalance = IERC20(token).balanceOf(address(to)); require(postBalance - priorBalance == amount, 'THL02'); } /// @notice Internal function is used with standard ERC20 transfer method /// @notice this function ensures that the amount received is the amount sent with pre and post balance checking /// @param token is the ERC20 contract address that is being transferred /// @param to is the address of the recipient /// @param amount is the amount of tokens that are being transferred function withdrawTokens( address token, address to, uint256 amount ) internal { uint256 priorBalance = IERC20(token).balanceOf(address(to)); SafeERC20.safeTransfer(IERC20(token), to, amount); uint256 postBalance = IERC20(token).balanceOf(address(to)); require(postBalance - priorBalance == amount, 'THL02'); } /// @dev Internal function that handles transfering payments from buyers to sellers with special WETH handling /// @dev this function assumes that if the recipient address is a contract, it cannot handle ETH - so we always deliver WETH /// @dev special care needs to be taken when using contract addresses to sell deals - to ensure it can handle WETH properly when received function transferPayment( address weth, address token, address from, address payable to, uint256 amount ) internal { if (token == weth) { require(msg.value == amount, 'THL03'); if (!Address.isContract(to)) { (bool success, ) = to.call{value: amount}(''); require(success, 'THL04'); } else { /// @dev we want to deliver WETH from ETH here for better handling at contract IWeth(weth).deposit{value: amount}(); assert(IWeth(weth).transfer(to, amount)); } } else { transferTokens(token, from, to, amount); } } /// @dev Internal funciton that handles withdrawing tokens and WETH that are up for sale to buyers /// @dev this function is only called if the tokens are not timelocked /// @dev this function handles weth specially and delivers ETH to the recipient function withdrawPayment( address weth, address token, address payable to, uint256 amount ) internal { if (token == weth) { IWeth(weth).withdraw(amount); (bool success, ) = to.call{value: amount}(''); require(success, 'THL04'); } else { withdrawTokens(token, to, amount); } } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.13; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import '../interfaces/INFT.sol'; /// @notice Library to lock tokens and mint an NFT /// @notice this NFTHelper is used by the HedgeyOTC contract to lock tokens and instruct the Hedgeys contract to mint an NFT library NFTHelper { /// @dev internal function that handles the locking of the tokens in the NFT Futures contract /// @param futureContract is the address of the NFT contract that will mint the NFT and lock tokens /// @param _holder address here becomes the owner of the newly minted NFT /// @param _token address here is the ERC20 contract address of the tokens being locked by the NFT contract /// @param _amount is the amount of tokens that will be locked /// @param _unlockDate provides the unlock date which is the expiration date for the Future generated function lockTokens( address futureContract, address _holder, address _token, uint256 _amount, uint256 _unlockDate ) internal { /// @dev ensure that the _unlockDate is in the future compared to the current block timestamp require(_unlockDate > block.timestamp, 'NHL01'); /// @dev similar to checking the balances for the OTC contract when creating a new deal - we check the current and post balance in the NFT contract /// @dev to ensure that 100% of the amount of tokens to be locked are in fact locked in the contract address uint256 currentBalance = IERC20(_token).balanceOf(futureContract); /// @dev increase allowance so that the NFT contract can pull the total funds /// @dev this is a safer way to ensure that the entire amount is delivered to the NFT contract SafeERC20.safeIncreaseAllowance(IERC20(_token), futureContract, _amount); /// @dev this function points to the NFT Futures contract and calls its function to mint an NFT and generate the locked tokens future struct INFT(futureContract).createNFT(_holder, _amount, _token, _unlockDate); /// @dev check to make sure that _holder is received by the futures contract equals the total amount we have delivered /// @dev this prevents functionality with deflationary or tax tokens that have not whitelisted these address uint256 postBalance = IERC20(_token).balanceOf(futureContract); assert(postBalance - currentBalance == _amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.13; interface IWeth { function deposit() external payable; function transfer(address to, uint256 value) external returns (bool); function withdraw(uint256) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.13; /// @dev this is the one contract call that the OTC needs to interact with the NFT contract interface INFT { /// @notice function for publicly viewing a lockedToken (future) details /// @param _id is the id of the NFT which is mapped to the future struct /// @dev this returns the amount of tokens locked, the token address and the date that they are unlocked function futures(uint256 _id) external view returns ( uint256 amount, address token, uint256 unlockDate ); /// @param _holder is the new owner of the NFT and timelock future - this can be any address /// @param _amount is the amount of tokens that are going to be locked /// @param _token is the token address to be locked by the NFT. Use WETH address for ETH - but WETH must be held by the msg.sender /// ... as there is no automatic wrapping from ETH to WETH for this function. /// @param _unlockDate is the date which the tokens become unlocked and available to be redeemed and withdrawn from the contract /// @dev this is a public function that anyone can call /// @dev the _holder can be defined as your address, or any chose address - and so you can directly mint NFTs to other addresses /// ... in a way to airdrop NFTs directly to contributors function createNFT( address _holder, uint256 _amount, address _token, uint256 _unlockDate ) external returns (uint256); /// @dev function for redeeming an NFT /// @notice this function will burn the NFT and delete the future struct - in return the locked tokens will be delivered function redeemNFT(uint256 _id) external returns (bool); /// @notice this event spits out the details of the NFT and future struct when a new NFT & Future is minted event NFTCreated(uint256 _i, address _holder, uint256 _amount, address _token, uint256 _unlockDate); /// @notice this event spits out the details of the NFT and future structe when an existing NFT and Future is redeemed event NFTRedeemed(uint256 _i, address _holder, uint256 _amount, address _token, uint256 _unlockDate); /// @notice this event is fired the one time when the baseURI is updated event URISet(string newURI); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenA","type":"address"},{"indexed":false,"internalType":"address","name":"tokenB","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountA","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountB","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unlockDate","type":"uint256"},{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"address","name":"nftLocker","type":"address"}],"name":"NewSwap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"SwapCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"SwapExecuted","type":"event"},{"inputs":[{"internalType":"uint256","name":"_swapId","type":"uint256"}],"name":"cancelSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_swapId","type":"uint256"}],"name":"executeSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"unlockDate","type":"uint256"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"address","name":"nftLocker","type":"address"}],"name":"initSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"swaps","outputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"unlockDate","type":"uint256"},{"internalType":"address","name":"initiator","type":"address"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"address","name":"nftLocker","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506001600055611301806100256000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806354d6a2b71461005c578063a9ab232b14610071578063aa5a08bc14610084578063f09c582914610097578063f54738ef1461014e575b600080fd5b61006f61006a3660046110c4565b610165565b005b61006f61007f3660046110c4565b6102f8565b61006f6100923660046110f9565b610509565b6100fb6100a53660046110c4565b6002602081905260009182526040909120805460018201549282015460038301546004840154600585015460068601546007909601546001600160a01b0395861697861696949593949293918216928216911688565b604080516001600160a01b03998a168152978916602089015287019590955260608601939093526080850191909152841660a0840152831660c083015290911660e0820152610100015b60405180910390f35b61015760015481565b604051908152602001610145565b6002600054036101905760405162461bcd60e51b81526004016101879061116a565b60405180910390fd5b60026000818155828152602082815260409182902082516101008101845281546001600160a01b0390811682526001830154811693820193909352938101549284019290925260038201546060840152600482015460808401526005820154811660a084018190526006830154821660c08501526007909201541660e0830152331461024f5760405162461bcd60e51b815260206004820152600e60248201526d37b7363c9034b734ba34b0ba37b960911b6044820152606401610187565b600082815260026020819052604080832080546001600160a01b03199081168255600182018054821690559281018490556003810184905560048101939093556005830180548316905560068301805483169055600790920180549091169055815160a0830151918301516102c49290610848565b60405182907ff6b6b4f7a13f02512c1b3aa8dcc4a07d7775a6a4becbd439efcbd37c5408e67f90600090a250506001600055565b60026000540361031a5760405162461bcd60e51b81526004016101879061116a565b60026000818155828152602082815260409182902082516101008101845281546001600160a01b0390811682526001830154811693820193909352938101549284019290925260038201546060840152600482015460808401526005820154811660a08401526006820154811660c084018190526007909201541660e083015233146103d85760405162461bcd60e51b815260206004820152600d60248201526c37b7363c9032bc32b1baba37b960991b6044820152606401610187565b6000828152600260208190526040822080546001600160a01b0319908116825560018201805482169055918101839055600381018390556004810192909255600582018054821690556006820180548216905560079091018054909116905560808101514210156104a25761045b81602001518260c0015130846060015161097a565b61047c8160e001518260a00151836020015184606001518560800151610b51565b61049d8160e001518260c00151836000015184604001518560800151610b51565b6104d5565b6104be81602001518260c001518360a00151846060015161097a565b6104d581600001518260c001518360400151610848565b60405182907f8d92c805c252261fcfff21ee60740eb8a38922469a7e6ee396976d57c22fc1c990600090a250506001600055565b60026000540361052b5760405162461bcd60e51b81526004016101879061116a565b60026000556001600160a01b0387161580159061055057506001600160a01b03861615155b6105925760405162461bcd60e51b8152602060048201526013602482015272746f6b656e206164647265737320697373756560681b6044820152606401610187565b6001600160a01b0382166105e85760405162461bcd60e51b815260206004820152601f60248201527f6578656375746f722063616e6e6f74206265207a65726f2061646472657373006044820152606401610187565b6000851180156105f85750600084115b61063a5760405162461bcd60e51b81526020600482015260136024820152720616d6f756e74732063616e6e6f74206265203606c1b6044820152606401610187565b42831115610698576001600160a01b0381166106985760405162461bcd60e51b815260206004820152601960248201527f6e6674206c6f636b65722063616e6e6f74206265207a65726f000000000000006044820152606401610187565b6106a48733308861097a565b600154604080516001600160a01b038a811682528981166020830152918101889052606081018790526080810186905283821660a08201529084169133917fe94b0c29bbea5a549b9d5882f4d35c23264c7d5fbde53f9c309c3858c5866c5b9060c00160405180910390a4604051806101000160405280886001600160a01b03168152602001876001600160a01b03168152602001868152602001858152602001848152602001336001600160a01b03168152602001836001600160a01b03168152602001826001600160a01b0316815250600260006001600081548092919061078d906111b7565b90915550815260208082019290925260409081016000908120845181546001600160a01b03199081166001600160a01b039283161783559486015160018084018054881692841692909217909155938601516002830155606086015160038301556080860151600483015560a0860151600583018054871691831691909117905560c0860151600683018054871691831691909117905560e09095015160079091018054909416941693909317909155905550505050505050565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908516906370a0823190602401602060405180830381865afa158015610892573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b691906111d0565b90506108c3848484610d17565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908616906370a0823190602401602060405180830381865afa15801561090d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093191906111d0565b90508261093e83836111e9565b146109735760405162461bcd60e51b81526020600482015260056024820152642a2426181960d91b6044820152606401610187565b5050505050565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908616906370a0823190602401602060405180830381865afa1580156109c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e891906111d0565b6040516370a0823160e01b81526001600160a01b03868116600483015291925083918716906370a0823190602401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906111d0565b1015610a8d5760405162461bcd60e51b815260206004820152600560248201526454484c303160d81b6044820152606401610187565b610a9985858585610d7f565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908716906370a0823190602401602060405180830381865afa158015610ae3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0791906111d0565b905082610b1483836111e9565b14610b495760405162461bcd60e51b81526020600482015260056024820152642a2426181960d91b6044820152606401610187565b505050505050565b428111610b885760405162461bcd60e51b81526020600482015260056024820152644e484c303160d81b6044820152606401610187565b6040516370a0823160e01b81526001600160a01b038681166004830152600091908516906370a0823190602401602060405180830381865afa158015610bd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf691906111d0565b9050610c03848785610dbd565b60405163b273e65360e01b81526001600160a01b0386811660048301526024820185905285811660448301526064820184905287169063b273e653906084016020604051808303816000875af1158015610c61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8591906111d0565b506040516370a0823160e01b81526001600160a01b038781166004830152600091908616906370a0823190602401602060405180830381865afa158015610cd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf491906111d0565b905083610d0183836111e9565b14610d0e57610d0e611200565b50505050505050565b6040516001600160a01b038316602482015260448101829052610d7a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610e6f565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610db79085906323b872dd60e01b90608401610d43565b50505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610e0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3291906111d0565b610e3c9190611216565b6040516001600160a01b038516602482015260448101829052909150610db790859063095ea7b360e01b90606401610d43565b6000610ec4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610f419092919063ffffffff16565b805190915015610d7a5780806020019051810190610ee2919061122e565b610d7a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610187565b6060610f508484600085610f5a565b90505b9392505050565b606082471015610fbb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610187565b6001600160a01b0385163b6110125760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610187565b600080866001600160a01b0316858760405161102e919061127c565b60006040518083038185875af1925050503d806000811461106b576040519150601f19603f3d011682016040523d82523d6000602084013e611070565b606091505b509150915061108082828661108b565b979650505050505050565b6060831561109a575081610f53565b8251156110aa5782518084602001fd5b8160405162461bcd60e51b81526004016101879190611298565b6000602082840312156110d657600080fd5b5035919050565b80356001600160a01b03811681146110f457600080fd5b919050565b600080600080600080600060e0888a03121561111457600080fd5b61111d886110dd565b965061112b602089016110dd565b955060408801359450606088013593506080880135925061114e60a089016110dd565b915061115c60c089016110dd565b905092959891949750929550565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000600182016111c9576111c96111a1565b5060010190565b6000602082840312156111e257600080fd5b5051919050565b6000828210156111fb576111fb6111a1565b500390565b634e487b7160e01b600052600160045260246000fd5b60008219821115611229576112296111a1565b500190565b60006020828403121561124057600080fd5b81518015158114610f5357600080fd5b60005b8381101561126b578181015183820152602001611253565b83811115610db75750506000910152565b6000825161128e818460208701611250565b9190910192915050565b60208152600082518060208401526112b7816040850160208701611250565b601f01601f1916919091016040019291505056fea2646970667358221220c3f86cf8c27a913b55c29459d7f28cf54b245a126abb192120f8b9ec76261e6e64736f6c634300080d0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100575760003560e01c806354d6a2b71461005c578063a9ab232b14610071578063aa5a08bc14610084578063f09c582914610097578063f54738ef1461014e575b600080fd5b61006f61006a3660046110c4565b610165565b005b61006f61007f3660046110c4565b6102f8565b61006f6100923660046110f9565b610509565b6100fb6100a53660046110c4565b6002602081905260009182526040909120805460018201549282015460038301546004840154600585015460068601546007909601546001600160a01b0395861697861696949593949293918216928216911688565b604080516001600160a01b03998a168152978916602089015287019590955260608601939093526080850191909152841660a0840152831660c083015290911660e0820152610100015b60405180910390f35b61015760015481565b604051908152602001610145565b6002600054036101905760405162461bcd60e51b81526004016101879061116a565b60405180910390fd5b60026000818155828152602082815260409182902082516101008101845281546001600160a01b0390811682526001830154811693820193909352938101549284019290925260038201546060840152600482015460808401526005820154811660a084018190526006830154821660c08501526007909201541660e0830152331461024f5760405162461bcd60e51b815260206004820152600e60248201526d37b7363c9034b734ba34b0ba37b960911b6044820152606401610187565b600082815260026020819052604080832080546001600160a01b03199081168255600182018054821690559281018490556003810184905560048101939093556005830180548316905560068301805483169055600790920180549091169055815160a0830151918301516102c49290610848565b60405182907ff6b6b4f7a13f02512c1b3aa8dcc4a07d7775a6a4becbd439efcbd37c5408e67f90600090a250506001600055565b60026000540361031a5760405162461bcd60e51b81526004016101879061116a565b60026000818155828152602082815260409182902082516101008101845281546001600160a01b0390811682526001830154811693820193909352938101549284019290925260038201546060840152600482015460808401526005820154811660a08401526006820154811660c084018190526007909201541660e083015233146103d85760405162461bcd60e51b815260206004820152600d60248201526c37b7363c9032bc32b1baba37b960991b6044820152606401610187565b6000828152600260208190526040822080546001600160a01b0319908116825560018201805482169055918101839055600381018390556004810192909255600582018054821690556006820180548216905560079091018054909116905560808101514210156104a25761045b81602001518260c0015130846060015161097a565b61047c8160e001518260a00151836020015184606001518560800151610b51565b61049d8160e001518260c00151836000015184604001518560800151610b51565b6104d5565b6104be81602001518260c001518360a00151846060015161097a565b6104d581600001518260c001518360400151610848565b60405182907f8d92c805c252261fcfff21ee60740eb8a38922469a7e6ee396976d57c22fc1c990600090a250506001600055565b60026000540361052b5760405162461bcd60e51b81526004016101879061116a565b60026000556001600160a01b0387161580159061055057506001600160a01b03861615155b6105925760405162461bcd60e51b8152602060048201526013602482015272746f6b656e206164647265737320697373756560681b6044820152606401610187565b6001600160a01b0382166105e85760405162461bcd60e51b815260206004820152601f60248201527f6578656375746f722063616e6e6f74206265207a65726f2061646472657373006044820152606401610187565b6000851180156105f85750600084115b61063a5760405162461bcd60e51b81526020600482015260136024820152720616d6f756e74732063616e6e6f74206265203606c1b6044820152606401610187565b42831115610698576001600160a01b0381166106985760405162461bcd60e51b815260206004820152601960248201527f6e6674206c6f636b65722063616e6e6f74206265207a65726f000000000000006044820152606401610187565b6106a48733308861097a565b600154604080516001600160a01b038a811682528981166020830152918101889052606081018790526080810186905283821660a08201529084169133917fe94b0c29bbea5a549b9d5882f4d35c23264c7d5fbde53f9c309c3858c5866c5b9060c00160405180910390a4604051806101000160405280886001600160a01b03168152602001876001600160a01b03168152602001868152602001858152602001848152602001336001600160a01b03168152602001836001600160a01b03168152602001826001600160a01b0316815250600260006001600081548092919061078d906111b7565b90915550815260208082019290925260409081016000908120845181546001600160a01b03199081166001600160a01b039283161783559486015160018084018054881692841692909217909155938601516002830155606086015160038301556080860151600483015560a0860151600583018054871691831691909117905560c0860151600683018054871691831691909117905560e09095015160079091018054909416941693909317909155905550505050505050565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908516906370a0823190602401602060405180830381865afa158015610892573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b691906111d0565b90506108c3848484610d17565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908616906370a0823190602401602060405180830381865afa15801561090d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093191906111d0565b90508261093e83836111e9565b146109735760405162461bcd60e51b81526020600482015260056024820152642a2426181960d91b6044820152606401610187565b5050505050565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908616906370a0823190602401602060405180830381865afa1580156109c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e891906111d0565b6040516370a0823160e01b81526001600160a01b03868116600483015291925083918716906370a0823190602401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5791906111d0565b1015610a8d5760405162461bcd60e51b815260206004820152600560248201526454484c303160d81b6044820152606401610187565b610a9985858585610d7f565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908716906370a0823190602401602060405180830381865afa158015610ae3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0791906111d0565b905082610b1483836111e9565b14610b495760405162461bcd60e51b81526020600482015260056024820152642a2426181960d91b6044820152606401610187565b505050505050565b428111610b885760405162461bcd60e51b81526020600482015260056024820152644e484c303160d81b6044820152606401610187565b6040516370a0823160e01b81526001600160a01b038681166004830152600091908516906370a0823190602401602060405180830381865afa158015610bd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf691906111d0565b9050610c03848785610dbd565b60405163b273e65360e01b81526001600160a01b0386811660048301526024820185905285811660448301526064820184905287169063b273e653906084016020604051808303816000875af1158015610c61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8591906111d0565b506040516370a0823160e01b81526001600160a01b038781166004830152600091908616906370a0823190602401602060405180830381865afa158015610cd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf491906111d0565b905083610d0183836111e9565b14610d0e57610d0e611200565b50505050505050565b6040516001600160a01b038316602482015260448101829052610d7a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610e6f565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610db79085906323b872dd60e01b90608401610d43565b50505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610e0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3291906111d0565b610e3c9190611216565b6040516001600160a01b038516602482015260448101829052909150610db790859063095ea7b360e01b90606401610d43565b6000610ec4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610f419092919063ffffffff16565b805190915015610d7a5780806020019051810190610ee2919061122e565b610d7a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610187565b6060610f508484600085610f5a565b90505b9392505050565b606082471015610fbb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610187565b6001600160a01b0385163b6110125760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610187565b600080866001600160a01b0316858760405161102e919061127c565b60006040518083038185875af1925050503d806000811461106b576040519150601f19603f3d011682016040523d82523d6000602084013e611070565b606091505b509150915061108082828661108b565b979650505050505050565b6060831561109a575081610f53565b8251156110aa5782518084602001fd5b8160405162461bcd60e51b81526004016101879190611298565b6000602082840312156110d657600080fd5b5035919050565b80356001600160a01b03811681146110f457600080fd5b919050565b600080600080600080600060e0888a03121561111457600080fd5b61111d886110dd565b965061112b602089016110dd565b955060408801359450606088013593506080880135925061114e60a089016110dd565b915061115c60c089016110dd565b905092959891949750929550565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000600182016111c9576111c96111a1565b5060010190565b6000602082840312156111e257600080fd5b5051919050565b6000828210156111fb576111fb6111a1565b500390565b634e487b7160e01b600052600160045260246000fd5b60008219821115611229576112296111a1565b500190565b60006020828403121561124057600080fd5b81518015158114610f5357600080fd5b60005b8381101561126b578181015183820152602001611253565b83811115610db75750506000910152565b6000825161128e818460208701611250565b9190910192915050565b60208152600082518060208401526112b7816040850160208701611250565b601f01601f1916919091016040019291505056fea2646970667358221220c3f86cf8c27a913b55c29459d7f28cf54b245a126abb192120f8b9ec76261e6e64736f6c634300080d0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $3.16 | 100 | $316 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.