Overview
APE Balance
0.481697101399999999 APE
APE Value
$0.55 (@ $1.15/APE)More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
HeadToHead
Compiler Version
v0.8.28+commit.7893614a
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.28; import {IEntropy} from "@pythnetwork/entropy-sdk-solidity/IEntropy.sol"; import {IEntropyConsumer} from "@pythnetwork/entropy-sdk-solidity/IEntropyConsumer.sol"; struct MatchedBet { address player1; address player2; uint96 amount; } contract HeadToHead is IEntropyConsumer { error InvalidAmount(); error NoMatchAvailable(); error TransferFailed(); IEntropy public constant entropy = IEntropy(0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320); address public constant provider = 0x52DeaA1c84233F7bb8C8A45baeDE41091c616506; // Maps bet amounts to pending players waiting for matches mapping(uint256 => address) public pendingBets; mapping(uint256 => MatchedBet) public matchedBets; event BetPlaced(address indexed player, uint256 amount); event BetMatched(address indexed player1, address indexed player2, uint256 amount); event BetResolved(address indexed winner, address indexed loser, uint256 amount); event BetCancelled(address indexed player, uint256 amount); // Automatically place bet when receiving ETH receive() external payable { _placeBet(); } function entropyCallback( uint64 sequenceNumber, address, bytes32 randomNumber ) internal override { MatchedBet memory bet = matchedBets[sequenceNumber]; address player1 = bet.player1; address player2 = bet.player2; uint256 betAmount = uint256(bet.amount); // Determine winner address winner = uint256(randomNumber) % 2 == 0 ? player1 : player2; address loser = winner == player1 ? player2 : player1; // transfer to winner (bool success,) = winner.call{value: betAmount * 2}(""); if (!success) revert TransferFailed(); emit BetResolved(winner, loser, betAmount); } function _placeBet() internal { // Validate bet amount is a power of 10 ether if (msg.value == 0 || !_isPowerOfTen(msg.value)) revert InvalidAmount(); address opponent = pendingBets[msg.value]; if (opponent == address(0)) { // No match available, store as pending pendingBets[msg.value] = msg.sender; emit BetPlaced(msg.sender, msg.value); } else { // Match found! Remove pending bet and play pendingBets[msg.value] = address(0); _playGame(opponent); } } function _playGame(address opponent) internal { bytes32 pseudoRandomNumber = keccak256(abi.encodePacked(block.timestamp, block.number, msg.sender)); // get the required fee uint128 requestFee = entropy.getFee(provider); // pay the fees and request a random number from entropy uint64 sequenceNumber = entropy.requestWithCallback{ value: requestFee }( provider, pseudoRandomNumber ); matchedBets[sequenceNumber] = MatchedBet(msg.sender, opponent, uint96(msg.value)); emit BetMatched(msg.sender, opponent, msg.value); } function cancelBet(uint256 amount) external { if (pendingBets[amount] != msg.sender) revert NoMatchAvailable(); pendingBets[amount] = address(0); (bool success,) = msg.sender.call{value: amount}(""); if (!success) revert TransferFailed(); emit BetCancelled(msg.sender, amount); } // This method is required by the IEntropyConsumer interface function getEntropy() internal view override returns (address) { return address(entropy); } // Helper function to check if amount is a power of 10 ether function _isPowerOfTen(uint256 amount) internal pure returns (bool) { // First check if it's in whole ether (no wei fractions) if (amount % 1 ether != 0) return false; // Convert to ether units for power of 10 check uint256 etherAmount = amount / 1 ether; // Add safety check for maximum reasonable bet if (etherAmount > 1e9) return false; // Max 1 billion APE // If not 1, keep dividing by 10 and check remainder while (etherAmount > 1) { if (etherAmount % 10 != 0) return false; etherAmount = etherAmount / 10; } return etherAmount == 1; } }
// SPDX-License-Identifier: Apache 2 pragma solidity ^0.8.0; import "./EntropyEvents.sol"; interface IEntropy is EntropyEvents { // Register msg.sender as a randomness provider. The arguments are the provider's configuration parameters // and initial commitment. Re-registering the same provider rotates the provider's commitment (and updates // the feeInWei). // // chainLength is the number of values in the hash chain *including* the commitment, that is, chainLength >= 1. function register( uint128 feeInWei, bytes32 commitment, bytes calldata commitmentMetadata, uint64 chainLength, bytes calldata uri ) external; // Withdraw a portion of the accumulated fees for the provider msg.sender. // Calling this function will transfer `amount` wei to the caller (provided that they have accrued a sufficient // balance of fees in the contract). function withdraw(uint128 amount) external; // Withdraw a portion of the accumulated fees for provider. The msg.sender must be the fee manager for this provider. // Calling this function will transfer `amount` wei to the caller (provided that they have accrued a sufficient // balance of fees in the contract). function withdrawAsFeeManager(address provider, uint128 amount) external; // As a user, request a random number from `provider`. Prior to calling this method, the user should // generate a random number x and keep it secret. The user should then compute hash(x) and pass that // as the userCommitment argument. (You may call the constructUserCommitment method to compute the hash.) // // This method returns a sequence number. The user should pass this sequence number to // their chosen provider (the exact method for doing so will depend on the provider) to retrieve the provider's // number. The user should then call fulfillRequest to construct the final random number. // // This method will revert unless the caller provides a sufficient fee (at least getFee(provider)) as msg.value. // Note that excess value is *not* refunded to the caller. function request( address provider, bytes32 userCommitment, bool useBlockHash ) external payable returns (uint64 assignedSequenceNumber); // Request a random number. The method expects the provider address and a secret random number // in the arguments. It returns a sequence number. // // The address calling this function should be a contract that inherits from the IEntropyConsumer interface. // The `entropyCallback` method on that interface will receive a callback with the generated random number. // // This method will revert unless the caller provides a sufficient fee (at least getFee(provider)) as msg.value. // Note that excess value is *not* refunded to the caller. function requestWithCallback( address provider, bytes32 userRandomNumber ) external payable returns (uint64 assignedSequenceNumber); // Fulfill a request for a random number. This method validates the provided userRandomness and provider's proof // against the corresponding commitments in the in-flight request. If both values are validated, this function returns // the corresponding random number. // // Note that this function can only be called once per in-flight request. Calling this function deletes the stored // request information (so that the contract doesn't use a linear amount of storage in the number of requests). // If you need to use the returned random number more than once, you are responsible for storing it. function reveal( address provider, uint64 sequenceNumber, bytes32 userRevelation, bytes32 providerRevelation ) external returns (bytes32 randomNumber); // Fulfill a request for a random number. This method validates the provided userRandomness // and provider's revelation against the corresponding commitment in the in-flight request. If both values are validated // and the requestor address is a contract address, this function calls the requester's entropyCallback method with the // sequence number, provider address and the random number as arguments. Else if the requestor is an EOA, it won't call it. // // Note that this function can only be called once per in-flight request. Calling this function deletes the stored // request information (so that the contract doesn't use a linear amount of storage in the number of requests). // If you need to use the returned random number more than once, you are responsible for storing it. // // Anyone can call this method to fulfill a request, but the callback will only be made to the original requester. function revealWithCallback( address provider, uint64 sequenceNumber, bytes32 userRandomNumber, bytes32 providerRevelation ) external; function getProviderInfo( address provider ) external view returns (EntropyStructs.ProviderInfo memory info); function getDefaultProvider() external view returns (address provider); function getRequest( address provider, uint64 sequenceNumber ) external view returns (EntropyStructs.Request memory req); function getFee(address provider) external view returns (uint128 feeAmount); function getAccruedPythFees() external view returns (uint128 accruedPythFeesInWei); function setProviderFee(uint128 newFeeInWei) external; function setProviderFeeAsFeeManager( address provider, uint128 newFeeInWei ) external; function setProviderUri(bytes calldata newUri) external; // Set manager as the fee manager for the provider msg.sender. // After calling this function, manager will be able to set the provider's fees and withdraw them. // Only one address can be the fee manager for a provider at a time -- calling this function again with a new value // will override the previous value. Call this function with the all-zero address to disable the fee manager role. function setFeeManager(address manager) external; function constructUserCommitment( bytes32 userRandomness ) external pure returns (bytes32 userCommitment); function combineRandomValues( bytes32 userRandomness, bytes32 providerRandomness, bytes32 blockHash ) external pure returns (bytes32 combinedRandomness); }
// SPDX-License-Identifier: Apache 2 pragma solidity ^0.8.0; abstract contract IEntropyConsumer { // This method is called by Entropy to provide the random number to the consumer. // It asserts that the msg.sender is the Entropy contract. It is not meant to be // override by the consumer. function _entropyCallback( uint64 sequence, address provider, bytes32 randomNumber ) external { address entropy = getEntropy(); require(entropy != address(0), "Entropy address not set"); require(msg.sender == entropy, "Only Entropy can call this function"); entropyCallback(sequence, provider, randomNumber); } // getEntropy returns Entropy contract address. The method is being used to check that the // callback is indeed from Entropy contract. The consumer is expected to implement this method. // Entropy address can be found here - https://docs.pyth.network/entropy/contract-addresses function getEntropy() internal view virtual returns (address); // This method is expected to be implemented by the consumer to handle the random number. // It will be called by _entropyCallback after _entropyCallback ensures that the call is // indeed from Entropy contract. function entropyCallback( uint64 sequence, address provider, bytes32 randomNumber ) internal virtual; }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; import "./EntropyStructs.sol"; interface EntropyEvents { event Registered(EntropyStructs.ProviderInfo provider); event Requested(EntropyStructs.Request request); event RequestedWithCallback( address indexed provider, address indexed requestor, uint64 indexed sequenceNumber, bytes32 userRandomNumber, EntropyStructs.Request request ); event Revealed( EntropyStructs.Request request, bytes32 userRevelation, bytes32 providerRevelation, bytes32 blockHash, bytes32 randomNumber ); event RevealedWithCallback( EntropyStructs.Request request, bytes32 userRandomNumber, bytes32 providerRevelation, bytes32 randomNumber ); event ProviderFeeUpdated(address provider, uint128 oldFee, uint128 newFee); event ProviderUriUpdated(address provider, bytes oldUri, bytes newUri); event ProviderFeeManagerUpdated( address provider, address oldFeeManager, address newFeeManager ); event Withdrawal( address provider, address recipient, uint128 withdrawnAmount ); }
// SPDX-License-Identifier: Apache 2 pragma solidity ^0.8.0; contract EntropyStructs { struct ProviderInfo { uint128 feeInWei; uint128 accruedFeesInWei; // The commitment that the provider posted to the blockchain, and the sequence number // where they committed to this. This value is not advanced after the provider commits, // and instead is stored to help providers track where they are in the hash chain. bytes32 originalCommitment; uint64 originalCommitmentSequenceNumber; // Metadata for the current commitment. Providers may optionally use this field to help // manage rotations (i.e., to pick the sequence number from the correct hash chain). bytes commitmentMetadata; // Optional URI where clients can retrieve revelations for the provider. // Client SDKs can use this field to automatically determine how to retrieve random values for each provider. // TODO: specify the API that must be implemented at this URI bytes uri; // The first sequence number that is *not* included in the current commitment (i.e., an exclusive end index). // The contract maintains the invariant that sequenceNumber <= endSequenceNumber. // If sequenceNumber == endSequenceNumber, the provider must rotate their commitment to add additional random values. uint64 endSequenceNumber; // The sequence number that will be assigned to the next inbound user request. uint64 sequenceNumber; // The current commitment represents an index/value in the provider's hash chain. // These values are used to verify requests for future sequence numbers. Note that // currentCommitmentSequenceNumber < sequenceNumber. // // The currentCommitment advances forward through the provider's hash chain as values // are revealed on-chain. bytes32 currentCommitment; uint64 currentCommitmentSequenceNumber; // An address that is authorized to set / withdraw fees on behalf of this provider. address feeManager; } struct Request { // Storage slot 1 // address provider; uint64 sequenceNumber; // The number of hashes required to verify the provider revelation. uint32 numHashes; // Storage slot 2 // // The commitment is keccak256(userCommitment, providerCommitment). Storing the hash instead of both saves 20k gas by // eliminating 1 store. bytes32 commitment; // Storage slot 3 // // The number of the block where this request was created. // Note that we're using a uint64 such that we have an additional space for an address and other fields in // this storage slot. Although block.number returns a uint256, 64 bits should be plenty to index all of the // blocks ever generated. uint64 blockNumber; // The address that requested this random number. address requester; // If true, incorporate the blockhash of blockNumber into the generated random value. bool useBlockhash; // If true, the requester will be called back with the generated random value. bool isRequestWithCallback; // There are 2 remaining bytes of free space in this slot. } }
{ "remappings": [ "@pythnetwork/entropy-sdk-solidity/=node_modules/@pythnetwork/entropy-sdk-solidity/", "forge-std/=lib/forge-std/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "evmVersion": "paris", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"NoMatchAvailable","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BetCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player1","type":"address"},{"indexed":true,"internalType":"address","name":"player2","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BetMatched","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BetPlaced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"winner","type":"address"},{"indexed":true,"internalType":"address","name":"loser","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BetResolved","type":"event"},{"inputs":[{"internalType":"uint64","name":"sequence","type":"uint64"},{"internalType":"address","name":"provider","type":"address"},{"internalType":"bytes32","name":"randomNumber","type":"bytes32"}],"name":"_entropyCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"cancelBet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"entropy","outputs":[{"internalType":"contract IEntropy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"matchedBets","outputs":[{"internalType":"address","name":"player1","type":"address"},{"internalType":"address","name":"player2","type":"address"},{"internalType":"uint96","name":"amount","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pendingBets","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provider","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052348015600f57600080fd5b506109bc8061001f6000396000f3fe6080604052600436106100595760003560e01c806301abd6d71461006d578063085d4883146100c0578063357401f5146100e857806347ce07cc1461010857806352a5f1f814610130578063c65b4fb11461015057600080fd5b36610068576100666101d2565b005b600080fd5b34801561007957600080fd5b506100a3610088366004610854565b6000602081905290815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100cc57600080fd5b506100a37352deaa1c84233f7bb8c8a45baede41091c61650681565b3480156100f457600080fd5b50610066610103366004610854565b6102a3565b34801561011457600080fd5b506100a37336825bf3fbdf5a29e2d5148bfe7dcf7b5639e32081565b34801561013c57600080fd5b5061006661014b366004610883565b610394565b34801561015c57600080fd5b506101a361016b366004610854565b600160208190526000918252604090912080549101546001600160a01b0391821691811690600160a01b90046001600160601b031683565b604080516001600160a01b0394851681529390921660208401526001600160601b0316908201526060016100b7565b3415806101e557506101e33461042c565b155b156102035760405163162908e360e11b815260040160405180910390fd5b346000908152602081905260409020546001600160a01b03168061027a57346000818152602081815260409182902080546001600160a01b03191633908117909155915192835290917f43e08d78302cdf9c94e1ffd293c2a3696139ee41cf3199b6f5eed9c7f6cc6090910160405180910390a250565b34600090815260208190526040902080546001600160a01b03191690556102a0816104b5565b50565b6000818152602081905260409020546001600160a01b031633146102da576040516301ee2bad60e71b815260040160405180910390fd5b60008181526020819052604080822080546001600160a01b031916905551339083908381818185875af1925050503d8060008114610334576040519150601f19603f3d011682016040523d82523d6000602084013e610339565b606091505b505090508061035b576040516312171d8360e31b815260040160405180910390fd5b60405182815233907f9e58f341ee6224856b97fa9bb85c38d5a631e05e8faf7bd5b756addcf00ac8439060200160405180910390a25050565b7336825bf3fbdf5a29e2d5148bfe7dcf7b5639e3206103b7565b60405180910390fd5b336001600160a01b0382161461041b5760405162461bcd60e51b815260206004820152602360248201527f4f6e6c7920456e74726f70792063616e2063616c6c20746869732066756e637460448201526234b7b760e91b60648201526084016103ae565b6104268484846106e7565b50505050565b6000610440670de0b6b3a7640000836108e6565b1561044d57506000919050565b6000610461670de0b6b3a7640000846108fa565b9050633b9aca008111156104785750600092915050565b60018111156104ac5761048c600a826108e6565b1561049a5750600092915050565b6104a5600a826108fa565b9050610478565b60011492915050565b60004243336040516020016104ef93929190928352602083019190915260601b6bffffffffffffffffffffffff1916604082015260540190565b60408051808303601f19018152908290528051602090910120631711922960e31b82527352deaa1c84233f7bb8c8a45baede41091c616506600483015291506000907336825bf3fbdf5a29e2d5148bfe7dcf7b5639e3209063b88c914890602401602060405180830381865afa15801561056d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610591919061090e565b6040516319cb825f60e01b81527352deaa1c84233f7bb8c8a45baede41091c6165066004820152602481018490529091506000907336825bf3fbdf5a29e2d5148bfe7dcf7b5639e320906319cb825f906001600160801b0385169060440160206040518083038185885af115801561060d573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610632919061093e565b60408051606081018252338082526001600160a01b0388811660208085018281526001600160601b0334818116888a0190815267ffffffffffffffff8b1660009081526001808752908b902099518a549089166001600160a01b0319909116178a5593519051909216600160a01b029190951617950194909455935190815293945091927f8f6aa89dd470c78d8e4fc3d277914983f5b2e18f31268b92bfac0f130e4760d3910160405180910390a350505050565b67ffffffffffffffff83166000908152600160208181526040808420815160608101835281546001600160a01b039081168083529290950154948516938101849052600160a01b9094046001600160601b0316918401829052929361074d6002876108e6565b15610758578261075a565b835b90506000846001600160a01b0316826001600160a01b03161461077d578461077f565b835b905060006001600160a01b03831661079885600261095b565b604051600081818185875af1925050503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50509050806107fb576040516312171d8360e31b815260040160405180910390fd5b816001600160a01b0316836001600160a01b03167f06c7c914495a46593321b59e2a44ae69d0d784ffb825f7ea0e3529000dd5fdd48660405161084091815260200190565b60405180910390a350505050505050505050565b60006020828403121561086657600080fd5b5035919050565b67ffffffffffffffff811681146102a057600080fd5b60008060006060848603121561089857600080fd5b83356108a38161086d565b925060208401356001600160a01b03811681146108bf57600080fd5b929592945050506040919091013590565b634e487b7160e01b600052601260045260246000fd5b6000826108f5576108f56108d0565b500690565b600082610909576109096108d0565b500490565b60006020828403121561092057600080fd5b81516001600160801b038116811461093757600080fd5b9392505050565b60006020828403121561095057600080fd5b81516109378161086d565b808202811582820484141761098057634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220d10eb145571cecd7910b0ad617390a92a232012b8634603c6e234e00aaec4e0c64736f6c634300081c0033
Deployed Bytecode
0x6080604052600436106100595760003560e01c806301abd6d71461006d578063085d4883146100c0578063357401f5146100e857806347ce07cc1461010857806352a5f1f814610130578063c65b4fb11461015057600080fd5b36610068576100666101d2565b005b600080fd5b34801561007957600080fd5b506100a3610088366004610854565b6000602081905290815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100cc57600080fd5b506100a37352deaa1c84233f7bb8c8a45baede41091c61650681565b3480156100f457600080fd5b50610066610103366004610854565b6102a3565b34801561011457600080fd5b506100a37336825bf3fbdf5a29e2d5148bfe7dcf7b5639e32081565b34801561013c57600080fd5b5061006661014b366004610883565b610394565b34801561015c57600080fd5b506101a361016b366004610854565b600160208190526000918252604090912080549101546001600160a01b0391821691811690600160a01b90046001600160601b031683565b604080516001600160a01b0394851681529390921660208401526001600160601b0316908201526060016100b7565b3415806101e557506101e33461042c565b155b156102035760405163162908e360e11b815260040160405180910390fd5b346000908152602081905260409020546001600160a01b03168061027a57346000818152602081815260409182902080546001600160a01b03191633908117909155915192835290917f43e08d78302cdf9c94e1ffd293c2a3696139ee41cf3199b6f5eed9c7f6cc6090910160405180910390a250565b34600090815260208190526040902080546001600160a01b03191690556102a0816104b5565b50565b6000818152602081905260409020546001600160a01b031633146102da576040516301ee2bad60e71b815260040160405180910390fd5b60008181526020819052604080822080546001600160a01b031916905551339083908381818185875af1925050503d8060008114610334576040519150601f19603f3d011682016040523d82523d6000602084013e610339565b606091505b505090508061035b576040516312171d8360e31b815260040160405180910390fd5b60405182815233907f9e58f341ee6224856b97fa9bb85c38d5a631e05e8faf7bd5b756addcf00ac8439060200160405180910390a25050565b7336825bf3fbdf5a29e2d5148bfe7dcf7b5639e3206103b7565b60405180910390fd5b336001600160a01b0382161461041b5760405162461bcd60e51b815260206004820152602360248201527f4f6e6c7920456e74726f70792063616e2063616c6c20746869732066756e637460448201526234b7b760e91b60648201526084016103ae565b6104268484846106e7565b50505050565b6000610440670de0b6b3a7640000836108e6565b1561044d57506000919050565b6000610461670de0b6b3a7640000846108fa565b9050633b9aca008111156104785750600092915050565b60018111156104ac5761048c600a826108e6565b1561049a5750600092915050565b6104a5600a826108fa565b9050610478565b60011492915050565b60004243336040516020016104ef93929190928352602083019190915260601b6bffffffffffffffffffffffff1916604082015260540190565b60408051808303601f19018152908290528051602090910120631711922960e31b82527352deaa1c84233f7bb8c8a45baede41091c616506600483015291506000907336825bf3fbdf5a29e2d5148bfe7dcf7b5639e3209063b88c914890602401602060405180830381865afa15801561056d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610591919061090e565b6040516319cb825f60e01b81527352deaa1c84233f7bb8c8a45baede41091c6165066004820152602481018490529091506000907336825bf3fbdf5a29e2d5148bfe7dcf7b5639e320906319cb825f906001600160801b0385169060440160206040518083038185885af115801561060d573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610632919061093e565b60408051606081018252338082526001600160a01b0388811660208085018281526001600160601b0334818116888a0190815267ffffffffffffffff8b1660009081526001808752908b902099518a549089166001600160a01b0319909116178a5593519051909216600160a01b029190951617950194909455935190815293945091927f8f6aa89dd470c78d8e4fc3d277914983f5b2e18f31268b92bfac0f130e4760d3910160405180910390a350505050565b67ffffffffffffffff83166000908152600160208181526040808420815160608101835281546001600160a01b039081168083529290950154948516938101849052600160a01b9094046001600160601b0316918401829052929361074d6002876108e6565b15610758578261075a565b835b90506000846001600160a01b0316826001600160a01b03161461077d578461077f565b835b905060006001600160a01b03831661079885600261095b565b604051600081818185875af1925050503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50509050806107fb576040516312171d8360e31b815260040160405180910390fd5b816001600160a01b0316836001600160a01b03167f06c7c914495a46593321b59e2a44ae69d0d784ffb825f7ea0e3529000dd5fdd48660405161084091815260200190565b60405180910390a350505050505050505050565b60006020828403121561086657600080fd5b5035919050565b67ffffffffffffffff811681146102a057600080fd5b60008060006060848603121561089857600080fd5b83356108a38161086d565b925060208401356001600160a01b03811681146108bf57600080fd5b929592945050506040919091013590565b634e487b7160e01b600052601260045260246000fd5b6000826108f5576108f56108d0565b500690565b600082610909576109096108d0565b500490565b60006020828403121561092057600080fd5b81516001600160801b038116811461093757600080fd5b9392505050565b60006020828403121561095057600080fd5b81516109378161086d565b808202811582820484141761098057634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220d10eb145571cecd7910b0ad617390a92a232012b8634603c6e234e00aaec4e0c64736f6c634300081c0033
Deployed Bytecode Sourcemap
311:4015:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1178:11;:9;:11::i;:::-;311:4015;;;;;683:46;;;;;;;;;;-1:-1:-1;683:46:4;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;683:46:4;;;;;;-1:-1:-1;;;;;363:32:5;;;345:51;;333:2;318:18;683:46:4;;;;;;;;536:77;;;;;;;;;;;;571:42;536:77;;3101:325;;;;;;;;;;-1:-1:-1;3101:325:4;;;;;:::i;:::-;;:::i;443:87::-;;;;;;;;;;;;487:42;443:87;;307:375:3;;;;;;;;;;-1:-1:-1;307:375:3;;;;;:::i;:::-;;:::i;735:49:4:-;;;;;;;;;;-1:-1:-1;735:49:4;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;735:49:4;;;;;;;-1:-1:-1;;;735:49:4;;-1:-1:-1;;;;;735:49:4;;;;;;;-1:-1:-1;;;;;1483:32:5;;;1465:51;;1552:32;;;;1547:2;1532:18;;1525:60;-1:-1:-1;;;;;1621:39:5;1601:18;;;1594:67;1453:2;1438:18;735:49:4;1265:402:5;1896:580:4;1994:9;:14;;:43;;;2013:24;2027:9;2013:13;:24::i;:::-;2012:25;1994:43;1990:71;;;2046:15;;-1:-1:-1;;;2046:15:4;;;;;;;;;;;1990:71;2103:9;2072:16;2091:22;;;;;;;;;;;-1:-1:-1;;;;;2091:22:4;;2124:346;;2230:9;2218:11;:22;;;;;;;;;;;;:35;;-1:-1:-1;;;;;;2218:35:4;2243:10;2218:35;;;;;;2272:32;;1818:25:5;;;2243:10:4;;2272:32;;1791:18:5;2272:32:4;;;;;;;1926:550;1896:580::o;2124:346::-;2403:9;2424:1;2391:22;;;;;;;;;;:35;;-1:-1:-1;;;;;;2391:35:4;;;2440:19;2450:8;2440:9;:19::i;:::-;1926:550;1896:580::o;3101:325::-;3159:11;:19;;;;;;;;;;;-1:-1:-1;;;;;3159:19:4;3182:10;3159:33;3155:64;;3201:18;;-1:-1:-1;;;3201:18:4;;;;;;;;;;;3155:64;3260:1;3230:19;;;;;;;;;;;:32;;-1:-1:-1;;;;;;3230:32:4;;;3290:34;:10;;3230:19;;3260:1;3290:34;3260:1;3290:34;3230:19;3290:10;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3272:52;;;3339:7;3334:37;;3355:16;;-1:-1:-1;;;3355:16:4;;;;;;;;;;;3334:37;3387:32;;1818:25:5;;;3400:10:4;;3387:32;;1806:2:5;1791:18;3387:32:4;;;;;;;3145:281;3101:325;:::o;307:375:3:-;487:42:4;479:57:3;;;;;;;;;;;554:10;-1:-1:-1;;;;;554:21:3;;;546:69;;;;-1:-1:-1;;;546:69:3;;2618:2:5;546:69:3;;;2600:21:5;2657:2;2637:18;;;2630:30;2696:34;2676:18;;;2669:62;-1:-1:-1;;;2747:18:5;;;2740:33;2790:19;;546:69:3;2416:399:5;546:69:3;626:49;642:8;652;662:12;626:15;:49::i;:::-;429:253;307:375;;;:::o;3671:653:4:-;3733:4;3818:16;3827:7;3818:6;:16;:::i;:::-;:21;3814:39;;-1:-1:-1;3848:5:4;;3671:653;-1:-1:-1;3671:653:4:o;3814:39::-;3920:19;3942:16;3951:7;3942:6;:16;:::i;:::-;3920:38;;4042:3;4028:11;:17;4024:35;;;-1:-1:-1;4054:5:4;;3671:653;-1:-1:-1;;3671:653:4:o;4024:35::-;4173:1;4159:11;:15;4152:132;;;4194:16;4208:2;4194:11;:16;:::i;:::-;:21;4190:39;;-1:-1:-1;4224:5:4;;3671:653;-1:-1:-1;;3671:653:4:o;4190:39::-;4257:16;4271:2;4257:11;:16;:::i;:::-;4243:30;;4152:132;;;4316:1;4301:16;;3671:653;-1:-1:-1;;3671:653:4:o;2482:613::-;2538:26;2594:15;2611:12;2625:10;2577:59;;;;;;;;;3379:19:5;;;3423:2;3414:12;;3407:28;;;;3473:2;3469:15;-1:-1:-1;;3465:53:5;3460:2;3451:12;;3444:75;3544:2;3535:12;;3194:359;2577:59:4;;;;;;;-1:-1:-1;;2577:59:4;;;;;;;2567:70;;2577:59;2567:70;;;;-1:-1:-1;;;2701:24:4;;571:42;2701:24;;;345:51:5;2567:70:4;-1:-1:-1;2680:18:4;;487:42;;2701:14;;318:18:5;;2701:24:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2825:112;;-1:-1:-1;;;2825:112:4;;571:42;2825:112;;;4042:51:5;4109:18;;;4102:34;;;2680:45:4;;-1:-1:-1;2801:21:4;;487:42;;2825:27;;-1:-1:-1;;;;;2825:112:4;;;4015:18:5;;2825:112:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2978:51;;;;;;;;2989:10;2978:51;;;-1:-1:-1;;;;;2978:51:4;;;;;;;;;;-1:-1:-1;;;;;3018:9:4;2978:51;;;;;;;;;2948:27;;;-1:-1:-1;2948:27:4;;;:11;:27;;;;;;;:81;;;;;;;-1:-1:-1;;;;;;2948:81:4;;;;;;;;;;;;;-1:-1:-1;;;2948:81:4;;;;;;;;;;;;3045:43;;1818:25:5;;;2948:27:4;;-1:-1:-1;2978:51:4;;3045:43;;1791:18:5;3045:43:4;;;;;;;2528:567;;;2482:613;:::o;1202:688::-;1363:27;;;1339:21;1363:27;;;:11;:27;;;;;;;;1339:51;;;;;;;;;-1:-1:-1;;;;;1339:51:4;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1339:51:4;;;-1:-1:-1;;;;;1339:51:4;;;;;;;;;1574:25;1598:1;1582:12;1574:25;:::i;:::-;:30;:50;;1617:7;1574:50;;;1607:7;1574:50;1557:67;;1634:13;1660:7;-1:-1:-1;;;;;1650:17:4;:6;-1:-1:-1;;;;;1650:17:4;;:37;;1680:7;1650:37;;;1670:7;1650:37;1634:53;-1:-1:-1;1729:12:4;-1:-1:-1;;;;;1746:11:4;;1765:13;:9;1777:1;1765:13;:::i;:::-;1746:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1728:55;;;1798:7;1793:37;;1814:16;;-1:-1:-1;;;1814:16:4;;;;;;;;;;;1793:37;1866:5;-1:-1:-1;;;;;1846:37:4;1858:6;-1:-1:-1;;;;;1846:37:4;;1873:9;1846:37;;;;1818:25:5;;1806:2;1791:18;;1672:177;1846:37:4;;;;;;;;1329:561;;;;;;;1202:688;;;:::o;14:180:5:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:5;;14:180;-1:-1:-1;14:180:5:o;631:129::-;716:18;709:5;705:30;698:5;695:41;685:69;;750:1;747;740:12;765:495;841:6;849;857;910:2;898:9;889:7;885:23;881:32;878:52;;;926:1;923;916:12;878:52;965:9;952:23;984:30;1008:5;984:30;:::i;:::-;1033:5;-1:-1:-1;1090:2:5;1075:18;;1062:32;-1:-1:-1;;;;;1125:33:5;;1113:46;;1103:74;;1173:1;1170;1163:12;1103:74;765:495;;1196:7;;-1:-1:-1;;;1250:2:5;1235:18;;;;1222:32;;765:495::o;2820:127::-;2881:10;2876:3;2872:20;2869:1;2862:31;2912:4;2909:1;2902:15;2936:4;2933:1;2926:15;2952:112;2984:1;3010;3000:35;;3015:18;;:::i;:::-;-1:-1:-1;3049:9:5;;2952:112::o;3069:120::-;3109:1;3135;3125:35;;3140:18;;:::i;:::-;-1:-1:-1;3174:9:5;;3069:120::o;3558:305::-;3628:6;3681:2;3669:9;3660:7;3656:23;3652:32;3649:52;;;3697:1;3694;3687:12;3649:52;3729:9;3723:16;-1:-1:-1;;;;;3772:5:5;3768:46;3761:5;3758:57;3748:85;;3829:1;3826;3819:12;3748:85;3852:5;3558:305;-1:-1:-1;;;3558:305:5:o;4147:249::-;4216:6;4269:2;4257:9;4248:7;4244:23;4240:32;4237:52;;;4285:1;4282;4275:12;4237:52;4317:9;4311:16;4336:30;4360:5;4336:30;:::i;4401:265::-;4474:9;;;4505;;4522:15;;;4516:22;;4502:37;4492:168;;4582:10;4577:3;4573:20;4570:1;4563:31;4617:4;4614:1;4607:15;4645:4;4642:1;4635:15;4492:168;4401:265;;;;:::o
Swarm Source
ipfs://d10eb145571cecd7910b0ad617390a92a232012b8634603c6e234e00aaec4e0c
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
APE | Ape (APE) | 100.00% | $1.15 | 0.4817 | $0.552916 |
[ Download: CSV Export ]
[ 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.