Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Multichain Info
No addresses found
Loading...
Loading
This contract contains unverified libraries: Ed25519
Contract Name:
Blake3
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.9; library Blake3 { uint256 constant BLOCK_LEN = 64; uint32 constant OUT_LEN = 32; uint32 constant CHUNK_LEN = 1024; // Flag constants uint32 constant CHUNK_START = 1 << 0; uint32 constant CHUNK_END = 1 << 1; uint32 constant PARENT = 1 << 2; uint32 constant ROOT = 1 << 3; uint32 constant KEYED_HASH = 1 << 4; uint32 constant DERIVE_KEY_CONTEXT = 1 << 5; uint32 constant DERIVE_KEY_MATERIAL = 1 << 6; // Product of a ChunkState before deriving chain value struct Output { uint32[8] input_chaining_value; uint32[16] block_words; uint64 counter; uint256 block_len; uint32 flags; } struct ChunkState { uint32[8] chaining_value; uint64 chunk_counter; // Has a max size of BLOCK_LEN bytes block_bytes; uint256 block_len; uint256 blocks_compressed; uint32 flags; } // An incremental hasher that can accept any number of writes. struct Hasher { ChunkState chunk_state; uint32[8] key_words; uint32[8][54] cv_stack; // Space for 54 subtree chaining values: uint8 cv_stack_len; // 2^54 * CHUNK_LEN = 2^64 uint32 flags; } // INTERNAL FUNCTIONS // This should remain constant but solidity doesn't support declaring it // uint8[16] MSG_PERMUTATION = [2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8]; // uint32[8] IV = [ // 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19 // ]; function _MSG_PERMUTATION() internal pure returns (uint8[16] memory) { return [2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8]; } function _IV() internal pure returns (uint32[8] memory) { return [0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19]; } // Mixing function G function _g( uint32[16] memory state, uint32 a, uint32 b, uint32 c, uint32 d, uint32 mx, uint32 my ) internal pure { unchecked { state[a] = state[a] + state[b] + mx; state[d] = _rotr(state[d] ^ state[a], 16); state[c] = state[c] + state[d]; state[b] = _rotr(state[b] ^ state[c], 12); state[a] = state[a] + state[b] + my; state[d] = _rotr(state[d] ^ state[a], 8); state[c] = state[c] + state[d]; state[b] = _rotr(state[b] ^ state[c], 7); } } function _round(uint32[16] memory state, uint32[16] memory m) internal pure { // Mix the columns. _g(state, 0, 4, 8, 12, m[0], m[1]); _g(state, 1, 5, 9, 13, m[2], m[3]); _g(state, 2, 6, 10, 14, m[4], m[5]); _g(state, 3, 7, 11, 15, m[6], m[7]); // Mix the diagonals. _g(state, 0, 5, 10, 15, m[8], m[9]); _g(state, 1, 6, 11, 12, m[10], m[11]); _g(state, 2, 7, 8, 13, m[12], m[13]); _g(state, 3, 4, 9, 14, m[14], m[15]); } function _permute(uint32[16] memory m) internal pure { uint8[16] memory MSG_PERMUTATION = _MSG_PERMUTATION(); uint32[16] memory permuted; for (uint256 i = 0; i < 16; ++i) { permuted[i] = m[MSG_PERMUTATION[i]]; } for (uint256 i = 0; i < 16; ++i) { m[i] = permuted[i]; } } function _compress( uint32[8] memory chaining_value, uint32[16] memory block_words_ref, uint64 counter, uint256 block_len, uint32 flags ) internal pure returns (uint32[16] memory) { uint32[8] memory IV = _IV(); uint32[16] memory block_words; for (uint256 i = 0; i < 16; ++i) { block_words[i] = block_words_ref[i]; } uint32[16] memory state = [ chaining_value[0], chaining_value[1], chaining_value[2], chaining_value[3], chaining_value[4], chaining_value[5], chaining_value[6], chaining_value[7], IV[0], IV[1], IV[2], IV[3], uint32(counter), uint32(counter >> 32), /////////////////////////////// uint32(block_len), flags ]; _round(state, block_words); // round 1 _permute(block_words); _round(state, block_words); // round 2 _permute(block_words); _round(state, block_words); // round 3 _permute(block_words); _round(state, block_words); // round 4 _permute(block_words); _round(state, block_words); // round 5 _permute(block_words); _round(state, block_words); // round 6 _permute(block_words); _round(state, block_words); // round 7 for (uint256 i = 0; i < 8; ++i) { state[i] ^= state[i + 8]; state[i + 8] ^= chaining_value[i]; } return state; } function _rotr(uint32 x, uint8 n) internal pure returns (uint32) { bytes4 b = bytes4(x); return uint32((b >> n) | (b << (32 - n))); } function _chaining_value(Output memory o) internal pure returns (uint32[8] memory) { uint32[16] memory compression_output = _compress( o.input_chaining_value, o.block_words, o.counter, o.block_len, o.flags ); return _first_8_words(compression_output); } function _root_output_bytes( Output memory self, bytes memory out_slice ) internal pure { //uint32 output_block_counter = 0; // Take 64-byte chunks at a time from out_slice //for (uint32 i = 0; i < out_slice.length; i += 2 * OUT_LEN) { uint32[16] memory words = _compress( self.input_chaining_value, self.block_words, 0, //output_block_counter, self.block_len, self.flags | ROOT ); // Load compressed words into out_slice (4 bytes at a time) // The output length might not be a multiple of 4. //for (uint32 j = 0; j < words.length && out_slice.length > j*4; j++) { //for (uint32 j = 0; j < words.length; j++) { for (uint32 j = 0; j < 8; j++) { // Load word at j into out_slice as little endian _load_uint32_to_le_bytes(words[j], out_slice, j*4); } //output_block_counter += 1; //} } function _load_uint32_to_le_bytes( uint32 n, bytes memory buf, uint32 offset ) internal pure { for (uint256 i = 0; i < 4; ++i) { buf[offset+i] = bytes1(uint8(n / (2 ** (i*8)))); } } function _uint32_to_le_bytes(uint32 n) internal pure returns (bytes4) { bytes4 buf; for (uint256 i = 0; i < 4; ++i) { assembly { let cc := add(buf, 0x20) let buf_idx := add(cc, sub(3, i)) let n_idx := add(n, i) mstore8(buf_idx, n_idx) } } return buf; } function _le_bytes_get_uint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) { require(_bytes.length >= _start + 4, "le_bytes_get_uint32_outOfBounds"); uint32 tempUint; for (uint256 i = 0; i < 4; ++i) { //tempUint += uint32(uint8(_bytes[i]) * (2 ** (8*i))); tempUint += uint32(bytes4(_bytes[3-i+_start]) >> (8 * i)); } /* assembly { // TODO why is this 0x4 in the bytes library??? //tempUint := mload(add(add(_bytes, 0x4), _start)) // Load 32 bytes from array (u256) tempUint := mload(add(add(_bytes, 0x20), _start)) // Keep just the first 4 bytes (u32) //tempUint := xor(tempUint, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000) tempUint := xor(tempUint, 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff) } */ return tempUint; } function _words_from_little_endian_bytes8( bytes memory data_bytes, uint32[8] memory words ) internal pure { require(data_bytes.length <= 4*8, "Data bytes is too long to convert to 8 4-byte words"); for (uint256 i = 0; i < data_bytes.length/4; ++i) { words[i] = _le_bytes_get_uint32(data_bytes, i*4); } } function _words_from_little_endian_bytes( bytes memory data_bytes, uint32[16] memory words ) internal pure { require(data_bytes.length <= 64 && data_bytes.length%4 == 0, "Data bytes is too long to convert to 16 4-byte words"); for (uint256 i = 0; i < data_bytes.length/4; ++i) { words[i] = _le_bytes_get_uint32(data_bytes, i*4); } } // TODO I wish this didn't require a copy to convert array sizes function _first_8_words(uint32[16] memory words) internal pure returns (uint32[8] memory) { // TODO there must be a way to do this without copying // How to take a slice of a memory array? uint32[8] memory first_8; for (uint256 i = 0; i < 8; ++i) { first_8[i] = words[i]; } return first_8; } // // Chunk state functions // function _new_chunkstate( uint32[8] memory key_words, uint64 chunk_counter, uint32 flags ) internal pure returns (ChunkState memory) { bytes memory block_bytes = new bytes(BLOCK_LEN); return ChunkState({ chaining_value: key_words, chunk_counter: chunk_counter, block_bytes: block_bytes, block_len: 0, blocks_compressed: 0, flags: flags }); } function _len(ChunkState memory chunk) internal pure returns (uint256) { return BLOCK_LEN * chunk.blocks_compressed + chunk.block_len; } function _start_flag(ChunkState memory chunk) internal pure returns (uint32) { if (chunk.blocks_compressed == 0) { return CHUNK_START; } else { return 0; } } // Returns a new input offset function _update_chunkstate( ChunkState memory chunk, bytes memory input ) internal pure {//returns (uint32) { uint256 input_offset = 0; while (input_offset < input.length) { // If the block buffer is full, compress it and clear it. More // input is coming, so this compression is not CHUNK_END. if (chunk.block_len == BLOCK_LEN) { uint32[16] memory block_words; _words_from_little_endian_bytes(chunk.block_bytes, block_words); chunk.chaining_value = _first_8_words(_compress( chunk.chaining_value, block_words, chunk.chunk_counter, BLOCK_LEN, chunk.flags | _start_flag(chunk) )); chunk.blocks_compressed += 1; // TODO probably cheaper to zero-out byte array than to reallocate chunk.block_bytes = new bytes(BLOCK_LEN); chunk.block_len = 0; } // Take enough to fill a block [min(want, input.length)] uint256 want = BLOCK_LEN - chunk.block_len; uint256 take = _min(want, input.length - input_offset); // Copy bytes from input to chunk block //chunk.block_bytes[self.block_len as usize..][..take].copy_from_slice(&input[..take]); for (uint256 i = 0; i < take; ++i) { // TODO recheck this logic chunk.block_bytes[i+chunk.block_len] = input[input_offset+i]; } /* bytes memory block_ref = chunk.block_bytes; uint32 blen = chunk.block_len; assembly { let block_addr := add(add(block_ref, 0x20), blen) let input_addr := add(add(input.offset, 0x20), input_offset) memorycopy(block_addr, input_addr, take) } */ chunk.block_len += take; input_offset += take; } } function _min(uint256 x, uint256 y) internal pure returns (uint256) { if (x < y) { return x; } else { return y; } } function _output(ChunkState memory chunk) internal pure returns (Output memory) { uint32[16] memory block_words; _words_from_little_endian_bytes(chunk.block_bytes, block_words); return Output({ input_chaining_value: chunk.chaining_value, block_words: block_words, counter: chunk.chunk_counter, block_len: chunk.block_len, flags: chunk.flags | _start_flag(chunk) | CHUNK_END }); } // // Parent functions // function _parent_output( uint32[8] memory left_child_cv, uint32[8] memory right_child_cv, uint32[8] memory key_words, uint32 flags ) internal pure returns (Output memory) { uint32[16] memory block_words; for (uint256 i = 0; i < 8; ++i) { block_words[i] = left_child_cv[i]; } for (uint256 i = 8; i < 16; ++i) { block_words[i] = right_child_cv[i - 8]; } return Output({ input_chaining_value: key_words, block_words: block_words, counter: 0, // Always 0 for parent nodes. block_len: BLOCK_LEN, // Always BLOCK_LEN (64) for parent nodes. flags: PARENT | flags }); } function _parent_cv( uint32[8] memory left_child_cv, uint32[8] memory right_child_cv, uint32[8] memory key_words, uint32 flags ) internal pure returns (uint32[8] memory) { return _chaining_value(_parent_output(left_child_cv, right_child_cv, key_words, flags)); } // // Hasher functions // function _new_hasher_internal( uint32[8] memory key_words, uint32 flags ) internal pure returns (Hasher memory) { uint32[8][54] memory cv_stack; return Hasher({ chunk_state: _new_chunkstate(key_words, 0, flags), key_words: key_words, cv_stack: cv_stack, cv_stack_len: 0, flags: flags }); } /// Construct a new `Hasher` for the regular hash function. function new_hasher() internal pure returns (Hasher memory) { uint32[8] memory IV = _IV(); return _new_hasher_internal(IV, 0); } /// Construct a new `Hasher` for the keyed hash function. function new_keyed(bytes memory key) internal pure returns (Hasher memory) { uint32[8] memory key_words; bytes memory key_mem = key; _words_from_little_endian_bytes8(key_mem, key_words); return _new_hasher_internal(key_words, KEYED_HASH); } // Construct a new `Hasher` for the key derivation function. The context // string should be hardcoded, globally unique, and application-specific function new_derive_key(bytes memory context) internal pure returns (Hasher memory) { uint32[8] memory IV = _IV(); Hasher memory context_hasher = _new_hasher_internal(IV, DERIVE_KEY_CONTEXT); update_hasher(context_hasher, context); bytes memory context_key = new bytes(256); _finalize_internal(context_hasher, context_key); uint32[8] memory context_key_words; _words_from_little_endian_bytes8(context_key, context_key_words); return _new_hasher_internal(context_key_words, DERIVE_KEY_MATERIAL); } function _push_stack(Hasher memory self, uint32[8] memory cv) internal pure { self.cv_stack[self.cv_stack_len] = cv; self.cv_stack_len += 1; } function _pop_stack(Hasher memory self) internal pure returns (uint32[8] memory) { self.cv_stack_len -= 1; return self.cv_stack[self.cv_stack_len]; } function _add_chunk_chaining_value( Hasher memory self, uint32[8] memory new_cv, uint64 total_chunks ) internal pure { while (total_chunks & 1 == 0) { new_cv = _parent_cv(_pop_stack(self), new_cv, self.key_words, self.flags); total_chunks >>= 1; } _push_stack(self, new_cv); } function _slice( bytes memory data, uint256 start, uint256 end ) internal pure returns (bytes memory) { uint256 dataSliceLength = end - start; bytes memory dataSlice = new bytes(dataSliceLength); for (uint256 i = 0; i < dataSliceLength; ++i) { dataSlice[i] = data[start + i]; } return dataSlice; } // Add input to the hash state. This can be called any number of times. function update_hasher( Hasher memory self, bytes memory input ) internal pure returns (Hasher memory) { uint256 input_offset = 0; while (input_offset < input.length) { // If the current chunk is complete, finalize it and reset the // chunk state. More input is coming, so this chunk is not ROOT. if (_len(self.chunk_state) == CHUNK_LEN) { uint32[8] memory chunk_cv = _chaining_value(_output(self.chunk_state)); uint64 total_chunks = self.chunk_state.chunk_counter + 1; _add_chunk_chaining_value(self, chunk_cv, total_chunks); self.chunk_state = _new_chunkstate(self.key_words, total_chunks, self.flags); } // Compress input bytes into the current chunk state. uint256 want = CHUNK_LEN - _len(self.chunk_state); uint256 take = _min(want, uint32(input.length - input_offset)); // Update chunk state bytes memory input_slice = _slice(input, input_offset, take + input_offset); _update_chunkstate(self.chunk_state, input_slice); input_offset += take; } return self; } function finalize(Hasher memory self) internal pure returns (bytes memory) { bytes memory output = new bytes(32); _finalize_internal(self, output); return output; } function _finalize_internal( Hasher memory self, bytes memory out_slice ) internal pure { // Starting with the Output from the current chunk, compute all the // parent chaining values along the right edge of the tree, until we // have the root Output. Output memory output = _output(self.chunk_state); uint32 parent_nodes_remaining = self.cv_stack_len; while (parent_nodes_remaining > 0) { parent_nodes_remaining -= 1; output = _parent_output( self.cv_stack[parent_nodes_remaining], _chaining_value(output), self.key_words, self.flags ); } _root_output_bytes(output, out_slice); } function sliceBytes(bytes memory message, uint64 length) internal pure returns (bytes memory) { require(length <= message.length, "Length exceeds message length"); // Overwrite the length field of the bytes to crop the message assembly { mstore(message, length) } return message; } function hash( bytes memory message, uint32 length ) external pure returns (bytes memory) { Hasher memory hasher = new_hasher(); update_hasher(hasher, message); return sliceBytes(finalize(hasher), length); } }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "frame-verifier/=lib/frame-verifier/src/", "solady/=lib/solady/src/", "wormhole/=lib/wormhole/ethereum/contracts/", "erc6551/=lib/erc6551/src/", "farcaster/=lib/farcaster/src/", "account-abstraction/=lib/account-abstraction/contracts/", "farcaster-solidity/=lib/farcaster-solidity/contracts/", "@openzeppelin/=lib/erc6551/lib/openzeppelin-contracts/", "chainlink-brownie-contracts/=lib/farcaster/lib/chainlink-brownie-contracts/", "chainlink/=lib/farcaster/lib/chainlink-brownie-contracts/contracts/src/", "erc4626-tests/=lib/farcaster/lib/openzeppelin-latest/lib/erc4626-tests/", "halmos-cheatcodes/=lib/farcaster/lib/halmos-cheatcodes/src/", "openzeppelin-contracts/=lib/farcaster/lib/openzeppelin-contracts/", "openzeppelin-latest/=lib/farcaster/lib/openzeppelin-latest/", "openzeppelin/=lib/farcaster/lib/openzeppelin-contracts/", "solmate/=lib/farcaster/lib/solmate/", "@lazyledger/protobuf3-solidity-lib/=lib/protobuf3-solidity-lib/", "protobuf3-solidity-lib/=lib/protobuf3-solidity-lib/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": { "lib/farcaster-solidity/contracts/libraries/Blake3.sol": { "Blake3": "0x33937f3b8a9107e409931b70478ae716cb51aee8" }, "lib/farcaster-solidity/contracts/libraries/Ed25519.sol": { "Ed25519": "0xfa7321696663ea6b9c8d4d3c892c1176e2587a39" }, "lib/farcaster-solidity/contracts/libraries/Ed25519_pow.sol": { "Ed25519_pow": "0xb4e22f10318492b7bbd160d736f708c1f23df021" }, "lib/farcaster-solidity/contracts/libraries/Sha512.sol": { "Sha512": "0x3c25e1bf271cc1d1ddc10c55c836c4ec727c20aa" } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"uint32","name":"length","type":"uint32"}],"name":"hash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
611a7861003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c8063227bb04d1461003a575b600080fd5b61004d6100483660046116aa565b610063565b60405161005a919061176c565b60405180910390f35b6060600061006f61009e565b905061007b81856100c3565b50610094610088826101bd565b8463ffffffff166101ec565b9150505b92915050565b6100a661154c565b60006100b0610254565b90506100bd8160006102ba565b91505090565b6100cb61154c565b60005b82518110156101b5578351610400906100e69061030f565b0361013e5760006101026100fd8660000151610331565b6103ab565b8551602001519091506000906101199060016117d0565b90506101268683836103e8565b6101398660200151828860800151610432565b865250505b600061014d856000015161030f565b610159906104006117f1565b905060006101798284875161016e91906117f1565b63ffffffff1661049a565b90506000610191868561018c8186611804565b6104b2565b90506101a187600001518261057e565b6101ab8285611804565b93505050506100ce565b509192915050565b6040805160208082528183019092526060916000919060208201818036833701905050905061009883826106ef565b606082518267ffffffffffffffff16111561024e5760405162461bcd60e51b815260206004820152601d60248201527f4c656e6774682065786365656473206d657373616765206c656e67746800000060448201526064015b60405180910390fd5b50815290565b61025c61158d565b506040805161010081018252636a09e667815263bb67ae856020820152633c6ef3729181019190915263a54ff53a606082015263510e527f6080820152639b05688c60a0820152631f83d9ab60c0820152635be0cd1960e082015290565b6102c261154c565b6102ca6115ac565b6040518060a001604052806102e186600087610432565b8152602001858152602001828152602001600060ff1681526020018463ffffffff1681525091505092915050565b60008160600151826080015160406103279190611817565b6100989190611804565b6103396115da565b610341611615565b61034f836040015182610776565b6040518060a0016040528084600001518152602001828152602001846020015167ffffffffffffffff1681526020018460600151815260200160026103938661085a565b8660a00151171763ffffffff16815250915050919050565b6103b361158d565b60006103d68360000151846020015185604001518660600151876080015161087d565b90506103e181610b69565b9392505050565b600181166000036104235761040f6103ff84610bd5565b8385602001518660800151610c21565b915060011c677fffffffffffffff166103e8565b61042d8383610c41565b505050565b61043a611634565b60408051818152606081018252600091602082018180368337019050506040805160c08101825296875267ffffffffffffffff90951660208701529385019390935250600060608401819052608084015263ffffffff1660a08301525090565b6000818310156104ab575081610098565b5080610098565b606060006104c084846117f1565b905060008167ffffffffffffffff8111156104dd576104dd611680565b6040519080825280601f01601f191660200182016040528015610507576020820181803683370190505b50905060005b8281101561057457866105208288611804565b815181106105305761053061182e565b602001015160f81c60f81b82828151811061054d5761054d61182e565b60200101906001600160f81b031916908160001a90535061056d81611844565b905061050d565b5095945050505050565b60005b815181101561042d57604083606001510361061a5761059e611615565b6105ac846040015182610776565b6105d86105d3856000015183876020015160406105c88a61085a565b8a60a001511761087d565b610b69565b8452608084018051600191906105ef908390611804565b9052506040805181815260608101825290602082018180368337505050604085015250600060608401525b60008360600151604061062d91906117f1565b905060006106478284865161064291906117f1565b61049a565b905060005b818110156106c6578461065f8286611804565b8151811061066f5761066f61182e565b602001015160f81c60f81b866040015187606001518361068f9190611804565b8151811061069f5761069f61182e565b60200101906001600160f81b031916908160001a9053506106bf81611844565b905061064c565b5080856060018181516106d99190611804565b9052506106e68184611804565b92505050610581565b60006106fe8360000151610331565b606084015190915060ff165b63ffffffff8116156107665761072160018261185d565b905061075f84604001518263ffffffff16603681106107425761074261182e565b6020020151610750846103ab565b86602001518760800151610c83565b915061070a565b6107708284610d7e565b50505050565b60408251111580156107935750600482516107919190611890565b155b6107fc5760405162461bcd60e51b815260206004820152603460248201527f4461746120627974657320697320746f6f206c6f6e6720746f20636f6e7665726044820152737420746f20313620342d6279746520776f72647360601b6064820152608401610245565b60005b6004835161080d91906118a4565b81101561042d5761082883610823836004611817565b610df8565b82826010811061083a5761083a61182e565b63ffffffff909216602092909202015261085381611844565b90506107ff565b6000816080015160000361087057506001919050565b506000919050565b919050565b610885611615565b600061088f610254565b9050610899611615565b60005b60108110156108ee578781601081106108b7576108b761182e565b60200201518282601081106108ce576108ce61182e565b63ffffffff90921660209290920201526108e781611844565b905061089c565b5060006040518061020001604052808a6000600881106109105761091061182e565b6020908102919091015163ffffffff168252018a60016020908102919091015163ffffffff168252018a60026020908102919091015163ffffffff168252018a60036020908102919091015163ffffffff168252018a60046020908102919091015163ffffffff168252018a60056020908102919091015163ffffffff168252018a60066020908102919091015163ffffffff168252018a60076020908102919091015163ffffffff168252018460006020908102919091015163ffffffff168252018460016020908102919091015163ffffffff168252018460026020908102919091015163ffffffff168252018460036020908102919091015163ffffffff90811683528a811683830152908a901c81166040830152888116606083015287166080909101529050610a448183610ece565b610a4d82610fb6565b610a578183610ece565b610a6082610fb6565b610a6a8183610ece565b610a7382610fb6565b610a7d8183610ece565b610a8682610fb6565b610a908183610ece565b610a9982610fb6565b610aa38183610ece565b610aac82610fb6565b610ab68183610ece565b60005b6008811015610b5c5781610ace826008611804565b60108110610ade57610ade61182e565b6020020151828260108110610af557610af561182e565b6020020180519190911863ffffffff169052898160088110610b1957610b1961182e565b602002015182610b2a836008611804565b60108110610b3a57610b3a61182e565b6020020180519190911863ffffffff169052610b5581611844565b9050610ab9565b5098975050505050505050565b610b7161158d565b610b7961158d565b60005b6008811015610bce57838160108110610b9757610b9761182e565b6020020151828260088110610bae57610bae61182e565b63ffffffff9092166020929092020152610bc781611844565b9050610b7c565b5092915050565b610bdd61158d565b600182606001818151610bf091906118b8565b60ff908116909152604084015160608501519092501660368110610c1657610c1661182e565b602002015192915050565b610c2961158d565b610c386100fd86868686610c83565b95945050505050565b808260400151836060015160ff1660368110610c5f57610c5f61182e565b602002015260608201805160019190610c799083906118d1565b60ff169052505050565b610c8b6115da565b610c93611615565b60005b6008811015610ce857868160088110610cb157610cb161182e565b6020020151828260108110610cc857610cc861182e565b63ffffffff9092166020929092020152610ce181611844565b9050610c96565b5060085b6010811015610d485785610d016008836117f1565b60088110610d1157610d1161182e565b6020020151828260108110610d2857610d2861182e565b63ffffffff9092166020929092020152610d4181611844565b9050610cec565b506040805160a081018252948552602085019190915260008482015260608401525060041763ffffffff16608082015292915050565b6000610da18360000151846020015160008660600151600888608001511761087d565b905060005b60088163ffffffff16101561077057610de6828263ffffffff1660108110610dd057610dd061182e565b602002015184610de18460046118ea565b61108e565b80610df081611912565b915050610da6565b6000610e05826004611804565b83511015610e555760405162461bcd60e51b815260206004820152601f60248201527f6c655f62797465735f6765745f75696e7433325f6f75744f66426f756e6473006044820152606401610245565b6000805b6004811015610ec657610e6d816008611817565b8585610e7a8460036117f1565b610e849190611804565b81518110610e9457610e9461182e565b0160200151610eb4916001600160f81b0319909116901c60e01c83611935565b9150610ebf81611844565b9050610e59565b509392505050565b610eef82600060046008600c868460200201518760015b602002015161110b565b610f0b82600160056009600d8660026020020151876003610ee5565b610f278260026006600a600e8660046020020151876005610ee5565b610f438260036007600b600f8660066020020151876007610ee5565b610f5f8260006005600a600f8660086020020151876009610ee5565b610f7b8260016006600b600c86600a602002015187600b610ee5565b610f9782600260076008600d86600c602002015187600d610ee5565b610fb282600360046009600e8681602002015187600f610ee5565b5050565b6000610fc0611489565b9050610fca611615565b60005b60108110156110385783838260108110610fe957610fe961182e565b602002015160ff16601081106110015761100161182e565b60200201518282601081106110185761101861182e565b63ffffffff909216602092909202015261103181611844565b9050610fcd565b5060005b6010811015610770578181601081106110575761105761182e565b602002015184826010811061106e5761106e61182e565b63ffffffff909216602092909202015261108781611844565b905061103c565b60005b6004811015610770576110a5816008611817565b6110b0906002611a36565b6110c09063ffffffff86166118a4565b60f81b836110d48363ffffffff8616611804565b815181106110e4576110e461182e565b60200101906001600160f81b031916908160001a90535061110481611844565b9050611091565b81878663ffffffff16601081106111245761112461182e565b6020020151888863ffffffff16601081106111415761114161182e565b60200201510101878763ffffffff16601081106111605761116061182e565b602002019063ffffffff16908163ffffffff16815250506111bc878763ffffffff16601081106111925761119261182e565b6020020151888563ffffffff16601081106111af576111af61182e565b6020020151186010611517565b878463ffffffff16601081106111d4576111d461182e565b602002019063ffffffff16908163ffffffff1681525050868363ffffffff16601081106112035761120361182e565b6020020151878563ffffffff16601081106112205761122061182e565b602002015101878563ffffffff166010811061123e5761123e61182e565b602002019063ffffffff16908163ffffffff168152505061129a878563ffffffff16601081106112705761127061182e565b6020020151888763ffffffff166010811061128d5761128d61182e565b602002015118600c611517565b878663ffffffff16601081106112b2576112b261182e565b602002019063ffffffff16908163ffffffff168152505080878663ffffffff16601081106112e2576112e261182e565b6020020151888863ffffffff16601081106112ff576112ff61182e565b60200201510101878763ffffffff166010811061131e5761131e61182e565b602002019063ffffffff16908163ffffffff168152505061137a878763ffffffff16601081106113505761135061182e565b6020020151888563ffffffff166010811061136d5761136d61182e565b6020020151186008611517565b878463ffffffff16601081106113925761139261182e565b602002019063ffffffff16908163ffffffff1681525050868363ffffffff16601081106113c1576113c161182e565b6020020151878563ffffffff16601081106113de576113de61182e565b602002015101878563ffffffff16601081106113fc576113fc61182e565b602002019063ffffffff16908163ffffffff1681525050611458878563ffffffff166010811061142e5761142e61182e565b6020020151888763ffffffff166010811061144b5761144b61182e565b6020020151186007611517565b878663ffffffff16601081106114705761147061182e565b63ffffffff909216602092909202015250505050505050565b611491611615565b5060408051610200810182526002815260066020820152600391810191909152600a606082015260076080820152600060a0820152600460c0820152600d60e08201526001610100820152600b610120820152600c61014082015260056101608201526009610180820152600e6101a0820152600f6101c082015260086101e082015290565b600060e083901b6115298360206118b8565b6001600160e01b031990911660ff84811682901c92161b1760e01c905092915050565b6040518060a0016040528061155f611634565b815260200161156c61158d565b81526020016115796115ac565b815260006020820181905260409091015290565b6040518061010001604052806008906020820280368337509192915050565b604051806106c001604052806036905b6115c461158d565b8152602001906001900390816115bc5790505090565b6040518060a001604052806115ed61158d565b81526020016115fa611615565b81526000602082018190526040820181905260609091015290565b6040518061020001604052806010906020820280368337509192915050565b6040518060c0016040528061164761158d565b8152602001600067ffffffffffffffff168152602001606081526020016000815260200160008152602001600063ffffffff1681525090565b634e487b7160e01b600052604160045260246000fd5b803563ffffffff8116811461087857600080fd5b600080604083850312156116bd57600080fd5b823567ffffffffffffffff808211156116d557600080fd5b818501915085601f8301126116e957600080fd5b8135818111156116fb576116fb611680565b604051601f8201601f19908116603f0116810190838211818310171561172357611723611680565b8160405282815288602084870101111561173c57600080fd5b82602086016020830137600060208483010152809650505050505061176360208401611696565b90509250929050565b600060208083528351808285015260005b818110156117995785810183015185820160400152820161177d565b506000604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b600052601160045260246000fd5b67ffffffffffffffff818116838216019080821115610bce57610bce6117ba565b81810381811115610098576100986117ba565b80820180821115610098576100986117ba565b8082028115828204841417610098576100986117ba565b634e487b7160e01b600052603260045260246000fd5b600060018201611856576118566117ba565b5060010190565b63ffffffff828116828216039080821115610bce57610bce6117ba565b634e487b7160e01b600052601260045260246000fd5b60008261189f5761189f61187a565b500690565b6000826118b3576118b361187a565b500490565b60ff8281168282160390811115610098576100986117ba565b60ff8181168382160190811115610098576100986117ba565b63ffffffff81811683821602808216919082811461190a5761190a6117ba565b505092915050565b600063ffffffff80831681810361192b5761192b6117ba565b6001019392505050565b63ffffffff818116838216019080821115610bce57610bce6117ba565b600181815b8085111561198d578160001904821115611973576119736117ba565b8085161561198057918102915b93841c9390800290611957565b509250929050565b6000826119a457506001610098565b816119b157506000610098565b81600181146119c757600281146119d1576119ed565b6001915050610098565b60ff8411156119e2576119e26117ba565b50506001821b610098565b5060208310610133831016604e8410600b8410161715611a10575081810a610098565b611a1a8383611952565b8060001904821115611a2e57611a2e6117ba565b029392505050565b60006103e1838361199556fea264697066735822122066a58790fe0a493ee174b532cd34ed5f45e21ae7346fadf0655faa0ce0af0cb164736f6c63430008150033
Deployed Bytecode
0x7333937f3b8a9107e409931b70478ae716cb51aee830146080604052600436106100355760003560e01c8063227bb04d1461003a575b600080fd5b61004d6100483660046116aa565b610063565b60405161005a919061176c565b60405180910390f35b6060600061006f61009e565b905061007b81856100c3565b50610094610088826101bd565b8463ffffffff166101ec565b9150505b92915050565b6100a661154c565b60006100b0610254565b90506100bd8160006102ba565b91505090565b6100cb61154c565b60005b82518110156101b5578351610400906100e69061030f565b0361013e5760006101026100fd8660000151610331565b6103ab565b8551602001519091506000906101199060016117d0565b90506101268683836103e8565b6101398660200151828860800151610432565b865250505b600061014d856000015161030f565b610159906104006117f1565b905060006101798284875161016e91906117f1565b63ffffffff1661049a565b90506000610191868561018c8186611804565b6104b2565b90506101a187600001518261057e565b6101ab8285611804565b93505050506100ce565b509192915050565b6040805160208082528183019092526060916000919060208201818036833701905050905061009883826106ef565b606082518267ffffffffffffffff16111561024e5760405162461bcd60e51b815260206004820152601d60248201527f4c656e6774682065786365656473206d657373616765206c656e67746800000060448201526064015b60405180910390fd5b50815290565b61025c61158d565b506040805161010081018252636a09e667815263bb67ae856020820152633c6ef3729181019190915263a54ff53a606082015263510e527f6080820152639b05688c60a0820152631f83d9ab60c0820152635be0cd1960e082015290565b6102c261154c565b6102ca6115ac565b6040518060a001604052806102e186600087610432565b8152602001858152602001828152602001600060ff1681526020018463ffffffff1681525091505092915050565b60008160600151826080015160406103279190611817565b6100989190611804565b6103396115da565b610341611615565b61034f836040015182610776565b6040518060a0016040528084600001518152602001828152602001846020015167ffffffffffffffff1681526020018460600151815260200160026103938661085a565b8660a00151171763ffffffff16815250915050919050565b6103b361158d565b60006103d68360000151846020015185604001518660600151876080015161087d565b90506103e181610b69565b9392505050565b600181166000036104235761040f6103ff84610bd5565b8385602001518660800151610c21565b915060011c677fffffffffffffff166103e8565b61042d8383610c41565b505050565b61043a611634565b60408051818152606081018252600091602082018180368337019050506040805160c08101825296875267ffffffffffffffff90951660208701529385019390935250600060608401819052608084015263ffffffff1660a08301525090565b6000818310156104ab575081610098565b5080610098565b606060006104c084846117f1565b905060008167ffffffffffffffff8111156104dd576104dd611680565b6040519080825280601f01601f191660200182016040528015610507576020820181803683370190505b50905060005b8281101561057457866105208288611804565b815181106105305761053061182e565b602001015160f81c60f81b82828151811061054d5761054d61182e565b60200101906001600160f81b031916908160001a90535061056d81611844565b905061050d565b5095945050505050565b60005b815181101561042d57604083606001510361061a5761059e611615565b6105ac846040015182610776565b6105d86105d3856000015183876020015160406105c88a61085a565b8a60a001511761087d565b610b69565b8452608084018051600191906105ef908390611804565b9052506040805181815260608101825290602082018180368337505050604085015250600060608401525b60008360600151604061062d91906117f1565b905060006106478284865161064291906117f1565b61049a565b905060005b818110156106c6578461065f8286611804565b8151811061066f5761066f61182e565b602001015160f81c60f81b866040015187606001518361068f9190611804565b8151811061069f5761069f61182e565b60200101906001600160f81b031916908160001a9053506106bf81611844565b905061064c565b5080856060018181516106d99190611804565b9052506106e68184611804565b92505050610581565b60006106fe8360000151610331565b606084015190915060ff165b63ffffffff8116156107665761072160018261185d565b905061075f84604001518263ffffffff16603681106107425761074261182e565b6020020151610750846103ab565b86602001518760800151610c83565b915061070a565b6107708284610d7e565b50505050565b60408251111580156107935750600482516107919190611890565b155b6107fc5760405162461bcd60e51b815260206004820152603460248201527f4461746120627974657320697320746f6f206c6f6e6720746f20636f6e7665726044820152737420746f20313620342d6279746520776f72647360601b6064820152608401610245565b60005b6004835161080d91906118a4565b81101561042d5761082883610823836004611817565b610df8565b82826010811061083a5761083a61182e565b63ffffffff909216602092909202015261085381611844565b90506107ff565b6000816080015160000361087057506001919050565b506000919050565b919050565b610885611615565b600061088f610254565b9050610899611615565b60005b60108110156108ee578781601081106108b7576108b761182e565b60200201518282601081106108ce576108ce61182e565b63ffffffff90921660209290920201526108e781611844565b905061089c565b5060006040518061020001604052808a6000600881106109105761091061182e565b6020908102919091015163ffffffff168252018a60016020908102919091015163ffffffff168252018a60026020908102919091015163ffffffff168252018a60036020908102919091015163ffffffff168252018a60046020908102919091015163ffffffff168252018a60056020908102919091015163ffffffff168252018a60066020908102919091015163ffffffff168252018a60076020908102919091015163ffffffff168252018460006020908102919091015163ffffffff168252018460016020908102919091015163ffffffff168252018460026020908102919091015163ffffffff168252018460036020908102919091015163ffffffff90811683528a811683830152908a901c81166040830152888116606083015287166080909101529050610a448183610ece565b610a4d82610fb6565b610a578183610ece565b610a6082610fb6565b610a6a8183610ece565b610a7382610fb6565b610a7d8183610ece565b610a8682610fb6565b610a908183610ece565b610a9982610fb6565b610aa38183610ece565b610aac82610fb6565b610ab68183610ece565b60005b6008811015610b5c5781610ace826008611804565b60108110610ade57610ade61182e565b6020020151828260108110610af557610af561182e565b6020020180519190911863ffffffff169052898160088110610b1957610b1961182e565b602002015182610b2a836008611804565b60108110610b3a57610b3a61182e565b6020020180519190911863ffffffff169052610b5581611844565b9050610ab9565b5098975050505050505050565b610b7161158d565b610b7961158d565b60005b6008811015610bce57838160108110610b9757610b9761182e565b6020020151828260088110610bae57610bae61182e565b63ffffffff9092166020929092020152610bc781611844565b9050610b7c565b5092915050565b610bdd61158d565b600182606001818151610bf091906118b8565b60ff908116909152604084015160608501519092501660368110610c1657610c1661182e565b602002015192915050565b610c2961158d565b610c386100fd86868686610c83565b95945050505050565b808260400151836060015160ff1660368110610c5f57610c5f61182e565b602002015260608201805160019190610c799083906118d1565b60ff169052505050565b610c8b6115da565b610c93611615565b60005b6008811015610ce857868160088110610cb157610cb161182e565b6020020151828260108110610cc857610cc861182e565b63ffffffff9092166020929092020152610ce181611844565b9050610c96565b5060085b6010811015610d485785610d016008836117f1565b60088110610d1157610d1161182e565b6020020151828260108110610d2857610d2861182e565b63ffffffff9092166020929092020152610d4181611844565b9050610cec565b506040805160a081018252948552602085019190915260008482015260608401525060041763ffffffff16608082015292915050565b6000610da18360000151846020015160008660600151600888608001511761087d565b905060005b60088163ffffffff16101561077057610de6828263ffffffff1660108110610dd057610dd061182e565b602002015184610de18460046118ea565b61108e565b80610df081611912565b915050610da6565b6000610e05826004611804565b83511015610e555760405162461bcd60e51b815260206004820152601f60248201527f6c655f62797465735f6765745f75696e7433325f6f75744f66426f756e6473006044820152606401610245565b6000805b6004811015610ec657610e6d816008611817565b8585610e7a8460036117f1565b610e849190611804565b81518110610e9457610e9461182e565b0160200151610eb4916001600160f81b0319909116901c60e01c83611935565b9150610ebf81611844565b9050610e59565b509392505050565b610eef82600060046008600c868460200201518760015b602002015161110b565b610f0b82600160056009600d8660026020020151876003610ee5565b610f278260026006600a600e8660046020020151876005610ee5565b610f438260036007600b600f8660066020020151876007610ee5565b610f5f8260006005600a600f8660086020020151876009610ee5565b610f7b8260016006600b600c86600a602002015187600b610ee5565b610f9782600260076008600d86600c602002015187600d610ee5565b610fb282600360046009600e8681602002015187600f610ee5565b5050565b6000610fc0611489565b9050610fca611615565b60005b60108110156110385783838260108110610fe957610fe961182e565b602002015160ff16601081106110015761100161182e565b60200201518282601081106110185761101861182e565b63ffffffff909216602092909202015261103181611844565b9050610fcd565b5060005b6010811015610770578181601081106110575761105761182e565b602002015184826010811061106e5761106e61182e565b63ffffffff909216602092909202015261108781611844565b905061103c565b60005b6004811015610770576110a5816008611817565b6110b0906002611a36565b6110c09063ffffffff86166118a4565b60f81b836110d48363ffffffff8616611804565b815181106110e4576110e461182e565b60200101906001600160f81b031916908160001a90535061110481611844565b9050611091565b81878663ffffffff16601081106111245761112461182e565b6020020151888863ffffffff16601081106111415761114161182e565b60200201510101878763ffffffff16601081106111605761116061182e565b602002019063ffffffff16908163ffffffff16815250506111bc878763ffffffff16601081106111925761119261182e565b6020020151888563ffffffff16601081106111af576111af61182e565b6020020151186010611517565b878463ffffffff16601081106111d4576111d461182e565b602002019063ffffffff16908163ffffffff1681525050868363ffffffff16601081106112035761120361182e565b6020020151878563ffffffff16601081106112205761122061182e565b602002015101878563ffffffff166010811061123e5761123e61182e565b602002019063ffffffff16908163ffffffff168152505061129a878563ffffffff16601081106112705761127061182e565b6020020151888763ffffffff166010811061128d5761128d61182e565b602002015118600c611517565b878663ffffffff16601081106112b2576112b261182e565b602002019063ffffffff16908163ffffffff168152505080878663ffffffff16601081106112e2576112e261182e565b6020020151888863ffffffff16601081106112ff576112ff61182e565b60200201510101878763ffffffff166010811061131e5761131e61182e565b602002019063ffffffff16908163ffffffff168152505061137a878763ffffffff16601081106113505761135061182e565b6020020151888563ffffffff166010811061136d5761136d61182e565b6020020151186008611517565b878463ffffffff16601081106113925761139261182e565b602002019063ffffffff16908163ffffffff1681525050868363ffffffff16601081106113c1576113c161182e565b6020020151878563ffffffff16601081106113de576113de61182e565b602002015101878563ffffffff16601081106113fc576113fc61182e565b602002019063ffffffff16908163ffffffff1681525050611458878563ffffffff166010811061142e5761142e61182e565b6020020151888763ffffffff166010811061144b5761144b61182e565b6020020151186007611517565b878663ffffffff16601081106114705761147061182e565b63ffffffff909216602092909202015250505050505050565b611491611615565b5060408051610200810182526002815260066020820152600391810191909152600a606082015260076080820152600060a0820152600460c0820152600d60e08201526001610100820152600b610120820152600c61014082015260056101608201526009610180820152600e6101a0820152600f6101c082015260086101e082015290565b600060e083901b6115298360206118b8565b6001600160e01b031990911660ff84811682901c92161b1760e01c905092915050565b6040518060a0016040528061155f611634565b815260200161156c61158d565b81526020016115796115ac565b815260006020820181905260409091015290565b6040518061010001604052806008906020820280368337509192915050565b604051806106c001604052806036905b6115c461158d565b8152602001906001900390816115bc5790505090565b6040518060a001604052806115ed61158d565b81526020016115fa611615565b81526000602082018190526040820181905260609091015290565b6040518061020001604052806010906020820280368337509192915050565b6040518060c0016040528061164761158d565b8152602001600067ffffffffffffffff168152602001606081526020016000815260200160008152602001600063ffffffff1681525090565b634e487b7160e01b600052604160045260246000fd5b803563ffffffff8116811461087857600080fd5b600080604083850312156116bd57600080fd5b823567ffffffffffffffff808211156116d557600080fd5b818501915085601f8301126116e957600080fd5b8135818111156116fb576116fb611680565b604051601f8201601f19908116603f0116810190838211818310171561172357611723611680565b8160405282815288602084870101111561173c57600080fd5b82602086016020830137600060208483010152809650505050505061176360208401611696565b90509250929050565b600060208083528351808285015260005b818110156117995785810183015185820160400152820161177d565b506000604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b600052601160045260246000fd5b67ffffffffffffffff818116838216019080821115610bce57610bce6117ba565b81810381811115610098576100986117ba565b80820180821115610098576100986117ba565b8082028115828204841417610098576100986117ba565b634e487b7160e01b600052603260045260246000fd5b600060018201611856576118566117ba565b5060010190565b63ffffffff828116828216039080821115610bce57610bce6117ba565b634e487b7160e01b600052601260045260246000fd5b60008261189f5761189f61187a565b500690565b6000826118b3576118b361187a565b500490565b60ff8281168282160390811115610098576100986117ba565b60ff8181168382160190811115610098576100986117ba565b63ffffffff81811683821602808216919082811461190a5761190a6117ba565b505092915050565b600063ffffffff80831681810361192b5761192b6117ba565b6001019392505050565b63ffffffff818116838216019080821115610bce57610bce6117ba565b600181815b8085111561198d578160001904821115611973576119736117ba565b8085161561198057918102915b93841c9390800290611957565b509250929050565b6000826119a457506001610098565b816119b157506000610098565b81600181146119c757600281146119d1576119ed565b6001915050610098565b60ff8411156119e2576119e26117ba565b50506001821b610098565b5060208310610133831016604e8410600b8410161715611a10575081810a610098565b611a1a8383611952565b8060001904821115611a2e57611a2e6117ba565b029392505050565b60006103e1838361199556fea264697066735822122066a58790fe0a493ee174b532cd34ed5f45e21ae7346fadf0655faa0ce0af0cb164736f6c63430008150033
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.