More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
FirnOTC
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity Multiple files format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "./ERC20.sol"; contract FirnOTC { address public constant FIRN_MULTISIG = 0xa14664a2E58e804669E9fF1DFbC1bD981E13B0dC; ERC20 public constant firnToken = ERC20(0xDDEA19FCE1E52497206bf1969D2d56FeD85aFF5c); uint256 public immutable ETHER_AMOUNT; uint256 public immutable FIRN_AMOUNT; uint256 public immutable LOCKUP_DAYS; address public buyer; uint256 public vesting_date; bool public deal = false; constructor(uint256 etherAmount, uint256 firnAmount, uint256 lockupDays) { buyer = FIRN_MULTISIG; // initialize to ourselves. this is for edge case where someone sends funds before deal ETHER_AMOUNT = etherAmount; FIRN_AMOUNT = firnAmount; LOCKUP_DAYS = lockupDays; } receive() external payable { // receive ether, e.g., as a payout from Firn fees. } function sweepFunds() external { // callable by anyone; sweeps balance to buyer (bool success, ) = payable(buyer).call{value: address(this).balance}(""); require(success, "Transfer failed."); } function executeDeal() external payable { buyer = msg.sender; require(!deal, "Deal already done."); // this can easily be avoided, just as an additional safety measure require(msg.value == ETHER_AMOUNT * 1 ether, "Wrong amount of ether supplied."); require(firnToken.balanceOf(address(this)) == FIRN_AMOUNT * 1 ether, "Token balance is wrong."); deal = true; // prevents Firn from exiting on line 49 vesting_date = block.timestamp + LOCKUP_DAYS * 1 days; // kick off lockup (bool success, ) = payable(FIRN_MULTISIG).call{value: msg.value}(""); require(success, "Transfer failed."); } function vest() external { // buyer calls this after a year to claim their token OR we call it to early exit. // if deal hasn't happened yet, will transfer the token back to Firn. require (!deal || block.timestamp >= vesting_date, "Hasn't vested yet."); firnToken.transfer(buyer, firnToken.balanceOf(address(this))); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; // ---------------------------------------------------------------------------- // BokkyPooBah's Red-Black Tree Library v1.0-pre-release-a // // A Solidity Red-Black Tree binary search library to store and access a sorted // list of unsigned integer data. The Red-Black algorithm rebalances the binary // search tree, resulting in O(log n) insert, remove and search time (and ~gas) // // https://github.com/bokkypoobah/BokkyPooBahsRedBlackTreeLibrary // // // Enjoy. (c) BokkyPooBah / Bok Consulting Pty Ltd 2020. The MIT Licence. // ---------------------------------------------------------------------------- abstract contract BalanceTree { struct Node { address parent; address left; address right; bool red; } address public root; address constant EMPTY = address(0); mapping(address => Node) public nodes; function exists(address key) internal view returns (bool) { return (key != EMPTY) && ((key == root) || (nodes[key].parent != EMPTY)); } function sortKey(address key) internal virtual view returns (uint256); function rotateLeft(address key) internal { address cursor = nodes[key].right; address keyParent = nodes[key].parent; address cursorLeft = nodes[cursor].left; nodes[key].right = cursorLeft; if (cursorLeft != EMPTY) { nodes[cursorLeft].parent = key; } nodes[cursor].parent = keyParent; if (keyParent == EMPTY) { root = cursor; } else if (key == nodes[keyParent].left) { nodes[keyParent].left = cursor; } else { nodes[keyParent].right = cursor; } nodes[cursor].left = key; nodes[key].parent = cursor; } function rotateRight(address key) internal { address cursor = nodes[key].left; address keyParent = nodes[key].parent; address cursorRight = nodes[cursor].right; nodes[key].left = cursorRight; if (cursorRight != EMPTY) { nodes[cursorRight].parent = key; } nodes[cursor].parent = keyParent; if (keyParent == EMPTY) { root = cursor; } else if (key == nodes[keyParent].right) { nodes[keyParent].right = cursor; } else { nodes[keyParent].left = cursor; } nodes[cursor].right = key; nodes[key].parent = cursor; } function insertFixup(address key) internal { address cursor; while (key != root && nodes[nodes[key].parent].red) { address keyParent = nodes[key].parent; if (keyParent == nodes[nodes[keyParent].parent].left) { cursor = nodes[nodes[keyParent].parent].right; if (nodes[cursor].red) { nodes[keyParent].red = false; nodes[cursor].red = false; nodes[nodes[keyParent].parent].red = true; key = nodes[keyParent].parent; } else { if (key == nodes[keyParent].right) { key = keyParent; rotateLeft(key); } keyParent = nodes[key].parent; nodes[keyParent].red = false; nodes[nodes[keyParent].parent].red = true; rotateRight(nodes[keyParent].parent); } } else { cursor = nodes[nodes[keyParent].parent].left; if (nodes[cursor].red) { nodes[keyParent].red = false; nodes[cursor].red = false; nodes[nodes[keyParent].parent].red = true; key = nodes[keyParent].parent; } else { if (key == nodes[keyParent].left) { key = keyParent; rotateRight(key); } keyParent = nodes[key].parent; nodes[keyParent].red = false; nodes[nodes[keyParent].parent].red = true; rotateLeft(nodes[keyParent].parent); } } } if (nodes[root].red) nodes[root].red = false; } function insert(address key) internal { address cursor = EMPTY; address probe = root; while (probe != EMPTY) { cursor = probe; if (sortKey(key) < sortKey(probe)) { probe = nodes[probe].left; } else { probe = nodes[probe].right; } } nodes[key] = Node({parent : cursor, left : EMPTY, right : EMPTY, red : true}); if (cursor == EMPTY) { root = key; } else if (sortKey(key) < sortKey(cursor)) { nodes[cursor].left = key; } else { nodes[cursor].right = key; } insertFixup(key); } function replaceParent(address a, address b) internal { address bParent = nodes[b].parent; nodes[a].parent = bParent; if (bParent == EMPTY) { root = a; } else { if (b == nodes[bParent].left) { nodes[bParent].left = a; } else { nodes[bParent].right = a; } } } function removeFixup(address key) internal { address cursor; while (key != root && !nodes[key].red) { address keyParent = nodes[key].parent; if (key == nodes[keyParent].left) { cursor = nodes[keyParent].right; if (nodes[cursor].red) { nodes[cursor].red = false; nodes[keyParent].red = true; rotateLeft(keyParent); cursor = nodes[keyParent].right; } if (!nodes[nodes[cursor].left].red && !nodes[nodes[cursor].right].red) { nodes[cursor].red = true; key = keyParent; } else { if (!nodes[nodes[cursor].right].red) { nodes[nodes[cursor].left].red = false; nodes[cursor].red = true; rotateRight(cursor); cursor = nodes[keyParent].right; } nodes[cursor].red = nodes[keyParent].red; nodes[keyParent].red = false; nodes[nodes[cursor].right].red = false; rotateLeft(keyParent); return; // key = root; } } else { cursor = nodes[keyParent].left; if (nodes[cursor].red) { nodes[cursor].red = false; nodes[keyParent].red = true; rotateRight(keyParent); cursor = nodes[keyParent].left; } if (!nodes[nodes[cursor].right].red && !nodes[nodes[cursor].left].red) { nodes[cursor].red = true; key = keyParent; } else { if (!nodes[nodes[cursor].left].red) { nodes[nodes[cursor].right].red = false; nodes[cursor].red = true; rotateLeft(cursor); cursor = nodes[keyParent].left; } nodes[cursor].red = nodes[keyParent].red; nodes[keyParent].red = false; nodes[nodes[cursor].left].red = false; rotateRight(keyParent); return; // key = root; } } } if (nodes[key].red) nodes[key].red = false; } function remove(address key) internal { address probe; address cursor; if (nodes[key].left == EMPTY || nodes[key].right == EMPTY) { cursor = key; } else { cursor = nodes[key].right; while (nodes[cursor].left != EMPTY) { cursor = nodes[cursor].left; } } if (nodes[cursor].left != EMPTY) { probe = nodes[cursor].left; } else { probe = nodes[cursor].right; } address yParent = nodes[cursor].parent; nodes[probe].parent = yParent; if (yParent != EMPTY) { if (cursor == nodes[yParent].left) { nodes[yParent].left = probe; } else { nodes[yParent].right = probe; } } else { root = probe; } bool doFixup = !nodes[cursor].red; if (cursor != key) { replaceParent(cursor, key); nodes[cursor].left = nodes[key].left; nodes[nodes[cursor].left].parent = cursor; nodes[cursor].right = nodes[key].right; nodes[nodes[cursor].right].parent = cursor; nodes[cursor].red = nodes[key].red; (cursor, key) = (key, cursor); } if (doFixup) { removeFixup(probe); } delete nodes[cursor]; } } // ---------------------------------------------------------------------------- // End - BokkyPooBah's Red-Black Tree Library // ----------------------------------------------------------------------------
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol) pragma solidity 0.8.17; import "./BalanceTree.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is BalanceTree { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; address _owner; mapping(address => bool) public admins; modifier onlyOwner() { require(msg.sender == _owner, "Caller is not the owner."); _; } modifier onlyAdmin() { require(admins[msg.sender], "Caller is not an admin."); _; } function sortKey(address key) internal view override returns (uint256) { return _balances[key]; } /** * @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 Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _owner = msg.sender; } function administrate(address owner_) external onlyOwner { _owner = owner_; } function setAdmin(address account, bool value) external onlyOwner { admins[account] = value; } function mint(address account, uint256 amount) external onlyAdmin { _mint(account, amount); } function burn(address account, uint256 amount) external onlyAdmin { _burn(account, amount); } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public pure returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public returns (bool) { address owner = msg.sender; _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public returns (bool) { address owner = msg.sender; _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public returns (bool) { address spender = msg.sender; _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { address owner = msg.sender; _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { address owner = msg.sender; uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; if (exists(from)) remove(from); // could be false, if balance was originally 0 and you transfer 0 if (_balances[from] > 0) insert(from); // could be false, if from got emptied if (exists(to)) remove(to); // could be false, if to is new if (_balances[to] > 0) insert(to); // could be false, if 0 got transferred and was already 0. emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; if (exists(account)) remove(account); if (_balances[account] > 0) insert(account); emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; if (exists(account)) remove(account); // could be false, if was 0 before burn and you burn 0 if (_balances[account] > 0) insert(account); emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal {} } // ---------------------------------------------------------------------------- // End - BokkyPooBah's Red-Black Tree Library // ----------------------------------------------------------------------------
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"etherAmount","type":"uint256"},{"internalType":"uint256","name":"firnAmount","type":"uint256"},{"internalType":"uint256","name":"lockupDays","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ETHER_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FIRN_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FIRN_MULTISIG","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCKUP_DAYS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"executeDeal","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"firnToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sweepFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vesting_date","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60e06040526002805460ff1916905534801561001a57600080fd5b506040516109bd3803806109bd83398101604081905261003991610070565b600080546001600160a01b03191673a14664a2e58e804669e9ff1dfbc1bd981e13b0dc17905560809290925260a05260c05261009e565b60008060006060848603121561008557600080fd5b8351925060208401519150604084015190509250925092565b60805160a05160c0516108dc6100e16000396000818160de01526106dd01526000818161026f015261058d01526000818161017201526104f301526108dc6000f3fe6080604052600436106100c05760003560e01c8063553df02111610074578063a8d6fe041161004e578063a8d6fe0414610232578063b54a661414610247578063e63db56b1461025d57600080fd5b8063553df021146101b35780637150d8ae146101dd5780637bd23fd61461020a57600080fd5b80633dd7609a116100a55780633dd7609a14610160578063458efde31461019457806349873783146101ab57600080fd5b80630253899f146100cc57806307bfe86a1461011357600080fd5b366100c757005b600080fd5b3480156100d857600080fd5b506101007f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561011f57600080fd5b5061013b73ddea19fce1e52497206bf1969d2d56fed85aff5c81565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010a565b34801561016c57600080fd5b506101007f000000000000000000000000000000000000000000000000000000000000000081565b3480156101a057600080fd5b506101a9610291565b005b6101a9610457565b3480156101bf57600080fd5b506002546101cd9060ff1681565b604051901515815260200161010a565b3480156101e957600080fd5b5060005461013b9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561021657600080fd5b5061013b73a14664a2e58e804669e9ff1dfbc1bd981e13b0dc81565b34801561023e57600080fd5b506101a96107de565b34801561025357600080fd5b5061010060015481565b34801561026957600080fd5b506101007f000000000000000000000000000000000000000000000000000000000000000081565b60025460ff1615806102a557506001544210155b610310576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4861736e277420766573746564207965742e000000000000000000000000000060448201526064015b60405180910390fd5b6000546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ddea19fce1e52497206bf1969d2d56fed85aff5c9163a9059cbb9173ffffffffffffffffffffffffffffffffffffffff9091169083906370a0823190602401602060405180830381865afa15801561039c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c09190610805565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015610430573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610454919061081e565b50565b600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000163317905560025460ff16156104ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4465616c20616c726561647920646f6e652e00000000000000000000000000006044820152606401610307565b6105207f0000000000000000000000000000000000000000000000000000000000000000670de0b6b3a7640000610876565b3414610588576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f57726f6e6720616d6f756e74206f6620657468657220737570706c6965642e006044820152606401610307565b6105ba7f0000000000000000000000000000000000000000000000000000000000000000670de0b6b3a7640000610876565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ddea19fce1e52497206bf1969d2d56fed85aff5c906370a0823190602401602060405180830381865afa158015610622573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106469190610805565b146106ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f546f6b656e2062616c616e63652069732077726f6e672e0000000000000000006044820152606401610307565b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556107057f000000000000000000000000000000000000000000000000000000000000000062015180610876565b61070f9042610893565b60015560405160009073a14664a2e58e804669e9ff1dfbc1bd981e13b0dc9034905b60006040518083038185875af1925050503d806000811461076e576040519150601f19603f3d011682016040523d82523d6000602084013e610773565b606091505b5050905080610454576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610307565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116904790610731565b60006020828403121561081757600080fd5b5051919050565b60006020828403121561083057600080fd5b8151801515811461084057600080fd5b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761088d5761088d610847565b92915050565b8082018082111561088d5761088d61084756fea2646970667358221220320448fe648d500f4e0871c577716b33cc498a572739298c2694f5535730be4564736f6c63430008110033000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000002a900000000000000000000000000000000000000000000000000000000000000b7
Deployed Bytecode
0x6080604052600436106100c05760003560e01c8063553df02111610074578063a8d6fe041161004e578063a8d6fe0414610232578063b54a661414610247578063e63db56b1461025d57600080fd5b8063553df021146101b35780637150d8ae146101dd5780637bd23fd61461020a57600080fd5b80633dd7609a116100a55780633dd7609a14610160578063458efde31461019457806349873783146101ab57600080fd5b80630253899f146100cc57806307bfe86a1461011357600080fd5b366100c757005b600080fd5b3480156100d857600080fd5b506101007f00000000000000000000000000000000000000000000000000000000000000b781565b6040519081526020015b60405180910390f35b34801561011f57600080fd5b5061013b73ddea19fce1e52497206bf1969d2d56fed85aff5c81565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010a565b34801561016c57600080fd5b506101007f000000000000000000000000000000000000000000000000000000000000000581565b3480156101a057600080fd5b506101a9610291565b005b6101a9610457565b3480156101bf57600080fd5b506002546101cd9060ff1681565b604051901515815260200161010a565b3480156101e957600080fd5b5060005461013b9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561021657600080fd5b5061013b73a14664a2e58e804669e9ff1dfbc1bd981e13b0dc81565b34801561023e57600080fd5b506101a96107de565b34801561025357600080fd5b5061010060015481565b34801561026957600080fd5b506101007f00000000000000000000000000000000000000000000000000000000000002a981565b60025460ff1615806102a557506001544210155b610310576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4861736e277420766573746564207965742e000000000000000000000000000060448201526064015b60405180910390fd5b6000546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ddea19fce1e52497206bf1969d2d56fed85aff5c9163a9059cbb9173ffffffffffffffffffffffffffffffffffffffff9091169083906370a0823190602401602060405180830381865afa15801561039c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c09190610805565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015610430573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610454919061081e565b50565b600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000163317905560025460ff16156104ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4465616c20616c726561647920646f6e652e00000000000000000000000000006044820152606401610307565b6105207f0000000000000000000000000000000000000000000000000000000000000005670de0b6b3a7640000610876565b3414610588576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f57726f6e6720616d6f756e74206f6620657468657220737570706c6965642e006044820152606401610307565b6105ba7f00000000000000000000000000000000000000000000000000000000000002a9670de0b6b3a7640000610876565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ddea19fce1e52497206bf1969d2d56fed85aff5c906370a0823190602401602060405180830381865afa158015610622573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106469190610805565b146106ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f546f6b656e2062616c616e63652069732077726f6e672e0000000000000000006044820152606401610307565b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556107057f00000000000000000000000000000000000000000000000000000000000000b762015180610876565b61070f9042610893565b60015560405160009073a14664a2e58e804669e9ff1dfbc1bd981e13b0dc9034905b60006040518083038185875af1925050503d806000811461076e576040519150601f19603f3d011682016040523d82523d6000602084013e610773565b606091505b5050905080610454576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610307565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116904790610731565b60006020828403121561081757600080fd5b5051919050565b60006020828403121561083057600080fd5b8151801515811461084057600080fd5b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761088d5761088d610847565b92915050565b8082018082111561088d5761088d61084756fea2646970667358221220320448fe648d500f4e0871c577716b33cc498a572739298c2694f5535730be4564736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000002a900000000000000000000000000000000000000000000000000000000000000b7
-----Decoded View---------------
Arg [0] : etherAmount (uint256): 5
Arg [1] : firnAmount (uint256): 681
Arg [2] : lockupDays (uint256): 183
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [1] : 00000000000000000000000000000000000000000000000000000000000002a9
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000b7
Deployed Bytecode Sourcemap
81:2053:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;366:36;;;;;;;;;;;;;;;;;;160:25:3;;;148:2;133:18;366:36:2;;;;;;;;192:83;;;;;;;;;;;;232:42;192:83;;;;;386:42:3;374:55;;;356:74;;344:2;329:18;192:83:2;196:240:3;281:37:2;;;;;;;;;;;;;;;1778:354;;;;;;;;;;;;;:::i;:::-;;1120:652;;;:::i;468:24::-;;;;;;;;;;-1:-1:-1;468:24:2;;;;;;;;;;;606:14:3;;599:22;581:41;;569:2;554:18;468:24:2;441:187:3;409:20:2;;;;;;;;;;-1:-1:-1;409:20:2;;;;;;;;104:82;;;;;;;;;;;;144:42;104:82;;901:213;;;;;;;;;;;;;:::i;435:27::-;;;;;;;;;;;;;;;;324:36;;;;;;;;;;;;;;;1778:354;1992:4;;;;1991:5;;:40;;;2019:12;;2000:15;:31;;1991:40;1982:72;;;;;;;1066:2:3;1982:72:2;;;1048:21:3;1105:2;1085:18;;;1078:30;1144:20;1124:18;;;1117:48;1182:18;;1982:72:2;;;;;;;;;2083:5;;2090:34;;;;;2118:4;2090:34;;;356:74:3;232:42:2;;2064:18;;;2083:5;;;;232:42;;2090:19;;329:18:3;;2090:34:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2064:61;;;;;;;;;;1604:42:3;1592:55;;;2064:61:2;;;1574:74:3;1664:18;;;1657:34;1547:18;;2064:61:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1778:354::o;1120:652::-;1170:5;:18;;;;1178:10;1170:18;;;1207:4;;;;1206:5;1198:36;;;;;;;2186:2:3;1198:36:2;;;2168:21:3;2225:2;2205:18;;;2198:30;2264:20;2244:18;;;2237:48;2302:18;;1198:36:2;1984:342:3;1198:36:2;1333:22;:12;1348:7;1333:22;:::i;:::-;1320:9;:35;1312:79;;;;;;;2895:2:3;1312:79:2;;;2877:21:3;2934:2;2914:18;;;2907:30;2973:33;2953:18;;;2946:61;3024:18;;1312:79:2;2693:355:3;1312:79:2;1447:21;:11;1461:7;1447:21;:::i;:::-;1409:34;;;;;1437:4;1409:34;;;356:74:3;232:42:2;;1409:19;;329:18:3;;1409:34:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:59;1401:95;;;;;;;3255:2:3;1401:95:2;;;3237:21:3;3294:2;3274:18;;;3267:30;3333:25;3313:18;;;3306:53;3376:18;;1401:95:2;3053:347:3;1401:95:2;1506:4;:11;;;;1513:4;1506:11;;;1602:20;:11;1616:6;1602:20;:::i;:::-;1584:38;;:15;:38;:::i;:::-;1569:12;:53;1670:49;;1652:12;;144:42;;1705:9;;1670:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1651:68;;;1737:7;1729:36;;;;;;;3947:2:3;1729:36:2;;;3929:21:3;3986:2;3966:18;;;3959:30;4025:18;4005;;;3998:46;4061:18;;1729:36:2;3745:340:3;901:213:2;990:12;1016:5;;1008:53;;1016:5;;;;;1035:21;;1008:53;3535:205:3;1211:184;1281:6;1334:2;1322:9;1313:7;1309:23;1305:32;1302:52;;;1350:1;1347;1340:12;1302:52;-1:-1:-1;1373:16:3;;1211:184;-1:-1:-1;1211:184:3:o;1702:277::-;1769:6;1822:2;1810:9;1801:7;1797:23;1793:32;1790:52;;;1838:1;1835;1828:12;1790:52;1870:9;1864:16;1923:5;1916:13;1909:21;1902:5;1899:32;1889:60;;1945:1;1942;1935:12;1889:60;1968:5;1702:277;-1:-1:-1;;;1702:277:3:o;2331:184::-;2383:77;2380:1;2373:88;2480:4;2477:1;2470:15;2504:4;2501:1;2494:15;2520:168;2593:9;;;2624;;2641:15;;;2635:22;;2621:37;2611:71;;2662:18;;:::i;:::-;2520:168;;;;:::o;3405:125::-;3470:9;;;3491:10;;;3488:36;;;3504:18;;:::i
Swarm Source
ipfs://320448fe648d500f4e0871c577716b33cc498a572739298c2694f5535730be45
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $3,295.75 | 0.00315834 | $10.41 |
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.