Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
CrowdfundWithEditionsLogic
Compiler Version
v0.8.6+commit.11564f7e
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.6; import {CrowdfundWithEditionsStorage} from "./CrowdfundWithEditionsStorage.sol"; import {ERC20} from "../../../external/ERC20.sol"; import {ICrowdfundWithEditions} from "./interface/ICrowdfundWithEditions.sol"; import {ITreasuryConfig} from "../../../interface/ITreasuryConfig.sol"; /** * @title CrowdfundWithEditionsLogic * @author MirrorXYZ * * Crowdfund the creation of NFTs by issuing ERC20 tokens that * can be redeemed for the underlying value of the NFT once sold. */ contract CrowdfundWithEditionsLogic is CrowdfundWithEditionsStorage, ERC20 { // ============ Events ============ event ReceivedERC721(uint256 tokenId, address sender); event Contribution(address contributor, uint256 amount); event ContributionForEdition( address contributor, uint256 amount, uint256 editionId, uint256 tokenId ); event FundingClosed(uint256 amountRaised, uint256 creatorAllocation); event BidAccepted(uint256 amount); event Redeemed(address contributor, uint256 amount); event Withdrawal(uint256 amount, uint256 fee); // ============ Modifiers ============ /** * @dev Modifier to check whether the `msg.sender` is the operator. * If it is, it will run the function. Otherwise, it will revert. */ modifier onlyOperator() { require(msg.sender == operator); _; } modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(reentrancy_status != REENTRANCY_ENTERED, "Reentrant call"); // Any calls to nonReentrant after this point will fail reentrancy_status = REENTRANCY_ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) reentrancy_status = REENTRANCY_NOT_ENTERED; } // ============ Crowdfunding Methods ============ /** * @notice Mints tokens for the sender propotional to the * amount of ETH sent in the transaction. * @dev Emits the Contribution event. */ function contribute( address payable backer, uint256 editionId, uint256 amount ) external payable nonReentrant { _contribute(backer, editionId, amount); } /** * @notice Burns the sender's tokens and redeems underlying ETH. * @dev Emits the Redeemed event. */ function redeem(uint256 tokenAmount) external nonReentrant { // Prevent backers from accidently redeeming when balance is 0. require( address(this).balance > 0, "Crowdfund: No ETH available to redeem" ); // Check require( balanceOf[msg.sender] >= tokenAmount, "Crowdfund: Insufficient balance" ); require(status == Status.TRADING, "Crowdfund: Funding must be trading"); // Effect uint256 redeemable = redeemableFromTokens(tokenAmount); _burn(msg.sender, tokenAmount); // Safe version of transfer. sendValue(payable(msg.sender), redeemable); emit Redeemed(msg.sender, redeemable); } /** * @notice Returns the amount of ETH that is redeemable for tokenAmount. */ function redeemableFromTokens(uint256 tokenAmount) public view returns (uint256) { return (tokenAmount * address(this).balance) / totalSupply; } function valueToTokens(uint256 value) public pure returns (uint256 tokens) { tokens = value * TOKEN_SCALE; } function tokensToValue(uint256 tokenAmount) internal pure returns (uint256 value) { value = tokenAmount / TOKEN_SCALE; } // ============ Operator Methods ============ /** * @notice Transfers all funds to operator, and mints tokens for the operator. * Updates status to TRADING. * @dev Emits the FundingClosed event. */ function closeFunding() external onlyOperator nonReentrant { require(status == Status.FUNDING, "Crowdfund: Funding must be open"); // Close funding status, move to tradable. status = Status.TRADING; // Mint the operator a percent of the total supply. uint256 operatorTokens = (operatorPercent * totalSupply) / (100 - operatorPercent); _mint(operator, operatorTokens); // Announce that funding has been closed. emit FundingClosed(address(this).balance, operatorTokens); _withdraw(); } /** * @notice Operator can change the funding recipient. */ function changeFundingRecipient(address payable newFundingRecipient) public onlyOperator { fundingRecipient = newFundingRecipient; } function withdraw() public { _withdraw(); } function computeFee(uint256 amount, uint256 feePercentage_) public pure returns (uint256 fee) { fee = (feePercentage_ * amount) / (100 * 100); } // ============ Utility Methods ============ function sendValue(address payable recipient, uint256 amount) internal { require( address(this).balance >= amount, "Address: insufficient balance" ); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{value: amount}(""); require( success, "Address: unable to send value, recipient may have reverted" ); } // ============ Edition Methods ============ function buyEdition( uint256 amount, uint256 editionId, address recipient ) internal returns (uint256) { // Check that the sender is paying the correct amount. require( amount >= ICrowdfundWithEditions(editions).editionPrice(editionId), "Unable purchase edition with available amount" ); // We don't need to transfer the value to the NFT contract here, // since that contract trusts this one to check before minting. // I.E. this contract has minting privileges. return ICrowdfundWithEditions(editions).buyEdition(editionId, recipient); } // ============ Internal Methods ============ function _contribute( address payable backer, uint256 editionId, uint256 amount ) private { require(status == Status.FUNDING, "Crowdfund: Funding must be open"); require(amount == msg.value, "Crowdfund: Amount is not value sent"); // This first case is the happy path, so we will keep it efficient. // The balance, which includes the current contribution, is less than or equal to cap. if (address(this).balance <= fundingCap) { // Mint equity for the contributor. _mint(backer, valueToTokens(amount)); // Editions start at 1, so a "0" edition means the user wants to contribute without // purchasing a token. if (editionId > 0) { emit ContributionForEdition( backer, amount, editionId, buyEdition(amount, editionId, backer) ); } else { emit Contribution(backer, amount); } } else { // Compute the balance of the crowdfund before the contribution was made. uint256 startAmount = address(this).balance - amount; // If that amount was already greater than the funding cap, then we should revert immediately. require( startAmount < fundingCap, "Crowdfund: Funding cap already reached" ); // Otherwise, the contribution helped us reach the funding cap. We should // take what we can until the funding cap is reached, and refund the rest. uint256 eligibleAmount = fundingCap - startAmount; // Otherwise, we process the contribution as if it were the minimal amount. _mint(backer, valueToTokens(eligibleAmount)); if (editionId > 0) { emit ContributionForEdition( backer, eligibleAmount, editionId, // Attempt to purchase edition with eligible amount. buyEdition(eligibleAmount, editionId, backer) ); } else { emit Contribution(backer, eligibleAmount); } // Refund the sender with their contribution (e.g. 2.5 minus the diff - e.g. 1.5 = 1 ETH) sendValue(backer, amount - eligibleAmount); } } function _withdraw() internal { uint256 fee = feePercentage; emit Withdrawal( address(this).balance, computeFee(address(this).balance, fee) ); // Transfer the fee to the treasury. sendValue( ITreasuryConfig(treasuryConfig).treasury(), computeFee(address(this).balance, fee) ); // Transfer available balance to the fundingRecipient. sendValue(fundingRecipient, address(this).balance); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.6; /** * @title CrowdfundWithEditionsStorage * @author MirrorXYZ */ contract CrowdfundWithEditionsStorage { /** * @notice The two states that this contract can exist in. * "FUNDING" allows contributors to add funds. */ enum Status { FUNDING, TRADING } // ============ Constants ============ /// @notice The factor by which ETH contributions will multiply into crowdfund tokens. uint16 internal constant TOKEN_SCALE = 1000; // ============ Reentrancy ============ /// @notice Reentrancy constants. uint256 internal constant REENTRANCY_NOT_ENTERED = 1; uint256 internal constant REENTRANCY_ENTERED = 2; /// @notice Current reentrancy status -- used by the modifier. uint256 internal reentrancy_status; /// @notice The operator has a special role to change contract status. address payable public operator; /// @notice Receives the funds when calling withdraw. Operator can configure. address payable public fundingRecipient; /// @notice Treasury configuration. address public treasuryConfig; /// @notice We add a hard cap to prevent raising more funds than deemed reasonable. uint256 public fundingCap; /// @notice Fee percentage that the crowdfund pays to the treasury. uint256 public feePercentage; /// @notice The operator takes some equity in the tokens, represented by this percent. uint256 public operatorPercent; // ============ Mutable Storage ============ /// @notice Represents the current state of the campaign. Status public status; // ============ Tiered Campaigns ============ /// @notice Address of the editions contract to purchase from. address public editions; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.6; // import {ERC20Storage} from "./ERC20Storage.sol"; import {IERC20, IERC20Events} from "./interface/IERC20.sol"; /** * @title ERC20 Implementation. * @author MirrorXYZ */ contract ERC20 is IERC20, IERC20Events { // ============ ERC20 Attributes ============ /// @notice EIP-20 token name for this token string public override name; /// @notice EIP-20 token symbol for this token string public override symbol; /// @notice EIP-20 token decimals for this token uint8 public constant override decimals = 18; // ============ Mutable ERC20 Storage ============ /// @notice EIP-20 total number of tokens in circulation uint256 public override totalSupply; /// @notice EIP-20 official record of token balances for each account mapping(address => uint256) public override balanceOf; /// @notice EIP-20 allowance amounts on behalf of others mapping(address => mapping(address => uint256)) public override allowance; /** * @notice Initialize and assign total supply when using * proxy pattern. Only callable during contract deployment. * @param totalSupply_ is the initial token supply * @param to_ is the address that will hold the initial token supply */ function initialize(uint256 totalSupply_, address to_) external { // Ensure that this function is only callable during contract construction. assembly { if extcodesize(address()) { revert(0, 0) } } totalSupply = totalSupply_; balanceOf[to_] = totalSupply_; emit Transfer(address(0), to_, totalSupply_); } // ============ ERC20 Spec ============ /** * @dev Function to increase allowance of tokens. * @param spender The address that will receive an allowance increase. * @param value The amount of tokens to increase allowance. */ function approve(address spender, uint256 value) external override returns (bool) { _approve(msg.sender, spender, value); return true; } /** * @dev Function to transfer tokens. * @param to The address that will receive the tokens. * @param value The amount of tokens to transfer. */ function transfer(address to, uint256 value) external override returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @dev Function to transfer an accounts tokens. Sender of txn must be approved. * @param from The address that will transfer tokens. * @param to The address that will receive the tokens. * @param value The amount of tokens to transfer. */ function transferFrom( address from, address to, uint256 value ) external override returns (bool) { require( allowance[from][msg.sender] >= value, "transfer amount exceeds spender allowance" ); allowance[from][msg.sender] = allowance[from][msg.sender] - value; _transfer(from, to, value); return true; } // ============ Private Utils ============ function _mint(address to, uint256 value) internal { totalSupply = totalSupply + value; balanceOf[to] = balanceOf[to] + value; emit Transfer(address(0), to, value); } function _burn(address from, uint256 value) internal { balanceOf[from] = balanceOf[from] - value; totalSupply = totalSupply - value; emit Transfer(from, address(0), value); } function _approve( address owner, address spender, uint256 value ) internal { allowance[owner][spender] = value; emit Approval(owner, spender, value); } function _transfer( address from, address to, uint256 value ) internal { require(balanceOf[from] >= value, "transfer amount exceeds balance"); balanceOf[from] = balanceOf[from] - value; balanceOf[to] = balanceOf[to] + value; emit Transfer(from, to, value); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.6; interface ICrowdfundWithEditions { struct Edition { // The maximum number of tokens that can be sold. uint256 quantity; // The price at which each token will be sold, in ETH. uint256 price; // The account that will receive sales revenue. address payable fundingRecipient; // The number of tokens sold so far. uint256 numSold; bytes32 contentHash; } struct EditionTier { // The maximum number of tokens that can be sold. uint256 quantity; // The price at which each token will be sold, in ETH. uint256 price; bytes32 contentHash; } function buyEdition(uint256 editionId, address recipient) external payable returns (uint256 tokenId); function editionPrice(uint256 editionId) external view returns (uint256); function createEditions( EditionTier[] memory tier, // The account that should receive the revenue. address payable fundingRecipient, address minter ) external; function contractURI() external view returns (string memory); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.6; interface ITreasuryConfig { function treasury() external returns (address payable); function distributionModel() external returns (address); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.6; interface IERC20 { /// @notice EIP-20 token name for this token function name() external returns (string calldata); /// @notice EIP-20 token symbol for this token function symbol() external returns (string calldata); /// @notice EIP-20 token decimals for this token function decimals() external returns (uint8); /// @notice EIP-20 total number of tokens in circulation function totalSupply() external returns (uint256); /// @notice EIP-20 official record of token balances for each account function balanceOf(address account) external returns (uint256); /// @notice EIP-20 allowance amounts on behalf of others function allowance(address owner, address spender) external returns (uint256); /// @notice EIP-20 approves _spender_ to transfer up to _value_ multiple times function approve(address spender, uint256 value) external returns (bool); /// @notice EIP-20 transfer _value_ to _to_ from _msg.sender_ function transfer(address to, uint256 value) external returns (bool); /// @notice EIP-20 transfer _value_ to _to_ from _from_ function transferFrom( address from, address to, uint256 value ) external returns (bool); } interface IERC20Events { /// @notice EIP-20 Mint event event Mint(address indexed to, uint256 amount); /// @notice EIP-20 approval event event Approval( address indexed from, address indexed spender, uint256 value ); /// @notice EIP-20 transfer event event Transfer(address indexed from, address indexed to, uint256 value); }
{ "optimizer": { "enabled": true, "runs": 2000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BidAccepted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"contributor","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Contribution","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"contributor","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"editionId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ContributionForEdition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amountRaised","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"creatorAllocation","type":"uint256"}],"name":"FundingClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"ReceivedERC721","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"contributor","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Redeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"newFundingRecipient","type":"address"}],"name":"changeFundingRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closeFunding","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"feePercentage_","type":"uint256"}],"name":"computeFee","outputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address payable","name":"backer","type":"address"},{"internalType":"uint256","name":"editionId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"contribute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"editions","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundingCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundingRecipient","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"totalSupply_","type":"uint256"},{"internalType":"address","name":"to_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"redeemableFromTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"status","outputs":[{"internalType":"enum CrowdfundWithEditionsStorage.Status","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryConfig","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"valueToTokens","outputs":[{"internalType":"uint256","name":"tokens","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506118ba806100206000396000f3fe6080604052600436106101a15760003560e01c80637b4044a0116100e1578063b8ddbcb31161008a578063da35a26f11610064578063da35a26f1461047d578063db006a751461049d578063dd62ed3e146104bd578063e3b2594f146104f557600080fd5b8063b8ddbcb314610418578063cfd7b0df1461043d578063da046b671461045d57600080fd5b8063a001ecdd116100bb578063a001ecdd146103cf578063a08f793c146103e5578063a9059cbb146103f857600080fd5b80637b4044a01461038457806395d89b411461039a5780639744b8dc146103af57600080fd5b80632f87e4be1161014e57806331a3a5061161012857806331a3a5061461030b5780633ccfd60b14610322578063570ca7351461033757806370a082311461035757600080fd5b80632f87e4be146102a45780632ff284c2146102c4578063313ce567146102e457600080fd5b80631bb534ba1161017f5780631bb534ba14610225578063200d2ed21461025d57806323b872dd1461028457600080fd5b806306fdde03146101a6578063095ea7b3146101d157806318160ddd14610201575b600080fd5b3480156101b257600080fd5b506101bb61050b565b6040516101c89190611707565b60405180910390f35b3480156101dd57600080fd5b506101f16101ec36600461163a565b610599565b60405190151581526020016101c8565b34801561020d57600080fd5b50610217600a5481565b6040519081526020016101c8565b34801561023157600080fd5b50600254610245906001600160a01b031681565b6040516001600160a01b0390911681526020016101c8565b34801561026957600080fd5b506007546102779060ff1681565b6040516101c891906116df565b34801561029057600080fd5b506101f161029f3660046115f9565b6105af565b3480156102b057600080fd5b506102176102bf366004611666565b6106b5565b3480156102d057600080fd5b506102176102df3660046116bd565b6106d5565b3480156102f057600080fd5b506102f9601281565b60405160ff90911681526020016101c8565b34801561031757600080fd5b506103206106f5565b005b34801561032e57600080fd5b50610320610882565b34801561034357600080fd5b50600154610245906001600160a01b031681565b34801561036357600080fd5b50610217610372366004611551565b600b6020526000908152604090205481565b34801561039057600080fd5b5061021760065481565b3480156103a657600080fd5b506101bb61088c565b3480156103bb57600080fd5b506102176103ca366004611666565b610899565b3480156103db57600080fd5b5061021760055481565b6103206103f336600461158b565b6108a7565b34801561040457600080fd5b506101f161041336600461163a565b610914565b34801561042457600080fd5b506007546102459061010090046001600160a01b031681565b34801561044957600080fd5b50600354610245906001600160a01b031681565b34801561046957600080fd5b50610320610478366004611551565b610921565b34801561048957600080fd5b50610320610498366004611698565b610972565b3480156104a957600080fd5b506103206104b8366004611666565b6109d5565b3480156104c957600080fd5b506102176104d83660046115c0565b600c60209081526000928352604080842090915290825290205481565b34801561050157600080fd5b5061021760045481565b6008805461051890611808565b80601f016020809104026020016040519081016040528092919081815260200182805461054490611808565b80156105915780601f1061056657610100808354040283529160200191610591565b820191906000526020600020905b81548152906001019060200180831161057457829003601f168201915b505050505081565b60006105a6338484610bee565b50600192915050565b6001600160a01b0383166000908152600c6020908152604080832033845290915281205482111561064d5760405162461bcd60e51b815260206004820152602960248201527f7472616e7366657220616d6f756e742065786365656473207370656e6465722060448201527f616c6c6f77616e6365000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b0384166000908152600c6020908152604080832033845290915290205461067c9083906117f1565b6001600160a01b0385166000908152600c602090815260408083203384529091529020556106ab848484610c50565b5060019392505050565b600a546000906106c547846117b4565b6106cf9190611792565b92915050565b60006127106106e484846117b4565b6106ee9190611792565b9392505050565b6001546001600160a01b0316331461070c57600080fd5b6002600054141561075f5760405162461bcd60e51b815260206004820152600e60248201527f5265656e7472616e742063616c6c0000000000000000000000000000000000006044820152606401610644565b6002600090815560075460ff16600181111561077d5761077d611859565b146107ca5760405162461bcd60e51b815260206004820152601f60248201527f43726f776466756e643a2046756e64696e67206d757374206265206f70656e006044820152606401610644565b600780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556006546000906108069060646117f1565b600a5460065461081691906117b4565b6108209190611792565b600154909150610839906001600160a01b031682610d60565b60408051478152602081018390527f352ce94da8e3109dc06c05ed84e8a0aaf9ce2c4329dfd10ad1190cf620048972910160405180910390a161087a610de6565b506001600055565b61088a610de6565b565b6009805461051890611808565b60006106cf6103e8836117b4565b600260005414156108fa5760405162461bcd60e51b815260206004820152600e60248201527f5265656e7472616e742063616c6c0000000000000000000000000000000000006044820152606401610644565b600260005561090a838383610eee565b5050600160005550565b60006105a6338484610c50565b6001546001600160a01b0316331461093857600080fd5b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b303b1561097e57600080fd5b600a8290556001600160a01b0381166000818152600b60209081526040808320869055518581527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91015b60405180910390a35050565b60026000541415610a285760405162461bcd60e51b815260206004820152600e60248201527f5265656e7472616e742063616c6c0000000000000000000000000000000000006044820152606401610644565b600260005547610aa05760405162461bcd60e51b815260206004820152602560248201527f43726f776466756e643a204e6f2045544820617661696c61626c6520746f207260448201527f656465656d0000000000000000000000000000000000000000000000000000006064820152608401610644565b336000908152600b6020526040902054811115610aff5760405162461bcd60e51b815260206004820152601f60248201527f43726f776466756e643a20496e73756666696369656e742062616c616e6365006044820152606401610644565b600160075460ff166001811115610b1857610b18611859565b14610b8b5760405162461bcd60e51b815260206004820152602260248201527f43726f776466756e643a2046756e64696e67206d75737420626520747261646960448201527f6e670000000000000000000000000000000000000000000000000000000000006064820152608401610644565b6000610b96826106b5565b9050610ba233836111ef565b610bac338261127b565b60408051338152602081018390527f4896181ff8f4543cc00db9fe9b6fb7e6f032b7eb772c72ab1ec1b4d2e03b9369910160405180910390a150506001600055565b6001600160a01b038381166000818152600c602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166000908152600b6020526040902054811115610cb85760405162461bcd60e51b815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e6365006044820152606401610644565b6001600160a01b0383166000908152600b6020526040902054610cdc9082906117f1565b6001600160a01b038085166000908152600b60205260408082209390935590841681522054610d0c90829061177a565b6001600160a01b038084166000818152600b602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610c439085815260200190565b80600a54610d6e919061177a565b600a556001600160a01b0382166000908152600b6020526040902054610d9590829061177a565b6001600160a01b0383166000818152600b60205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109c99085815260200190565b6005547fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347610e1547846106d5565b6040805192835260208301919091520160405180910390a1600354604080517f61d027b30000000000000000000000000000000000000000000000000000000081529051610ed5926001600160a01b0316916361d027b39160048083019260209291908290030181600087803b158015610e8e57600080fd5b505af1158015610ea2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec6919061156e565b610ed047846106d5565b61127b565b600254610eeb906001600160a01b03164761127b565b50565b600060075460ff166001811115610f0757610f07611859565b14610f545760405162461bcd60e51b815260206004820152601f60248201527f43726f776466756e643a2046756e64696e67206d757374206265206f70656e006044820152606401610644565b348114610fc95760405162461bcd60e51b815260206004820152602360248201527f43726f776466756e643a20416d6f756e74206973206e6f742076616c7565207360448201527f656e7400000000000000000000000000000000000000000000000000000000006064820152608401610644565b600454471161108b57610fe483610fdf83610899565b610d60565b811561104c577ffb7955a99240dbf0dd35c467144fb9661fbf7a19839f7d8220400c0dc52e70ae838284611019858789611394565b604080516001600160a01b03909516855260208501939093529183015260608201526080015b60405180910390a1505050565b604080516001600160a01b0385168152602081018390527f4d154d4aae216bed6d0926db77c00df2b57c6b5ba4eee05775de20facede3a7b910161103f565b600061109782476117f1565b905060045481106111105760405162461bcd60e51b815260206004820152602660248201527f43726f776466756e643a2046756e64696e672063617020616c7265616479207260448201527f65616368656400000000000000000000000000000000000000000000000000006064820152608401610644565b60008160045461112091906117f1565b905061112f85610fdf83610899565b8315611196577ffb7955a99240dbf0dd35c467144fb9661fbf7a19839f7d8220400c0dc52e70ae85828661116485898b611394565b604080516001600160a01b039095168552602085019390935291830152606082015260800160405180910390a16111d9565b604080516001600160a01b0387168152602081018390527f4d154d4aae216bed6d0926db77c00df2b57c6b5ba4eee05775de20facede3a7b910160405180910390a15b6111e785610ed083866117f1565b50505b505050565b6001600160a01b0382166000908152600b60205260409020546112139082906117f1565b6001600160a01b0383166000908152600b6020526040902055600a5461123a9082906117f1565b600a556040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016109c9565b804710156112cb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610644565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611318576040519150601f19603f3d011682016040523d82523d6000602084013e61131d565b606091505b50509050806111ea5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610644565b6007546040517f38d37b9b0000000000000000000000000000000000000000000000000000000081526004810184905260009161010090046001600160a01b0316906338d37b9b9060240160206040518083038186803b1580156113f757600080fd5b505afa15801561140b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142f919061167f565b8410156114a45760405162461bcd60e51b815260206004820152602d60248201527f556e61626c652070757263686173652065646974696f6e20776974682061766160448201527f696c61626c6520616d6f756e74000000000000000000000000000000000000006064820152608401610644565b6007546040517f121e4984000000000000000000000000000000000000000000000000000000008152600481018590526001600160a01b0384811660248301526101009092049091169063121e498490604401602060405180830381600087803b15801561151157600080fd5b505af1158015611525573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611549919061167f565b949350505050565b60006020828403121561156357600080fd5b81356106ee8161186f565b60006020828403121561158057600080fd5b81516106ee8161186f565b6000806000606084860312156115a057600080fd5b83356115ab8161186f565b95602085013595506040909401359392505050565b600080604083850312156115d357600080fd5b82356115de8161186f565b915060208301356115ee8161186f565b809150509250929050565b60008060006060848603121561160e57600080fd5b83356116198161186f565b925060208401356116298161186f565b929592945050506040919091013590565b6000806040838503121561164d57600080fd5b82356116588161186f565b946020939093013593505050565b60006020828403121561167857600080fd5b5035919050565b60006020828403121561169157600080fd5b5051919050565b600080604083850312156116ab57600080fd5b8235915060208301356115ee8161186f565b600080604083850312156116d057600080fd5b50508035926020909101359150565b602081016002831061170157634e487b7160e01b600052602160045260246000fd5b91905290565b600060208083528351808285015260005b8181101561173457858101830151858201604001528201611718565b81811115611746576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b6000821982111561178d5761178d611843565b500190565b6000826117af57634e487b7160e01b600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156117ec576117ec611843565b500290565b60008282101561180357611803611843565b500390565b600181811c9082168061181c57607f821691505b6020821081141561183d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0381168114610eeb57600080fdfea26469706673582212200a9ab3eacec586becf9e85c320604231ea2e180e60e1162e5f7f3526bfa3543d64736f6c63430008060033
Deployed Bytecode
0x6080604052600436106101a15760003560e01c80637b4044a0116100e1578063b8ddbcb31161008a578063da35a26f11610064578063da35a26f1461047d578063db006a751461049d578063dd62ed3e146104bd578063e3b2594f146104f557600080fd5b8063b8ddbcb314610418578063cfd7b0df1461043d578063da046b671461045d57600080fd5b8063a001ecdd116100bb578063a001ecdd146103cf578063a08f793c146103e5578063a9059cbb146103f857600080fd5b80637b4044a01461038457806395d89b411461039a5780639744b8dc146103af57600080fd5b80632f87e4be1161014e57806331a3a5061161012857806331a3a5061461030b5780633ccfd60b14610322578063570ca7351461033757806370a082311461035757600080fd5b80632f87e4be146102a45780632ff284c2146102c4578063313ce567146102e457600080fd5b80631bb534ba1161017f5780631bb534ba14610225578063200d2ed21461025d57806323b872dd1461028457600080fd5b806306fdde03146101a6578063095ea7b3146101d157806318160ddd14610201575b600080fd5b3480156101b257600080fd5b506101bb61050b565b6040516101c89190611707565b60405180910390f35b3480156101dd57600080fd5b506101f16101ec36600461163a565b610599565b60405190151581526020016101c8565b34801561020d57600080fd5b50610217600a5481565b6040519081526020016101c8565b34801561023157600080fd5b50600254610245906001600160a01b031681565b6040516001600160a01b0390911681526020016101c8565b34801561026957600080fd5b506007546102779060ff1681565b6040516101c891906116df565b34801561029057600080fd5b506101f161029f3660046115f9565b6105af565b3480156102b057600080fd5b506102176102bf366004611666565b6106b5565b3480156102d057600080fd5b506102176102df3660046116bd565b6106d5565b3480156102f057600080fd5b506102f9601281565b60405160ff90911681526020016101c8565b34801561031757600080fd5b506103206106f5565b005b34801561032e57600080fd5b50610320610882565b34801561034357600080fd5b50600154610245906001600160a01b031681565b34801561036357600080fd5b50610217610372366004611551565b600b6020526000908152604090205481565b34801561039057600080fd5b5061021760065481565b3480156103a657600080fd5b506101bb61088c565b3480156103bb57600080fd5b506102176103ca366004611666565b610899565b3480156103db57600080fd5b5061021760055481565b6103206103f336600461158b565b6108a7565b34801561040457600080fd5b506101f161041336600461163a565b610914565b34801561042457600080fd5b506007546102459061010090046001600160a01b031681565b34801561044957600080fd5b50600354610245906001600160a01b031681565b34801561046957600080fd5b50610320610478366004611551565b610921565b34801561048957600080fd5b50610320610498366004611698565b610972565b3480156104a957600080fd5b506103206104b8366004611666565b6109d5565b3480156104c957600080fd5b506102176104d83660046115c0565b600c60209081526000928352604080842090915290825290205481565b34801561050157600080fd5b5061021760045481565b6008805461051890611808565b80601f016020809104026020016040519081016040528092919081815260200182805461054490611808565b80156105915780601f1061056657610100808354040283529160200191610591565b820191906000526020600020905b81548152906001019060200180831161057457829003601f168201915b505050505081565b60006105a6338484610bee565b50600192915050565b6001600160a01b0383166000908152600c6020908152604080832033845290915281205482111561064d5760405162461bcd60e51b815260206004820152602960248201527f7472616e7366657220616d6f756e742065786365656473207370656e6465722060448201527f616c6c6f77616e6365000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b0384166000908152600c6020908152604080832033845290915290205461067c9083906117f1565b6001600160a01b0385166000908152600c602090815260408083203384529091529020556106ab848484610c50565b5060019392505050565b600a546000906106c547846117b4565b6106cf9190611792565b92915050565b60006127106106e484846117b4565b6106ee9190611792565b9392505050565b6001546001600160a01b0316331461070c57600080fd5b6002600054141561075f5760405162461bcd60e51b815260206004820152600e60248201527f5265656e7472616e742063616c6c0000000000000000000000000000000000006044820152606401610644565b6002600090815560075460ff16600181111561077d5761077d611859565b146107ca5760405162461bcd60e51b815260206004820152601f60248201527f43726f776466756e643a2046756e64696e67206d757374206265206f70656e006044820152606401610644565b600780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556006546000906108069060646117f1565b600a5460065461081691906117b4565b6108209190611792565b600154909150610839906001600160a01b031682610d60565b60408051478152602081018390527f352ce94da8e3109dc06c05ed84e8a0aaf9ce2c4329dfd10ad1190cf620048972910160405180910390a161087a610de6565b506001600055565b61088a610de6565b565b6009805461051890611808565b60006106cf6103e8836117b4565b600260005414156108fa5760405162461bcd60e51b815260206004820152600e60248201527f5265656e7472616e742063616c6c0000000000000000000000000000000000006044820152606401610644565b600260005561090a838383610eee565b5050600160005550565b60006105a6338484610c50565b6001546001600160a01b0316331461093857600080fd5b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b303b1561097e57600080fd5b600a8290556001600160a01b0381166000818152600b60209081526040808320869055518581527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91015b60405180910390a35050565b60026000541415610a285760405162461bcd60e51b815260206004820152600e60248201527f5265656e7472616e742063616c6c0000000000000000000000000000000000006044820152606401610644565b600260005547610aa05760405162461bcd60e51b815260206004820152602560248201527f43726f776466756e643a204e6f2045544820617661696c61626c6520746f207260448201527f656465656d0000000000000000000000000000000000000000000000000000006064820152608401610644565b336000908152600b6020526040902054811115610aff5760405162461bcd60e51b815260206004820152601f60248201527f43726f776466756e643a20496e73756666696369656e742062616c616e6365006044820152606401610644565b600160075460ff166001811115610b1857610b18611859565b14610b8b5760405162461bcd60e51b815260206004820152602260248201527f43726f776466756e643a2046756e64696e67206d75737420626520747261646960448201527f6e670000000000000000000000000000000000000000000000000000000000006064820152608401610644565b6000610b96826106b5565b9050610ba233836111ef565b610bac338261127b565b60408051338152602081018390527f4896181ff8f4543cc00db9fe9b6fb7e6f032b7eb772c72ab1ec1b4d2e03b9369910160405180910390a150506001600055565b6001600160a01b038381166000818152600c602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166000908152600b6020526040902054811115610cb85760405162461bcd60e51b815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e6365006044820152606401610644565b6001600160a01b0383166000908152600b6020526040902054610cdc9082906117f1565b6001600160a01b038085166000908152600b60205260408082209390935590841681522054610d0c90829061177a565b6001600160a01b038084166000818152600b602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610c439085815260200190565b80600a54610d6e919061177a565b600a556001600160a01b0382166000908152600b6020526040902054610d9590829061177a565b6001600160a01b0383166000818152600b60205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109c99085815260200190565b6005547fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347610e1547846106d5565b6040805192835260208301919091520160405180910390a1600354604080517f61d027b30000000000000000000000000000000000000000000000000000000081529051610ed5926001600160a01b0316916361d027b39160048083019260209291908290030181600087803b158015610e8e57600080fd5b505af1158015610ea2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec6919061156e565b610ed047846106d5565b61127b565b600254610eeb906001600160a01b03164761127b565b50565b600060075460ff166001811115610f0757610f07611859565b14610f545760405162461bcd60e51b815260206004820152601f60248201527f43726f776466756e643a2046756e64696e67206d757374206265206f70656e006044820152606401610644565b348114610fc95760405162461bcd60e51b815260206004820152602360248201527f43726f776466756e643a20416d6f756e74206973206e6f742076616c7565207360448201527f656e7400000000000000000000000000000000000000000000000000000000006064820152608401610644565b600454471161108b57610fe483610fdf83610899565b610d60565b811561104c577ffb7955a99240dbf0dd35c467144fb9661fbf7a19839f7d8220400c0dc52e70ae838284611019858789611394565b604080516001600160a01b03909516855260208501939093529183015260608201526080015b60405180910390a1505050565b604080516001600160a01b0385168152602081018390527f4d154d4aae216bed6d0926db77c00df2b57c6b5ba4eee05775de20facede3a7b910161103f565b600061109782476117f1565b905060045481106111105760405162461bcd60e51b815260206004820152602660248201527f43726f776466756e643a2046756e64696e672063617020616c7265616479207260448201527f65616368656400000000000000000000000000000000000000000000000000006064820152608401610644565b60008160045461112091906117f1565b905061112f85610fdf83610899565b8315611196577ffb7955a99240dbf0dd35c467144fb9661fbf7a19839f7d8220400c0dc52e70ae85828661116485898b611394565b604080516001600160a01b039095168552602085019390935291830152606082015260800160405180910390a16111d9565b604080516001600160a01b0387168152602081018390527f4d154d4aae216bed6d0926db77c00df2b57c6b5ba4eee05775de20facede3a7b910160405180910390a15b6111e785610ed083866117f1565b50505b505050565b6001600160a01b0382166000908152600b60205260409020546112139082906117f1565b6001600160a01b0383166000908152600b6020526040902055600a5461123a9082906117f1565b600a556040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016109c9565b804710156112cb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610644565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611318576040519150601f19603f3d011682016040523d82523d6000602084013e61131d565b606091505b50509050806111ea5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610644565b6007546040517f38d37b9b0000000000000000000000000000000000000000000000000000000081526004810184905260009161010090046001600160a01b0316906338d37b9b9060240160206040518083038186803b1580156113f757600080fd5b505afa15801561140b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142f919061167f565b8410156114a45760405162461bcd60e51b815260206004820152602d60248201527f556e61626c652070757263686173652065646974696f6e20776974682061766160448201527f696c61626c6520616d6f756e74000000000000000000000000000000000000006064820152608401610644565b6007546040517f121e4984000000000000000000000000000000000000000000000000000000008152600481018590526001600160a01b0384811660248301526101009092049091169063121e498490604401602060405180830381600087803b15801561151157600080fd5b505af1158015611525573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611549919061167f565b949350505050565b60006020828403121561156357600080fd5b81356106ee8161186f565b60006020828403121561158057600080fd5b81516106ee8161186f565b6000806000606084860312156115a057600080fd5b83356115ab8161186f565b95602085013595506040909401359392505050565b600080604083850312156115d357600080fd5b82356115de8161186f565b915060208301356115ee8161186f565b809150509250929050565b60008060006060848603121561160e57600080fd5b83356116198161186f565b925060208401356116298161186f565b929592945050506040919091013590565b6000806040838503121561164d57600080fd5b82356116588161186f565b946020939093013593505050565b60006020828403121561167857600080fd5b5035919050565b60006020828403121561169157600080fd5b5051919050565b600080604083850312156116ab57600080fd5b8235915060208301356115ee8161186f565b600080604083850312156116d057600080fd5b50508035926020909101359150565b602081016002831061170157634e487b7160e01b600052602160045260246000fd5b91905290565b600060208083528351808285015260005b8181101561173457858101830151858201604001528201611718565b81811115611746576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b6000821982111561178d5761178d611843565b500190565b6000826117af57634e487b7160e01b600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156117ec576117ec611843565b500290565b60008282101561180357611803611843565b500390565b600181811c9082168061181c57607f821691505b6020821081141561183d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0381168114610eeb57600080fdfea26469706673582212200a9ab3eacec586becf9e85c320604231ea2e180e60e1162e5f7f3526bfa3543d64736f6c63430008060033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.