Source Code
Overview
APE Balance
More Info
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Coinflip
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 2000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Coinflip * @dev A contract for a fair coin flip game */ contract Coinflip { struct Flip { address player; uint8 choice; // 1 for heads, 2 for tails uint256 timestamp; } uint256 public constant BET_AMOUNT = 0.001 ether; uint8 public constant HEADS = 1; uint8 public constant TAILS = 2; uint8 public constant MAX_FLIPS = 11; uint8 public constant WIN_THRESHOLD = 5; // Number of heads or tails needed to win minus 1 // Reentrancy guard bool private _locked; mapping(uint256 => Flip) public flips; mapping(address => uint256) public pendingWithdrawals; uint256 public nextFlipId; uint256 public pendingFlipId; event FlipInitiated( uint256 indexed flipId, address indexed player, uint8 choice ); event FlipResolved( uint256 indexed flipId, address indexed player, bool won, bool paid ); event Withdrawal(address indexed player, uint256 amount); constructor() {} /** * @dev Modifier to prevent reentrancy attacks */ modifier nonReentrant() { require(!_locked, "ReentrancyGuard: reentrant call"); _locked = true; _; _locked = false; } /** * @dev Choose a side for the coinflip (heads or tails) * @param choice 1 for heads, 2 for tails * @return The flip ID */ function flipCoin( uint8 choice ) external payable nonReentrant returns (uint256) { require( choice == HEADS || choice == TAILS, "Invalid choice: must be 1 (heads) or 2 (tails)" ); require(msg.value == BET_AMOUNT, "Bet amount must be exactly 1 ether"); uint256 flipId = nextFlipId++; flips[flipId] = Flip({ player: msg.sender, choice: choice, timestamp: block.timestamp }); // Resolve the pending flip if one exists if (flipId > 1) { _resolvePreviousFlip(flipId); } emit FlipInitiated(flipId, msg.sender, choice); return flipId; } /** * @dev Check the result of a flip * @param flipId The ID of the flip to check * @return True if the player won, false otherwise */ function checkResult(uint256 flipId) external view returns (bool) { require(flipId > 0, "Invalid flip ID"); require(flipId < nextFlipId, "Wait until next flip has started"); Flip storage flip = flips[flipId]; uint8 flipResult = _flipResult(flip, flips[flipId + 1]); bool isHeads = flipResult == HEADS; // Determine if old flip won bool flipWon = (flip.choice == HEADS && isHeads) || (flip.choice == TAILS && !isHeads); return flipWon; } /** * @dev Withdraw pending winnings */ function withdraw() external nonReentrant { uint256 amount = pendingWithdrawals[msg.sender]; require(amount > 0, "No pending withdrawals"); pendingWithdrawals[msg.sender] = 0; (bool success, ) = payable(msg.sender).call{value: amount}(""); require(success, "Transfer failed"); emit Withdrawal(msg.sender, amount); } /** * @dev Internal function to resolve a flip * @param flipId The ID of the new flip that will resolve the pending one */ function _resolvePreviousFlip(uint256 flipId) private { uint256 previousFlipId = flipId - 1; Flip storage previousFlip = flips[previousFlipId - 1]; Flip storage currentFlip = flips[flipId]; uint8 flipResult = _flipResult(previousFlip, currentFlip); bool isHeads = flipResult == HEADS; // Determine if old flip won bool flipWon = (previousFlip.choice == HEADS && isHeads) || (previousFlip.choice == TAILS && !isHeads); bool paid = false; // If player won, try to pay immediately if (flipWon) { uint256 winAmount = BET_AMOUNT * 2; // Try immediate payout if there's enough balance if (address(this).balance >= winAmount) { paid = _tryPayment(previousFlip.player, winAmount); } // If immediate payment failed, add to pending withdrawals if (!paid) { pendingWithdrawals[previousFlip.player] += winAmount; } } emit FlipResolved(previousFlipId, previousFlip.player, flipWon, paid); } function _flipResult( Flip storage flip, Flip storage nextFlip ) internal view returns (uint8) { uint256 headsCount = 0; uint256 tailsCount = 0; for (uint256 i = 0; i < MAX_FLIPS; i++) { // Generate the result using hash of both players' data bytes32 hash = sha256( abi.encodePacked( flip.player, flip.choice, nextFlip.player, nextFlip.timestamp ) ); // Extract first byte from the hash (values 0-255) uint8 resultValue = uint8(hash[0]); // Determine the result: heads if higher than half range, tails otherwise // Single byte max value is 255, so half is 127 bool isHeads = resultValue > 127; if (isHeads) { if (headsCount == WIN_THRESHOLD) { return HEADS; } headsCount++; } else { if (tailsCount == WIN_THRESHOLD) { return TAILS; } tailsCount++; } } } /** * @dev Try to make a payment to a winner * @param player Address of the player to pay * @param amount Amount to pay * @return success Whether the payment was successful */ function _tryPayment( address player, uint256 amount ) private returns (bool) { (bool success, ) = payable(player).call{value: amount}(""); return success; } /** * @dev Get the amount of pending withdrawals for an address * @param player Address to check * @return Amount of pending withdrawals */ function getPendingWithdrawal( address player ) external view returns (uint256) { return pendingWithdrawals[player]; } }
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 2000, "details": { "yulDetails": { "optimizerSteps": "u" } } }, "debug": { "revertStrings": "debug" }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"flipId","type":"uint256"},{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint8","name":"choice","type":"uint8"}],"name":"FlipInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"flipId","type":"uint256"},{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"bool","name":"won","type":"bool"},{"indexed":false,"internalType":"bool","name":"paid","type":"bool"}],"name":"FlipResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[],"name":"BET_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HEADS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FLIPS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TAILS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WIN_THRESHOLD","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"flipId","type":"uint256"}],"name":"checkResult","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"choice","type":"uint8"}],"name":"flipCoin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"flips","outputs":[{"internalType":"address","name":"player","type":"address"},{"internalType":"uint8","name":"choice","type":"uint8"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"}],"name":"getPendingWithdrawal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextFlipId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingFlipId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"pendingWithdrawals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523460195760405161133e61006e823961133e90f35b6084602360405190565b62461bcd60e51b815260206004820152602260248201527f45746865722073656e7420746f206e6f6e2d70617961626c652066756e63746960448201526137b760f11b6064820152fdfe6080604052600436106105d35760003560e01c80631995cec6146100dc578063310e769f146100d75780633ccfd60b146100d25780633f9326af146100cd5780634ca1a838146100c85780636afa82ea146100c357806370d9235a146100be5780637640202f146100b95780637ee8b2f8146100b4578063a8239f70146100af578063e132f79e146100aa578063e9f9d28b146100a55763f3f43703036105d3576105b8565b610537565b61051c565b6104f5565b6104c8565b610483565b610437565b610332565b6102e5565b6102a7565b610265565b61024a565b6101ff565b60846100ec60405190565b62461bcd60e51b815260206004820152602260248201527f45746865722073656e7420746f206e6f6e2d70617961626c652066756e63746960448201527f6f6e0000000000000000000000000000000000000000000000000000000000006064820152fd5b608461015c60405190565b62461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a207475706c65206461746120746f6f2073686f60448201527f72740000000000000000000000000000000000000000000000000000000000006064820152fd5b60009103126101cc57565b610151565b6101e16101de6101de9290565b90565b60ff1690565b6101de60016101d1565b6101de6101e7565b9052565b565b346102335761020f3660046101c1565b61022f61021a6101f1565b6040515b9182918260ff909116815260200190565b0390f35b6100e1565b6101de60056101d1565b6101de610238565b346102335761025a3660046101c1565b61022f61021a610242565b34610233576102753660046101c1565b61027d610946565b604051005b6101de6101de6101de9290565b6101de66038d7ea4c68000610282565b6101de61028f565b34610233576102b73660046101c1565b61022f6102c261029f565b6040515b9182918290815260200190565b6101de60026101d1565b6101de6102d3565b34610233576102f53660046101c1565b61022f61021a6102dd565b60ff81165b0361030c57565b600080fd5b905035906101fd82610300565b906020828203126101cc576101de91610311565b61022f6102c261034336600461031e565b610ca1565b80610305565b905035906101fd82610348565b906020828203126101cc576101de9161034e565b9061037990610282565b600052602052604060002090565b6101de905b73ffffffffffffffffffffffffffffffffffffffff1690565b6101de9054610387565b6101de9060a01c6101e1565b6101de90546103af565b6101de9081565b6101de90546103c5565b6103e190600161036f565b6103ea816103a5565b916101de60016103f9846103bb565b93016103cc565b6101f99061038c565b6040906104336101fd949695939661042960608401986000850190610400565b60ff166020830152565b0152565b346102335761022f61045261044d36600461035b565b6103d6565b60405191939193849384610409565b6101de916008021c81565b906101de9154610461565b6101de6000600361046c565b34610233576104933660046101c1565b61022f6102c2610477565b6103058161038c565b905035906101fd8261049e565b906020828203126101cc576101de916104a7565b346102335761022f6102c26104de3660046104b4565b610cac565b6101de600b6101d1565b6101de6104e3565b34610233576105053660046101c1565b61022f61021a6104ed565b6101de6000600461046c565b346102335761052c3660046101c1565b61022f6102c2610510565b346102335761022f61055261054d36600461035b565b610d7c565b60405191829182901515815260200190565b61038c6101de6101de9273ffffffffffffffffffffffffffffffffffffffff1690565b6101de90610564565b6101de90610587565b9061037990610590565b60006105b36101de926002610599565b61046c565b346102335761022f6102c26105ce3660046104b4565b6105a3565b60846105de60405190565b62461bcd60e51b815260206004820152603560248201527f436f6e747261637420646f6573206e6f7420686176652066616c6c6261636b2060448201527f6e6f7220726563656976652066756e6374696f6e7300000000000000000000006064820152fd5b6101de906101e1565b6101de9054610643565b0190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b1561069857565b60405162461bcd60e51b8152806106b16004820161065a565b0390fd5b9060ff905b9181191691161790565b151590565b906106d96101de6106e0926106c4565b82546106b5565b9055565b6106fd6106f86106f4600061064c565b1590565b610691565b610709600160006106c9565b61071161088f565b6101fd6000806106c9565b60208082526016908201527f4e6f2070656e64696e67207769746864726177616c7300000000000000000000604082015260600190565b1561075a57565b60405162461bcd60e51b8152806106b16004820161071c565b90600019906106ba565b9061078d6101de6106e092610282565b8254610773565b634e487b7160e01b600052604160045260246000fd5b90601f01601f1916810190811067ffffffffffffffff8211176107cc57604052565b610794565b906101fd6107de60405190565b92836107aa565b67ffffffffffffffff81116107cc57602090601f01601f19160190565b9061081461080f836107e5565b6107d1565b918252565b3d15610833576108283d610802565b903d6000602084013e565b606090565b6020808252600f908201527f5472616e73666572206661696c65640000000000000000000000000000000000604082015260600190565b1561087657565b60405162461bcd60e51b8152806106b160048201610838565b6108a261089d336002610599565b6103cc565b6108b66108af6000610282565b8211610753565b6108d36108c36000610282565b6108ce336002610599565b61077d565b61090a6000806108ea6108e533610590565b610590565b60405185816108f8816101de565b03925af1610904610819565b5061086f565b7f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b6561094161093733610590565b926102c660405190565b0390a2565b6101fd6106e4565b90610974916109636106f86106f4600061064c565b61096f600160006106c9565b610b94565b906101fd6000806106c9565b6020808252602e908201527f496e76616c69642063686f6963653a206d75737420626520312028686561647360408201527f29206f72203220287461696c7329000000000000000000000000000000000000606082015260800190565b156109e457565b60405162461bcd60e51b8152806106b160048201610980565b60208082526022908201527f42657420616d6f756e74206d7573742062652065786163746c7920312065746860408201527f6572000000000000000000000000000000000000000000000000000000000000606082015260800190565b15610a6157565b60405162461bcd60e51b8152806106b1600482016109fd565b634e487b7160e01b600052601160045260246000fd5b6000198114610a9f5760010190565b610a7a565b6101de60606107d1565b906101f99061038c565b6101de905161038c565b9073ffffffffffffffffffffffffffffffffffffffff906106ba565b90610aee6101de6106e092610590565b8254610ac2565b5160ff1690565b9074ff00000000000000000000000000000000000000009060a01b6106ba565b6101e16101de6101de9260ff1690565b90610b3c6101de6106e092610b1c565b8254610afc565b5190565b6101fd91600190610b8390604090610b7d85610b6b610b6584610ab8565b82610ade565b610b7760208401610af5565b90610b2c565b01610b43565b910161077d565b906101fd91610b47565b50610ba06101e16101e7565b60ff8216148015610c86575b610bb5906109dd565b610bca610bc36101de61028f565b3414610a5a565b610bd460036103cc565b90610be8610be183610a90565b600361077d565b610c21610bf3610aa4565b610bfd3382610aae565b60ff83166020820152610c11426040830152565b610c1c84600161036f565b610b8a565b610c2b6001610282565b8211610c78575b610c3b82610282565b7faa5634ee0c6d2385c65bc0cf9a8d15cc4c4514a311da9a1fc7053d894524b934610c72610c6833610590565b9361021e60405190565b0390a390565b610c8182610e8d565b610c32565b50610bb5610c956101e16102d3565b60ff8316149050610bac565b6101de90600061094e565b61089d6101de91610cbb600090565b506002610599565b6020808252600f908201527f496e76616c696420666c69702049440000000000000000000000000000000000604082015260600190565b15610d0157565b60405162461bcd60e51b8152806106b160048201610cc3565b6020808252818101527f5761697420756e74696c206e65787420666c6970206861732073746172746564604082015260600190565b15610d5657565b60405162461bcd60e51b8152806106b160048201610d1a565b91908201809211610a9f57565b610d90610d896000610282565b8211610cfa565b610da7610da06101de60036103cc565b8210610d4f565b610dde610dd86101de6001610dd2610dc26101de878461036f565b95610dcc83610282565b90610d6f565b9061036f565b8261117f565b906000610de96101e7565b92610df960ff85165b9160ff1690565b14910191610e13610df2610e0c856103bb565b9260ff1690565b149182610e51575b8215610e2657505090565b610e319192506103bb565b610e3f610df26101e16102d3565b149081610e4b575b5090565b15905090565b91508091610e1b565b91908203918211610a9f57565b81810292918115918404141715610a9f57565b9015158152901515602082015260400190565b600190610ed6610ed06101de610eab610ea586610282565b85610e5a565b93610eca6101de610ec4610ebe89610282565b88610e5a565b8861036f565b9561036f565b8361117f565b91610edf6101e7565b92610eec60ff8516610df2565b146000820193610f01610df2610e0c876103bb565b14938461107f575b841561102a575b5050827f7b1bf55fd6fc99a16b04696b3f617f0ffb985829fe70c95fccec5f94927b457d91600091610f76575b610f55610f4f6000610f5b93016103a5565b94610282565b93610590565b93610f71610f6860405190565b92839283610e7a565b0390a3565b610f91610f8161028f565b610f8b6002610282565b90610e67565b610f9a30610590565b8190311015610ffc575b610f5b91610f5591610f4f916000918615610fc5575b509350505050610f3d565b610ff690610ff0610fe1610fda8686016103a5565b6002610599565b91610feb836103cc565b610d6f565b9061077d565b38610fba565b9150610f55610f4f60008361101e8661101984610f5b98016103a5565b6112ce565b95935093505050610fa4565b7f7b1bf55fd6fc99a16b04696b3f617f0ffb985829fe70c95fccec5f94927b457d929450611057906103bb565b611065610df26101e16102d3565b149081611076575b50929038610f10565b1590503861106d565b93508093610f09565b60010190565b6101de6101de6101de9260ff1690565b60601b90565b6101de9061109e565b6110b96101f99161038c565b6110a4565b60f81b90565b6101f99060ff166110be565b926110fe6001610656946110f66014886110ee60209b9a83996110ad565b0180926110c4565b0180926110ad565b01918252565b60005b8381106111175750506000910152565b8181015183820152602001611107565b61065661113f92602092611139815190565b94859290565b93849101611104565b6101de91611127565b6040513d6000823e3d90fd5b634e487b7160e01b600052603260045260246000fd5b6101de9060f81c610b1c565b9091600091600061118f81610282565b948592865b6111a461119f6104e3565b61108e565b8810156112c45760208461120c8185016112006111c96111c3836103a5565b926103bb565b6111d4858a016103a5565b926111f46111e460018c016103cc565b6040519586948a860194856110d0565b908103825203826107aa565b60405191829182611148565b039060025afa156112bf57835161122285610282565b60208110156112ba5761123991901a60f81b611173565b611246610df2607f6101d1565b11156112855761125761119f610238565b81146112755761126961126f91610a90565b97611088565b96611194565b50505050509150506101de6101e7565b969361129261119f610238565b81146112aa576112a461126f91610a90565b94611088565b50505050509150506101de6102d3565b61115d565b611151565b5050505050909150565b6000916112e76108e584936112e1600090565b50610590565b906112f160405190565b90816112fc816101de565b03925af1610e4761081956fea2646970667358221220dd5dd5f3b451fa2f8ce4fec3d98422106847fe9b5ed99cea6ef8f8ee4e06b53364736f6c634300081c0033
Deployed Bytecode
0x6080604052600436106105d35760003560e01c80631995cec6146100dc578063310e769f146100d75780633ccfd60b146100d25780633f9326af146100cd5780634ca1a838146100c85780636afa82ea146100c357806370d9235a146100be5780637640202f146100b95780637ee8b2f8146100b4578063a8239f70146100af578063e132f79e146100aa578063e9f9d28b146100a55763f3f43703036105d3576105b8565b610537565b61051c565b6104f5565b6104c8565b610483565b610437565b610332565b6102e5565b6102a7565b610265565b61024a565b6101ff565b60846100ec60405190565b62461bcd60e51b815260206004820152602260248201527f45746865722073656e7420746f206e6f6e2d70617961626c652066756e63746960448201527f6f6e0000000000000000000000000000000000000000000000000000000000006064820152fd5b608461015c60405190565b62461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a207475706c65206461746120746f6f2073686f60448201527f72740000000000000000000000000000000000000000000000000000000000006064820152fd5b60009103126101cc57565b610151565b6101e16101de6101de9290565b90565b60ff1690565b6101de60016101d1565b6101de6101e7565b9052565b565b346102335761020f3660046101c1565b61022f61021a6101f1565b6040515b9182918260ff909116815260200190565b0390f35b6100e1565b6101de60056101d1565b6101de610238565b346102335761025a3660046101c1565b61022f61021a610242565b34610233576102753660046101c1565b61027d610946565b604051005b6101de6101de6101de9290565b6101de66038d7ea4c68000610282565b6101de61028f565b34610233576102b73660046101c1565b61022f6102c261029f565b6040515b9182918290815260200190565b6101de60026101d1565b6101de6102d3565b34610233576102f53660046101c1565b61022f61021a6102dd565b60ff81165b0361030c57565b600080fd5b905035906101fd82610300565b906020828203126101cc576101de91610311565b61022f6102c261034336600461031e565b610ca1565b80610305565b905035906101fd82610348565b906020828203126101cc576101de9161034e565b9061037990610282565b600052602052604060002090565b6101de905b73ffffffffffffffffffffffffffffffffffffffff1690565b6101de9054610387565b6101de9060a01c6101e1565b6101de90546103af565b6101de9081565b6101de90546103c5565b6103e190600161036f565b6103ea816103a5565b916101de60016103f9846103bb565b93016103cc565b6101f99061038c565b6040906104336101fd949695939661042960608401986000850190610400565b60ff166020830152565b0152565b346102335761022f61045261044d36600461035b565b6103d6565b60405191939193849384610409565b6101de916008021c81565b906101de9154610461565b6101de6000600361046c565b34610233576104933660046101c1565b61022f6102c2610477565b6103058161038c565b905035906101fd8261049e565b906020828203126101cc576101de916104a7565b346102335761022f6102c26104de3660046104b4565b610cac565b6101de600b6101d1565b6101de6104e3565b34610233576105053660046101c1565b61022f61021a6104ed565b6101de6000600461046c565b346102335761052c3660046101c1565b61022f6102c2610510565b346102335761022f61055261054d36600461035b565b610d7c565b60405191829182901515815260200190565b61038c6101de6101de9273ffffffffffffffffffffffffffffffffffffffff1690565b6101de90610564565b6101de90610587565b9061037990610590565b60006105b36101de926002610599565b61046c565b346102335761022f6102c26105ce3660046104b4565b6105a3565b60846105de60405190565b62461bcd60e51b815260206004820152603560248201527f436f6e747261637420646f6573206e6f7420686176652066616c6c6261636b2060448201527f6e6f7220726563656976652066756e6374696f6e7300000000000000000000006064820152fd5b6101de906101e1565b6101de9054610643565b0190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b1561069857565b60405162461bcd60e51b8152806106b16004820161065a565b0390fd5b9060ff905b9181191691161790565b151590565b906106d96101de6106e0926106c4565b82546106b5565b9055565b6106fd6106f86106f4600061064c565b1590565b610691565b610709600160006106c9565b61071161088f565b6101fd6000806106c9565b60208082526016908201527f4e6f2070656e64696e67207769746864726177616c7300000000000000000000604082015260600190565b1561075a57565b60405162461bcd60e51b8152806106b16004820161071c565b90600019906106ba565b9061078d6101de6106e092610282565b8254610773565b634e487b7160e01b600052604160045260246000fd5b90601f01601f1916810190811067ffffffffffffffff8211176107cc57604052565b610794565b906101fd6107de60405190565b92836107aa565b67ffffffffffffffff81116107cc57602090601f01601f19160190565b9061081461080f836107e5565b6107d1565b918252565b3d15610833576108283d610802565b903d6000602084013e565b606090565b6020808252600f908201527f5472616e73666572206661696c65640000000000000000000000000000000000604082015260600190565b1561087657565b60405162461bcd60e51b8152806106b160048201610838565b6108a261089d336002610599565b6103cc565b6108b66108af6000610282565b8211610753565b6108d36108c36000610282565b6108ce336002610599565b61077d565b61090a6000806108ea6108e533610590565b610590565b60405185816108f8816101de565b03925af1610904610819565b5061086f565b7f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b6561094161093733610590565b926102c660405190565b0390a2565b6101fd6106e4565b90610974916109636106f86106f4600061064c565b61096f600160006106c9565b610b94565b906101fd6000806106c9565b6020808252602e908201527f496e76616c69642063686f6963653a206d75737420626520312028686561647360408201527f29206f72203220287461696c7329000000000000000000000000000000000000606082015260800190565b156109e457565b60405162461bcd60e51b8152806106b160048201610980565b60208082526022908201527f42657420616d6f756e74206d7573742062652065786163746c7920312065746860408201527f6572000000000000000000000000000000000000000000000000000000000000606082015260800190565b15610a6157565b60405162461bcd60e51b8152806106b1600482016109fd565b634e487b7160e01b600052601160045260246000fd5b6000198114610a9f5760010190565b610a7a565b6101de60606107d1565b906101f99061038c565b6101de905161038c565b9073ffffffffffffffffffffffffffffffffffffffff906106ba565b90610aee6101de6106e092610590565b8254610ac2565b5160ff1690565b9074ff00000000000000000000000000000000000000009060a01b6106ba565b6101e16101de6101de9260ff1690565b90610b3c6101de6106e092610b1c565b8254610afc565b5190565b6101fd91600190610b8390604090610b7d85610b6b610b6584610ab8565b82610ade565b610b7760208401610af5565b90610b2c565b01610b43565b910161077d565b906101fd91610b47565b50610ba06101e16101e7565b60ff8216148015610c86575b610bb5906109dd565b610bca610bc36101de61028f565b3414610a5a565b610bd460036103cc565b90610be8610be183610a90565b600361077d565b610c21610bf3610aa4565b610bfd3382610aae565b60ff83166020820152610c11426040830152565b610c1c84600161036f565b610b8a565b610c2b6001610282565b8211610c78575b610c3b82610282565b7faa5634ee0c6d2385c65bc0cf9a8d15cc4c4514a311da9a1fc7053d894524b934610c72610c6833610590565b9361021e60405190565b0390a390565b610c8182610e8d565b610c32565b50610bb5610c956101e16102d3565b60ff8316149050610bac565b6101de90600061094e565b61089d6101de91610cbb600090565b506002610599565b6020808252600f908201527f496e76616c696420666c69702049440000000000000000000000000000000000604082015260600190565b15610d0157565b60405162461bcd60e51b8152806106b160048201610cc3565b6020808252818101527f5761697420756e74696c206e65787420666c6970206861732073746172746564604082015260600190565b15610d5657565b60405162461bcd60e51b8152806106b160048201610d1a565b91908201809211610a9f57565b610d90610d896000610282565b8211610cfa565b610da7610da06101de60036103cc565b8210610d4f565b610dde610dd86101de6001610dd2610dc26101de878461036f565b95610dcc83610282565b90610d6f565b9061036f565b8261117f565b906000610de96101e7565b92610df960ff85165b9160ff1690565b14910191610e13610df2610e0c856103bb565b9260ff1690565b149182610e51575b8215610e2657505090565b610e319192506103bb565b610e3f610df26101e16102d3565b149081610e4b575b5090565b15905090565b91508091610e1b565b91908203918211610a9f57565b81810292918115918404141715610a9f57565b9015158152901515602082015260400190565b600190610ed6610ed06101de610eab610ea586610282565b85610e5a565b93610eca6101de610ec4610ebe89610282565b88610e5a565b8861036f565b9561036f565b8361117f565b91610edf6101e7565b92610eec60ff8516610df2565b146000820193610f01610df2610e0c876103bb565b14938461107f575b841561102a575b5050827f7b1bf55fd6fc99a16b04696b3f617f0ffb985829fe70c95fccec5f94927b457d91600091610f76575b610f55610f4f6000610f5b93016103a5565b94610282565b93610590565b93610f71610f6860405190565b92839283610e7a565b0390a3565b610f91610f8161028f565b610f8b6002610282565b90610e67565b610f9a30610590565b8190311015610ffc575b610f5b91610f5591610f4f916000918615610fc5575b509350505050610f3d565b610ff690610ff0610fe1610fda8686016103a5565b6002610599565b91610feb836103cc565b610d6f565b9061077d565b38610fba565b9150610f55610f4f60008361101e8661101984610f5b98016103a5565b6112ce565b95935093505050610fa4565b7f7b1bf55fd6fc99a16b04696b3f617f0ffb985829fe70c95fccec5f94927b457d929450611057906103bb565b611065610df26101e16102d3565b149081611076575b50929038610f10565b1590503861106d565b93508093610f09565b60010190565b6101de6101de6101de9260ff1690565b60601b90565b6101de9061109e565b6110b96101f99161038c565b6110a4565b60f81b90565b6101f99060ff166110be565b926110fe6001610656946110f66014886110ee60209b9a83996110ad565b0180926110c4565b0180926110ad565b01918252565b60005b8381106111175750506000910152565b8181015183820152602001611107565b61065661113f92602092611139815190565b94859290565b93849101611104565b6101de91611127565b6040513d6000823e3d90fd5b634e487b7160e01b600052603260045260246000fd5b6101de9060f81c610b1c565b9091600091600061118f81610282565b948592865b6111a461119f6104e3565b61108e565b8810156112c45760208461120c8185016112006111c96111c3836103a5565b926103bb565b6111d4858a016103a5565b926111f46111e460018c016103cc565b6040519586948a860194856110d0565b908103825203826107aa565b60405191829182611148565b039060025afa156112bf57835161122285610282565b60208110156112ba5761123991901a60f81b611173565b611246610df2607f6101d1565b11156112855761125761119f610238565b81146112755761126961126f91610a90565b97611088565b96611194565b50505050509150506101de6101e7565b969361129261119f610238565b81146112aa576112a461126f91610a90565b94611088565b50505050509150506101de6102d3565b61115d565b611151565b5050505050909150565b6000916112e76108e584936112e1600090565b50610590565b906112f160405190565b90816112fc816101de565b03925af1610e4761081956fea2646970667358221220dd5dd5f3b451fa2f8ce4fec3d98422106847fe9b5ed99cea6ef8f8ee4e06b53364736f6c634300081c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ 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.