craft-nft

A standalone NFT implementation for real-world arts and crafts assets
Log | Files | Refs | README

commit fb7bd8c9156f59ed8ff1d62edae38baf027320bf
parent 0d864f3beea17451280b77ffc3f4d4a591c430bd
Author: lash <dev@holbrook.no>
Date:   Sun, 18 Dec 2022 11:24:59 +0000

Adjust batch and index number resolution

Diffstat:
Mjs/contract/CraftNFT.bin | 4++--
Mjs/contract/CraftNFT.json | 2+-
Mpython/eth_craft_nft/data/CraftNFT.bin | 4++--
Mpython/eth_craft_nft/data/CraftNFT.json | 2+-
Mpython/eth_craft_nft/nft.py | 18+++++++++---------
Mpython/tests/test_basic.py | 22++++++++++++++--------
Msolidity/CraftNFT.sol | 30+++++++++++++++---------------
7 files changed, 44 insertions(+), 38 deletions(-)

diff --git a/js/contract/CraftNFT.bin b/js/contract/CraftNFT.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b506040516200339d3803806200339d833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600690816200008891906200050c565b5080600790816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612d9a80620006036000396000f3fe60806040526004361061015d576000357c010000000000000000000000000000000000000000000000000000000090048063559f5dc9116100d3578063adf288df1161008c578063adf288df146104d4578063b88d4fde14610511578063c87b56dd1461052d578063c9796c391461056a578063e985e9c5146105a7578063f9613ab2146105e45761015d565b8063559f5dc91461039b5780636352211e146103db57806370a08231146104185780638da5cb5b1461045557806395d89b4114610480578063a22cb465146104ab5761015d565b806324e0febc1161012557806324e0febc1461024e57806325cbaa181461028b5780632c1369de146102c857806342842e0e146103055780634d03546a146103215780634f64b2be1461035e5761015d565b806301ffc9a71461016257806306fdde031461019f578063081812fc146101ca57806318160ddd1461020757806323b872dd14610232575b600080fd5b34801561016e57600080fd5b506101896004803603810190610184919061234f565b610621565b6040516101969190612397565b60405180910390f35b3480156101ab57600080fd5b506101b46107c7565b6040516101c19190612442565b60405180910390f35b3480156101d657600080fd5b506101f160048036038101906101ec919061249a565b610855565b6040516101fe9190612508565b60405180910390f35b34801561021357600080fd5b5061021c610892565b6040516102299190612532565b60405180910390f35b61024c60048036038101906102479190612579565b61089c565b005b34801561025a57600080fd5b5061027560048036038101906102709190612602565b61090b565b604051610282919061263e565b60405180910390f35b34801561029757600080fd5b506102b260048036038101906102ad9190612659565b610923565b6040516102bf919061263e565b60405180910390f35b3480156102d457600080fd5b506102ef60048036038101906102ea91906126ea565b610ace565b6040516102fc919061263e565b60405180910390f35b61031f600480360381019061031a9190612579565b610bcf565b005b34801561032d57600080fd5b5061034860048036038101906103439190612751565b610c3e565b6040516103559190612397565b60405180910390f35b34801561036a57600080fd5b506103856004803603810190610380919061249a565b610f16565b604051610392919061263e565b60405180910390f35b3480156103a757600080fd5b506103c260048036038101906103bd9190612791565b610f3a565b6040516103d294939291906127e0565b60405180910390f35b3480156103e757600080fd5b5061040260048036038101906103fd919061249a565b610fc6565b60405161040f9190612508565b60405180910390f35b34801561042457600080fd5b5061043f600480360381019061043a9190612825565b611002565b60405161044c9190612532565b60405180910390f35b34801561046157600080fd5b5061046a611009565b6040516104779190612508565b60405180910390f35b34801561048c57600080fd5b5061049561102d565b6040516104a29190612442565b60405180910390f35b3480156104b757600080fd5b506104d260048036038101906104cd919061287e565b6110bb565b005b3480156104e057600080fd5b506104fb60048036038101906104f691906128be565b61135d565b604051610508919061263e565b60405180910390f35b61052b60048036038101906105269190612a33565b6114bf565b005b34801561053957600080fd5b50610554600480360381019061054f919061249a565b611596565b6040516105619190612442565b60405180910390f35b34801561057657600080fd5b50610591600480360381019061058c9190612602565b611646565b60405161059e9190612442565b60405180910390f35b3480156105b357600080fd5b506105ce60048036038101906105c99190612ab6565b611c61565b6040516105db9190612397565b60405180910390f35b3480156105f057600080fd5b5061060b60048036038101906106069190612602565b611cf9565b604051610618919061263e565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361067557600190506107c2565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106c757600190506107c2565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361071957600190506107c2565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361076b57600190506107c2565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107bd57600190506107c2565b600090505b919050565b600680546107d490612b25565b80601f016020809104026020016040519081016040528092919081815260200182805461080090612b25565b801561084d5780601f106108225761010080835404028352916020019161084d565b820191906000526020600020905b81548152906001019060200180831161083057829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108aa84848484611da5565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60008060026000858152602001908152602001600020838154811061094b5761094a612b56565b5b9060005260206000200190508060000160129054906101000a900460ff161561097357600080fd5b6000831480156109a1575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15610a0057600181600001600c8282829054906101000a900465ffffffffffff166109cc9190612bb4565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055506109f8858561135d565b915050610ac7565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a5857600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff1681600001600c9054906101000a900465ffffffffffff1665ffffffffffff1610610aa057600080fd5b610ac385858584600001600c9054906101000a900465ffffffffffff168561200f565b9150505b9392505050565b600080600260008681526020019081526020016000208481548110610af657610af5612b56565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b5a57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610b8557600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610610bb757600080fd5b610bc4868686868561200f565b915050949350505050565b6060610bdd84848484611da5565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c9c57600080fd5b610ca46122a1565b600260008781526020019081526020016000208054905092506000831115610d7457600060026000888152602001908152602001600020600081548110610cee57610ced612b56565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610d2057600080fd5b60026000878152602001908152602001600020600184610d409190612bee565b81548110610d5157610d50612b56565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1691505b84816000019065ffffffffffff16908165ffffffffffff16815250508482610d9c9190612bb4565b816020019065ffffffffffff16908165ffffffffffff168152505060026000878152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548165ffffffffffff021916908365ffffffffffff16021790555060608201518160000160126101000a81548160ff0219169083151502179055505050600186908060018154018082558091505060019003906000526020600020016000909190919091505560008565ffffffffffff1603610eeb57600160086000828254610edf9190612c22565b92505081905550610f0d565b8465ffffffffffff1660086000828254610f059190612c22565b925050819055505b50505092915050565b60018181548110610f2657600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610f5657600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900465ffffffffffff16908060000160129054906101000a900460ff16905084565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6007805461103a90612b25565b80601f016020809104026020016040519081016040528092919081815260200182805461106690612b25565b80156110b35780601f10611088576101008083540402835291602001916110b3565b820191906000526020600020905b81548152906001019060200180831161109657829003601f168201915b505050505081565b80156111dc57600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461115957600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506112f4565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361127457600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516113519190612397565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113bb57600080fd5b60016002600086815260200190815260200160002080549050146113de57600080fd5b60006002600086815260200190815260200160002060008154811061140657611405612b56565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461143857600080fd5b600060010260036000868152602001908152602001600020541461145b57600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b6114cb84848484611da5565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e6000600102604051611588919061263e565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016115f2919061263e565b602060405180830381865afa15801561160f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116339190612c6b565b905061163e81611646565b915050919050565b606080600080604767ffffffffffffffff81111561166757611666612908565b5b6040519080825280601f01601f1916602001820160405280156116995781602001600182028036833780820191505090505b5092507f7300000000000000000000000000000000000000000000000000000000000000836000815181106116d1576116d0612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061173557611734612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061179957611798612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3200000000000000000000000000000000000000000000000000000000000000836003815181106117fd576117fc612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061186157611860612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3600000000000000000000000000000000000000000000000000000000000000836005815181106118c5576118c4612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a000000000000000000000000000000000000000000000000000000000000008360068151811061192957611928612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611c5557600460f087836020811061197f5761197e612b56565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff161015611a57576030836119ee9190612ca5565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611a2357611a22612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611ac9565b605783611a649190612ca5565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611a9957611a98612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611ade57611add612b56565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611bb557603083611b409190612ca5565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611b709190612c22565b81518110611b8157611b80612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611c33565b605783611bc29190612ca5565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611bf29190612c22565b81518110611c0357611c02612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611c409190612c22565b91508080611c4d90612cda565b91505061195f565b50829350505050919050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008060036000848152602001908152602001600020549050611d1b816121ac565b611d2457600080fd5b611d2d816121de565b15611d3b5782915050611da0565b7effffffffff00000000000000000000000000000000000000000000000000006001028116905060d081908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611dfc9190612532565b602060405180830381865afa158015611e19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3d9190612d37565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611e7757600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614611fab573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611fa157503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b611faa57600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506120088385612210565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000088600190041692506014879060020a02831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461208057600080fd5b8460000160129054906101000a900460ff166120e25784600001600c9054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16146120e15760018560000160126101000a81548160ff0219169083151502179055505b5b64ffffffffff886001900416915060d0829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff1682179150600185600001600c8282829054906101000a900465ffffffffffff166121609190612bb4565b92506101000a81548165ffffffffffff021916908365ffffffffffff16021790555081600102600360008381526020019081526020016000208190555080935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361224057600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060800160405280600065ffffffffffff168152602001600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61232c816122f7565b811461233757600080fd5b50565b60008135905061234981612323565b92915050565b600060208284031215612365576123646122ed565b5b60006123738482850161233a565b91505092915050565b60008115159050919050565b6123918161237c565b82525050565b60006020820190506123ac6000830184612388565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156123ec5780820151818401526020810190506123d1565b60008484015250505050565b6000601f19601f8301169050919050565b6000612414826123b2565b61241e81856123bd565b935061242e8185602086016123ce565b612437816123f8565b840191505092915050565b6000602082019050818103600083015261245c8184612409565b905092915050565b6000819050919050565b61247781612464565b811461248257600080fd5b50565b6000813590506124948161246e565b92915050565b6000602082840312156124b0576124af6122ed565b5b60006124be84828501612485565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006124f2826124c7565b9050919050565b612502816124e7565b82525050565b600060208201905061251d60008301846124f9565b92915050565b61252c81612464565b82525050565b60006020820190506125476000830184612523565b92915050565b612556816124e7565b811461256157600080fd5b50565b6000813590506125738161254d565b92915050565b600080600060608486031215612592576125916122ed565b5b60006125a086828701612564565b93505060206125b186828701612564565b92505060406125c286828701612485565b9150509250925092565b6000819050919050565b6125df816125cc565b81146125ea57600080fd5b50565b6000813590506125fc816125d6565b92915050565b600060208284031215612618576126176122ed565b5b6000612626848285016125ed565b91505092915050565b612638816125cc565b82525050565b6000602082019050612653600083018461262f565b92915050565b600080600060608486031215612672576126716122ed565b5b600061268086828701612564565b9350506020612691868287016125ed565b92505060406126a286828701612485565b9150509250925092565b600065ffffffffffff82169050919050565b6126c7816126ac565b81146126d257600080fd5b50565b6000813590506126e4816126be565b92915050565b60008060008060808587031215612704576127036122ed565b5b600061271287828801612564565b9450506020612723878288016125ed565b935050604061273487828801612485565b9250506060612745878288016126d5565b91505092959194509250565b60008060408385031215612768576127676122ed565b5b6000612776858286016125ed565b9250506020612787858286016126d5565b9150509250929050565b600080604083850312156127a8576127a76122ed565b5b60006127b6858286016125ed565b92505060206127c785828601612485565b9150509250929050565b6127da816126ac565b82525050565b60006080820190506127f560008301876127d1565b61280260208301866127d1565b61280f60408301856127d1565b61281c6060830184612388565b95945050505050565b60006020828403121561283b5761283a6122ed565b5b600061284984828501612564565b91505092915050565b61285b8161237c565b811461286657600080fd5b50565b60008135905061287881612852565b92915050565b60008060408385031215612895576128946122ed565b5b60006128a385828601612564565b92505060206128b485828601612869565b9150509250929050565b600080604083850312156128d5576128d46122ed565b5b60006128e385828601612564565b92505060206128f4858286016125ed565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612940826123f8565b810181811067ffffffffffffffff8211171561295f5761295e612908565b5b80604052505050565b60006129726122e3565b905061297e8282612937565b919050565b600067ffffffffffffffff82111561299e5761299d612908565b5b6129a7826123f8565b9050602081019050919050565b82818337600083830152505050565b60006129d66129d184612983565b612968565b9050828152602081018484840111156129f2576129f1612903565b5b6129fd8482856129b4565b509392505050565b600082601f830112612a1a57612a196128fe565b5b8135612a2a8482602086016129c3565b91505092915050565b60008060008060808587031215612a4d57612a4c6122ed565b5b6000612a5b87828801612564565b9450506020612a6c87828801612564565b9350506040612a7d87828801612485565b925050606085013567ffffffffffffffff811115612a9e57612a9d6122f2565b5b612aaa87828801612a05565b91505092959194509250565b60008060408385031215612acd57612acc6122ed565b5b6000612adb85828601612564565b9250506020612aec85828601612564565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612b3d57607f821691505b602082108103612b5057612b4f612af6565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612bbf826126ac565b9150612bca836126ac565b9250828201905065ffffffffffff811115612be857612be7612b85565b5b92915050565b6000612bf982612464565b9150612c0483612464565b9250828203905081811115612c1c57612c1b612b85565b5b92915050565b6000612c2d82612464565b9150612c3883612464565b9250828201905080821115612c5057612c4f612b85565b5b92915050565b600081519050612c65816125d6565b92915050565b600060208284031215612c8157612c806122ed565b5b6000612c8f84828501612c56565b91505092915050565b600060ff82169050919050565b6000612cb082612c98565b9150612cbb83612c98565b9250828201905060ff811115612cd457612cd3612b85565b5b92915050565b6000612ce582612464565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d1757612d16612b85565b5b600182019050919050565b600081519050612d318161254d565b92915050565b600060208284031215612d4d57612d4c6122ed565b5b6000612d5b84828501612d22565b9150509291505056fea26469706673582212201e4b1d17fa65a90937945a5e38563cea12d57838e663a460dda50bb81ee7d37a64736f6c63430008110033 -\ No newline at end of file +60806040523480156200001157600080fd5b506040516200335a3803806200335a833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600690816200008891906200050c565b5080600790816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612d5780620006036000396000f3fe60806040526004361061015d576000357c01000000000000000000000000000000000000000000000000000000009004806370a08231116100d3578063c87b56dd1161008c578063c87b56dd146104b2578063c9796c39146104ef578063d824ee4f1461052c578063e985e9c514610569578063f117e173146105a6578063f9613ab2146105e35761015d565b806370a082311461039d5780638da5cb5b146103da57806395d89b4114610405578063a22cb46514610430578063adf288df14610459578063b88d4fde146104965761015d565b806324e0febc1161012557806324e0febc1461024e57806342842e0e1461028b5780634d03546a146102a75780634f64b2be146102e4578063559f5dc9146103215780636352211e146103605761015d565b806301ffc9a71461016257806306fdde031461019f578063081812fc146101ca57806318160ddd1461020757806323b872dd14610232575b600080fd5b34801561016e57600080fd5b5061018960048036038101906101849190612314565b610620565b604051610196919061235c565b60405180910390f35b3480156101ab57600080fd5b506101b46107c6565b6040516101c19190612407565b60405180910390f35b3480156101d657600080fd5b506101f160048036038101906101ec919061245f565b610854565b6040516101fe91906124cd565b60405180910390f35b34801561021357600080fd5b5061021c610891565b60405161022991906124f7565b60405180910390f35b61024c6004803603810190610247919061253e565b61089b565b005b34801561025a57600080fd5b50610275600480360381019061027091906125c7565b61090a565b6040516102829190612603565b60405180910390f35b6102a560048036038101906102a0919061253e565b610922565b005b3480156102b357600080fd5b506102ce60048036038101906102c9919061265c565b610991565b6040516102db919061235c565b60405180910390f35b3480156102f057600080fd5b5061030b6004803603810190610306919061245f565b610bc0565b6040516103189190612603565b60405180910390f35b34801561032d57600080fd5b506103486004803603810190610343919061269c565b610be4565b604051610357939291906126eb565b60405180910390f35b34801561036c57600080fd5b506103876004803603810190610382919061245f565b610c58565b60405161039491906124cd565b60405180910390f35b3480156103a957600080fd5b506103c460048036038101906103bf9190612722565b610c94565b6040516103d191906124f7565b60405180910390f35b3480156103e657600080fd5b506103ef610c9b565b6040516103fc91906124cd565b60405180910390f35b34801561041157600080fd5b5061041a610cbf565b6040516104279190612407565b60405180910390f35b34801561043c57600080fd5b506104576004803603810190610452919061277b565b610d4d565b005b34801561046557600080fd5b50610480600480360381019061047b91906127bb565b610fef565b60405161048d9190612603565b60405180910390f35b6104b060048036038101906104ab9190612930565b611151565b005b3480156104be57600080fd5b506104d960048036038101906104d4919061245f565b611228565b6040516104e69190612407565b60405180910390f35b3480156104fb57600080fd5b50610516600480360381019061051191906125c7565b6112d8565b6040516105239190612407565b60405180910390f35b34801561053857600080fd5b50610553600480360381019061054e91906129ed565b6118f3565b6040516105609190612603565b60405180910390f35b34801561057557600080fd5b50610590600480360381019061058b9190612a40565b611aa6565b60405161059d919061235c565b60405180910390f35b3480156105b257600080fd5b506105cd60048036038101906105c89190612a80565b611b3e565b6040516105da9190612603565b60405180910390f35b3480156105ef57600080fd5b5061060a600480360381019061060591906125c7565b611c43565b6040516106179190612603565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361067457600190506107c1565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106c657600190506107c1565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361071857600190506107c1565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361076a57600190506107c1565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107bc57600190506107c1565b600090505b919050565b600680546107d390612b16565b80601f01602080910402602001604051908101604052809291908181526020018280546107ff90612b16565b801561084c5780601f106108215761010080835404028352916020019161084c565b820191906000526020600020905b81548152906001019060200180831161082f57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108a984848484611cef565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b606061093084848484611cef565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109ec57600080fd5b6109f4612275565b600260008681526020019081526020016000208054905091506000821115610a7157600060026000878152602001908152602001600020600081548110610a3e57610a3d612b47565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610a7057600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610b9657600160086000828254610b8a9190612ba5565b92505081905550610bb8565b8365ffffffffffff1660086000828254610bb09190612ba5565b925050819055505b505092915050565b60018181548110610bd057600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610c0057600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610ccc90612b16565b80601f0160208091040260200160405190810160405280929190818152602001828054610cf890612b16565b8015610d455780601f10610d1a57610100808354040283529160200191610d45565b820191906000526020600020905b815481529060010190602001808311610d2857829003601f168201915b505050505081565b8015610e6e57600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610deb57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f86565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f0657600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610fe3919061235c565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461104d57600080fd5b600160026000868152602001908152602001600020805490501461107057600080fd5b60006002600086815260200190815260200160002060008154811061109857611097612b47565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146110ca57600080fd5b60006001026003600086815260200190815260200160002054146110ed57600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b61115d84848484611cef565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161121a9190612603565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016112849190612603565b602060405180830381865afa1580156112a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c59190612bee565b90506112d0816112d8565b915050919050565b606080600080604767ffffffffffffffff8111156112f9576112f8612805565b5b6040519080825280601f01601f19166020018201604052801561132b5781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061136357611362612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6800000000000000000000000000000000000000000000000000000000000000836001815181106113c7576113c6612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061142b5761142a612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f32000000000000000000000000000000000000000000000000000000000000008360038151811061148f5761148e612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3500000000000000000000000000000000000000000000000000000000000000836004815181106114f3576114f2612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061155757611556612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a00000000000000000000000000000000000000000000000000000000000000836006815181106115bb576115ba612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b60208110156118e757600460f087836020811061161157611610612b47565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff1610156116e9576030836116809190612c28565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106116b5576116b4612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061175b565b6057836116f69190612c28565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061172b5761172a612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106117705761176f612b47565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611847576030836117d29190612c28565b7f010000000000000000000000000000000000000000000000000000000000000002846001846118029190612ba5565b8151811061181357611812612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506118c5565b6057836118549190612c28565b7f010000000000000000000000000000000000000000000000000000000000000002846001846118849190612ba5565b8151811061189557611894612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b6002826118d29190612ba5565b915080806118df90612c5d565b9150506115f1565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff168154811061191f5761191e612b47565b5b90600052602060002001905080600001600c9054906101000a900460ff161561194757600080fd5b60008361ffff16148015611979575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b156119d85760018160000160068282829054906101000a900465ffffffffffff166119a49190612ca5565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055506119d08585610fef565b915050611a9f565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a3057600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611a7857600080fd5b611a9b8585858460000160069054906101000a900465ffffffffffff1685611f59565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611b6a57611b69612b47565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611bce57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611bf957600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611c2b57600080fd5b611c388686868685611f59565b915050949350505050565b60008060036000848152602001908152602001600020549050611c6581612180565b611c6e57600080fd5b611c77816121b2565b15611c855782915050611cea565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611d4691906124f7565b602060405180830381865afa158015611d63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d879190612cf4565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611dc157600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614611ef5573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611eeb57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b611ef457600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611f5283856121e4565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff16831792508260010290506000600102600360008381526020019081526020016000205414611fec57600080fd5b84600001600c9054906101000a900460ff1661204e578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff161461204d57600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff166120cf9190612ca5565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161216991906124f7565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361221457600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6122f1816122bc565b81146122fc57600080fd5b50565b60008135905061230e816122e8565b92915050565b60006020828403121561232a576123296122b2565b5b6000612338848285016122ff565b91505092915050565b60008115159050919050565b61235681612341565b82525050565b6000602082019050612371600083018461234d565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156123b1578082015181840152602081019050612396565b60008484015250505050565b6000601f19601f8301169050919050565b60006123d982612377565b6123e38185612382565b93506123f3818560208601612393565b6123fc816123bd565b840191505092915050565b6000602082019050818103600083015261242181846123ce565b905092915050565b6000819050919050565b61243c81612429565b811461244757600080fd5b50565b60008135905061245981612433565b92915050565b600060208284031215612475576124746122b2565b5b60006124838482850161244a565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006124b78261248c565b9050919050565b6124c7816124ac565b82525050565b60006020820190506124e260008301846124be565b92915050565b6124f181612429565b82525050565b600060208201905061250c60008301846124e8565b92915050565b61251b816124ac565b811461252657600080fd5b50565b60008135905061253881612512565b92915050565b600080600060608486031215612557576125566122b2565b5b600061256586828701612529565b935050602061257686828701612529565b92505060406125878682870161244a565b9150509250925092565b6000819050919050565b6125a481612591565b81146125af57600080fd5b50565b6000813590506125c18161259b565b92915050565b6000602082840312156125dd576125dc6122b2565b5b60006125eb848285016125b2565b91505092915050565b6125fd81612591565b82525050565b600060208201905061261860008301846125f4565b92915050565b600065ffffffffffff82169050919050565b6126398161261e565b811461264457600080fd5b50565b60008135905061265681612630565b92915050565b60008060408385031215612673576126726122b2565b5b6000612681858286016125b2565b925050602061269285828601612647565b9150509250929050565b600080604083850312156126b3576126b26122b2565b5b60006126c1858286016125b2565b92505060206126d28582860161244a565b9150509250929050565b6126e58161261e565b82525050565b600060608201905061270060008301866126dc565b61270d60208301856126dc565b61271a604083018461234d565b949350505050565b600060208284031215612738576127376122b2565b5b600061274684828501612529565b91505092915050565b61275881612341565b811461276357600080fd5b50565b6000813590506127758161274f565b92915050565b60008060408385031215612792576127916122b2565b5b60006127a085828601612529565b92505060206127b185828601612766565b9150509250929050565b600080604083850312156127d2576127d16122b2565b5b60006127e085828601612529565b92505060206127f1858286016125b2565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61283d826123bd565b810181811067ffffffffffffffff8211171561285c5761285b612805565b5b80604052505050565b600061286f6122a8565b905061287b8282612834565b919050565b600067ffffffffffffffff82111561289b5761289a612805565b5b6128a4826123bd565b9050602081019050919050565b82818337600083830152505050565b60006128d36128ce84612880565b612865565b9050828152602081018484840111156128ef576128ee612800565b5b6128fa8482856128b1565b509392505050565b600082601f830112612917576129166127fb565b5b81356129278482602086016128c0565b91505092915050565b6000806000806080858703121561294a576129496122b2565b5b600061295887828801612529565b945050602061296987828801612529565b935050604061297a8782880161244a565b925050606085013567ffffffffffffffff81111561299b5761299a6122b7565b5b6129a787828801612902565b91505092959194509250565b600061ffff82169050919050565b6129ca816129b3565b81146129d557600080fd5b50565b6000813590506129e7816129c1565b92915050565b600080600060608486031215612a0657612a056122b2565b5b6000612a1486828701612529565b9350506020612a25868287016125b2565b9250506040612a36868287016129d8565b9150509250925092565b60008060408385031215612a5757612a566122b2565b5b6000612a6585828601612529565b9250506020612a7685828601612529565b9150509250929050565b60008060008060808587031215612a9a57612a996122b2565b5b6000612aa887828801612529565b9450506020612ab9878288016125b2565b9350506040612aca878288016129d8565b9250506060612adb87828801612647565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612b2e57607f821691505b602082108103612b4157612b40612ae7565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612bb082612429565b9150612bbb83612429565b9250828201905080821115612bd357612bd2612b76565b5b92915050565b600081519050612be88161259b565b92915050565b600060208284031215612c0457612c036122b2565b5b6000612c1284828501612bd9565b91505092915050565b600060ff82169050919050565b6000612c3382612c1b565b9150612c3e83612c1b565b9250828201905060ff811115612c5757612c56612b76565b5b92915050565b6000612c6882612429565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c9a57612c99612b76565b5b600182019050919050565b6000612cb08261261e565b9150612cbb8361261e565b9250828201905065ffffffffffff811115612cd957612cd8612b76565b5b92915050565b600081519050612cee81612512565b92915050565b600060208284031215612d0a57612d096122b2565b5b6000612d1884828501612cdf565b9150509291505056fea26469706673582212201fd82403c5293de325654f31b85c48b293a8122903ef7468c8535d2b717832ee64736f6c63430008110033 +\ No newline at end of file diff --git a/js/contract/CraftNFT.json b/js/contract/CraftNFT.json @@ -1 +1 @@ -[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"TransferWithData","type":"event"},{"inputs":[{"internalType":"bytes32","name":"content","type":"bytes32"},{"internalType":"uint48","name":"count","type":"uint48"}],"name":"allocate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_truncatedId","type":"bytes32"}],"name":"getDigest","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint256","name":"_batch","type":"uint256"},{"internalType":"uint48","name":"_index","type":"uint48"}],"name":"mintExactFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint256","name":"_batch","type":"uint256"}],"name":"mintFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"}],"name":"mintTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"mintedToken","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"toURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"token","outputs":[{"internalType":"uint48","name":"count","type":"uint48"},{"internalType":"uint48","name":"cumulativeCount","type":"uint48"},{"internalType":"uint48","name":"cursor","type":"uint48"},{"internalType":"bool","name":"sparse","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"}] +[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"TransferWithData","type":"event"},{"inputs":[{"internalType":"bytes32","name":"content","type":"bytes32"},{"internalType":"uint48","name":"count","type":"uint48"}],"name":"allocate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_truncatedId","type":"bytes32"}],"name":"getDigest","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint16","name":"_batch","type":"uint16"},{"internalType":"uint48","name":"_index","type":"uint48"}],"name":"mintExactFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint16","name":"_batch","type":"uint16"}],"name":"mintFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"}],"name":"mintTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"mintedToken","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"toURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"token","outputs":[{"internalType":"uint48","name":"count","type":"uint48"},{"internalType":"uint48","name":"cursor","type":"uint48"},{"internalType":"bool","name":"sparse","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"}] diff --git a/python/eth_craft_nft/data/CraftNFT.bin b/python/eth_craft_nft/data/CraftNFT.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b506040516200339d3803806200339d833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600690816200008891906200050c565b5080600790816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612d9a80620006036000396000f3fe60806040526004361061015d576000357c010000000000000000000000000000000000000000000000000000000090048063559f5dc9116100d3578063adf288df1161008c578063adf288df146104d4578063b88d4fde14610511578063c87b56dd1461052d578063c9796c391461056a578063e985e9c5146105a7578063f9613ab2146105e45761015d565b8063559f5dc91461039b5780636352211e146103db57806370a08231146104185780638da5cb5b1461045557806395d89b4114610480578063a22cb465146104ab5761015d565b806324e0febc1161012557806324e0febc1461024e57806325cbaa181461028b5780632c1369de146102c857806342842e0e146103055780634d03546a146103215780634f64b2be1461035e5761015d565b806301ffc9a71461016257806306fdde031461019f578063081812fc146101ca57806318160ddd1461020757806323b872dd14610232575b600080fd5b34801561016e57600080fd5b506101896004803603810190610184919061234f565b610621565b6040516101969190612397565b60405180910390f35b3480156101ab57600080fd5b506101b46107c7565b6040516101c19190612442565b60405180910390f35b3480156101d657600080fd5b506101f160048036038101906101ec919061249a565b610855565b6040516101fe9190612508565b60405180910390f35b34801561021357600080fd5b5061021c610892565b6040516102299190612532565b60405180910390f35b61024c60048036038101906102479190612579565b61089c565b005b34801561025a57600080fd5b5061027560048036038101906102709190612602565b61090b565b604051610282919061263e565b60405180910390f35b34801561029757600080fd5b506102b260048036038101906102ad9190612659565b610923565b6040516102bf919061263e565b60405180910390f35b3480156102d457600080fd5b506102ef60048036038101906102ea91906126ea565b610ace565b6040516102fc919061263e565b60405180910390f35b61031f600480360381019061031a9190612579565b610bcf565b005b34801561032d57600080fd5b5061034860048036038101906103439190612751565b610c3e565b6040516103559190612397565b60405180910390f35b34801561036a57600080fd5b506103856004803603810190610380919061249a565b610f16565b604051610392919061263e565b60405180910390f35b3480156103a757600080fd5b506103c260048036038101906103bd9190612791565b610f3a565b6040516103d294939291906127e0565b60405180910390f35b3480156103e757600080fd5b5061040260048036038101906103fd919061249a565b610fc6565b60405161040f9190612508565b60405180910390f35b34801561042457600080fd5b5061043f600480360381019061043a9190612825565b611002565b60405161044c9190612532565b60405180910390f35b34801561046157600080fd5b5061046a611009565b6040516104779190612508565b60405180910390f35b34801561048c57600080fd5b5061049561102d565b6040516104a29190612442565b60405180910390f35b3480156104b757600080fd5b506104d260048036038101906104cd919061287e565b6110bb565b005b3480156104e057600080fd5b506104fb60048036038101906104f691906128be565b61135d565b604051610508919061263e565b60405180910390f35b61052b60048036038101906105269190612a33565b6114bf565b005b34801561053957600080fd5b50610554600480360381019061054f919061249a565b611596565b6040516105619190612442565b60405180910390f35b34801561057657600080fd5b50610591600480360381019061058c9190612602565b611646565b60405161059e9190612442565b60405180910390f35b3480156105b357600080fd5b506105ce60048036038101906105c99190612ab6565b611c61565b6040516105db9190612397565b60405180910390f35b3480156105f057600080fd5b5061060b60048036038101906106069190612602565b611cf9565b604051610618919061263e565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361067557600190506107c2565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106c757600190506107c2565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361071957600190506107c2565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361076b57600190506107c2565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107bd57600190506107c2565b600090505b919050565b600680546107d490612b25565b80601f016020809104026020016040519081016040528092919081815260200182805461080090612b25565b801561084d5780601f106108225761010080835404028352916020019161084d565b820191906000526020600020905b81548152906001019060200180831161083057829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108aa84848484611da5565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60008060026000858152602001908152602001600020838154811061094b5761094a612b56565b5b9060005260206000200190508060000160129054906101000a900460ff161561097357600080fd5b6000831480156109a1575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15610a0057600181600001600c8282829054906101000a900465ffffffffffff166109cc9190612bb4565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055506109f8858561135d565b915050610ac7565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a5857600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff1681600001600c9054906101000a900465ffffffffffff1665ffffffffffff1610610aa057600080fd5b610ac385858584600001600c9054906101000a900465ffffffffffff168561200f565b9150505b9392505050565b600080600260008681526020019081526020016000208481548110610af657610af5612b56565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b5a57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610b8557600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610610bb757600080fd5b610bc4868686868561200f565b915050949350505050565b6060610bdd84848484611da5565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c9c57600080fd5b610ca46122a1565b600260008781526020019081526020016000208054905092506000831115610d7457600060026000888152602001908152602001600020600081548110610cee57610ced612b56565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610d2057600080fd5b60026000878152602001908152602001600020600184610d409190612bee565b81548110610d5157610d50612b56565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1691505b84816000019065ffffffffffff16908165ffffffffffff16815250508482610d9c9190612bb4565b816020019065ffffffffffff16908165ffffffffffff168152505060026000878152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548165ffffffffffff021916908365ffffffffffff16021790555060608201518160000160126101000a81548160ff0219169083151502179055505050600186908060018154018082558091505060019003906000526020600020016000909190919091505560008565ffffffffffff1603610eeb57600160086000828254610edf9190612c22565b92505081905550610f0d565b8465ffffffffffff1660086000828254610f059190612c22565b925050819055505b50505092915050565b60018181548110610f2657600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610f5657600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900465ffffffffffff16908060000160129054906101000a900460ff16905084565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6007805461103a90612b25565b80601f016020809104026020016040519081016040528092919081815260200182805461106690612b25565b80156110b35780601f10611088576101008083540402835291602001916110b3565b820191906000526020600020905b81548152906001019060200180831161109657829003601f168201915b505050505081565b80156111dc57600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461115957600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506112f4565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361127457600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516113519190612397565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113bb57600080fd5b60016002600086815260200190815260200160002080549050146113de57600080fd5b60006002600086815260200190815260200160002060008154811061140657611405612b56565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461143857600080fd5b600060010260036000868152602001908152602001600020541461145b57600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b6114cb84848484611da5565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e6000600102604051611588919061263e565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016115f2919061263e565b602060405180830381865afa15801561160f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116339190612c6b565b905061163e81611646565b915050919050565b606080600080604767ffffffffffffffff81111561166757611666612908565b5b6040519080825280601f01601f1916602001820160405280156116995781602001600182028036833780820191505090505b5092507f7300000000000000000000000000000000000000000000000000000000000000836000815181106116d1576116d0612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061173557611734612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061179957611798612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3200000000000000000000000000000000000000000000000000000000000000836003815181106117fd576117fc612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061186157611860612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3600000000000000000000000000000000000000000000000000000000000000836005815181106118c5576118c4612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a000000000000000000000000000000000000000000000000000000000000008360068151811061192957611928612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611c5557600460f087836020811061197f5761197e612b56565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff161015611a57576030836119ee9190612ca5565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611a2357611a22612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611ac9565b605783611a649190612ca5565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611a9957611a98612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611ade57611add612b56565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611bb557603083611b409190612ca5565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611b709190612c22565b81518110611b8157611b80612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611c33565b605783611bc29190612ca5565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611bf29190612c22565b81518110611c0357611c02612b56565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611c409190612c22565b91508080611c4d90612cda565b91505061195f565b50829350505050919050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008060036000848152602001908152602001600020549050611d1b816121ac565b611d2457600080fd5b611d2d816121de565b15611d3b5782915050611da0565b7effffffffff00000000000000000000000000000000000000000000000000006001028116905060d081908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611dfc9190612532565b602060405180830381865afa158015611e19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3d9190612d37565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611e7757600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614611fab573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611fa157503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b611faa57600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506120088385612210565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000088600190041692506014879060020a02831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461208057600080fd5b8460000160129054906101000a900460ff166120e25784600001600c9054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16146120e15760018560000160126101000a81548160ff0219169083151502179055505b5b64ffffffffff886001900416915060d0829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff1682179150600185600001600c8282829054906101000a900465ffffffffffff166121609190612bb4565b92506101000a81548165ffffffffffff021916908365ffffffffffff16021790555081600102600360008381526020019081526020016000208190555080935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361224057600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060800160405280600065ffffffffffff168152602001600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61232c816122f7565b811461233757600080fd5b50565b60008135905061234981612323565b92915050565b600060208284031215612365576123646122ed565b5b60006123738482850161233a565b91505092915050565b60008115159050919050565b6123918161237c565b82525050565b60006020820190506123ac6000830184612388565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156123ec5780820151818401526020810190506123d1565b60008484015250505050565b6000601f19601f8301169050919050565b6000612414826123b2565b61241e81856123bd565b935061242e8185602086016123ce565b612437816123f8565b840191505092915050565b6000602082019050818103600083015261245c8184612409565b905092915050565b6000819050919050565b61247781612464565b811461248257600080fd5b50565b6000813590506124948161246e565b92915050565b6000602082840312156124b0576124af6122ed565b5b60006124be84828501612485565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006124f2826124c7565b9050919050565b612502816124e7565b82525050565b600060208201905061251d60008301846124f9565b92915050565b61252c81612464565b82525050565b60006020820190506125476000830184612523565b92915050565b612556816124e7565b811461256157600080fd5b50565b6000813590506125738161254d565b92915050565b600080600060608486031215612592576125916122ed565b5b60006125a086828701612564565b93505060206125b186828701612564565b92505060406125c286828701612485565b9150509250925092565b6000819050919050565b6125df816125cc565b81146125ea57600080fd5b50565b6000813590506125fc816125d6565b92915050565b600060208284031215612618576126176122ed565b5b6000612626848285016125ed565b91505092915050565b612638816125cc565b82525050565b6000602082019050612653600083018461262f565b92915050565b600080600060608486031215612672576126716122ed565b5b600061268086828701612564565b9350506020612691868287016125ed565b92505060406126a286828701612485565b9150509250925092565b600065ffffffffffff82169050919050565b6126c7816126ac565b81146126d257600080fd5b50565b6000813590506126e4816126be565b92915050565b60008060008060808587031215612704576127036122ed565b5b600061271287828801612564565b9450506020612723878288016125ed565b935050604061273487828801612485565b9250506060612745878288016126d5565b91505092959194509250565b60008060408385031215612768576127676122ed565b5b6000612776858286016125ed565b9250506020612787858286016126d5565b9150509250929050565b600080604083850312156127a8576127a76122ed565b5b60006127b6858286016125ed565b92505060206127c785828601612485565b9150509250929050565b6127da816126ac565b82525050565b60006080820190506127f560008301876127d1565b61280260208301866127d1565b61280f60408301856127d1565b61281c6060830184612388565b95945050505050565b60006020828403121561283b5761283a6122ed565b5b600061284984828501612564565b91505092915050565b61285b8161237c565b811461286657600080fd5b50565b60008135905061287881612852565b92915050565b60008060408385031215612895576128946122ed565b5b60006128a385828601612564565b92505060206128b485828601612869565b9150509250929050565b600080604083850312156128d5576128d46122ed565b5b60006128e385828601612564565b92505060206128f4858286016125ed565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612940826123f8565b810181811067ffffffffffffffff8211171561295f5761295e612908565b5b80604052505050565b60006129726122e3565b905061297e8282612937565b919050565b600067ffffffffffffffff82111561299e5761299d612908565b5b6129a7826123f8565b9050602081019050919050565b82818337600083830152505050565b60006129d66129d184612983565b612968565b9050828152602081018484840111156129f2576129f1612903565b5b6129fd8482856129b4565b509392505050565b600082601f830112612a1a57612a196128fe565b5b8135612a2a8482602086016129c3565b91505092915050565b60008060008060808587031215612a4d57612a4c6122ed565b5b6000612a5b87828801612564565b9450506020612a6c87828801612564565b9350506040612a7d87828801612485565b925050606085013567ffffffffffffffff811115612a9e57612a9d6122f2565b5b612aaa87828801612a05565b91505092959194509250565b60008060408385031215612acd57612acc6122ed565b5b6000612adb85828601612564565b9250506020612aec85828601612564565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612b3d57607f821691505b602082108103612b5057612b4f612af6565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612bbf826126ac565b9150612bca836126ac565b9250828201905065ffffffffffff811115612be857612be7612b85565b5b92915050565b6000612bf982612464565b9150612c0483612464565b9250828203905081811115612c1c57612c1b612b85565b5b92915050565b6000612c2d82612464565b9150612c3883612464565b9250828201905080821115612c5057612c4f612b85565b5b92915050565b600081519050612c65816125d6565b92915050565b600060208284031215612c8157612c806122ed565b5b6000612c8f84828501612c56565b91505092915050565b600060ff82169050919050565b6000612cb082612c98565b9150612cbb83612c98565b9250828201905060ff811115612cd457612cd3612b85565b5b92915050565b6000612ce582612464565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d1757612d16612b85565b5b600182019050919050565b600081519050612d318161254d565b92915050565b600060208284031215612d4d57612d4c6122ed565b5b6000612d5b84828501612d22565b9150509291505056fea26469706673582212201e4b1d17fa65a90937945a5e38563cea12d57838e663a460dda50bb81ee7d37a64736f6c63430008110033 -\ No newline at end of file +60806040523480156200001157600080fd5b506040516200335a3803806200335a833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600690816200008891906200050c565b5080600790816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612d5780620006036000396000f3fe60806040526004361061015d576000357c01000000000000000000000000000000000000000000000000000000009004806370a08231116100d3578063c87b56dd1161008c578063c87b56dd146104b2578063c9796c39146104ef578063d824ee4f1461052c578063e985e9c514610569578063f117e173146105a6578063f9613ab2146105e35761015d565b806370a082311461039d5780638da5cb5b146103da57806395d89b4114610405578063a22cb46514610430578063adf288df14610459578063b88d4fde146104965761015d565b806324e0febc1161012557806324e0febc1461024e57806342842e0e1461028b5780634d03546a146102a75780634f64b2be146102e4578063559f5dc9146103215780636352211e146103605761015d565b806301ffc9a71461016257806306fdde031461019f578063081812fc146101ca57806318160ddd1461020757806323b872dd14610232575b600080fd5b34801561016e57600080fd5b5061018960048036038101906101849190612314565b610620565b604051610196919061235c565b60405180910390f35b3480156101ab57600080fd5b506101b46107c6565b6040516101c19190612407565b60405180910390f35b3480156101d657600080fd5b506101f160048036038101906101ec919061245f565b610854565b6040516101fe91906124cd565b60405180910390f35b34801561021357600080fd5b5061021c610891565b60405161022991906124f7565b60405180910390f35b61024c6004803603810190610247919061253e565b61089b565b005b34801561025a57600080fd5b50610275600480360381019061027091906125c7565b61090a565b6040516102829190612603565b60405180910390f35b6102a560048036038101906102a0919061253e565b610922565b005b3480156102b357600080fd5b506102ce60048036038101906102c9919061265c565b610991565b6040516102db919061235c565b60405180910390f35b3480156102f057600080fd5b5061030b6004803603810190610306919061245f565b610bc0565b6040516103189190612603565b60405180910390f35b34801561032d57600080fd5b506103486004803603810190610343919061269c565b610be4565b604051610357939291906126eb565b60405180910390f35b34801561036c57600080fd5b506103876004803603810190610382919061245f565b610c58565b60405161039491906124cd565b60405180910390f35b3480156103a957600080fd5b506103c460048036038101906103bf9190612722565b610c94565b6040516103d191906124f7565b60405180910390f35b3480156103e657600080fd5b506103ef610c9b565b6040516103fc91906124cd565b60405180910390f35b34801561041157600080fd5b5061041a610cbf565b6040516104279190612407565b60405180910390f35b34801561043c57600080fd5b506104576004803603810190610452919061277b565b610d4d565b005b34801561046557600080fd5b50610480600480360381019061047b91906127bb565b610fef565b60405161048d9190612603565b60405180910390f35b6104b060048036038101906104ab9190612930565b611151565b005b3480156104be57600080fd5b506104d960048036038101906104d4919061245f565b611228565b6040516104e69190612407565b60405180910390f35b3480156104fb57600080fd5b50610516600480360381019061051191906125c7565b6112d8565b6040516105239190612407565b60405180910390f35b34801561053857600080fd5b50610553600480360381019061054e91906129ed565b6118f3565b6040516105609190612603565b60405180910390f35b34801561057557600080fd5b50610590600480360381019061058b9190612a40565b611aa6565b60405161059d919061235c565b60405180910390f35b3480156105b257600080fd5b506105cd60048036038101906105c89190612a80565b611b3e565b6040516105da9190612603565b60405180910390f35b3480156105ef57600080fd5b5061060a600480360381019061060591906125c7565b611c43565b6040516106179190612603565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361067457600190506107c1565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106c657600190506107c1565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361071857600190506107c1565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361076a57600190506107c1565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107bc57600190506107c1565b600090505b919050565b600680546107d390612b16565b80601f01602080910402602001604051908101604052809291908181526020018280546107ff90612b16565b801561084c5780601f106108215761010080835404028352916020019161084c565b820191906000526020600020905b81548152906001019060200180831161082f57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108a984848484611cef565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b606061093084848484611cef565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109ec57600080fd5b6109f4612275565b600260008681526020019081526020016000208054905091506000821115610a7157600060026000878152602001908152602001600020600081548110610a3e57610a3d612b47565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610a7057600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610b9657600160086000828254610b8a9190612ba5565b92505081905550610bb8565b8365ffffffffffff1660086000828254610bb09190612ba5565b925050819055505b505092915050565b60018181548110610bd057600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610c0057600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610ccc90612b16565b80601f0160208091040260200160405190810160405280929190818152602001828054610cf890612b16565b8015610d455780601f10610d1a57610100808354040283529160200191610d45565b820191906000526020600020905b815481529060010190602001808311610d2857829003601f168201915b505050505081565b8015610e6e57600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610deb57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f86565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f0657600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610fe3919061235c565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461104d57600080fd5b600160026000868152602001908152602001600020805490501461107057600080fd5b60006002600086815260200190815260200160002060008154811061109857611097612b47565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146110ca57600080fd5b60006001026003600086815260200190815260200160002054146110ed57600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b61115d84848484611cef565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161121a9190612603565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016112849190612603565b602060405180830381865afa1580156112a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c59190612bee565b90506112d0816112d8565b915050919050565b606080600080604767ffffffffffffffff8111156112f9576112f8612805565b5b6040519080825280601f01601f19166020018201604052801561132b5781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061136357611362612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6800000000000000000000000000000000000000000000000000000000000000836001815181106113c7576113c6612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061142b5761142a612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f32000000000000000000000000000000000000000000000000000000000000008360038151811061148f5761148e612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3500000000000000000000000000000000000000000000000000000000000000836004815181106114f3576114f2612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061155757611556612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a00000000000000000000000000000000000000000000000000000000000000836006815181106115bb576115ba612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b60208110156118e757600460f087836020811061161157611610612b47565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff1610156116e9576030836116809190612c28565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106116b5576116b4612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061175b565b6057836116f69190612c28565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061172b5761172a612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106117705761176f612b47565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611847576030836117d29190612c28565b7f010000000000000000000000000000000000000000000000000000000000000002846001846118029190612ba5565b8151811061181357611812612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506118c5565b6057836118549190612c28565b7f010000000000000000000000000000000000000000000000000000000000000002846001846118849190612ba5565b8151811061189557611894612b47565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b6002826118d29190612ba5565b915080806118df90612c5d565b9150506115f1565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff168154811061191f5761191e612b47565b5b90600052602060002001905080600001600c9054906101000a900460ff161561194757600080fd5b60008361ffff16148015611979575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b156119d85760018160000160068282829054906101000a900465ffffffffffff166119a49190612ca5565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055506119d08585610fef565b915050611a9f565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a3057600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611a7857600080fd5b611a9b8585858460000160069054906101000a900465ffffffffffff1685611f59565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611b6a57611b69612b47565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611bce57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611bf957600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611c2b57600080fd5b611c388686868685611f59565b915050949350505050565b60008060036000848152602001908152602001600020549050611c6581612180565b611c6e57600080fd5b611c77816121b2565b15611c855782915050611cea565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611d4691906124f7565b602060405180830381865afa158015611d63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d879190612cf4565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611dc157600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614611ef5573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611eeb57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b611ef457600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611f5283856121e4565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff16831792508260010290506000600102600360008381526020019081526020016000205414611fec57600080fd5b84600001600c9054906101000a900460ff1661204e578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff161461204d57600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff166120cf9190612ca5565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161216991906124f7565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361221457600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6122f1816122bc565b81146122fc57600080fd5b50565b60008135905061230e816122e8565b92915050565b60006020828403121561232a576123296122b2565b5b6000612338848285016122ff565b91505092915050565b60008115159050919050565b61235681612341565b82525050565b6000602082019050612371600083018461234d565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156123b1578082015181840152602081019050612396565b60008484015250505050565b6000601f19601f8301169050919050565b60006123d982612377565b6123e38185612382565b93506123f3818560208601612393565b6123fc816123bd565b840191505092915050565b6000602082019050818103600083015261242181846123ce565b905092915050565b6000819050919050565b61243c81612429565b811461244757600080fd5b50565b60008135905061245981612433565b92915050565b600060208284031215612475576124746122b2565b5b60006124838482850161244a565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006124b78261248c565b9050919050565b6124c7816124ac565b82525050565b60006020820190506124e260008301846124be565b92915050565b6124f181612429565b82525050565b600060208201905061250c60008301846124e8565b92915050565b61251b816124ac565b811461252657600080fd5b50565b60008135905061253881612512565b92915050565b600080600060608486031215612557576125566122b2565b5b600061256586828701612529565b935050602061257686828701612529565b92505060406125878682870161244a565b9150509250925092565b6000819050919050565b6125a481612591565b81146125af57600080fd5b50565b6000813590506125c18161259b565b92915050565b6000602082840312156125dd576125dc6122b2565b5b60006125eb848285016125b2565b91505092915050565b6125fd81612591565b82525050565b600060208201905061261860008301846125f4565b92915050565b600065ffffffffffff82169050919050565b6126398161261e565b811461264457600080fd5b50565b60008135905061265681612630565b92915050565b60008060408385031215612673576126726122b2565b5b6000612681858286016125b2565b925050602061269285828601612647565b9150509250929050565b600080604083850312156126b3576126b26122b2565b5b60006126c1858286016125b2565b92505060206126d28582860161244a565b9150509250929050565b6126e58161261e565b82525050565b600060608201905061270060008301866126dc565b61270d60208301856126dc565b61271a604083018461234d565b949350505050565b600060208284031215612738576127376122b2565b5b600061274684828501612529565b91505092915050565b61275881612341565b811461276357600080fd5b50565b6000813590506127758161274f565b92915050565b60008060408385031215612792576127916122b2565b5b60006127a085828601612529565b92505060206127b185828601612766565b9150509250929050565b600080604083850312156127d2576127d16122b2565b5b60006127e085828601612529565b92505060206127f1858286016125b2565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61283d826123bd565b810181811067ffffffffffffffff8211171561285c5761285b612805565b5b80604052505050565b600061286f6122a8565b905061287b8282612834565b919050565b600067ffffffffffffffff82111561289b5761289a612805565b5b6128a4826123bd565b9050602081019050919050565b82818337600083830152505050565b60006128d36128ce84612880565b612865565b9050828152602081018484840111156128ef576128ee612800565b5b6128fa8482856128b1565b509392505050565b600082601f830112612917576129166127fb565b5b81356129278482602086016128c0565b91505092915050565b6000806000806080858703121561294a576129496122b2565b5b600061295887828801612529565b945050602061296987828801612529565b935050604061297a8782880161244a565b925050606085013567ffffffffffffffff81111561299b5761299a6122b7565b5b6129a787828801612902565b91505092959194509250565b600061ffff82169050919050565b6129ca816129b3565b81146129d557600080fd5b50565b6000813590506129e7816129c1565b92915050565b600080600060608486031215612a0657612a056122b2565b5b6000612a1486828701612529565b9350506020612a25868287016125b2565b9250506040612a36868287016129d8565b9150509250925092565b60008060408385031215612a5757612a566122b2565b5b6000612a6585828601612529565b9250506020612a7685828601612529565b9150509250929050565b60008060008060808587031215612a9a57612a996122b2565b5b6000612aa887828801612529565b9450506020612ab9878288016125b2565b9350506040612aca878288016129d8565b9250506060612adb87828801612647565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612b2e57607f821691505b602082108103612b4157612b40612ae7565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612bb082612429565b9150612bbb83612429565b9250828201905080821115612bd357612bd2612b76565b5b92915050565b600081519050612be88161259b565b92915050565b600060208284031215612c0457612c036122b2565b5b6000612c1284828501612bd9565b91505092915050565b600060ff82169050919050565b6000612c3382612c1b565b9150612c3e83612c1b565b9250828201905060ff811115612c5757612c56612b76565b5b92915050565b6000612c6882612429565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c9a57612c99612b76565b5b600182019050919050565b6000612cb08261261e565b9150612cbb8361261e565b9250828201905065ffffffffffff811115612cd957612cd8612b76565b5b92915050565b600081519050612cee81612512565b92915050565b600060208284031215612d0a57612d096122b2565b5b6000612d1884828501612cdf565b9150509291505056fea26469706673582212201fd82403c5293de325654f31b85c48b293a8122903ef7468c8535d2b717832ee64736f6c63430008110033 +\ No newline at end of file diff --git a/python/eth_craft_nft/data/CraftNFT.json b/python/eth_craft_nft/data/CraftNFT.json @@ -1 +1 @@ -[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"TransferWithData","type":"event"},{"inputs":[{"internalType":"bytes32","name":"content","type":"bytes32"},{"internalType":"uint48","name":"count","type":"uint48"}],"name":"allocate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_truncatedId","type":"bytes32"}],"name":"getDigest","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint256","name":"_batch","type":"uint256"},{"internalType":"uint48","name":"_index","type":"uint48"}],"name":"mintExactFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint256","name":"_batch","type":"uint256"}],"name":"mintFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"}],"name":"mintTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"mintedToken","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"toURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"token","outputs":[{"internalType":"uint48","name":"count","type":"uint48"},{"internalType":"uint48","name":"cumulativeCount","type":"uint48"},{"internalType":"uint48","name":"cursor","type":"uint48"},{"internalType":"bool","name":"sparse","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"}] +[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"TransferWithData","type":"event"},{"inputs":[{"internalType":"bytes32","name":"content","type":"bytes32"},{"internalType":"uint48","name":"count","type":"uint48"}],"name":"allocate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_truncatedId","type":"bytes32"}],"name":"getDigest","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint16","name":"_batch","type":"uint16"},{"internalType":"uint48","name":"_index","type":"uint48"}],"name":"mintExactFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint16","name":"_batch","type":"uint16"}],"name":"mintFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"}],"name":"mintTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"mintedToken","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"toURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"token","outputs":[{"internalType":"uint48","name":"count","type":"uint48"},{"internalType":"uint48","name":"cursor","type":"uint48"},{"internalType":"bool","name":"sparse","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"}] diff --git a/python/eth_craft_nft/nft.py b/python/eth_craft_nft/nft.py @@ -28,9 +28,8 @@ logg = logging.getLogger(__name__) class TokenSpec: - def __init__(self, count, cumulative_count, cursor): + def __init__(self, count, cursor): self.count = count - self.cumulative_count = cumulative_count self.cursor = cursor @@ -213,21 +212,21 @@ class CraftNFT(ERC721): enc.method('mintExactFromBatchTo') enc.typ(ABIContractType.ADDRESS) enc.typ(ABIContractType.BYTES32) - enc.typ(ABIContractType.UINT256) + enc.typ(ABIContractType.UINT16) enc.typ(ABIContractType.UINT48) enc.address(recipient) enc.bytes32(token_id) - enc.uint256(batch) + enc.uintn(batch, 16) enc.uintn(index, 48) data = enc.get() else: enc.method('mintFromBatchTo') enc.typ(ABIContractType.ADDRESS) enc.typ(ABIContractType.BYTES32) - enc.typ(ABIContractType.UINT256) + enc.typ(ABIContractType.UINT16) enc.address(recipient) enc.bytes32(token_id) - enc.uint256(batch) + enc.uintn(batch, 16) data = enc.get() tx = self.template(sender_address, contract_address, use_nonce=True) @@ -236,6 +235,9 @@ class CraftNFT(ERC721): return tx + # def to_index_id(self, token_id, batch, index): + + @classmethod def parse_batch_of(self, v): r = abi_decode_single(ABIContractType.UINT256, v) @@ -250,12 +252,10 @@ class CraftNFT(ERC721): d = ABIContractDecoder() d.typ(ABIContractType.UINT48) d.typ(ABIContractType.UINT48) - d.typ(ABIContractType.UINT48) d.val(v[:64]) d.val(v[64:128]) - d.val(v[128:192]) r = d.decode() - return TokenSpec(r[0], r[1], r[2]) + return TokenSpec(r[0], r[1]) @classmethod def parse_token(self, v, token_id): diff --git a/python/tests/test_basic.py b/python/tests/test_basic.py @@ -218,7 +218,7 @@ class Test(EthTesterCase): r = self.conn.do(o) self.assertEqual(r['status'], 1) - expected_id = hash_of_foo[:64-10] + '0000000000' + expected_id = hash_of_foo[:64-16] + '0000000000000000' o = c.get_token(self.address, expected_id, sender_address=self.accounts[0]) r = self.rpc.do(o) @@ -233,7 +233,7 @@ class Test(EthTesterCase): r = self.conn.do(o) self.assertEqual(r['status'], 1) - expected_id = hash_of_foo[:64-10] + '0000000001' + expected_id = hash_of_foo[:64-16] + '0000000000000001' o = c.get_token(self.address, expected_id, sender_address=self.accounts[0]) r = self.rpc.do(o) @@ -337,6 +337,9 @@ class Test(EthTesterCase): (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[1], hash_of_foo, 0) self.rpc.do(o) + o = c.get_token_spec(self.address, hash_of_foo, 0, sender_address=self.accounts[0]) + r = self.rpc.do(o) + o = c.get_token(self.address, hash_of_foo, sender_address=self.accounts[0]) r = self.rpc.do(o) @@ -356,7 +359,7 @@ class Test(EthTesterCase): self.rpc.do(o) (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[1], hash_of_foo, 0) - self.rpc.do(o) + self.conn.do(o) (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[1], hash_of_foo, 1) self.rpc.do(o) @@ -364,17 +367,20 @@ class Test(EthTesterCase): (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[1], hash_of_foo, 1) self.rpc.do(o) - expected_id = hash_of_foo[:64-10] + '0000000000' + expected_id = hash_of_foo[:64-16] + '0000000000000000' o = c.get_digest(self.address, expected_id, sender_address=self.accounts[0]) r = self.rpc.do(o) self.assertEqual(strip_0x(r), hash_of_foo) - expected_id = hash_of_foo[:64-10] + '0000100000' + expected_id = hash_of_foo[:64-16] + '0001000000000000' + o = c.get_token(self.address, expected_id, sender_address=self.accounts[0]) + self.rpc.do(o) + o = c.get_digest(self.address, expected_id, sender_address=self.accounts[0]) r = self.rpc.do(o) self.assertEqual(strip_0x(r), hash_of_foo) - expected_id = hash_of_foo[:64-10] + '0000100001' + expected_id = hash_of_foo[:64-16] + '0001000000000001' o = c.get_digest(self.address, expected_id, sender_address=self.accounts[0]) r = self.rpc.do(o) self.assertEqual(strip_0x(r), hash_of_foo) @@ -405,7 +411,7 @@ class Test(EthTesterCase): (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[1], hash_of_foo, 0) self.rpc.do(o) - expected_id = hash_of_foo[:64-10] + '0000000000' + expected_id = hash_of_foo[:64-16] + '0000000000000000' o = c.token_uri(self.address, int(expected_id, 16), sender_address=self.accounts[0]) r = self.rpc.do(o) uri = c.parse_token_uri(r) @@ -459,7 +465,7 @@ class Test(EthTesterCase): r = self.conn.do(o) self.assertEqual(r['status'], 0) - expected_id = hash_of_foo[:64-10] + '0000000000' + expected_id = hash_of_foo[:64-16] + '0000000000000000' o = c.get_digest(self.address, expected_id, sender_address=self.accounts[0]) r = self.rpc.do(o) self.assertEqual(strip_0x(r), hash_of_foo) diff --git a/solidity/CraftNFT.sol b/solidity/CraftNFT.sol @@ -14,7 +14,6 @@ contract CraftNFT { // In this case a full iteration up to count is required to discover all minted tokens. struct tokenSpec { uint48 count; - uint48 cumulativeCount; uint48 cursor; bool sparse; } @@ -52,6 +51,9 @@ contract CraftNFT { // ERC-721 event TransferWithData(address indexed _from, address indexed _to, uint256 indexed _tokenId, bytes32 _data); + // Minter + event Mint(address indexed _minter, address indexed _beneficiary, uint256 value); + constructor(string memory _name, string memory _symbol) { owner = msg.sender; name = _name; @@ -79,9 +81,9 @@ contract CraftNFT { return _truncatedId; } - digest &= 0x00ffffffffff0000000000000000000000000000000000000000000000000000; - digest >>= 208; - digest |= _truncatedId & 0xffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000; + digest &= 0x00ffffffffffffffff0000000000000000000000000000000000000000000000; + digest >>= 184; + digest |= _truncatedId & 0xffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000; return digest; } @@ -89,7 +91,6 @@ contract CraftNFT { // if count is set to 0, only a single unique token can be minted. function allocate(bytes32 content, uint48 count) public returns (bool) { uint256 l; - uint48 _cumulativeCount; require(msg.sender == owner); tokenSpec memory _token; @@ -97,11 +98,9 @@ contract CraftNFT { l = token[content].length; if (l > 0) { require(token[content][0].count > 0); - _cumulativeCount = token[content][l-1].cumulativeCount; } _token.count = count; - _token.cumulativeCount = _cumulativeCount + count; token[content].push(_token); tokens.push(content); @@ -162,10 +161,10 @@ contract CraftNFT { // // If the token was allocated as a single token (which has not yet been minted), // this method will transparently alias to mintTo - function mintFromBatchTo(address _recipient, bytes32 _content, uint256 _batch) public returns (bytes32) { + function mintFromBatchTo(address _recipient, bytes32 _content, uint16 _batch) public returns (bytes32) { tokenSpec storage spec; - spec = token[_content][_batch]; + spec = token[_content][uint256(_batch)]; require(!spec.sparse); if (_batch == 0 && spec.count == 0) { @@ -183,7 +182,7 @@ contract CraftNFT { // Sparse tokens cannot thereafter be minted using mintFromBatchTo // The method will fail if the token at the specified index has already been minted, or if the index is out of bounds of the batch. // This method cannot be used to mint a unique token. - function mintExactFromBatchTo(address _recipient, bytes32 _content, uint256 _batch, uint48 _index) public returns (bytes32) { + function mintExactFromBatchTo(address _recipient, bytes32 _content, uint16 _batch, uint48 _index) public returns (bytes32) { tokenSpec storage spec; spec = token[_content][_batch]; @@ -194,13 +193,13 @@ contract CraftNFT { } // Common code path for both batch mint methods. - function mintBatchCore(address _recipient, bytes32 _content, uint256 _batch, uint48 _index, tokenSpec storage _spec) private returns (bytes32) { + function mintBatchCore(address _recipient, bytes32 _content, uint16 _batch, uint48 _index, tokenSpec storage _spec) private returns (bytes32) { uint256 left; uint256 right; bytes32 k; - left = uint256(_content) & 0xffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000; - left |= (_batch << 20); + left = uint256(_content) & 0xffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000; + left |= ((_batch & 0xffffffffffffffff) << 48); left |= _index; k = bytes32(left); @@ -212,13 +211,14 @@ contract CraftNFT { } } - right = uint256(_content) & ((1 << 40) - 1); - right <<= 208; + right = uint256(_content) & ((1 << 64) - 1); + right <<= 184; right |= (1 << 255); right |= uint160(_recipient); _spec.cursor += 1; mintedToken[k] = bytes32(right); + emit Mint(msg.sender, _recipient, left); return k; }