Polygon Sponsored slots available. Book your slot here!
Overview
POL Balance
0 POL
POL Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
OfferFactory
Compiler Version
v0.8.25+commit.b61c2a91
Contract Source Code (Solidity Standard Json-Input format)
/** * SPDX-License-Identifier: LicenseRef-Aktionariat * * MIT License with Automated License Fee Payments * * Copyright (c) 2022 Aktionariat AG (aktionariat.com) * * Permission is hereby granted to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software * without restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies of the * Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * - The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * - All automated license fee payments integrated into this and related Software * are preserved. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ pragma solidity ^0.8.0; import "./Offer.sol"; import "./IOffer.sol"; import "./IOfferFactory.sol"; contract OfferFactory is IOfferFactory{ // It must be possible to predict the address of the offer so one can pre-fund the allowance. function predictOfferAddress(bytes32 salt, address buyer, IDraggable token, uint256 pricePerShare, IERC20 currency, uint256 quorum, uint256 votePeriod) external view returns (address) { bytes32 initCodeHash = keccak256(abi.encodePacked(type(Offer).creationCode, abi.encode(buyer, token, pricePerShare, currency, quorum, votePeriod))); bytes32 hashResult = keccak256(abi.encodePacked(bytes1(0xff), address(this), salt, initCodeHash)); return address(uint160(uint256(hashResult))); } // Do not call directly, msg.sender must be the token to be acquired function create(bytes32 salt, address buyer, uint256 pricePerShare, IERC20 currency, uint256 quorum, uint256 votePeriod) override external payable returns (IOffer) { IOffer offer = new Offer{value: msg.value, salt: salt}(buyer, IDraggable(msg.sender), pricePerShare, currency, quorum, votePeriod); return offer; } }
/** * SPDX-License-Identifier: MIT * * Copyright (c) 2016-2019 zOS Global Limited * */ pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */ interface IERC20 { // Optional functions function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a `Transfer` event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through `transferFrom`. This is * zero by default. * * This value changes when `approve` or `transferFrom` are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * > Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an `Approval` event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a `Transfer` event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to `approve`. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) // Copied from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/draft-IERC20Permit.sol pragma solidity ^0.8.0; import "./IERC20.sol"; /** * @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 is IERC20 { /*////////////////////////////////////////////////////////////// Custom errors //////////////////////////////////////////////////////////////*/ /// Block timestamp must to be before deadline. /// @param deadline The deadline of the permit. /// @param blockTimestamp The timestamp of the execution block. error Permit_DeadlineExpired(uint256 deadline, uint256 blockTimestamp); /// Recovered address must be owner and not zero address. /// @param signerAddress The recovered signer address. error Permit_InvalidSigner(address signerAddress); /** * @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 pragma solidity ^0.8.0; import "../ERC20/IERC20.sol"; import "./IOffer.sol"; interface IDraggable is IERC20 { /*////////////////////////////////////////////////////////////// Custom errors //////////////////////////////////////////////////////////////*/ /// conversion factor has to be > 0 for this transaction. error Draggable_NotBinding(); /// conversion factor has to be = 0 for this transaction. error Draggable_IsBinding(); /// conversion factor can't be 0 if binding gets deactivated. error Draggable_FactorZero(); /// the reported votes can't be > max voting tokens. /// @param maxVotes The max voting tokens. /// @param reportedVotes The actual reported votes. error Draggable_TooManyVotes(uint256 maxVotes, uint256 reportedVotes); /// there is still an open offer that has to be canceled first error Draggable_OpenOffer(); /// For migration the quorum needs to be reached. /// @param needed The needed quorum. /// @param actual The current yes votes. error Draggable_QuorumNotReached(uint256 needed, uint256 actual); function wrapped() external view returns (IERC20); function unwrap(uint256 amount) external; function offer() external view returns (IOffer); function oracle() external view returns (address); function drag(address buyer, IERC20 currency) external; function notifyOfferEnded() external; function votingPower(address voter) external returns (uint256); function totalVotingTokens() external view returns (uint256); function notifyVoted(address voter) external; function migrate() external; function setOracle(address newOracle) external; function migrateWithExternalApproval(address successor, uint256 additionalVotes) external; function setTerms(string calldata _terms) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC20/IERC20.sol"; interface IOffer { /*////////////////////////////////////////////////////////////// Custom errors //////////////////////////////////////////////////////////////*/ /// Invalid msg.sender. /// @param sender The msg.sender of the transaction. error Offer_InvalidSender(address sender); /// Offer needs to be still open. error Offer_AlreadyAccepted(); /// Offer needs to be not accepted yet. error Offer_NotAccepted(); /// Sender of the offer needs to have needed funds in his account. error Offer_NotWellFunded(); /// New offer not valid. `newPrice` needs to be higher than `oldPrice`. /// @param oldPrice Price of the old offer. /// @param newPrice Price of the new offer. error Offer_OldOfferBetter(uint256 oldPrice, uint256 newPrice); /// Voting needs to be still open. error Offer_VotingEnded(); /// Too many (External) reported votes. `reportedVotes` needs to be less or equal to `maxVotes`. /// @param maxVotes The max possible votes for the token. /// @param reportedVotes The external reported votes + circulating supply of the token. error Offer_TooManyVotes(uint256 maxVotes, uint256 reportedVotes); /// Competing offer needs to be in the same currency. error Offer_OfferInWrongCurrency(); /// Offer got already killed. error Offer_IsKilled(); /*////////////////////////////////////////////////////////////// Function Interfaces //////////////////////////////////////////////////////////////*/ function makeCompetingOffer(IOffer newOffer) external; // if there is a token transfer while an offer is open, the votes get transfered too function notifyMoved(address from, address to, uint256 value) external; function currency() external view returns (IERC20); function price() external view returns (uint256); function isWellFunded() external view returns (bool); function voteYes() external; function voteNo() external; function isKilled() external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC20/IERC20.sol"; import "./IOffer.sol"; interface IOfferFactory { function create( bytes32 salt, address buyer, uint256 pricePerShare, IERC20 currency, uint256 quorum, uint256 votePeriod ) external payable returns (IOffer); }
/** * SPDX-License-Identifier: LicenseRef-Aktionariat * * MIT License with Automated License Fee Payments * * Copyright (c) 2022 Aktionariat AG (aktionariat.com) * * Permission is hereby granted to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software * without restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies of the * Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * - The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * - All automated license fee payments integrated into this and related Software * are preserved. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ pragma solidity ^0.8.0; import "../ERC20/IERC20.sol"; import "./IDraggable.sol"; import "./IOffer.sol"; import "../utils/SafeERC20.sol"; /** * @title A public offer to acquire all tokens * @author Luzius Meisser, [email protected] */ contract Offer is IOffer { using SafeERC20 for IERC20; address private constant LICENSE_FEE_ADDRESS = 0x29Fe8914e76da5cE2d90De98a64d0055f199d06D; uint256 private constant AQUISITION_GRACE_PERIOD = 30 days; // buyer has thirty days to complete acquisition after voting ends uint256 private constant BPS_MUL = 10000; // basis point multiplier to be used with quorum uint256 public immutable quorum; // Percentage of votes needed to start drag-along process in BPS, i.e. 10'000 = 100% IDraggable public immutable token; address public immutable buyer; // who made the offer IERC20 override public immutable currency; uint256 override public immutable price; // the price offered per share enum Vote { NONE, YES, NO } // Used internally, represents not voted yet or yes/no vote. mapping (address => Vote) private votes; // Who votes what uint256 public yesVotes; // total number of yes votes, including external votes uint256 public noVotes; // total number of no votes, including external votes uint256 public noExternal; // number of external no votes reported by oracle uint256 public yesExternal; // number of external yes votes reported by oracle uint256 public immutable voteEnd; // end of vote period in block time (seconds after 1.1.1970) bool public isKilled; // indicator that contract disabled (replaces selfdestruct) event VotesChanged(uint256 yesVotes, uint256 noVotes); event OfferCreated(address indexed buyer, IDraggable indexed token, uint256 pricePerShare, IERC20 indexed currency); event OfferEnded(address indexed buyer, bool executed, string message); // Not checked here, but buyer should make sure it is well funded from the beginning constructor( address _buyer, IDraggable _token, uint256 _price, IERC20 _currency, uint256 _quorum, uint256 _votePeriod ) payable { buyer = _buyer; token = _token; currency = _currency; price = _price; quorum = _quorum; // rely on time stamp is ok, no exact time stamp needed // solhint-disable-next-line not-rely-on-time voteEnd = block.timestamp + _votePeriod; emit OfferCreated(_buyer, _token, _price, _currency); // License Fee to Aktionariat AG, also ensures that offer is serious. // Any circumvention of this license fee payment is a violation of the copyright terms. payable(LICENSE_FEE_ADDRESS).transfer(5000 ether); } modifier onlyBuyer { _checkSender(buyer); _; } modifier onlyToken { _checkSender(address(token)); _; } modifier onlyOracle { _checkSender(token.oracle()); _; } modifier votingOpen { if (!isVotingOpen()) { revert Offer_VotingEnded(); } _; } function makeCompetingOffer(IOffer betterOffer) external override onlyToken { if (isAccepted()) { revert Offer_AlreadyAccepted(); } uint256 newPrice = betterOffer.price(); if (newPrice <= price) { revert Offer_OldOfferBetter(price, newPrice); } if (currency != betterOffer.currency()) { revert Offer_OfferInWrongCurrency(); } if (!betterOffer.isWellFunded()) { revert Offer_NotWellFunded(); } kill(false, "replaced"); } function hasExpired() internal view returns (bool) { // rely on time stamp is ok, no exact time stamp needed // solhint-disable-next-line not-rely-on-time return block.timestamp > voteEnd + AQUISITION_GRACE_PERIOD; } function contest() external { if (hasExpired()) { kill(false, "expired"); } else if (isDeclined()) { kill(false, "declined"); } else if (!isWellFunded()) { kill(false, "lack of funds"); } } function cancel() external onlyBuyer { kill(false, "cancelled"); } function execute() external onlyBuyer { if (isKilled) revert Offer_IsKilled(); if (!isAccepted()) revert Offer_NotAccepted(); uint256 totalPrice = getTotalPrice(); currency.safeTransferFrom(buyer, address(token), totalPrice); token.drag(buyer, currency); kill(true, "success"); } function getTotalPrice() internal view returns (uint256) { IERC20 tok = IERC20(address(token)); return (tok.totalSupply() - tok.balanceOf(buyer)) * price; } function isWellFunded() public view override returns (bool) { uint256 buyerBalance = currency.balanceOf(buyer); uint256 totalPrice = getTotalPrice(); return totalPrice <= buyerBalance; } function isAccepted() public view returns (bool) { if (isVotingOpen()) { // is it already clear that more than the quorum requiered will vote yes even though the vote is not over yet? return yesVotes * BPS_MUL >= quorum * token.totalVotingTokens(); } else { // did more than the quorum requiered votes say 'yes'? return yesVotes * BPS_MUL >= quorum * (yesVotes + noVotes); } } function isDeclined() public view returns (bool) { if (isVotingOpen()) { // is it already clear that 25% will vote no even though the vote is not over yet? uint256 supply = token.totalVotingTokens(); return (supply - noVotes) * BPS_MUL < quorum * supply; } else { // did quorum% of all cast votes say 'no'? return BPS_MUL * yesVotes < quorum * (yesVotes + noVotes); } } function notifyMoved(address from, address to, uint256 value) external override onlyToken { if (isVotingOpen()) { Vote fromVoting = votes[from]; Vote toVoting = votes[to]; update(fromVoting, toVoting, value); } } function update(Vote previousVote, Vote newVote, uint256 votes_) internal { if (previousVote != newVote) { if (previousVote == Vote.NO) { noVotes -= votes_; } else if (previousVote == Vote.YES) { yesVotes -= votes_; } if (newVote == Vote.NO) { noVotes += votes_; } else if (newVote == Vote.YES) { yesVotes += votes_; } emit VotesChanged(yesVotes, noVotes); } } function isVotingOpen() public view returns (bool) { // rely on time stamp is ok, no exact time stamp needed // solhint-disable-next-line not-rely-on-time return block.timestamp <= voteEnd && !isKilled; } /** * Function to allow the oracle to report the votes of external votes (e.g. shares tokenized on other blockchains). * This functions is idempotent and sets the number of external yes and no votes. So when more votes come in, the * oracle should always report the total number of yes and no votes. Abstentions are not counted. */ function reportExternalVotes(uint256 yes, uint256 no) external onlyOracle votingOpen { uint256 maxVotes = token.totalVotingTokens(); uint256 reportingVotes = yes + no + IERC20(address(token)).totalSupply(); if (reportingVotes > maxVotes) { revert Offer_TooManyVotes(maxVotes, reportingVotes); } // adjust total votes taking into account that the oralce might have reported different counts before yesVotes = yesVotes - yesExternal + yes; noVotes = noVotes - noExternal + no; // remember how the oracle voted in case the oracle later reports updated numbers yesExternal = yes; noExternal = no; } function voteYes() external override{ vote(Vote.YES); } function voteNo() external override{ vote(Vote.NO); } function vote(Vote newVote) internal votingOpen { Vote previousVote = votes[msg.sender]; votes[msg.sender] = newVote; if(previousVote == Vote.NONE){ token.notifyVoted(msg.sender); } update(previousVote, newVote, token.votingPower(msg.sender)); } function hasVotedYes(address voter) external view returns (bool) { return votes[voter] == Vote.YES; } function hasVotedNo(address voter) external view returns (bool) { return votes[voter] == Vote.NO; } function kill(bool executed, string memory message) internal { isKilled = true; emit OfferEnded(buyer, executed, message); token.notifyOfferEnded(); payable(buyer).call{value:address(this).balance}(""); // buyer is responsible to be able to receive Ether, else he can block cancellation } /** * Checks if msg.sender is an authorized address. * @param validSender The authorized address. */ function _checkSender(address validSender) internal view { if (msg.sender != validSender) { revert Offer_InvalidSender(msg.sender); } } }
// SPDX-License-Identifier: MIT // Copied from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol // and modified it. pragma solidity ^0.8.0; library Address { /// @param target Target address to call the function on. error Address_NotTransferNorContract(address target); /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/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 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 or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * 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. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } function functionCallWithValue(address target, bytes memory data, uint256 weiValue) internal returns (bytes memory) { if (data.length != 0 && !isContract(target)) { revert Address_NotTransferNorContract(target); } // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else if (returndata.length > 0) { assembly{ revert (add (returndata, 0x20), mload (returndata)) } } else { revert("failed"); } } }
// SPDX-License-Identifier: MIT // coppied and adjusted from OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../ERC20/IERC20.sol"; import {IERC20Permit} from "../ERC20/IERC20Permit.sol"; import {Address} from "./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 An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, value))); } /** * @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); if (nonceAfter != nonceBefore + 1) { revert SafeERC20FailedOperation(address(token)); } } /** * @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); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @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(token).code.length > 0; } }
{ "evmVersion": "paris", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"uint256","name":"pricePerShare","type":"uint256"},{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"quorum","type":"uint256"},{"internalType":"uint256","name":"votePeriod","type":"uint256"}],"name":"create","outputs":[{"internalType":"contract IOffer","name":"","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"contract IDraggable","name":"token","type":"address"},{"internalType":"uint256","name":"pricePerShare","type":"uint256"},{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"quorum","type":"uint256"},{"internalType":"uint256","name":"votePeriod","type":"uint256"}],"name":"predictOfferAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052348015600f57600080fd5b50611ebd8061001f6000396000f3fe6080604052600436106100295760003560e01c8063452784bc1461002e5780634dc5e4311461006a575b600080fd5b34801561003a57600080fd5b5061004e6100493660046101c7565b61007d565b6040516001600160a01b03909116815260200160405180910390f35b61004e610078366004610238565b61014e565b60008060405180602001610090906101a2565b601f1982820381018352601f9091011660408190526100bd908a908a908a908a908a908a90602001610294565b60408051601f19818403018152908290526100db92916020016102fe565b60408051601f1981840301815282825280516020918201206001600160f81b0319828501523060601b6bffffffffffffffffffffffff19166021850152603584019c909c5260558084019c909c528151808403909c018c5260759092019052895199019890982098975050505050505050565b600080348890883389898989604051610166906101a2565b61017596959493929190610294565b82906040518091039083f591505080158015610195573d6000803e3d6000fd5b5098975050505050505050565b611b6c8061031c83390190565b6001600160a01b03811681146101c457600080fd5b50565b600080600080600080600060e0888a0312156101e257600080fd5b8735965060208801356101f4816101af565b95506040880135610204816101af565b945060608801359350608088013561021b816101af565b9699959850939692959460a0840135945060c09093013592915050565b60008060008060008060c0878903121561025157600080fd5b863595506020870135610263816101af565b945060408701359350606087013561027a816101af565b9598949750929560808101359460a0909101359350915050565b6001600160a01b0396871681529486166020860152604085019390935293166060830152608082019290925260a081019190915260c00190565b6000815160005b818110156102ef57602081850181015186830152016102d5565b50600093019283525090919050565b600061031361030d83866102ce565b846102ce565b94935050505056fe610140604052604051611b6c380380611b6c83398101604081905261002391610105565b6001600160a01b0380871660c05285811660a052831660e0526101008490526080829052610051814261016e565b610120526040518481526001600160a01b0380851691878216918916907f4f05be72ad7f57c27e555ace8452f56d8b1e82c9e6e1cd4fd282f34518b7729a9060200160405180910390a46040517329fe8914e76da5ce2d90de98a64d0055f199d06d9060009069010f0cf064dd592000009082818181858883f193505050501580156100e1573d6000803e3d6000fd5b50505050505050610195565b6001600160a01b038116811461010257600080fd5b50565b60008060008060008060c0878903121561011e57600080fd5b8651610129816100ed565b602088015190965061013a816100ed565b604088015160608901519196509450610152816100ed565b809350506080870151915060a087015190509295509295509295565b8082018082111561018f57634e487b7160e01b600052601160045260246000fd5b92915050565b60805160a05160c05160e05161010051610120516118a16102cb600039600081816102c001528181610ec801526114f601526000818161027d01528181610cfc01528181610d300152610f62015260008181610302015281816103bb015281816105ef015281816106960152610dd001526000818161020e0152818161038e01528181610569015281816106110152818161066e01528181610bf501528181610f1501528181611275015261134b0152600081816103550152818161049301528181610632015281816106be0152818161076d0152818161088f0152818161093d015281816109c301528181610ad701528181610c4a01528181610f40015281816110d40152818161115e01526112cf01526000818161019901528181610519015281816107f5015261085101526118a16000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80639b4e88aa116100de578063e3ac83da11610097578063f6c8c41e11610071578063f6c8c41e1461032c578063fa7f1bae1461033f578063fb286c6514610347578063fc0c546a1461035057600080fd5b8063e3ac83da146102f5578063e5a6b10f146102fd578063ea8a1af01461032457600080fd5b80639b4e88aa14610270578063a035b1fe14610278578063b5b47f421461029f578063bd3bc1d3146102a8578063ddbe8f09146102bb578063e1a1810f146102e257600080fd5b80635051a5ec116101305780635051a5ec146101f957806361461954146102015780637150d8ae146102095780638f1b4c6f146102485780638fe8a1011461025b57806390cf581c1461026857600080fd5b806311a439a0146101785780631703a01814610194578063354e5629146101bb5780633f5e3e7f146101c457806341c12a70146101dc578063448ab4c6146101e6575b600080fd5b61018160045481565b6040519081526020015b60405180910390f35b6101817f000000000000000000000000000000000000000000000000000000000000000081565b61018160035481565b6101cc610377565b604051901515815260200161018b565b6101e461043d565b005b6101cc6101f43660046116ae565b610449565b6101cc610482565b6101e4610564565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161018b565b6101cc6102563660046116ae565b610747565b6005546101cc9060ff1681565b6101e4610750565b6101cc61075a565b6101817f000000000000000000000000000000000000000000000000000000000000000081565b61018160025481565b6101e46102b63660046116cb565b61088a565b6101817f000000000000000000000000000000000000000000000000000000000000000081565b6101e46102f03660046116ed565b610ad2565b6101e4610b45565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6101e4610bf0565b6101e461033a3660046116ae565b610c45565b6101cc610ec4565b61018160015481565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6040516370a0823160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260009182917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610402573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610426919061172e565b90506000610432610efe565b919091111592915050565b610447600261104c565b565b600060015b6001600160a01b03831660009081526020819052604090205460ff16600281111561047b5761047b611747565b1492915050565b600061048c610ec4565b15610554577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630a81b2de6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610513919061172e565b61053d907f0000000000000000000000000000000000000000000000000000000000000000611773565b61271060015461054d9190611773565b1015905090565b600254600154610513919061178a565b61058d7f00000000000000000000000000000000000000000000000000000000000000006111d0565b60055460ff16156105b15760405163284489e360e11b815260040160405180910390fd5b6105b9610482565b6105d65760405163d652cf2960e01b815260040160405180910390fd5b60006105e0610efe565b90506106576001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000846111fb565b604051637e5bcd3f60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063fcb79a7e90604401600060405180830381600087803b15801561070257600080fd5b505af1158015610716573d6000803e3d6000fd5b505050506107446001604051806040016040528060078152602001667375636365737360c81b81525061125b565b50565b6000600261044e565b610447600161104c565b6000610764610ec4565b1561083b5760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630a81b2de6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ed919061172e565b9050610819817f0000000000000000000000000000000000000000000000000000000000000000611773565b6127106002548361082a919061179d565b6108349190611773565b1091505090565b60025460015461084b919061178a565b610875907f0000000000000000000000000000000000000000000000000000000000000000611773565b60015461088490612710611773565b10905090565b6109147f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090f91906117b0565b6111d0565b61091c610ec4565b610939576040516317189a8360e31b815260040160405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630a81b2de6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610999573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bd919061172e565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a43919061172e565b610a4d848661178a565b610a57919061178a565b905081811115610a89576040516344ec605760e11b815260048101839052602481018290526044015b60405180910390fd5b83600454600154610a9a919061179d565b610aa4919061178a565b6001556003546002548491610ab89161179d565b610ac2919061178a565b6002555050600491909155600355565b610afb7f00000000000000000000000000000000000000000000000000000000000000006111d0565b610b03610ec4565b15610b40576001600160a01b0380841660009081526020819052604080822054928516825290205460ff9182169116610b3d8282856113a9565b50505b505050565b610b4d6114eb565b15610b7c57610447600060405180604001604052806007815260200166195e1c1a5c995960ca1b81525061125b565b610b8461075a565b15610bb457610447600060405180604001604052806008815260200167191958db1a5b995960c21b81525061125b565b610bbc610377565b6104475761044760006040518060400160405280600d81526020016c6c61636b206f662066756e647360981b81525061125b565b610c197f00000000000000000000000000000000000000000000000000000000000000006111d0565b61044760006040518060400160405280600981526020016818d85b98d95b1b195960ba1b81525061125b565b610c6e7f00000000000000000000000000000000000000000000000000000000000000006111d0565b610c76610482565b15610c9457604051635fea7a8560e11b815260040160405180910390fd5b6000816001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf8919061172e565b90507f00000000000000000000000000000000000000000000000000000000000000008111610d6357604051633c0e47bd60e21b81527f0000000000000000000000000000000000000000000000000000000000000000600482015260248101829052604401610a80565b816001600160a01b031663e5a6b10f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610da1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc591906117b0565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e165760405163497b781f60e11b815260040160405180910390fd5b816001600160a01b0316633f5e3e7f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7891906117cd565b610e95576040516375677ae960e01b815260040160405180910390fd5b610ec06000604051806040016040528060088152602001671c995c1b1858d95960c21b81525061125b565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004211158015610ef9575060055460ff16155b905090565b6040516370a0823160e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000917f000000000000000000000000000000000000000000000000000000000000000091908316906370a0823190602401602060405180830381865afa158015610fac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd0919061172e565b826001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561100e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611032919061172e565b61103c919061179d565b6110469190611773565b91505090565b611054610ec4565b611071576040516317189a8360e31b815260040160405180910390fd5b336000908152602081905260409020805460ff811691839160ff191660018360028111156110a1576110a1611747565b021790555060008160028111156110ba576110ba611747565b03611139576040516345c8a62b60e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906345c8a62b90602401600060405180830381600087803b15801561112057600080fd5b505af1158015611134573d6000803e3d6000fd5b505050505b60405163603a39fb60e11b8152336004820152610ec090829084906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c07473f6906024016020604051808303816000875af11580156111a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111cb919061172e565b6113a9565b336001600160a01b038216146107445760405163d600708f60e01b8152336004820152602401610a80565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611255908590611521565b50505050565b6005805460ff191660011790556040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016907fba01adb1638f647e6baa43cb5d8d3a05ed7e59ac18415bf4c64adba235c5b2b0906112c59085908590611813565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166332bc320b6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561132857600080fd5b505af115801561133c573d6000803e3d6000fd5b50506040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169250479150600081818185875af1925050503d8060008114610b3d576040519150601f19603f3d011682016040523d82523d6000602084013e610b3d565b8160028111156113bb576113bb611747565b8360028111156113cd576113cd611747565b14610b405760028360028111156113e6576113e6611747565b036114085780600260008282546113fd919061179d565b909155506114399050565b600183600281111561141c5761141c611747565b03611439578060016000828254611433919061179d565b90915550505b600282600281111561144d5761144d611747565b0361146f578060026000828254611464919061178a565b909155506114a09050565b600182600281111561148357611483611747565b036114a057806001600082825461149a919061178a565b90915550505b7f8fcc50c2c4edd06d51ae66e9e21ed76b32a1766c57f491788e1aa24a1b58c2566001546002546040516114de929190918252602082015260400190565b60405180910390a1505050565b600061151a62278d007f000000000000000000000000000000000000000000000000000000000000000061178a565b4211905090565b60006115366001600160a01b03841683611584565b9050805160001415801561155b57508080602001905181019061155991906117cd565b155b15610b4057604051635274afe760e01b81526001600160a01b0384166004820152602401610a80565b60606115928383600061159b565b90505b92915050565b606082516000141580156115b757506001600160a01b0384163b155b156115e057604051639eb1341360e01b81526001600160a01b0385166004820152602401610a80565b600080856001600160a01b031684866040516115fc919061184f565b60006040518083038185875af1925050503d8060008114611639576040519150601f19603f3d011682016040523d82523d6000602084013e61163e565b606091505b509150915081156116525791506116929050565b80511561166157805160208201fd5b60405162461bcd60e51b815260206004820152600660248201526519985a5b195960d21b6044820152606401610a80565b9392505050565b6001600160a01b038116811461074457600080fd5b6000602082840312156116c057600080fd5b813561169281611699565b600080604083850312156116de57600080fd5b50508035926020909101359150565b60008060006060848603121561170257600080fd5b833561170d81611699565b9250602084013561171d81611699565b929592945050506040919091013590565b60006020828403121561174057600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176115955761159561175d565b808201808211156115955761159561175d565b818103818111156115955761159561175d565b6000602082840312156117c257600080fd5b815161169281611699565b6000602082840312156117df57600080fd5b8151801515811461169257600080fd5b60005b8381101561180a5781810151838201526020016117f2565b50506000910152565b8215158152604060208201526000825180604084015261183a8160608501602087016117ef565b601f01601f1916919091016060019392505050565b600082516118618184602087016117ef565b919091019291505056fea2646970667358221220f5f88a92a06fb1e37da92a7ad8ee2f1df06c53a9b9db6ebbb0e21ad44df1792964736f6c63430008190033a2646970667358221220b71e7a9a6f26e8491acf50966daf6efd4ee24dcf42fcb93b5ee0c3420091c93764736f6c63430008190033
Deployed Bytecode
0x6080604052600436106100295760003560e01c8063452784bc1461002e5780634dc5e4311461006a575b600080fd5b34801561003a57600080fd5b5061004e6100493660046101c7565b61007d565b6040516001600160a01b03909116815260200160405180910390f35b61004e610078366004610238565b61014e565b60008060405180602001610090906101a2565b601f1982820381018352601f9091011660408190526100bd908a908a908a908a908a908a90602001610294565b60408051601f19818403018152908290526100db92916020016102fe565b60408051601f1981840301815282825280516020918201206001600160f81b0319828501523060601b6bffffffffffffffffffffffff19166021850152603584019c909c5260558084019c909c528151808403909c018c5260759092019052895199019890982098975050505050505050565b600080348890883389898989604051610166906101a2565b61017596959493929190610294565b82906040518091039083f591505080158015610195573d6000803e3d6000fd5b5098975050505050505050565b611b6c8061031c83390190565b6001600160a01b03811681146101c457600080fd5b50565b600080600080600080600060e0888a0312156101e257600080fd5b8735965060208801356101f4816101af565b95506040880135610204816101af565b945060608801359350608088013561021b816101af565b9699959850939692959460a0840135945060c09093013592915050565b60008060008060008060c0878903121561025157600080fd5b863595506020870135610263816101af565b945060408701359350606087013561027a816101af565b9598949750929560808101359460a0909101359350915050565b6001600160a01b0396871681529486166020860152604085019390935293166060830152608082019290925260a081019190915260c00190565b6000815160005b818110156102ef57602081850181015186830152016102d5565b50600093019283525090919050565b600061031361030d83866102ce565b846102ce565b94935050505056fe610140604052604051611b6c380380611b6c83398101604081905261002391610105565b6001600160a01b0380871660c05285811660a052831660e0526101008490526080829052610051814261016e565b610120526040518481526001600160a01b0380851691878216918916907f4f05be72ad7f57c27e555ace8452f56d8b1e82c9e6e1cd4fd282f34518b7729a9060200160405180910390a46040517329fe8914e76da5ce2d90de98a64d0055f199d06d9060009069010f0cf064dd592000009082818181858883f193505050501580156100e1573d6000803e3d6000fd5b50505050505050610195565b6001600160a01b038116811461010257600080fd5b50565b60008060008060008060c0878903121561011e57600080fd5b8651610129816100ed565b602088015190965061013a816100ed565b604088015160608901519196509450610152816100ed565b809350506080870151915060a087015190509295509295509295565b8082018082111561018f57634e487b7160e01b600052601160045260246000fd5b92915050565b60805160a05160c05160e05161010051610120516118a16102cb600039600081816102c001528181610ec801526114f601526000818161027d01528181610cfc01528181610d300152610f62015260008181610302015281816103bb015281816105ef015281816106960152610dd001526000818161020e0152818161038e01528181610569015281816106110152818161066e01528181610bf501528181610f1501528181611275015261134b0152600081816103550152818161049301528181610632015281816106be0152818161076d0152818161088f0152818161093d015281816109c301528181610ad701528181610c4a01528181610f40015281816110d40152818161115e01526112cf01526000818161019901528181610519015281816107f5015261085101526118a16000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80639b4e88aa116100de578063e3ac83da11610097578063f6c8c41e11610071578063f6c8c41e1461032c578063fa7f1bae1461033f578063fb286c6514610347578063fc0c546a1461035057600080fd5b8063e3ac83da146102f5578063e5a6b10f146102fd578063ea8a1af01461032457600080fd5b80639b4e88aa14610270578063a035b1fe14610278578063b5b47f421461029f578063bd3bc1d3146102a8578063ddbe8f09146102bb578063e1a1810f146102e257600080fd5b80635051a5ec116101305780635051a5ec146101f957806361461954146102015780637150d8ae146102095780638f1b4c6f146102485780638fe8a1011461025b57806390cf581c1461026857600080fd5b806311a439a0146101785780631703a01814610194578063354e5629146101bb5780633f5e3e7f146101c457806341c12a70146101dc578063448ab4c6146101e6575b600080fd5b61018160045481565b6040519081526020015b60405180910390f35b6101817f000000000000000000000000000000000000000000000000000000000000000081565b61018160035481565b6101cc610377565b604051901515815260200161018b565b6101e461043d565b005b6101cc6101f43660046116ae565b610449565b6101cc610482565b6101e4610564565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161018b565b6101cc6102563660046116ae565b610747565b6005546101cc9060ff1681565b6101e4610750565b6101cc61075a565b6101817f000000000000000000000000000000000000000000000000000000000000000081565b61018160025481565b6101e46102b63660046116cb565b61088a565b6101817f000000000000000000000000000000000000000000000000000000000000000081565b6101e46102f03660046116ed565b610ad2565b6101e4610b45565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6101e4610bf0565b6101e461033a3660046116ae565b610c45565b6101cc610ec4565b61018160015481565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6040516370a0823160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260009182917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610402573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610426919061172e565b90506000610432610efe565b919091111592915050565b610447600261104c565b565b600060015b6001600160a01b03831660009081526020819052604090205460ff16600281111561047b5761047b611747565b1492915050565b600061048c610ec4565b15610554577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630a81b2de6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610513919061172e565b61053d907f0000000000000000000000000000000000000000000000000000000000000000611773565b61271060015461054d9190611773565b1015905090565b600254600154610513919061178a565b61058d7f00000000000000000000000000000000000000000000000000000000000000006111d0565b60055460ff16156105b15760405163284489e360e11b815260040160405180910390fd5b6105b9610482565b6105d65760405163d652cf2960e01b815260040160405180910390fd5b60006105e0610efe565b90506106576001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000846111fb565b604051637e5bcd3f60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063fcb79a7e90604401600060405180830381600087803b15801561070257600080fd5b505af1158015610716573d6000803e3d6000fd5b505050506107446001604051806040016040528060078152602001667375636365737360c81b81525061125b565b50565b6000600261044e565b610447600161104c565b6000610764610ec4565b1561083b5760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630a81b2de6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ed919061172e565b9050610819817f0000000000000000000000000000000000000000000000000000000000000000611773565b6127106002548361082a919061179d565b6108349190611773565b1091505090565b60025460015461084b919061178a565b610875907f0000000000000000000000000000000000000000000000000000000000000000611773565b60015461088490612710611773565b10905090565b6109147f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090f91906117b0565b6111d0565b61091c610ec4565b610939576040516317189a8360e31b815260040160405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630a81b2de6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610999573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bd919061172e565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a43919061172e565b610a4d848661178a565b610a57919061178a565b905081811115610a89576040516344ec605760e11b815260048101839052602481018290526044015b60405180910390fd5b83600454600154610a9a919061179d565b610aa4919061178a565b6001556003546002548491610ab89161179d565b610ac2919061178a565b6002555050600491909155600355565b610afb7f00000000000000000000000000000000000000000000000000000000000000006111d0565b610b03610ec4565b15610b40576001600160a01b0380841660009081526020819052604080822054928516825290205460ff9182169116610b3d8282856113a9565b50505b505050565b610b4d6114eb565b15610b7c57610447600060405180604001604052806007815260200166195e1c1a5c995960ca1b81525061125b565b610b8461075a565b15610bb457610447600060405180604001604052806008815260200167191958db1a5b995960c21b81525061125b565b610bbc610377565b6104475761044760006040518060400160405280600d81526020016c6c61636b206f662066756e647360981b81525061125b565b610c197f00000000000000000000000000000000000000000000000000000000000000006111d0565b61044760006040518060400160405280600981526020016818d85b98d95b1b195960ba1b81525061125b565b610c6e7f00000000000000000000000000000000000000000000000000000000000000006111d0565b610c76610482565b15610c9457604051635fea7a8560e11b815260040160405180910390fd5b6000816001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf8919061172e565b90507f00000000000000000000000000000000000000000000000000000000000000008111610d6357604051633c0e47bd60e21b81527f0000000000000000000000000000000000000000000000000000000000000000600482015260248101829052604401610a80565b816001600160a01b031663e5a6b10f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610da1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc591906117b0565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e165760405163497b781f60e11b815260040160405180910390fd5b816001600160a01b0316633f5e3e7f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7891906117cd565b610e95576040516375677ae960e01b815260040160405180910390fd5b610ec06000604051806040016040528060088152602001671c995c1b1858d95960c21b81525061125b565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004211158015610ef9575060055460ff16155b905090565b6040516370a0823160e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000917f000000000000000000000000000000000000000000000000000000000000000091908316906370a0823190602401602060405180830381865afa158015610fac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd0919061172e565b826001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561100e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611032919061172e565b61103c919061179d565b6110469190611773565b91505090565b611054610ec4565b611071576040516317189a8360e31b815260040160405180910390fd5b336000908152602081905260409020805460ff811691839160ff191660018360028111156110a1576110a1611747565b021790555060008160028111156110ba576110ba611747565b03611139576040516345c8a62b60e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906345c8a62b90602401600060405180830381600087803b15801561112057600080fd5b505af1158015611134573d6000803e3d6000fd5b505050505b60405163603a39fb60e11b8152336004820152610ec090829084906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c07473f6906024016020604051808303816000875af11580156111a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111cb919061172e565b6113a9565b336001600160a01b038216146107445760405163d600708f60e01b8152336004820152602401610a80565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611255908590611521565b50505050565b6005805460ff191660011790556040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016907fba01adb1638f647e6baa43cb5d8d3a05ed7e59ac18415bf4c64adba235c5b2b0906112c59085908590611813565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166332bc320b6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561132857600080fd5b505af115801561133c573d6000803e3d6000fd5b50506040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169250479150600081818185875af1925050503d8060008114610b3d576040519150601f19603f3d011682016040523d82523d6000602084013e610b3d565b8160028111156113bb576113bb611747565b8360028111156113cd576113cd611747565b14610b405760028360028111156113e6576113e6611747565b036114085780600260008282546113fd919061179d565b909155506114399050565b600183600281111561141c5761141c611747565b03611439578060016000828254611433919061179d565b90915550505b600282600281111561144d5761144d611747565b0361146f578060026000828254611464919061178a565b909155506114a09050565b600182600281111561148357611483611747565b036114a057806001600082825461149a919061178a565b90915550505b7f8fcc50c2c4edd06d51ae66e9e21ed76b32a1766c57f491788e1aa24a1b58c2566001546002546040516114de929190918252602082015260400190565b60405180910390a1505050565b600061151a62278d007f000000000000000000000000000000000000000000000000000000000000000061178a565b4211905090565b60006115366001600160a01b03841683611584565b9050805160001415801561155b57508080602001905181019061155991906117cd565b155b15610b4057604051635274afe760e01b81526001600160a01b0384166004820152602401610a80565b60606115928383600061159b565b90505b92915050565b606082516000141580156115b757506001600160a01b0384163b155b156115e057604051639eb1341360e01b81526001600160a01b0385166004820152602401610a80565b600080856001600160a01b031684866040516115fc919061184f565b60006040518083038185875af1925050503d8060008114611639576040519150601f19603f3d011682016040523d82523d6000602084013e61163e565b606091505b509150915081156116525791506116929050565b80511561166157805160208201fd5b60405162461bcd60e51b815260206004820152600660248201526519985a5b195960d21b6044820152606401610a80565b9392505050565b6001600160a01b038116811461074457600080fd5b6000602082840312156116c057600080fd5b813561169281611699565b600080604083850312156116de57600080fd5b50508035926020909101359150565b60008060006060848603121561170257600080fd5b833561170d81611699565b9250602084013561171d81611699565b929592945050506040919091013590565b60006020828403121561174057600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176115955761159561175d565b808201808211156115955761159561175d565b818103818111156115955761159561175d565b6000602082840312156117c257600080fd5b815161169281611699565b6000602082840312156117df57600080fd5b8151801515811461169257600080fd5b60005b8381101561180a5781810151838201526020016117f2565b50506000910152565b8215158152604060208201526000825180604084015261183a8160608501602087016117ef565b601f01601f1916919091016060019392505050565b600082516118618184602087016117ef565b919091019291505056fea2646970667358221220f5f88a92a06fb1e37da92a7ad8ee2f1df06c53a9b9db6ebbb0e21ad44df1792964736f6c63430008190033a2646970667358221220b71e7a9a6f26e8491acf50966daf6efd4ee24dcf42fcb93b5ee0c3420091c93764736f6c63430008190033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.