false
true
0

Contract Address Details

0x20e1bE50Fb0FB2e3716a721D6051d91151617f2a

Contract Name
Inventory
Creator
0xc57120–5cab7c at 0x751b1f–3a0959
Balance
0 tPLS
Tokens
Fetching tokens...
Transactions
Fetching transactions...
Transfers
Fetching transfers...
Gas Used
Fetching gas used...
Last Balance Update
25428075
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
Inventory




Optimization enabled
false
Compiler version
v0.8.28+commit.7893614a




EVM Version




Verified at
2026-09-18T22:34:42.329904Z

Constructor Arguments

0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000c8cd89650f12b8b565ba89307e072c10579f6aa600000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000a4000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000001158e460913d00000000000000000000000000000000000000000000000000001a055690d9db800000000000000000000000000000000000000000000000000022b1c8c1227a00000000000000000000000000000000000000000000000000002b5e3af16b188000000000000000000000000000000000000000000000000000000000000000000462c636ebc011329aed1185a57e3c2a3c0af41f020b1cd510cdcd7559b14f403e20b601a78eebaaf22460cb2c9e33c6811a3d7126eb2dad36e4d7fd3eda6b701dc09e59986b50708b98794b19e9d13efcd08af4649f3ca7469155e638c88fe2a0306d6cb9fbff30eacff4325ac98c6fe142151a0673d0eb40a48be2ad8bf6ddd000e8b3722e66b02edd1391e2f81e0acc81189cb9fc9b96942ab86a6dd243288a159115d7905bf9212a9cf89e86b4df93602af044993286f6110858fe3df833b91c000820c1bcf1a6ad86437f4b0deb482ce60e828b60dc67e640948a496be16dbeb4d9d372767c4ececb3aad7b22f7e897c08a8a29530ec48e1377ef0b25453b7e5950697f5600665080a6fb0da0a5ec6e82e679b20ee1a5dae726d0562c26d4ba4512682729c90ca21a798ea956aa127156ea5439cabaeb23477a17cd7797f16b2757cf0db322f15109bea185468e63dfa1c5c5293e7d44a283282c9ad456a39f3256a52a3ce81a612872ef9330c62e921921d83c448c0deaa4fd4da39420f0570da435f9bc4fec5f1f29eabe9d41da4ab745653432d1362189d201a114d235da1a1c9e08252aaa4ded4db2605226f11a591c56a46878e2e931836c2cb29686878c0770978a573ee72cf6beef5a42f93f82810df5537700e40d2cc7c8cb8132a87529723537efce58f2312c1384b141c5046f2b8ff786f9273fbb9c95845afdaf22997229d9189c63c2ea7359e05a227166ab87f1a220f29b63d83022635b96277a7886bb4664869ca709bc68b460d5e5a89505d472a204cda2867cc855a02588fb76f682dda9cda3b059e3407110840ac4fe7e0fd45db0e65245a9e5d63c2a61e5a551d7925f71fb5e255c0d0686f82ef4b3d5181a02baa3c6d3c23712a8f48f114ca0d0c5a4332ba638823a7d84a947cb153eff8fa7cfc4c4fa2b493cf088ca1b905154ec07db8e853977382b33d58519268af30da405176e715f91f4a20f07cee311dbf4233f861ca9babb86c5b67333783d0b9cb29c6dd15c63b3d352830571496e9ab0cf3a26881e28124b1167a834164874f807af865798334ad87fce83593effd32f0f72925509621cebd0fd6f0a6337b0b44c6666470cc51d80f95a2840e50ec70ff4ecbc36861e12aea5cd8c734995059acae929a9459263f8f93905c7b163862c4fba8e2ac5ebe7ed171766ce01fd0e4d2ec4baae415668d384a75f1281bb340dba6193bf187288fda70ca10fa8b1b7be8aabf4c3f02999cd711ba4bfd57abfbb23911043c9dbe33b4b00c78b0b4f09032609fdb153a3a9db88d3932fb9926c155628eeda37c269aa131fc08430d4774b806bfec41c146fc552d6d4dd6a29027b74c355c79069c90553b0f026698ae2a4ffb30c5b8b076e382159c4ab67a8a09d44de85a9b2824622666d6003e70603f3d064e98cae5e0b8410de026afecab4f0642bccaba47fa9faef4d3db6d40ecb9cade98ba8fb63d6cacf6cbf4ae0028ba2ccbfa30a97810f1f45e3953c58ed623db3ed842d3548e4a0a9bb3318feb881806246188b8b8783ca6b6cde13fdf5115d1be1710ed6cb758f490ae2bbc25f46bf967c01b85f231be9a96a7e57e93767155973dfa89a2ca70447afdbac88755cae5546d82746dce0c3bbab2a60e0e6affafbc5716c66c684fe4f1eb2a25b932916798dd7bf2c4bf057cbbf97498a1269edf1b32d0b95203032ae9cdac9527b8095a6093fe7966eacf967dac7f42e52ab71db183649f000967a7713df1c017227eb11e6d3b1a19031bba3181e84e13c610f0d5c00d45d4b1513566ed900c55ea21751dbc05342bf116ca997cf48caa62ce6acc043ca721e5fa1a1753e01354b19b2dd07fb0b478eafa040cbba3ecc217adef1fb53e8a1d55e1b68874c9c4ba346e6773e63954b1d86e574d4337d2bf1c8c0beaa32a5fc0ad7272ad4f69008fd1843fcf0330923b3ededf4291305e946d95b8108e37633892eb180c604abbaf3f392860cdc3228af17bcbeebf8e77ea588c8ff88d992a9fac44eed9cd3c30d6083bbfc9a859482f3814b0f8eedd5c62e08dba95a9a3857a9625bb1d9396953624a6517752ad61efaa4e1fc7211f8c23012dad034098e7ad7be863317e396b744aeb16455dcba10378d7270b47b047d516b6a08c43f942d3f16d895b74b8e080ae0214819cc0678e5a9cfb56cf59c18c5e36df2193c7e76cacdb85fdc186bc16204044a59124cda107ded623b22057baff75281a0b48770a7f5fbf5559234da98cf9c787470344176c9a0525613062ce5a6c1611a7b43482dd87f510b361cd2d53eb0f41b1d54458ec76b6175c3106e65d646eb2dc3fb17d17a7c1f363b8cb3d41fd8b48a27567eecbc5fc05a19f057d4ea03efd717132686d4cd9945a558ec1e86e0f875356ef36c62db93e752f3b71b1c96171e8f6519247b6c251cc1491cb13ef3b6662b1cbb141f25fc9e6e135cd96fcd113b95011aa034459dba23130200f4aaea4385d45cb3c46887e563a1b60fed8ff4db342bdff1283f8c421de45da0cac4b27e9ba3f5889e3a94fa25d9d8b2bdcf879d23eacc6c4582ab1a9db1943c8f490b352607d059a2be2de6446f0e9be1d43f0bb581b5b2541b7329869afc02e9f7c2e8f5001328c6b94c00c6ae89b35512855907a9243899164b4b1f06802762fb242148ff069d92cd9aca7a31a82fcc30e5ae3faf6fd7488685f45e8761445f7aebd2e15e9c4baa1a7f3e4ef19922746679a3cbd72a748533d85976f15f69e9b7e6849d9209c748e27aa70a261402891b4a89bd70e6c4690172150e0221e691190263e736e76c09f6c8e70daeeb22921e72bd144e42a126225329f3f4b1489b80cdcf2919e0f6d77433fb6eb6e8ea7094ec7a61a5e678b9b651588eb9a58db0e8302dab6eea689062b8b0aa86d1806c32fa741e858638425b38dfe51048a58d46523fd13801c5e04d1fac4b0ea0750232ee7e2f322e4dca6568fac29046931a5f6931ae491307aaf0622fd232b0e02fc11d0d692fb1c93e06bea8fa1f8116bbba86ff74e1119e8c7de157ed7e405bfc593e278e2bd3bfb5cc40f2bb14acc3ceb21b4783502bc47142df2609bf2eb882b976da51527319bcf26c4de007d0f031ed9d4130778924f03a0b2562c8fa5192f4d7e034ae9987d563b179b00000000000000000000000000000000000000000000000000000000000000460000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Arg [0] (uint256[]) : [5000000000000000000, 10000000000000000000, 20000000000000000000, 30000000000000000000, 40000000000000000000, 50000000000000000000]
Arg [1] (address) : 0xc8cd89650f12b8b565ba89307e072c10579f6aa6
Arg [2] (bytes32[]) : [2c636ebc011329aed1185a57e3c2a3c0af41f020b1cd510cdcd7559b14f403e2, 0b601a78eebaaf22460cb2c9e33c6811a3d7126eb2dad36e4d7fd3eda6b701dc, 09e59986b50708b98794b19e9d13efcd08af4649f3ca7469155e638c88fe2a03, 06d6cb9fbff30eacff4325ac98c6fe142151a0673d0eb40a48be2ad8bf6ddd00, 0e8b3722e66b02edd1391e2f81e0acc81189cb9fc9b96942ab86a6dd243288a1, 59115d7905bf9212a9cf89e86b4df93602af044993286f6110858fe3df833b91, c000820c1bcf1a6ad86437f4b0deb482ce60e828b60dc67e640948a496be16db, eb4d9d372767c4ececb3aad7b22f7e897c08a8a29530ec48e1377ef0b25453b7, e5950697f5600665080a6fb0da0a5ec6e82e679b20ee1a5dae726d0562c26d4b, a4512682729c90ca21a798ea956aa127156ea5439cabaeb23477a17cd7797f16, b2757cf0db322f15109bea185468e63dfa1c5c5293e7d44a283282c9ad456a39, f3256a52a3ce81a612872ef9330c62e921921d83c448c0deaa4fd4da39420f05, 70da435f9bc4fec5f1f29eabe9d41da4ab745653432d1362189d201a114d235d, a1a1c9e08252aaa4ded4db2605226f11a591c56a46878e2e931836c2cb296868, 78c0770978a573ee72cf6beef5a42f93f82810df5537700e40d2cc7c8cb8132a, 87529723537efce58f2312c1384b141c5046f2b8ff786f9273fbb9c95845afda, f22997229d9189c63c2ea7359e05a227166ab87f1a220f29b63d83022635b962, 77a7886bb4664869ca709bc68b460d5e5a89505d472a204cda2867cc855a0258, 8fb76f682dda9cda3b059e3407110840ac4fe7e0fd45db0e65245a9e5d63c2a6, 1e5a551d7925f71fb5e255c0d0686f82ef4b3d5181a02baa3c6d3c23712a8f48, f114ca0d0c5a4332ba638823a7d84a947cb153eff8fa7cfc4c4fa2b493cf088c, a1b905154ec07db8e853977382b33d58519268af30da405176e715f91f4a20f0, 7cee311dbf4233f861ca9babb86c5b67333783d0b9cb29c6dd15c63b3d352830, 571496e9ab0cf3a26881e28124b1167a834164874f807af865798334ad87fce8, 3593effd32f0f72925509621cebd0fd6f0a6337b0b44c6666470cc51d80f95a2, 840e50ec70ff4ecbc36861e12aea5cd8c734995059acae929a9459263f8f9390, 5c7b163862c4fba8e2ac5ebe7ed171766ce01fd0e4d2ec4baae415668d384a75, f1281bb340dba6193bf187288fda70ca10fa8b1b7be8aabf4c3f02999cd711ba, 4bfd57abfbb23911043c9dbe33b4b00c78b0b4f09032609fdb153a3a9db88d39, 32fb9926c155628eeda37c269aa131fc08430d4774b806bfec41c146fc552d6d, 4dd6a29027b74c355c79069c90553b0f026698ae2a4ffb30c5b8b076e382159c, 4ab67a8a09d44de85a9b2824622666d6003e70603f3d064e98cae5e0b8410de0, 26afecab4f0642bccaba47fa9faef4d3db6d40ecb9cade98ba8fb63d6cacf6cb, f4ae0028ba2ccbfa30a97810f1f45e3953c58ed623db3ed842d3548e4a0a9bb3, 318feb881806246188b8b8783ca6b6cde13fdf5115d1be1710ed6cb758f490ae, 2bbc25f46bf967c01b85f231be9a96a7e57e93767155973dfa89a2ca70447afd, bac88755cae5546d82746dce0c3bbab2a60e0e6affafbc5716c66c684fe4f1eb, 2a25b932916798dd7bf2c4bf057cbbf97498a1269edf1b32d0b95203032ae9cd, ac9527b8095a6093fe7966eacf967dac7f42e52ab71db183649f000967a7713d, f1c017227eb11e6d3b1a19031bba3181e84e13c610f0d5c00d45d4b1513566ed, 900c55ea21751dbc05342bf116ca997cf48caa62ce6acc043ca721e5fa1a1753, e01354b19b2dd07fb0b478eafa040cbba3ecc217adef1fb53e8a1d55e1b68874, c9c4ba346e6773e63954b1d86e574d4337d2bf1c8c0beaa32a5fc0ad7272ad4f, 69008fd1843fcf0330923b3ededf4291305e946d95b8108e37633892eb180c60, 4abbaf3f392860cdc3228af17bcbeebf8e77ea588c8ff88d992a9fac44eed9cd, 3c30d6083bbfc9a859482f3814b0f8eedd5c62e08dba95a9a3857a9625bb1d93, 96953624a6517752ad61efaa4e1fc7211f8c23012dad034098e7ad7be863317e, 396b744aeb16455dcba10378d7270b47b047d516b6a08c43f942d3f16d895b74, b8e080ae0214819cc0678e5a9cfb56cf59c18c5e36df2193c7e76cacdb85fdc1, 86bc16204044a59124cda107ded623b22057baff75281a0b48770a7f5fbf5559, 234da98cf9c787470344176c9a0525613062ce5a6c1611a7b43482dd87f510b3, 61cd2d53eb0f41b1d54458ec76b6175c3106e65d646eb2dc3fb17d17a7c1f363, b8cb3d41fd8b48a27567eecbc5fc05a19f057d4ea03efd717132686d4cd9945a, 558ec1e86e0f875356ef36c62db93e752f3b71b1c96171e8f6519247b6c251cc, 1491cb13ef3b6662b1cbb141f25fc9e6e135cd96fcd113b95011aa034459dba2, 3130200f4aaea4385d45cb3c46887e563a1b60fed8ff4db342bdff1283f8c421, de45da0cac4b27e9ba3f5889e3a94fa25d9d8b2bdcf879d23eacc6c4582ab1a9, db1943c8f490b352607d059a2be2de6446f0e9be1d43f0bb581b5b2541b73298, 69afc02e9f7c2e8f5001328c6b94c00c6ae89b35512855907a9243899164b4b1, f06802762fb242148ff069d92cd9aca7a31a82fcc30e5ae3faf6fd7488685f45, e8761445f7aebd2e15e9c4baa1a7f3e4ef19922746679a3cbd72a748533d8597, 6f15f69e9b7e6849d9209c748e27aa70a261402891b4a89bd70e6c4690172150, e0221e691190263e736e76c09f6c8e70daeeb22921e72bd144e42a126225329f, 3f4b1489b80cdcf2919e0f6d77433fb6eb6e8ea7094ec7a61a5e678b9b651588, eb9a58db0e8302dab6eea689062b8b0aa86d1806c32fa741e858638425b38dfe, 51048a58d46523fd13801c5e04d1fac4b0ea0750232ee7e2f322e4dca6568fac, 29046931a5f6931ae491307aaf0622fd232b0e02fc11d0d692fb1c93e06bea8f, a1f8116bbba86ff74e1119e8c7de157ed7e405bfc593e278e2bd3bfb5cc40f2b, b14acc3ceb21b4783502bc47142df2609bf2eb882b976da51527319bcf26c4de, 007d0f031ed9d4130778924f03a0b2562c8fa5192f4d7e034ae9987d563b179b]
Arg [3] (uint8[]) : [2, 1, 3, 5, 2, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 3, 5, 3, 5, 3, 4, 2, 1, 2, 1, 1, 1, 1, 1, 3, 3, 3, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

              

Inventory.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

/// @title  Inventory — who has what, on chain, and nothing else.
/// @notice Not a token. Not an NFT. No ERC standard, no ids to mint, no marketplace,
///         no royalties. Just a record: this address holds this many of this thing.
///
///         An item is identified by the **content hash of its own data** — the same
///         hash a `pblockz://` URI carries. So there is no registry to look an item up
///         in and no authority that decides what exists: if you can name the bytes,
///         you can name the item, and anybody can fetch those bytes and check that
///         they hash to it. The asset layer is the uploader; this is the save file.
///
/// @dev    Stated plainly because it is the design rather than an oversight: this is
///         not scarcity. Anyone standing high enough on the ladder who knows a hash can
///         record that they hold that thing too. Copying data costs nothing, and
///         pretending otherwise would need a gatekeeper — the thing this project does
///         not have. What the ladder buys is a floor on who may claim what, not a
///         ceiling on how many exist. Real scarcity belongs in a different contract.
///
///         Holdings gate what you may claim, and the chain enforces it: `add` checks
///         `msg.sender.balance` against a fixed ladder. Doing that in a client would be
///         theatre -- anyone running their own would skip it.
///
///         Ownerless: no admin, no pause, no upgrade, no privileged address. The constructor
///         credits a founder with a stated list, once, before the contract can be called by
///         anybody -- and leaves no function behind that could do it again.
contract Inventory {
    /// @notice How many of `item` `who` holds.
    mapping(address => mapping(bytes32 => uint32)) public held;

    /// Every item an address has ever held, so a client can enumerate without an
    /// indexer. Entries are never removed -- a count of zero stays listed, which costs
    /// one slot and saves the client from needing logs to find what you used to have.
    mapping(address => bytes32[]) private _seen;
    mapping(address => mapping(bytes32 => bool)) private _known;

    /// @notice The data an item is made of. Because an item's id folds in the tier it
    ///         was claimed at, the id alone is not enough to go and fetch the bytes;
    ///         this is what turns one back into the other. Written once, by whoever
    ///         claims a thing first, and never changed.
    mapping(bytes32 => bytes32) public dataOf;

    event Changed(address indexed who, bytes32 indexed item, uint32 count);

    error NotEnough();
    error ZeroAmount();
    error NoSuchTier();
    error NotBigEnough();
    error TooManySlots();
    error StillHeld();
    error NotListed();

    /// A list has a ceiling, because `give` writes into somebody else's storage and an
    /// unbounded array there is a griefing tool: claim junk at tier zero, hand it to a
    /// stranger, repeat, and their list eventually costs more to read than any client
    /// will spend. Bounded, and readable a page at a time.
    uint256 public constant MAX_SLOTS = 1024;

    /// Of which this many may be opened by *other people's* gifts. Kept separate so
    /// that filling somebody's list with rubbish can never stop them adding their own
    /// things -- the worst it does is use up the space reserved for presents.
    uint256 public constant MAX_GIFT_SLOTS = 128;

    mapping(address => uint256) public giftSlots;

    /// Holdings, in wei, for each rung. Set once at construction and never again:
    /// there is nobody who could change them.
    uint256[] public thresholds;

    /// @param rungs      Holdings, in wei, for each rung. Fixed forever at this moment.
    /// @param founder    Who the town belongs to, credited with `seedItems` below.
    /// @param seedItems  Data hashes to credit the founder with, one of each.
    /// @param seedTiers  The tier each of them is claimed at, in the same order.
    ///
    /// @dev The seed is the one privilege in this contract and it lasts one transaction.
    ///      There is no function that does this -- not a restricted one, not an ownable one,
    ///      not one behind a flag. It happens inside the constructor, before an address
    ///      exists for anybody to call, and after it returns there is no path to `_credit`
    ///      that does not go through `add` and its balance check, or `give` and somebody
    ///      actually parting with a thing they hold.
    ///
    ///      That is a different claim from "trust the deployer". Anyone can read the
    ///      deployment transaction and see exactly what was seeded and to whom, and anyone
    ///      can read this constructor and see there is no second helping. A demo whose author
    ///      cannot show the town wearing its own clothes is a poor demo; a contract with a
    ///      mint function for the author is a poor contract. This is neither.
    ///
    ///      The tier is folded into the id as it is everywhere else, so a seeded item is the
    ///      SAME id as one somebody earns by standing on that rung -- not a special edition,
    ///      not a variant. The founder is holding the thing you can hold.
    constructor(
        uint256[] memory rungs,
        address founder,
        bytes32[] memory seedItems,
        uint8[] memory seedTiers
    ) {
        thresholds = rungs;
        if (seedItems.length != seedTiers.length) revert NotEnough();
        for (uint256 i = 0; i < seedItems.length; i++) {
            if (seedTiers[i] >= rungs.length) revert NoSuchTier();
            bytes32 item = itemId(seedItems[i], seedTiers[i]);
            if (dataOf[item] == bytes32(0)) dataOf[item] = seedItems[i];
            _credit(founder, item, 1);
        }
    }

    /// @notice Record that you hold one more of the thing described by `dataHash`,
    ///         claimed at `tier`.
    ///
    ///         The tier is part of the item's identity, not a field beside it:
    ///         `item = keccak256(dataHash, tier)`. That is what makes the gate real.
    ///         A modified client can call this with any tier it likes, but claiming a
    ///         lower one to duck the threshold produces a *different* id, which is not
    ///         the id the game knows that thing by -- so it buys you a record of
    ///         something nobody recognises. There is no honest way round it and no
    ///         gatekeeper deciding: the chain checks your balance itself.
    uint8 public constant RECORD_TIER = 255;   // `keep`: a record, on no rung of the ladder

    function add(bytes32 dataHash, uint8 tier) external {
        if (tier >= thresholds.length) revert NoSuchTier();
        // msg.sender.balance is native PLS, read by the chain at the moment of the
        // call. Nothing is taken and nothing is locked -- spend it and you fall back
        // down the ladder, which is the point of measuring holdings rather than spend.
        if (msg.sender.balance < thresholds[tier]) revert NotBigEnough();
        bytes32 item = itemId(dataHash, tier);
        if (dataOf[item] == bytes32(0)) dataOf[item] = dataHash;
        _credit(msg.sender, item, 1);
    }

    /// @notice Keep a record of your own -- an outfit, say: a list of things you already hold.
    ///         Nothing is claimed, so nothing is gated: the ladder is what standing on a rung
    ///         buys, and a note about what you wear is not bought. Kept at RECORD_TIER, which
    ///         `add` can never produce (it is past every rung), so a kept hash is never the id
    ///         of anything on a shelf and keeping one cannot be a way round the gate.
    function keep(bytes32 dataHash) external {
        bytes32 item = itemId(dataHash, RECORD_TIER);
        if (dataOf[item] == bytes32(0)) dataOf[item] = dataHash;
        _credit(msg.sender, item, 1);
    }

    /// @notice The id a piece of data has when claimed at a given tier.
    function itemId(bytes32 dataHash, uint8 tier) public pure returns (bytes32) {
        return keccak256(abi.encodePacked(dataHash, tier));
    }

    /// @notice What each rung of the ladder costs to stand on, in wei of native PLS.
    function ladder() external view returns (uint256[] memory) {
        return thresholds;
    }

    /// @notice Give some of yours to someone else. Yours goes down, theirs goes up;
    ///         nothing is created or destroyed.
    function give(address to, bytes32 item, uint32 amount) external {
        _debit(msg.sender, item, amount);
        if (to != msg.sender && !_known[to][item]) {
            if (giftSlots[to] >= MAX_GIFT_SLOTS) revert TooManySlots();
            giftSlots[to]++;
        }
        _credit(to, item, amount);
    }

    /// @notice Drop an entry you no longer hold out of your own list, so a list filled
    ///         with somebody else's rubbish can be cleaned up. Only you can call this,
    ///         and only for something whose count is already zero.
    function forget(bytes32 item) external {
        if (held[msg.sender][item] != 0) revert StillHeld();
        if (!_known[msg.sender][item]) revert NotListed();
        bytes32[] storage list = _seen[msg.sender];
        for (uint256 i = 0; i < list.length; i++) {
            if (list[i] == item) {
                list[i] = list[list.length - 1];
                list.pop();
                break;
            }
        }
        _known[msg.sender][item] = false;
        if (giftSlots[msg.sender] > 0) giftSlots[msg.sender]--;
        emit Changed(msg.sender, item, 0);
    }

    /// @notice Throw some away. There is no way for anyone else to do this to you.
    function drop(bytes32 item, uint32 amount) external {
        _debit(msg.sender, item, amount);
    }

    // ---- views ----------------------------------------------------------------
    /// @notice Everything `who` has ever held, and how many of each they hold now.
    ///         Counts of zero are included; the caller decides whether to show them.
    /// @param offset where to start, @param limit how many at most. A page, because a
    ///        list somebody else can grow should never be a single unbounded return.
    function inventoryOf(address who, uint256 offset, uint256 limit)
        external view returns (bytes32[] memory items, uint32[] memory counts, bytes32[] memory data)
    {
        bytes32[] storage all = _seen[who];
        uint256 n = offset >= all.length ? 0 : all.length - offset;
        if (n > limit) n = limit;
        items = new bytes32[](n);
        counts = new uint32[](n);
        data = new bytes32[](n);
        for (uint256 i = 0; i < n; i++) {
            items[i] = all[offset + i];
            counts[i] = held[who][items[i]];
            data[i] = dataOf[items[i]];
        }
    }

    /// @notice How many distinct items `who` has ever held.
    function slotsOf(address who) external view returns (uint256) {
        return _seen[who].length;
    }

    // ---- internals ------------------------------------------------------------
    function _credit(address who, bytes32 item, uint32 amount) internal {
        if (amount == 0) revert ZeroAmount();
        if (!_known[who][item]) {
            if (_seen[who].length >= MAX_SLOTS) revert TooManySlots();
            _known[who][item] = true;
            _seen[who].push(item);
        }
        uint32 next = held[who][item] + amount;   // 0.8 reverts on overflow
        held[who][item] = next;
        emit Changed(who, item, next);
    }

    function _debit(address who, bytes32 item, uint32 amount) internal {
        if (amount == 0) revert ZeroAmount();
        uint32 have = held[who][item];
        if (have < amount) revert NotEnough();
        uint32 next = have - amount;
        held[who][item] = next;
        emit Changed(who, item, next);
    }
}
        

Compiler Settings

{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","metadata"]}},"optimizer":{"runs":200,"enabled":true},"evmVersion":"shanghai"}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"uint256[]","name":"rungs","internalType":"uint256[]"},{"type":"address","name":"founder","internalType":"address"},{"type":"bytes32[]","name":"seedItems","internalType":"bytes32[]"},{"type":"uint8[]","name":"seedTiers","internalType":"uint8[]"}]},{"type":"error","name":"NoSuchTier","inputs":[]},{"type":"error","name":"NotBigEnough","inputs":[]},{"type":"error","name":"NotEnough","inputs":[]},{"type":"error","name":"NotListed","inputs":[]},{"type":"error","name":"StillHeld","inputs":[]},{"type":"error","name":"TooManySlots","inputs":[]},{"type":"error","name":"ZeroAmount","inputs":[]},{"type":"event","name":"Changed","inputs":[{"type":"address","name":"who","internalType":"address","indexed":true},{"type":"bytes32","name":"item","internalType":"bytes32","indexed":true},{"type":"uint32","name":"count","internalType":"uint32","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_GIFT_SLOTS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_SLOTS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"RECORD_TIER","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"add","inputs":[{"type":"bytes32","name":"dataHash","internalType":"bytes32"},{"type":"uint8","name":"tier","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"dataOf","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"drop","inputs":[{"type":"bytes32","name":"item","internalType":"bytes32"},{"type":"uint32","name":"amount","internalType":"uint32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"forget","inputs":[{"type":"bytes32","name":"item","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"giftSlots","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"give","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"bytes32","name":"item","internalType":"bytes32"},{"type":"uint32","name":"amount","internalType":"uint32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"","internalType":"uint32"}],"name":"held","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"bytes32","name":"","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32[]","name":"items","internalType":"bytes32[]"},{"type":"uint32[]","name":"counts","internalType":"uint32[]"},{"type":"bytes32[]","name":"data","internalType":"bytes32[]"}],"name":"inventoryOf","inputs":[{"type":"address","name":"who","internalType":"address"},{"type":"uint256","name":"offset","internalType":"uint256"},{"type":"uint256","name":"limit","internalType":"uint256"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"itemId","inputs":[{"type":"bytes32","name":"dataHash","internalType":"bytes32"},{"type":"uint8","name":"tier","internalType":"uint8"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"keep","inputs":[{"type":"bytes32","name":"dataHash","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"ladder","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"slotsOf","inputs":[{"type":"address","name":"who","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"thresholds","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]}]
              

Contract Creation Code

0x608060405234801561000f575f5ffd5b506040516114e03803806114e083398101604081905261002e916104da565b8351610041906005906020870190610329565b5080518251146100645760405163342ccafd60e21b815260040160405180910390fd5b5f5b8251811015610149578451828281518110610083576100836105d1565b602002602001015160ff16106100ac57604051631b30760560e01b815260040160405180910390fd5b5f6100ef8483815181106100c2576100c26105d1565b60200260200101518484815181106100dc576100dc6105d1565b602002602001015161015360201b60201c565b5f8181526003602052604090205490915061013457838281518110610116576101166105d1565b602002602001015160035f8381526020019081526020015f20819055505b610140858260016101b4565b50600101610066565b505050505061060d565b5f828260405160200161019592919091825260f81b7fff0000000000000000000000000000000000000000000000000000000000000016602082015260210190565b6040516020818303038152906040528051906020012090505b92915050565b8063ffffffff165f036101da57604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b0383165f90815260026020908152604080832085845290915290205460ff16610285576001600160a01b0383165f908152600160205260409020546104001161023d57604051630c74bf5160e41b815260040160405180910390fd5b6001600160a01b0383165f8181526002602090815260408083208684528252808320805460ff1916600190811790915593835283825282208054938401815582529020018290555b6001600160a01b0383165f908152602081815260408083208584529091528120546102b790839063ffffffff166105e5565b6001600160a01b0385165f81815260208181526040808320888452825291829020805463ffffffff191663ffffffff8616908117909155915191825292935085927f559759328e258c277fe8ed115c81d0b414a9a92f16ce2cfdbeaf98d6c8f7c513910160405180910390a350505050565b828054828255905f5260205f20908101928215610362579160200282015b82811115610362578251825591602001919060010190610347565b5061036e929150610372565b5090565b5b8082111561036e575f8155600101610373565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b03811182821017156103c2576103c2610386565b604052919050565b5f6001600160401b038211156103e2576103e2610386565b5060051b60200190565b80516001600160a01b0381168114610402575f5ffd5b919050565b5f82601f830112610416575f5ffd5b8151610429610424826103ca565b61039a565b8082825260208201915060208360051b86010192508583111561044a575f5ffd5b602085015b8381101561046757805183526020928301920161044f565b5095945050505050565b5f82601f830112610480575f5ffd5b815161048e610424826103ca565b8082825260208201915060208360051b8601019250858311156104af575f5ffd5b602085015b8381101561046757805160ff811681146104cc575f5ffd5b8352602092830192016104b4565b5f5f5f5f608085870312156104ed575f5ffd5b84516001600160401b03811115610502575f5ffd5b8501601f81018713610512575f5ffd5b8051610520610424826103ca565b8082825260208201915060208360051b850101925089831115610541575f5ffd5b6020840193505b82841015610563578351825260209384019390910190610548565b965061057592505050602086016103ec565b60408601519093506001600160401b03811115610590575f5ffd5b61059c87828801610407565b606087015190935090506001600160401b038111156105b9575f5ffd5b6105c587828801610471565b91505092959194509250565b634e487b7160e01b5f52603260045260245ffd5b63ffffffff81811683821601908111156101ae57634e487b7160e01b5f52601160045260245ffd5b610ec68061061a5f395ff3fe608060405234801561000f575f5ffd5b50600436106100fb575f3560e01c80639fea683d11610093578063c0f3f2e911610063578063c0f3f2e914610261578063d4ade11b1461026a578063dafa91601461027d578063f400ccb914610290575f5ffd5b80639fea683d146101d3578063a389c15f14610215578063a91e11f31461022f578063b6c226111461024e575f5ffd5b8063468c7b64116100ce578063468c7b64146101615780635e3632c314610176578063755e3bbe146101985780638ac48a59146101ab575f5ffd5b80631c6a7a2f146100ff57806326166535146101315780633465b787146101465780633945248d14610159575b5f5ffd5b61011e61010d366004610b90565b60046020525f908152604090205481565b6040519081526020015b60405180910390f35b61014461013f366004610bc3565b6102a3565b005b610144610154366004610bed565b6102b2565b61011e608081565b6101696102f0565b6040516101289190610c04565b610189610184366004610c46565b610346565b60405161012893929190610cb0565b6101446101a6366004610bed565b61058e565b61011e6101b9366004610b90565b6001600160a01b03165f9081526001602052604090205490565b6102006101e1366004610d21565b5f60208181529281526040808220909352908152205463ffffffff1681565b60405163ffffffff9091168152602001610128565b61021d60ff81565b60405160ff9091168152602001610128565b61011e61023d366004610bed565b60036020525f908152604090205481565b61011e61025c366004610bed565b610740565b61011e61040081565b610144610278366004610d49565b61075f565b61014461028b366004610d82565b61081c565b61011e61029e366004610d82565b6108c7565b6102ae338383610910565b5050565b5f6102be8260ff6108c7565b5f818152600360205260409020549091506102e4575f8181526003602052604090208290555b6102ae33826001610a00565b6060600580548060200260200160405190810160405280929190818152602001828054801561033c57602002820191905f5260205f20905b815481526020019060010190808311610328575b5050505050905090565b6001600160a01b0383165f90815260016020526040812080546060928392839290919087101561038257815461037d908890610dc9565b610384565b5f5b9050858111156103915750845b8067ffffffffffffffff8111156103aa576103aa610ddc565b6040519080825280602002602001820160405280156103d3578160200160208202803683370190505b5094508067ffffffffffffffff8111156103ef576103ef610ddc565b604051908082528060200260200182016040528015610418578160200160208202803683370190505b5093508067ffffffffffffffff81111561043457610434610ddc565b60405190808252806020026020018201604052801561045d578160200160208202803683370190505b5092505f5b818110156105825782610475828a610df0565b8154811061048557610485610e03565b905f5260205f2001548682815181106104a0576104a0610e03565b6020026020010181815250505f5f8a6001600160a01b03166001600160a01b031681526020019081526020015f205f8783815181106104e1576104e1610e03565b602002602001015181526020019081526020015f205f9054906101000a900463ffffffff1685828151811061051857610518610e03565b602002602001019063ffffffff16908163ffffffff168152505060035f87838151811061054757610547610e03565b602002602001015181526020019081526020015f205484828151811061056f5761056f610e03565b6020908102919091010152600101610462565b50505093509350939050565b335f9081526020818152604080832084845290915290205463ffffffff16156105ca576040516304282b9b60e41b815260040160405180910390fd5b335f90815260026020908152604080832084845290915290205460ff166106045760405163665c1c5760e01b815260040160405180910390fd5b335f908152600160205260408120905b81548110156106b5578282828154811061063057610630610e03565b905f5260205f200154036106ad578154829061064e90600190610dc9565b8154811061065e5761065e610e03565b905f5260205f20015482828154811061067957610679610e03565b905f5260205f2001819055508180548061069557610695610e17565b600190038181905f5260205f20015f905590556106b5565b600101610614565b50335f8181526002602090815260408083208684528252808320805460ff191690559282526004905220541561070557335f9081526004602052604081208054916106ff83610e2b565b91905055505b6040515f8152829033907f559759328e258c277fe8ed115c81d0b414a9a92f16ce2cfdbeaf98d6c8f7c5139060200160405180910390a35050565b6005818154811061074f575f80fd5b5f91825260209091200154905081565b61076a338383610910565b6001600160a01b03831633148015906107a657506001600160a01b0383165f90815260026020908152604080832085845290915290205460ff16155b1561080c576001600160a01b0383165f908152600460205260409020546080116107e357604051630c74bf5160e41b815260040160405180910390fd5b6001600160a01b0383165f90815260046020526040812080549161080683610e40565b91905055505b610817838383610a00565b505050565b60055460ff82161061084157604051631b30760560e01b815260040160405180910390fd5b60058160ff168154811061085757610857610e03565b905f5260205f200154336001600160a01b031631101561088a576040516328fb27c960e21b815260040160405180910390fd5b5f61089583836108c7565b5f818152600360205260409020549091506108bb575f8181526003602052604090208390555b61081733826001610a00565b5f82826040516020016108f192919091825260f81b6001600160f81b031916602082015260210190565b6040516020818303038152906040528051906020012090505b92915050565b8063ffffffff165f0361093657604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b0383165f9081526020818152604080832085845290915290205463ffffffff9081169082168110156109825760405163342ccafd60e21b815260040160405180910390fd5b5f61098d8383610e58565b6001600160a01b0386165f81815260208181526040808320898452825291829020805463ffffffff191663ffffffff8616908117909155915191825292935086927f559759328e258c277fe8ed115c81d0b414a9a92f16ce2cfdbeaf98d6c8f7c513910160405180910390a35050505050565b8063ffffffff165f03610a2657604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b0383165f90815260026020908152604080832085845290915290205460ff16610ad1576001600160a01b0383165f9081526001602052604090205461040011610a8957604051630c74bf5160e41b815260040160405180910390fd5b6001600160a01b0383165f8181526002602090815260408083208684528252808320805460ff1916600190811790915593835283825282208054938401815582529020018290555b6001600160a01b0383165f90815260208181526040808320858452909152812054610b0390839063ffffffff16610e74565b6001600160a01b0385165f81815260208181526040808320888452825291829020805463ffffffff191663ffffffff8616908117909155915191825292935085927f559759328e258c277fe8ed115c81d0b414a9a92f16ce2cfdbeaf98d6c8f7c513910160405180910390a350505050565b80356001600160a01b0381168114610b8b575f5ffd5b919050565b5f60208284031215610ba0575f5ffd5b610ba982610b75565b9392505050565b803563ffffffff81168114610b8b575f5ffd5b5f5f60408385031215610bd4575f5ffd5b82359150610be460208401610bb0565b90509250929050565b5f60208284031215610bfd575f5ffd5b5035919050565b602080825282518282018190525f918401906040840190835b81811015610c3b578351835260209384019390920191600101610c1d565b509095945050505050565b5f5f5f60608486031215610c58575f5ffd5b610c6184610b75565b95602085013595506040909401359392505050565b5f8151808452602084019350602083015f5b82811015610ca6578151865260209586019590910190600101610c88565b5093949350505050565b606081525f610cc26060830186610c76565b82810360208401528085518083526020830191506020870192505f5b81811015610d0257835163ffffffff16835260209384019390920191600101610cde565b50508381036040850152610d168186610c76565b979650505050505050565b5f5f60408385031215610d32575f5ffd5b610d3b83610b75565b946020939093013593505050565b5f5f5f60608486031215610d5b575f5ffd5b610d6484610b75565b925060208401359150610d7960408501610bb0565b90509250925092565b5f5f60408385031215610d93575f5ffd5b82359150602083013560ff81168114610daa575f5ffd5b809150509250929050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561090a5761090a610db5565b634e487b7160e01b5f52604160045260245ffd5b8082018082111561090a5761090a610db5565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b5f81610e3957610e39610db5565b505f190190565b5f60018201610e5157610e51610db5565b5060010190565b63ffffffff828116828216039081111561090a5761090a610db5565b63ffffffff818116838216019081111561090a5761090a610db556fea264697066735822122099e4ea02b9ba4038da1ed889bba736ed008a9722b1d8fe87499d22353556cd0664736f6c634300081c00330000000000000000000000000000000000000000000000000000000000000080000000000000000000000000c8cd89650f12b8b565ba89307e072c10579f6aa600000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000a4000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000001158e460913d00000000000000000000000000000000000000000000000000001a055690d9db800000000000000000000000000000000000000000000000000022b1c8c1227a00000000000000000000000000000000000000000000000000002b5e3af16b188000000000000000000000000000000000000000000000000000000000000000000462c636ebc011329aed1185a57e3c2a3c0af41f020b1cd510cdcd7559b14f403e20b601a78eebaaf22460cb2c9e33c6811a3d7126eb2dad36e4d7fd3eda6b701dc09e59986b50708b98794b19e9d13efcd08af4649f3ca7469155e638c88fe2a0306d6cb9fbff30eacff4325ac98c6fe142151a0673d0eb40a48be2ad8bf6ddd000e8b3722e66b02edd1391e2f81e0acc81189cb9fc9b96942ab86a6dd243288a159115d7905bf9212a9cf89e86b4df93602af044993286f6110858fe3df833b91c000820c1bcf1a6ad86437f4b0deb482ce60e828b60dc67e640948a496be16dbeb4d9d372767c4ececb3aad7b22f7e897c08a8a29530ec48e1377ef0b25453b7e5950697f5600665080a6fb0da0a5ec6e82e679b20ee1a5dae726d0562c26d4ba4512682729c90ca21a798ea956aa127156ea5439cabaeb23477a17cd7797f16b2757cf0db322f15109bea185468e63dfa1c5c5293e7d44a283282c9ad456a39f3256a52a3ce81a612872ef9330c62e921921d83c448c0deaa4fd4da39420f0570da435f9bc4fec5f1f29eabe9d41da4ab745653432d1362189d201a114d235da1a1c9e08252aaa4ded4db2605226f11a591c56a46878e2e931836c2cb29686878c0770978a573ee72cf6beef5a42f93f82810df5537700e40d2cc7c8cb8132a87529723537efce58f2312c1384b141c5046f2b8ff786f9273fbb9c95845afdaf22997229d9189c63c2ea7359e05a227166ab87f1a220f29b63d83022635b96277a7886bb4664869ca709bc68b460d5e5a89505d472a204cda2867cc855a02588fb76f682dda9cda3b059e3407110840ac4fe7e0fd45db0e65245a9e5d63c2a61e5a551d7925f71fb5e255c0d0686f82ef4b3d5181a02baa3c6d3c23712a8f48f114ca0d0c5a4332ba638823a7d84a947cb153eff8fa7cfc4c4fa2b493cf088ca1b905154ec07db8e853977382b33d58519268af30da405176e715f91f4a20f07cee311dbf4233f861ca9babb86c5b67333783d0b9cb29c6dd15c63b3d352830571496e9ab0cf3a26881e28124b1167a834164874f807af865798334ad87fce83593effd32f0f72925509621cebd0fd6f0a6337b0b44c6666470cc51d80f95a2840e50ec70ff4ecbc36861e12aea5cd8c734995059acae929a9459263f8f93905c7b163862c4fba8e2ac5ebe7ed171766ce01fd0e4d2ec4baae415668d384a75f1281bb340dba6193bf187288fda70ca10fa8b1b7be8aabf4c3f02999cd711ba4bfd57abfbb23911043c9dbe33b4b00c78b0b4f09032609fdb153a3a9db88d3932fb9926c155628eeda37c269aa131fc08430d4774b806bfec41c146fc552d6d4dd6a29027b74c355c79069c90553b0f026698ae2a4ffb30c5b8b076e382159c4ab67a8a09d44de85a9b2824622666d6003e70603f3d064e98cae5e0b8410de026afecab4f0642bccaba47fa9faef4d3db6d40ecb9cade98ba8fb63d6cacf6cbf4ae0028ba2ccbfa30a97810f1f45e3953c58ed623db3ed842d3548e4a0a9bb3318feb881806246188b8b8783ca6b6cde13fdf5115d1be1710ed6cb758f490ae2bbc25f46bf967c01b85f231be9a96a7e57e93767155973dfa89a2ca70447afdbac88755cae5546d82746dce0c3bbab2a60e0e6affafbc5716c66c684fe4f1eb2a25b932916798dd7bf2c4bf057cbbf97498a1269edf1b32d0b95203032ae9cdac9527b8095a6093fe7966eacf967dac7f42e52ab71db183649f000967a7713df1c017227eb11e6d3b1a19031bba3181e84e13c610f0d5c00d45d4b1513566ed900c55ea21751dbc05342bf116ca997cf48caa62ce6acc043ca721e5fa1a1753e01354b19b2dd07fb0b478eafa040cbba3ecc217adef1fb53e8a1d55e1b68874c9c4ba346e6773e63954b1d86e574d4337d2bf1c8c0beaa32a5fc0ad7272ad4f69008fd1843fcf0330923b3ededf4291305e946d95b8108e37633892eb180c604abbaf3f392860cdc3228af17bcbeebf8e77ea588c8ff88d992a9fac44eed9cd3c30d6083bbfc9a859482f3814b0f8eedd5c62e08dba95a9a3857a9625bb1d9396953624a6517752ad61efaa4e1fc7211f8c23012dad034098e7ad7be863317e396b744aeb16455dcba10378d7270b47b047d516b6a08c43f942d3f16d895b74b8e080ae0214819cc0678e5a9cfb56cf59c18c5e36df2193c7e76cacdb85fdc186bc16204044a59124cda107ded623b22057baff75281a0b48770a7f5fbf5559234da98cf9c787470344176c9a0525613062ce5a6c1611a7b43482dd87f510b361cd2d53eb0f41b1d54458ec76b6175c3106e65d646eb2dc3fb17d17a7c1f363b8cb3d41fd8b48a27567eecbc5fc05a19f057d4ea03efd717132686d4cd9945a558ec1e86e0f875356ef36c62db93e752f3b71b1c96171e8f6519247b6c251cc1491cb13ef3b6662b1cbb141f25fc9e6e135cd96fcd113b95011aa034459dba23130200f4aaea4385d45cb3c46887e563a1b60fed8ff4db342bdff1283f8c421de45da0cac4b27e9ba3f5889e3a94fa25d9d8b2bdcf879d23eacc6c4582ab1a9db1943c8f490b352607d059a2be2de6446f0e9be1d43f0bb581b5b2541b7329869afc02e9f7c2e8f5001328c6b94c00c6ae89b35512855907a9243899164b4b1f06802762fb242148ff069d92cd9aca7a31a82fcc30e5ae3faf6fd7488685f45e8761445f7aebd2e15e9c4baa1a7f3e4ef19922746679a3cbd72a748533d85976f15f69e9b7e6849d9209c748e27aa70a261402891b4a89bd70e6c4690172150e0221e691190263e736e76c09f6c8e70daeeb22921e72bd144e42a126225329f3f4b1489b80cdcf2919e0f6d77433fb6eb6e8ea7094ec7a61a5e678b9b651588eb9a58db0e8302dab6eea689062b8b0aa86d1806c32fa741e858638425b38dfe51048a58d46523fd13801c5e04d1fac4b0ea0750232ee7e2f322e4dca6568fac29046931a5f6931ae491307aaf0622fd232b0e02fc11d0d692fb1c93e06bea8fa1f8116bbba86ff74e1119e8c7de157ed7e405bfc593e278e2bd3bfb5cc40f2bb14acc3ceb21b4783502bc47142df2609bf2eb882b976da51527319bcf26c4de007d0f031ed9d4130778924f03a0b2562c8fa5192f4d7e034ae9987d563b179b00000000000000000000000000000000000000000000000000000000000000460000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Deployed ByteCode

0x608060405234801561000f575f5ffd5b50600436106100fb575f3560e01c80639fea683d11610093578063c0f3f2e911610063578063c0f3f2e914610261578063d4ade11b1461026a578063dafa91601461027d578063f400ccb914610290575f5ffd5b80639fea683d146101d3578063a389c15f14610215578063a91e11f31461022f578063b6c226111461024e575f5ffd5b8063468c7b64116100ce578063468c7b64146101615780635e3632c314610176578063755e3bbe146101985780638ac48a59146101ab575f5ffd5b80631c6a7a2f146100ff57806326166535146101315780633465b787146101465780633945248d14610159575b5f5ffd5b61011e61010d366004610b90565b60046020525f908152604090205481565b6040519081526020015b60405180910390f35b61014461013f366004610bc3565b6102a3565b005b610144610154366004610bed565b6102b2565b61011e608081565b6101696102f0565b6040516101289190610c04565b610189610184366004610c46565b610346565b60405161012893929190610cb0565b6101446101a6366004610bed565b61058e565b61011e6101b9366004610b90565b6001600160a01b03165f9081526001602052604090205490565b6102006101e1366004610d21565b5f60208181529281526040808220909352908152205463ffffffff1681565b60405163ffffffff9091168152602001610128565b61021d60ff81565b60405160ff9091168152602001610128565b61011e61023d366004610bed565b60036020525f908152604090205481565b61011e61025c366004610bed565b610740565b61011e61040081565b610144610278366004610d49565b61075f565b61014461028b366004610d82565b61081c565b61011e61029e366004610d82565b6108c7565b6102ae338383610910565b5050565b5f6102be8260ff6108c7565b5f818152600360205260409020549091506102e4575f8181526003602052604090208290555b6102ae33826001610a00565b6060600580548060200260200160405190810160405280929190818152602001828054801561033c57602002820191905f5260205f20905b815481526020019060010190808311610328575b5050505050905090565b6001600160a01b0383165f90815260016020526040812080546060928392839290919087101561038257815461037d908890610dc9565b610384565b5f5b9050858111156103915750845b8067ffffffffffffffff8111156103aa576103aa610ddc565b6040519080825280602002602001820160405280156103d3578160200160208202803683370190505b5094508067ffffffffffffffff8111156103ef576103ef610ddc565b604051908082528060200260200182016040528015610418578160200160208202803683370190505b5093508067ffffffffffffffff81111561043457610434610ddc565b60405190808252806020026020018201604052801561045d578160200160208202803683370190505b5092505f5b818110156105825782610475828a610df0565b8154811061048557610485610e03565b905f5260205f2001548682815181106104a0576104a0610e03565b6020026020010181815250505f5f8a6001600160a01b03166001600160a01b031681526020019081526020015f205f8783815181106104e1576104e1610e03565b602002602001015181526020019081526020015f205f9054906101000a900463ffffffff1685828151811061051857610518610e03565b602002602001019063ffffffff16908163ffffffff168152505060035f87838151811061054757610547610e03565b602002602001015181526020019081526020015f205484828151811061056f5761056f610e03565b6020908102919091010152600101610462565b50505093509350939050565b335f9081526020818152604080832084845290915290205463ffffffff16156105ca576040516304282b9b60e41b815260040160405180910390fd5b335f90815260026020908152604080832084845290915290205460ff166106045760405163665c1c5760e01b815260040160405180910390fd5b335f908152600160205260408120905b81548110156106b5578282828154811061063057610630610e03565b905f5260205f200154036106ad578154829061064e90600190610dc9565b8154811061065e5761065e610e03565b905f5260205f20015482828154811061067957610679610e03565b905f5260205f2001819055508180548061069557610695610e17565b600190038181905f5260205f20015f905590556106b5565b600101610614565b50335f8181526002602090815260408083208684528252808320805460ff191690559282526004905220541561070557335f9081526004602052604081208054916106ff83610e2b565b91905055505b6040515f8152829033907f559759328e258c277fe8ed115c81d0b414a9a92f16ce2cfdbeaf98d6c8f7c5139060200160405180910390a35050565b6005818154811061074f575f80fd5b5f91825260209091200154905081565b61076a338383610910565b6001600160a01b03831633148015906107a657506001600160a01b0383165f90815260026020908152604080832085845290915290205460ff16155b1561080c576001600160a01b0383165f908152600460205260409020546080116107e357604051630c74bf5160e41b815260040160405180910390fd5b6001600160a01b0383165f90815260046020526040812080549161080683610e40565b91905055505b610817838383610a00565b505050565b60055460ff82161061084157604051631b30760560e01b815260040160405180910390fd5b60058160ff168154811061085757610857610e03565b905f5260205f200154336001600160a01b031631101561088a576040516328fb27c960e21b815260040160405180910390fd5b5f61089583836108c7565b5f818152600360205260409020549091506108bb575f8181526003602052604090208390555b61081733826001610a00565b5f82826040516020016108f192919091825260f81b6001600160f81b031916602082015260210190565b6040516020818303038152906040528051906020012090505b92915050565b8063ffffffff165f0361093657604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b0383165f9081526020818152604080832085845290915290205463ffffffff9081169082168110156109825760405163342ccafd60e21b815260040160405180910390fd5b5f61098d8383610e58565b6001600160a01b0386165f81815260208181526040808320898452825291829020805463ffffffff191663ffffffff8616908117909155915191825292935086927f559759328e258c277fe8ed115c81d0b414a9a92f16ce2cfdbeaf98d6c8f7c513910160405180910390a35050505050565b8063ffffffff165f03610a2657604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b0383165f90815260026020908152604080832085845290915290205460ff16610ad1576001600160a01b0383165f9081526001602052604090205461040011610a8957604051630c74bf5160e41b815260040160405180910390fd5b6001600160a01b0383165f8181526002602090815260408083208684528252808320805460ff1916600190811790915593835283825282208054938401815582529020018290555b6001600160a01b0383165f90815260208181526040808320858452909152812054610b0390839063ffffffff16610e74565b6001600160a01b0385165f81815260208181526040808320888452825291829020805463ffffffff191663ffffffff8616908117909155915191825292935085927f559759328e258c277fe8ed115c81d0b414a9a92f16ce2cfdbeaf98d6c8f7c513910160405180910390a350505050565b80356001600160a01b0381168114610b8b575f5ffd5b919050565b5f60208284031215610ba0575f5ffd5b610ba982610b75565b9392505050565b803563ffffffff81168114610b8b575f5ffd5b5f5f60408385031215610bd4575f5ffd5b82359150610be460208401610bb0565b90509250929050565b5f60208284031215610bfd575f5ffd5b5035919050565b602080825282518282018190525f918401906040840190835b81811015610c3b578351835260209384019390920191600101610c1d565b509095945050505050565b5f5f5f60608486031215610c58575f5ffd5b610c6184610b75565b95602085013595506040909401359392505050565b5f8151808452602084019350602083015f5b82811015610ca6578151865260209586019590910190600101610c88565b5093949350505050565b606081525f610cc26060830186610c76565b82810360208401528085518083526020830191506020870192505f5b81811015610d0257835163ffffffff16835260209384019390920191600101610cde565b50508381036040850152610d168186610c76565b979650505050505050565b5f5f60408385031215610d32575f5ffd5b610d3b83610b75565b946020939093013593505050565b5f5f5f60608486031215610d5b575f5ffd5b610d6484610b75565b925060208401359150610d7960408501610bb0565b90509250925092565b5f5f60408385031215610d93575f5ffd5b82359150602083013560ff81168114610daa575f5ffd5b809150509250929050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561090a5761090a610db5565b634e487b7160e01b5f52604160045260245ffd5b8082018082111561090a5761090a610db5565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b5f81610e3957610e39610db5565b505f190190565b5f60018201610e5157610e51610db5565b5060010190565b63ffffffff828116828216039081111561090a5761090a610db5565b63ffffffff818116838216019081111561090a5761090a610db556fea264697066735822122099e4ea02b9ba4038da1ed889bba736ed008a9722b1d8fe87499d22353556cd0664736f6c634300081c0033