commit a9f3d3310b6de85a4bb71a343b3aced0dc1c0f96
parent 3e9a8e746529fbb6b6c72f22a0dcbeed02754c57
Author: lash <dev@holbrook.no>
Date: Sun, 18 Dec 2022 06:23:03 +0000
Add manual token numbering, tests for spec
Diffstat:
9 files changed, 315 insertions(+), 26 deletions(-)
diff --git a/js/contract/CraftNFT.bin b/js/contract/CraftNFT.bin
@@ -1 +1 @@
-60806040523480156200001157600080fd5b506040516200328338038062003283833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600690816200008891906200050c565b5080600790816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612c8080620006036000396000f3fe60806040526004361061015d576000357c0100000000000000000000000000000000000000000000000000000000900480636352211e116100d3578063b88d4fde1161008c578063b88d4fde146104d3578063bee2c0b5146104ef578063c87b56dd1461052c578063c9796c3914610569578063e985e9c5146105a6578063f9613ab2146105e35761015d565b80636352211e1461039d57806370a08231146103da5780638da5cb5b1461041757806395d89b4114610442578063a22cb4651461046d578063adf288df146104965761015d565b806324e0febc1161012557806324e0febc1461024e57806325cbaa181461028b57806342842e0e146102c85780634d03546a146102e45780634f64b2be14610321578063559f5dc91461035e5761015d565b806301ffc9a71461016257806306fdde031461019f578063081812fc146101ca57806318160ddd1461020757806323b872dd14610232575b600080fd5b34801561016e57600080fd5b5061018960048036038101906101849190612223565b610620565b604051610196919061226b565b60405180910390f35b3480156101ab57600080fd5b506101b46107c6565b6040516101c19190612316565b60405180910390f35b3480156101d657600080fd5b506101f160048036038101906101ec919061236e565b610854565b6040516101fe91906123dc565b60405180910390f35b34801561021357600080fd5b5061021c610891565b6040516102299190612406565b60405180910390f35b61024c6004803603810190610247919061244d565b61089b565b005b34801561025a57600080fd5b50610275600480360381019061027091906124d6565b61090a565b6040516102829190612512565b60405180910390f35b34801561029757600080fd5b506102b260048036038101906102ad919061252d565b610922565b6040516102bf9190612512565b60405180910390f35b6102e260048036038101906102dd919061244d565b610ba9565b005b3480156102f057600080fd5b5061030b600480360381019061030691906125be565b610c18565b604051610318919061226b565b60405180910390f35b34801561032d57600080fd5b506103486004803603810190610343919061236e565b610ed0565b6040516103559190612512565b60405180910390f35b34801561036a57600080fd5b50610385600480360381019061038091906125fe565b610ef4565b6040516103949392919061264d565b60405180910390f35b3480156103a957600080fd5b506103c460048036038101906103bf919061236e565b610f6d565b6040516103d191906123dc565b60405180910390f35b3480156103e657600080fd5b5061040160048036038101906103fc9190612684565b610fa9565b60405161040e9190612406565b60405180910390f35b34801561042357600080fd5b5061042c610fb0565b60405161043991906123dc565b60405180910390f35b34801561044e57600080fd5b50610457610fd4565b6040516104649190612316565b60405180910390f35b34801561047957600080fd5b50610494600480360381019061048f91906126dd565b611062565b005b3480156104a257600080fd5b506104bd60048036038101906104b8919061271d565b611304565b6040516104ca9190612512565b60405180910390f35b6104ed60048036038101906104e89190612892565b611466565b005b3480156104fb57600080fd5b5061051660048036038101906105119190612915565b61153d565b6040516105239190612981565b60405180910390f35b34801561053857600080fd5b50610553600480360381019061054e919061236e565b611610565b6040516105609190612316565b60405180910390f35b34801561057557600080fd5b50610590600480360381019061058b91906124d6565b6116c0565b60405161059d9190612316565b60405180910390f35b3480156105b257600080fd5b506105cd60048036038101906105c8919061299c565b611cdb565b6040516105da919061226b565b60405180910390f35b3480156105ef57600080fd5b5061060a600480360381019061060591906124d6565b611d73565b6040516106179190612512565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361067457600190506107c1565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106c657600190506107c1565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361071857600190506107c1565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361076a57600190506107c1565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107bc57600190506107c1565b600090505b919050565b600680546107d390612a0b565b80601f01602080910402602001604051908101604052809291908181526020018280546107ff90612a0b565b801561084c5780601f106108215761010080835404028352916020019161084c565b820191906000526020600020905b81548152906001019060200180831161082f57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108a984848484611e1f565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60008060008060026000878152602001908152602001600020858154811061094d5761094c612a3c565b5b906000526020600020019050600085148015610987575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b156109e857600181600001600c8282829054906101000a900465ffffffffffff166109b29190612a9a565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055506109de8787611304565b9350505050610ba2565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a4057600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff1681600001600c9054906101000a900465ffffffffffff1665ffffffffffff1610610a8857600080fd5b64ffffffffff866001900416915060d0829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508673ffffffffffffffffffffffffffffffffffffffff16821791507fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000086600190041692506014859060020a028317925080600001600c9054906101000a900465ffffffffffff1665ffffffffffff1683179250600181600001600c8282829054906101000a900465ffffffffffff16610b5e9190612a9a565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000856001028152602001908152602001600020819055505050505b9392505050565b6060610bb784848484611e1f565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c7657600080fd5b610c7e61217e565b600260008781526020019081526020016000208054905092506000831115610d4e57600060026000888152602001908152602001600020600081548110610cc857610cc7612a3c565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610cfa57600080fd5b60026000878152602001908152602001600020600184610d1a9190612ad4565b81548110610d2b57610d2a612a3c565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1691505b84816000019065ffffffffffff16908165ffffffffffff16815250508482610d769190612a9a565b816020019065ffffffffffff16908165ffffffffffff168152505060026000878152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548165ffffffffffff021916908365ffffffffffff1602179055505050600186908060018154018082558091505060019003906000526020600020016000909190919091505560008565ffffffffffff1603610ea557600160086000828254610e999190612b08565b92505081905550610ec7565b8465ffffffffffff1660086000828254610ebf9190612b08565b925050819055505b50505092915050565b60018181548110610ee057600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610f1057600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900465ffffffffffff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610fe190612a0b565b80601f016020809104026020016040519081016040528092919081815260200182805461100d90612a0b565b801561105a5780601f1061102f5761010080835404028352916020019161105a565b820191906000526020600020905b81548152906001019060200180831161103d57829003601f168201915b505050505081565b801561118357600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461110057600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061129b565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361121b57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516112f8919061226b565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461136257600080fd5b600160026000868152602001908152602001600020805490501461138557600080fd5b6000600260008681526020019081526020016000206000815481106113ad576113ac612a3c565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146113df57600080fd5b600060010260036000868152602001908152602001600020541461140257600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b61147284848484611e1f565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161152f9190612512565b60405180910390a450505050565b6000808290505b60026000868152602001908152602001600020805490508110156115e457836fffffffffffffffffffffffffffffffff1660026000878152602001908152602001600020828154811061159a57611599612a3c565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1665ffffffffffff1611156115d15780915050611609565b80806115dc90612b3c565b915050611544565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90505b9392505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161166c9190612512565b602060405180830381865afa158015611689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ad9190612b99565b90506116b8816116c0565b915050919050565b606080600080604767ffffffffffffffff8111156116e1576116e0612767565b5b6040519080825280601f01601f1916602001820160405280156117135781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061174b5761174a612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6800000000000000000000000000000000000000000000000000000000000000836001815181106117af576117ae612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061181357611812612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f32000000000000000000000000000000000000000000000000000000000000008360038151811061187757611876612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3500000000000000000000000000000000000000000000000000000000000000836004815181106118db576118da612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061193f5761193e612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a00000000000000000000000000000000000000000000000000000000000000836006815181106119a3576119a2612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611ccf57600460f08783602081106119f9576119f8612a3c565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff161015611ad157603083611a689190612bd3565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611a9d57611a9c612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611b43565b605783611ade9190612bd3565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611b1357611b12612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611b5857611b57612a3c565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611c2f57603083611bba9190612bd3565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611bea9190612b08565b81518110611bfb57611bfa612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611cad565b605783611c3c9190612bd3565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611c6c9190612b08565b81518110611c7d57611c7c612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611cba9190612b08565b91508080611cc790612b3c565b9150506119d9565b50829350505050919050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008060036000848152602001908152602001600020549050611d9581612089565b611d9e57600080fd5b611da7816120bb565b15611db55782915050611e1a565b7effffffffff00000000000000000000000000000000000000000000000000006001028116905060d081908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611e769190612406565b602060405180830381865afa158015611e93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb79190612c1d565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611ef157600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612025573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061201b57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61202457600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061208283856120ed565b5050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361211d57600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff168152602001600065ffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612200816121cb565b811461220b57600080fd5b50565b60008135905061221d816121f7565b92915050565b600060208284031215612239576122386121c1565b5b60006122478482850161220e565b91505092915050565b60008115159050919050565b61226581612250565b82525050565b6000602082019050612280600083018461225c565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156122c05780820151818401526020810190506122a5565b60008484015250505050565b6000601f19601f8301169050919050565b60006122e882612286565b6122f28185612291565b93506123028185602086016122a2565b61230b816122cc565b840191505092915050565b6000602082019050818103600083015261233081846122dd565b905092915050565b6000819050919050565b61234b81612338565b811461235657600080fd5b50565b60008135905061236881612342565b92915050565b600060208284031215612384576123836121c1565b5b600061239284828501612359565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006123c68261239b565b9050919050565b6123d6816123bb565b82525050565b60006020820190506123f160008301846123cd565b92915050565b61240081612338565b82525050565b600060208201905061241b60008301846123f7565b92915050565b61242a816123bb565b811461243557600080fd5b50565b60008135905061244781612421565b92915050565b600080600060608486031215612466576124656121c1565b5b600061247486828701612438565b935050602061248586828701612438565b925050604061249686828701612359565b9150509250925092565b6000819050919050565b6124b3816124a0565b81146124be57600080fd5b50565b6000813590506124d0816124aa565b92915050565b6000602082840312156124ec576124eb6121c1565b5b60006124fa848285016124c1565b91505092915050565b61250c816124a0565b82525050565b60006020820190506125276000830184612503565b92915050565b600080600060608486031215612546576125456121c1565b5b600061255486828701612438565b9350506020612565868287016124c1565b925050604061257686828701612359565b9150509250925092565b600065ffffffffffff82169050919050565b61259b81612580565b81146125a657600080fd5b50565b6000813590506125b881612592565b92915050565b600080604083850312156125d5576125d46121c1565b5b60006125e3858286016124c1565b92505060206125f4858286016125a9565b9150509250929050565b60008060408385031215612615576126146121c1565b5b6000612623858286016124c1565b925050602061263485828601612359565b9150509250929050565b61264781612580565b82525050565b6000606082019050612662600083018661263e565b61266f602083018561263e565b61267c604083018461263e565b949350505050565b60006020828403121561269a576126996121c1565b5b60006126a884828501612438565b91505092915050565b6126ba81612250565b81146126c557600080fd5b50565b6000813590506126d7816126b1565b92915050565b600080604083850312156126f4576126f36121c1565b5b600061270285828601612438565b9250506020612713858286016126c8565b9150509250929050565b60008060408385031215612734576127336121c1565b5b600061274285828601612438565b9250506020612753858286016124c1565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61279f826122cc565b810181811067ffffffffffffffff821117156127be576127bd612767565b5b80604052505050565b60006127d16121b7565b90506127dd8282612796565b919050565b600067ffffffffffffffff8211156127fd576127fc612767565b5b612806826122cc565b9050602081019050919050565b82818337600083830152505050565b6000612835612830846127e2565b6127c7565b90508281526020810184848401111561285157612850612762565b5b61285c848285612813565b509392505050565b600082601f8301126128795761287861275d565b5b8135612889848260208601612822565b91505092915050565b600080600080608085870312156128ac576128ab6121c1565b5b60006128ba87828801612438565b94505060206128cb87828801612438565b93505060406128dc87828801612359565b925050606085013567ffffffffffffffff8111156128fd576128fc6121c6565b5b61290987828801612864565b91505092959194509250565b60008060006060848603121561292e5761292d6121c1565b5b600061293c868287016124c1565b935050602061294d86828701612359565b925050604061295e86828701612359565b9150509250925092565b6000819050919050565b61297b81612968565b82525050565b60006020820190506129966000830184612972565b92915050565b600080604083850312156129b3576129b26121c1565b5b60006129c185828601612438565b92505060206129d285828601612438565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612a2357607f821691505b602082108103612a3657612a356129dc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612aa582612580565b9150612ab083612580565b9250828201905065ffffffffffff811115612ace57612acd612a6b565b5b92915050565b6000612adf82612338565b9150612aea83612338565b9250828203905081811115612b0257612b01612a6b565b5b92915050565b6000612b1382612338565b9150612b1e83612338565b9250828201905080821115612b3657612b35612a6b565b5b92915050565b6000612b4782612338565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612b7957612b78612a6b565b5b600182019050919050565b600081519050612b93816124aa565b92915050565b600060208284031215612baf57612bae6121c1565b5b6000612bbd84828501612b84565b91505092915050565b600060ff82169050919050565b6000612bde82612bc6565b9150612be983612bc6565b9250828201905060ff811115612c0257612c01612a6b565b5b92915050565b600081519050612c1781612421565b92915050565b600060208284031215612c3357612c326121c1565b5b6000612c4184828501612c08565b9150509291505056fea2646970667358221220ff70abaa1d8ea33cee12b101e3f02d2dfbbeed2445c3856b47f871b5955c653c64736f6c63430008110033
-\ No newline at end of file
+60806040523480156200001157600080fd5b506040516200353f3803806200353f833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600690816200008891906200050c565b5080600790816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612f3c80620006036000396000f3fe608060405260043610610168576000357c0100000000000000000000000000000000000000000000000000000000900480636352211e116100d3578063b88d4fde1161008c578063b88d4fde1461051c578063bee2c0b514610538578063c87b56dd14610575578063c9796c39146105b2578063e985e9c5146105ef578063f9613ab21461062c57610168565b80636352211e146103e657806370a08231146104235780638da5cb5b1461046057806395d89b411461048b578063a22cb465146104b6578063adf288df146104df57610168565b806325cbaa181161012557806325cbaa18146102965780632c1369de146102d357806342842e0e146103105780634d03546a1461032c5780634f64b2be14610369578063559f5dc9146103a657610168565b806301ffc9a71461016d57806306fdde03146101aa578063081812fc146101d557806318160ddd1461021257806323b872dd1461023d57806324e0febc14610259575b600080fd5b34801561017957600080fd5b50610194600480360381019061018f919061246a565b610669565b6040516101a191906124b2565b60405180910390f35b3480156101b657600080fd5b506101bf61080f565b6040516101cc919061255d565b60405180910390f35b3480156101e157600080fd5b506101fc60048036038101906101f791906125b5565b61089d565b6040516102099190612623565b60405180910390f35b34801561021e57600080fd5b506102276108da565b604051610234919061264d565b60405180910390f35b61025760048036038101906102529190612694565b6108e4565b005b34801561026557600080fd5b50610280600480360381019061027b919061271d565b610953565b60405161028d9190612759565b60405180910390f35b3480156102a257600080fd5b506102bd60048036038101906102b89190612774565b61096b565b6040516102ca9190612759565b60405180910390f35b3480156102df57600080fd5b506102fa60048036038101906102f59190612805565b610b16565b6040516103079190612759565b60405180910390f35b61032a60048036038101906103259190612694565b610c17565b005b34801561033857600080fd5b50610353600480360381019061034e919061286c565b610c86565b60405161036091906124b2565b60405180910390f35b34801561037557600080fd5b50610390600480360381019061038b91906125b5565b610f5e565b60405161039d9190612759565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c891906128ac565b610f82565b6040516103dd94939291906128fb565b60405180910390f35b3480156103f257600080fd5b5061040d600480360381019061040891906125b5565b61100e565b60405161041a9190612623565b60405180910390f35b34801561042f57600080fd5b5061044a60048036038101906104459190612940565b61104a565b604051610457919061264d565b60405180910390f35b34801561046c57600080fd5b50610475611051565b6040516104829190612623565b60405180910390f35b34801561049757600080fd5b506104a0611075565b6040516104ad919061255d565b60405180910390f35b3480156104c257600080fd5b506104dd60048036038101906104d89190612999565b611103565b005b3480156104eb57600080fd5b50610506600480360381019061050191906129d9565b6113a5565b6040516105139190612759565b60405180910390f35b61053660048036038101906105319190612b4e565b611507565b005b34801561054457600080fd5b5061055f600480360381019061055a9190612bd1565b6115de565b60405161056c9190612c3d565b60405180910390f35b34801561058157600080fd5b5061059c600480360381019061059791906125b5565b6116b1565b6040516105a9919061255d565b60405180910390f35b3480156105be57600080fd5b506105d960048036038101906105d4919061271d565b611761565b6040516105e6919061255d565b60405180910390f35b3480156105fb57600080fd5b5061061660048036038101906106119190612c58565b611d7c565b60405161062391906124b2565b60405180910390f35b34801561063857600080fd5b50610653600480360381019061064e919061271d565b611e14565b6040516106609190612759565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106bd576001905061080a565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361070f576001905061080a565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610761576001905061080a565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107b3576001905061080a565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610805576001905061080a565b600090505b919050565b6006805461081c90612cc7565b80601f016020809104026020016040519081016040528092919081815260200182805461084890612cc7565b80156108955780601f1061086a57610100808354040283529160200191610895565b820191906000526020600020905b81548152906001019060200180831161087857829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108f284848484611ec0565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60008060026000858152602001908152602001600020838154811061099357610992612cf8565b5b9060005260206000200190508060000160129054906101000a900460ff16156109bb57600080fd5b6000831480156109e9575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15610a4857600181600001600c8282829054906101000a900465ffffffffffff16610a149190612d56565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550610a4085856113a5565b915050610b0f565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa057600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff1681600001600c9054906101000a900465ffffffffffff1665ffffffffffff1610610ae857600080fd5b610b0b85858584600001600c9054906101000a900465ffffffffffff168561212a565b9150505b9392505050565b600080600260008681526020019081526020016000208481548110610b3e57610b3d612cf8565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ba257600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610bcd57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610610bff57600080fd5b610c0c868686868561212a565b915050949350505050565b6060610c2584848484611ec0565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ce457600080fd5b610cec6123bc565b600260008781526020019081526020016000208054905092506000831115610dbc57600060026000888152602001908152602001600020600081548110610d3657610d35612cf8565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610d6857600080fd5b60026000878152602001908152602001600020600184610d889190612d90565b81548110610d9957610d98612cf8565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1691505b84816000019065ffffffffffff16908165ffffffffffff16815250508482610de49190612d56565b816020019065ffffffffffff16908165ffffffffffff168152505060026000878152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548165ffffffffffff021916908365ffffffffffff16021790555060608201518160000160126101000a81548160ff0219169083151502179055505050600186908060018154018082558091505060019003906000526020600020016000909190919091505560008565ffffffffffff1603610f3357600160086000828254610f279190612dc4565b92505081905550610f55565b8465ffffffffffff1660086000828254610f4d9190612dc4565b925050819055505b50505092915050565b60018181548110610f6e57600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610f9e57600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900465ffffffffffff16908060000160129054906101000a900460ff16905084565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6007805461108290612cc7565b80601f01602080910402602001604051908101604052809291908181526020018280546110ae90612cc7565b80156110fb5780601f106110d0576101008083540402835291602001916110fb565b820191906000526020600020905b8154815290600101906020018083116110de57829003601f168201915b505050505081565b801561122457600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111a157600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061133c565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036112bc57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161139991906124b2565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461140357600080fd5b600160026000868152602001908152602001600020805490501461142657600080fd5b60006002600086815260200190815260200160002060008154811061144e5761144d612cf8565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461148057600080fd5b60006001026003600086815260200190815260200160002054146114a357600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b61151384848484611ec0565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e60006001026040516115d09190612759565b60405180910390a450505050565b6000808290505b600260008681526020019081526020016000208054905081101561168557836fffffffffffffffffffffffffffffffff1660026000878152602001908152602001600020828154811061163b5761163a612cf8565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1665ffffffffffff16111561167257809150506116aa565b808061167d90612df8565b9150506115e5565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90505b9392505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161170d9190612759565b602060405180830381865afa15801561172a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174e9190612e55565b905061175981611761565b915050919050565b606080600080604767ffffffffffffffff81111561178257611781612a23565b5b6040519080825280601f01601f1916602001820160405280156117b45781602001600182028036833780820191505090505b5092507f7300000000000000000000000000000000000000000000000000000000000000836000815181106117ec576117eb612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6800000000000000000000000000000000000000000000000000000000000000836001815181106118505761184f612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6100000000000000000000000000000000000000000000000000000000000000836002815181106118b4576118b3612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f32000000000000000000000000000000000000000000000000000000000000008360038151811061191857611917612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061197c5761197b612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3600000000000000000000000000000000000000000000000000000000000000836005815181106119e0576119df612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a0000000000000000000000000000000000000000000000000000000000000083600681518110611a4457611a43612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611d7057600460f0878360208110611a9a57611a99612cf8565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff161015611b7257603083611b099190612e8f565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611b3e57611b3d612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611be4565b605783611b7f9190612e8f565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611bb457611bb3612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611bf957611bf8612cf8565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611cd057603083611c5b9190612e8f565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611c8b9190612dc4565b81518110611c9c57611c9b612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611d4e565b605783611cdd9190612e8f565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611d0d9190612dc4565b81518110611d1e57611d1d612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611d5b9190612dc4565b91508080611d6890612df8565b915050611a7a565b50829350505050919050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008060036000848152602001908152602001600020549050611e36816122c7565b611e3f57600080fd5b611e48816122f9565b15611e565782915050611ebb565b7effffffffff00000000000000000000000000000000000000000000000000006001028116905060d081908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611f17919061264d565b602060405180830381865afa158015611f34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f589190612ed9565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611f9257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146120c6573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806120bc57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6120c557600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612123838561232b565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000088600190041692506014879060020a02831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461219b57600080fd5b8460000160129054906101000a900460ff166121fd5784600001600c9054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16146121fc5760018560000160126101000a81548160ff0219169083151502179055505b5b64ffffffffff886001900416915060d0829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff1682179150600185600001600c8282829054906101000a900465ffffffffffff1661227b9190612d56565b92506101000a81548165ffffffffffff021916908365ffffffffffff16021790555081600102600360008381526020019081526020016000208190555080935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361235b57600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060800160405280600065ffffffffffff168152602001600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61244781612412565b811461245257600080fd5b50565b6000813590506124648161243e565b92915050565b6000602082840312156124805761247f612408565b5b600061248e84828501612455565b91505092915050565b60008115159050919050565b6124ac81612497565b82525050565b60006020820190506124c760008301846124a3565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156125075780820151818401526020810190506124ec565b60008484015250505050565b6000601f19601f8301169050919050565b600061252f826124cd565b61253981856124d8565b93506125498185602086016124e9565b61255281612513565b840191505092915050565b600060208201905081810360008301526125778184612524565b905092915050565b6000819050919050565b6125928161257f565b811461259d57600080fd5b50565b6000813590506125af81612589565b92915050565b6000602082840312156125cb576125ca612408565b5b60006125d9848285016125a0565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061260d826125e2565b9050919050565b61261d81612602565b82525050565b60006020820190506126386000830184612614565b92915050565b6126478161257f565b82525050565b6000602082019050612662600083018461263e565b92915050565b61267181612602565b811461267c57600080fd5b50565b60008135905061268e81612668565b92915050565b6000806000606084860312156126ad576126ac612408565b5b60006126bb8682870161267f565b93505060206126cc8682870161267f565b92505060406126dd868287016125a0565b9150509250925092565b6000819050919050565b6126fa816126e7565b811461270557600080fd5b50565b600081359050612717816126f1565b92915050565b60006020828403121561273357612732612408565b5b600061274184828501612708565b91505092915050565b612753816126e7565b82525050565b600060208201905061276e600083018461274a565b92915050565b60008060006060848603121561278d5761278c612408565b5b600061279b8682870161267f565b93505060206127ac86828701612708565b92505060406127bd868287016125a0565b9150509250925092565b600065ffffffffffff82169050919050565b6127e2816127c7565b81146127ed57600080fd5b50565b6000813590506127ff816127d9565b92915050565b6000806000806080858703121561281f5761281e612408565b5b600061282d8782880161267f565b945050602061283e87828801612708565b935050604061284f878288016125a0565b9250506060612860878288016127f0565b91505092959194509250565b6000806040838503121561288357612882612408565b5b600061289185828601612708565b92505060206128a2858286016127f0565b9150509250929050565b600080604083850312156128c3576128c2612408565b5b60006128d185828601612708565b92505060206128e2858286016125a0565b9150509250929050565b6128f5816127c7565b82525050565b600060808201905061291060008301876128ec565b61291d60208301866128ec565b61292a60408301856128ec565b61293760608301846124a3565b95945050505050565b60006020828403121561295657612955612408565b5b60006129648482850161267f565b91505092915050565b61297681612497565b811461298157600080fd5b50565b6000813590506129938161296d565b92915050565b600080604083850312156129b0576129af612408565b5b60006129be8582860161267f565b92505060206129cf85828601612984565b9150509250929050565b600080604083850312156129f0576129ef612408565b5b60006129fe8582860161267f565b9250506020612a0f85828601612708565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612a5b82612513565b810181811067ffffffffffffffff82111715612a7a57612a79612a23565b5b80604052505050565b6000612a8d6123fe565b9050612a998282612a52565b919050565b600067ffffffffffffffff821115612ab957612ab8612a23565b5b612ac282612513565b9050602081019050919050565b82818337600083830152505050565b6000612af1612aec84612a9e565b612a83565b905082815260208101848484011115612b0d57612b0c612a1e565b5b612b18848285612acf565b509392505050565b600082601f830112612b3557612b34612a19565b5b8135612b45848260208601612ade565b91505092915050565b60008060008060808587031215612b6857612b67612408565b5b6000612b768782880161267f565b9450506020612b878782880161267f565b9350506040612b98878288016125a0565b925050606085013567ffffffffffffffff811115612bb957612bb861240d565b5b612bc587828801612b20565b91505092959194509250565b600080600060608486031215612bea57612be9612408565b5b6000612bf886828701612708565b9350506020612c09868287016125a0565b9250506040612c1a868287016125a0565b9150509250925092565b6000819050919050565b612c3781612c24565b82525050565b6000602082019050612c526000830184612c2e565b92915050565b60008060408385031215612c6f57612c6e612408565b5b6000612c7d8582860161267f565b9250506020612c8e8582860161267f565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612cdf57607f821691505b602082108103612cf257612cf1612c98565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612d61826127c7565b9150612d6c836127c7565b9250828201905065ffffffffffff811115612d8a57612d89612d27565b5b92915050565b6000612d9b8261257f565b9150612da68361257f565b9250828203905081811115612dbe57612dbd612d27565b5b92915050565b6000612dcf8261257f565b9150612dda8361257f565b9250828201905080821115612df257612df1612d27565b5b92915050565b6000612e038261257f565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612e3557612e34612d27565b5b600182019050919050565b600081519050612e4f816126f1565b92915050565b600060208284031215612e6b57612e6a612408565b5b6000612e7984828501612e40565b91505092915050565b600060ff82169050919050565b6000612e9a82612e82565b9150612ea583612e82565b9250828201905060ff811115612ebe57612ebd612d27565b5b92915050565b600081519050612ed381612668565b92915050565b600060208284031215612eef57612eee612408565b5b6000612efd84828501612ec4565b9150509291505056fea2646970667358221220a62f827589f16aecc656da96e430b2614d60fe5c431eea0396000834def84cf064736f6c63430008110033
+\ 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":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint256","name":"_superIndex","type":"uint256"},{"internalType":"uint256","name":"_startAt","type":"uint256"}],"name":"batchOf","outputs":[{"internalType":"int256","name":"","type":"int256"}],"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"}],"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"}],"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":"_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":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint256","name":"_superIndex","type":"uint256"},{"internalType":"uint256","name":"_startAt","type":"uint256"}],"name":"batchOf","outputs":[{"internalType":"int256","name":"","type":"int256"}],"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"}]
diff --git a/python/eth_craft_nft/data/CraftNFT.bin b/python/eth_craft_nft/data/CraftNFT.bin
@@ -1 +1 @@
-60806040523480156200001157600080fd5b506040516200328338038062003283833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600690816200008891906200050c565b5080600790816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612c8080620006036000396000f3fe60806040526004361061015d576000357c0100000000000000000000000000000000000000000000000000000000900480636352211e116100d3578063b88d4fde1161008c578063b88d4fde146104d3578063bee2c0b5146104ef578063c87b56dd1461052c578063c9796c3914610569578063e985e9c5146105a6578063f9613ab2146105e35761015d565b80636352211e1461039d57806370a08231146103da5780638da5cb5b1461041757806395d89b4114610442578063a22cb4651461046d578063adf288df146104965761015d565b806324e0febc1161012557806324e0febc1461024e57806325cbaa181461028b57806342842e0e146102c85780634d03546a146102e45780634f64b2be14610321578063559f5dc91461035e5761015d565b806301ffc9a71461016257806306fdde031461019f578063081812fc146101ca57806318160ddd1461020757806323b872dd14610232575b600080fd5b34801561016e57600080fd5b5061018960048036038101906101849190612223565b610620565b604051610196919061226b565b60405180910390f35b3480156101ab57600080fd5b506101b46107c6565b6040516101c19190612316565b60405180910390f35b3480156101d657600080fd5b506101f160048036038101906101ec919061236e565b610854565b6040516101fe91906123dc565b60405180910390f35b34801561021357600080fd5b5061021c610891565b6040516102299190612406565b60405180910390f35b61024c6004803603810190610247919061244d565b61089b565b005b34801561025a57600080fd5b50610275600480360381019061027091906124d6565b61090a565b6040516102829190612512565b60405180910390f35b34801561029757600080fd5b506102b260048036038101906102ad919061252d565b610922565b6040516102bf9190612512565b60405180910390f35b6102e260048036038101906102dd919061244d565b610ba9565b005b3480156102f057600080fd5b5061030b600480360381019061030691906125be565b610c18565b604051610318919061226b565b60405180910390f35b34801561032d57600080fd5b506103486004803603810190610343919061236e565b610ed0565b6040516103559190612512565b60405180910390f35b34801561036a57600080fd5b50610385600480360381019061038091906125fe565b610ef4565b6040516103949392919061264d565b60405180910390f35b3480156103a957600080fd5b506103c460048036038101906103bf919061236e565b610f6d565b6040516103d191906123dc565b60405180910390f35b3480156103e657600080fd5b5061040160048036038101906103fc9190612684565b610fa9565b60405161040e9190612406565b60405180910390f35b34801561042357600080fd5b5061042c610fb0565b60405161043991906123dc565b60405180910390f35b34801561044e57600080fd5b50610457610fd4565b6040516104649190612316565b60405180910390f35b34801561047957600080fd5b50610494600480360381019061048f91906126dd565b611062565b005b3480156104a257600080fd5b506104bd60048036038101906104b8919061271d565b611304565b6040516104ca9190612512565b60405180910390f35b6104ed60048036038101906104e89190612892565b611466565b005b3480156104fb57600080fd5b5061051660048036038101906105119190612915565b61153d565b6040516105239190612981565b60405180910390f35b34801561053857600080fd5b50610553600480360381019061054e919061236e565b611610565b6040516105609190612316565b60405180910390f35b34801561057557600080fd5b50610590600480360381019061058b91906124d6565b6116c0565b60405161059d9190612316565b60405180910390f35b3480156105b257600080fd5b506105cd60048036038101906105c8919061299c565b611cdb565b6040516105da919061226b565b60405180910390f35b3480156105ef57600080fd5b5061060a600480360381019061060591906124d6565b611d73565b6040516106179190612512565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361067457600190506107c1565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106c657600190506107c1565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361071857600190506107c1565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361076a57600190506107c1565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107bc57600190506107c1565b600090505b919050565b600680546107d390612a0b565b80601f01602080910402602001604051908101604052809291908181526020018280546107ff90612a0b565b801561084c5780601f106108215761010080835404028352916020019161084c565b820191906000526020600020905b81548152906001019060200180831161082f57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108a984848484611e1f565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60008060008060026000878152602001908152602001600020858154811061094d5761094c612a3c565b5b906000526020600020019050600085148015610987575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b156109e857600181600001600c8282829054906101000a900465ffffffffffff166109b29190612a9a565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055506109de8787611304565b9350505050610ba2565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a4057600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff1681600001600c9054906101000a900465ffffffffffff1665ffffffffffff1610610a8857600080fd5b64ffffffffff866001900416915060d0829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508673ffffffffffffffffffffffffffffffffffffffff16821791507fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000086600190041692506014859060020a028317925080600001600c9054906101000a900465ffffffffffff1665ffffffffffff1683179250600181600001600c8282829054906101000a900465ffffffffffff16610b5e9190612a9a565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000856001028152602001908152602001600020819055505050505b9392505050565b6060610bb784848484611e1f565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c7657600080fd5b610c7e61217e565b600260008781526020019081526020016000208054905092506000831115610d4e57600060026000888152602001908152602001600020600081548110610cc857610cc7612a3c565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610cfa57600080fd5b60026000878152602001908152602001600020600184610d1a9190612ad4565b81548110610d2b57610d2a612a3c565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1691505b84816000019065ffffffffffff16908165ffffffffffff16815250508482610d769190612a9a565b816020019065ffffffffffff16908165ffffffffffff168152505060026000878152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548165ffffffffffff021916908365ffffffffffff1602179055505050600186908060018154018082558091505060019003906000526020600020016000909190919091505560008565ffffffffffff1603610ea557600160086000828254610e999190612b08565b92505081905550610ec7565b8465ffffffffffff1660086000828254610ebf9190612b08565b925050819055505b50505092915050565b60018181548110610ee057600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610f1057600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900465ffffffffffff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610fe190612a0b565b80601f016020809104026020016040519081016040528092919081815260200182805461100d90612a0b565b801561105a5780601f1061102f5761010080835404028352916020019161105a565b820191906000526020600020905b81548152906001019060200180831161103d57829003601f168201915b505050505081565b801561118357600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461110057600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061129b565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361121b57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516112f8919061226b565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461136257600080fd5b600160026000868152602001908152602001600020805490501461138557600080fd5b6000600260008681526020019081526020016000206000815481106113ad576113ac612a3c565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146113df57600080fd5b600060010260036000868152602001908152602001600020541461140257600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b61147284848484611e1f565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161152f9190612512565b60405180910390a450505050565b6000808290505b60026000868152602001908152602001600020805490508110156115e457836fffffffffffffffffffffffffffffffff1660026000878152602001908152602001600020828154811061159a57611599612a3c565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1665ffffffffffff1611156115d15780915050611609565b80806115dc90612b3c565b915050611544565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90505b9392505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161166c9190612512565b602060405180830381865afa158015611689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ad9190612b99565b90506116b8816116c0565b915050919050565b606080600080604767ffffffffffffffff8111156116e1576116e0612767565b5b6040519080825280601f01601f1916602001820160405280156117135781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061174b5761174a612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6800000000000000000000000000000000000000000000000000000000000000836001815181106117af576117ae612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061181357611812612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f32000000000000000000000000000000000000000000000000000000000000008360038151811061187757611876612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3500000000000000000000000000000000000000000000000000000000000000836004815181106118db576118da612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061193f5761193e612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a00000000000000000000000000000000000000000000000000000000000000836006815181106119a3576119a2612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611ccf57600460f08783602081106119f9576119f8612a3c565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff161015611ad157603083611a689190612bd3565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611a9d57611a9c612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611b43565b605783611ade9190612bd3565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611b1357611b12612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611b5857611b57612a3c565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611c2f57603083611bba9190612bd3565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611bea9190612b08565b81518110611bfb57611bfa612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611cad565b605783611c3c9190612bd3565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611c6c9190612b08565b81518110611c7d57611c7c612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611cba9190612b08565b91508080611cc790612b3c565b9150506119d9565b50829350505050919050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008060036000848152602001908152602001600020549050611d9581612089565b611d9e57600080fd5b611da7816120bb565b15611db55782915050611e1a565b7effffffffff00000000000000000000000000000000000000000000000000006001028116905060d081908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611e769190612406565b602060405180830381865afa158015611e93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb79190612c1d565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611ef157600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612025573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061201b57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61202457600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061208283856120ed565b5050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361211d57600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff168152602001600065ffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612200816121cb565b811461220b57600080fd5b50565b60008135905061221d816121f7565b92915050565b600060208284031215612239576122386121c1565b5b60006122478482850161220e565b91505092915050565b60008115159050919050565b61226581612250565b82525050565b6000602082019050612280600083018461225c565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156122c05780820151818401526020810190506122a5565b60008484015250505050565b6000601f19601f8301169050919050565b60006122e882612286565b6122f28185612291565b93506123028185602086016122a2565b61230b816122cc565b840191505092915050565b6000602082019050818103600083015261233081846122dd565b905092915050565b6000819050919050565b61234b81612338565b811461235657600080fd5b50565b60008135905061236881612342565b92915050565b600060208284031215612384576123836121c1565b5b600061239284828501612359565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006123c68261239b565b9050919050565b6123d6816123bb565b82525050565b60006020820190506123f160008301846123cd565b92915050565b61240081612338565b82525050565b600060208201905061241b60008301846123f7565b92915050565b61242a816123bb565b811461243557600080fd5b50565b60008135905061244781612421565b92915050565b600080600060608486031215612466576124656121c1565b5b600061247486828701612438565b935050602061248586828701612438565b925050604061249686828701612359565b9150509250925092565b6000819050919050565b6124b3816124a0565b81146124be57600080fd5b50565b6000813590506124d0816124aa565b92915050565b6000602082840312156124ec576124eb6121c1565b5b60006124fa848285016124c1565b91505092915050565b61250c816124a0565b82525050565b60006020820190506125276000830184612503565b92915050565b600080600060608486031215612546576125456121c1565b5b600061255486828701612438565b9350506020612565868287016124c1565b925050604061257686828701612359565b9150509250925092565b600065ffffffffffff82169050919050565b61259b81612580565b81146125a657600080fd5b50565b6000813590506125b881612592565b92915050565b600080604083850312156125d5576125d46121c1565b5b60006125e3858286016124c1565b92505060206125f4858286016125a9565b9150509250929050565b60008060408385031215612615576126146121c1565b5b6000612623858286016124c1565b925050602061263485828601612359565b9150509250929050565b61264781612580565b82525050565b6000606082019050612662600083018661263e565b61266f602083018561263e565b61267c604083018461263e565b949350505050565b60006020828403121561269a576126996121c1565b5b60006126a884828501612438565b91505092915050565b6126ba81612250565b81146126c557600080fd5b50565b6000813590506126d7816126b1565b92915050565b600080604083850312156126f4576126f36121c1565b5b600061270285828601612438565b9250506020612713858286016126c8565b9150509250929050565b60008060408385031215612734576127336121c1565b5b600061274285828601612438565b9250506020612753858286016124c1565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61279f826122cc565b810181811067ffffffffffffffff821117156127be576127bd612767565b5b80604052505050565b60006127d16121b7565b90506127dd8282612796565b919050565b600067ffffffffffffffff8211156127fd576127fc612767565b5b612806826122cc565b9050602081019050919050565b82818337600083830152505050565b6000612835612830846127e2565b6127c7565b90508281526020810184848401111561285157612850612762565b5b61285c848285612813565b509392505050565b600082601f8301126128795761287861275d565b5b8135612889848260208601612822565b91505092915050565b600080600080608085870312156128ac576128ab6121c1565b5b60006128ba87828801612438565b94505060206128cb87828801612438565b93505060406128dc87828801612359565b925050606085013567ffffffffffffffff8111156128fd576128fc6121c6565b5b61290987828801612864565b91505092959194509250565b60008060006060848603121561292e5761292d6121c1565b5b600061293c868287016124c1565b935050602061294d86828701612359565b925050604061295e86828701612359565b9150509250925092565b6000819050919050565b61297b81612968565b82525050565b60006020820190506129966000830184612972565b92915050565b600080604083850312156129b3576129b26121c1565b5b60006129c185828601612438565b92505060206129d285828601612438565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612a2357607f821691505b602082108103612a3657612a356129dc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612aa582612580565b9150612ab083612580565b9250828201905065ffffffffffff811115612ace57612acd612a6b565b5b92915050565b6000612adf82612338565b9150612aea83612338565b9250828203905081811115612b0257612b01612a6b565b5b92915050565b6000612b1382612338565b9150612b1e83612338565b9250828201905080821115612b3657612b35612a6b565b5b92915050565b6000612b4782612338565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612b7957612b78612a6b565b5b600182019050919050565b600081519050612b93816124aa565b92915050565b600060208284031215612baf57612bae6121c1565b5b6000612bbd84828501612b84565b91505092915050565b600060ff82169050919050565b6000612bde82612bc6565b9150612be983612bc6565b9250828201905060ff811115612c0257612c01612a6b565b5b92915050565b600081519050612c1781612421565b92915050565b600060208284031215612c3357612c326121c1565b5b6000612c4184828501612c08565b9150509291505056fea2646970667358221220ff70abaa1d8ea33cee12b101e3f02d2dfbbeed2445c3856b47f871b5955c653c64736f6c63430008110033
-\ No newline at end of file
+60806040523480156200001157600080fd5b506040516200353f3803806200353f833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600690816200008891906200050c565b5080600790816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612f3c80620006036000396000f3fe608060405260043610610168576000357c0100000000000000000000000000000000000000000000000000000000900480636352211e116100d3578063b88d4fde1161008c578063b88d4fde1461051c578063bee2c0b514610538578063c87b56dd14610575578063c9796c39146105b2578063e985e9c5146105ef578063f9613ab21461062c57610168565b80636352211e146103e657806370a08231146104235780638da5cb5b1461046057806395d89b411461048b578063a22cb465146104b6578063adf288df146104df57610168565b806325cbaa181161012557806325cbaa18146102965780632c1369de146102d357806342842e0e146103105780634d03546a1461032c5780634f64b2be14610369578063559f5dc9146103a657610168565b806301ffc9a71461016d57806306fdde03146101aa578063081812fc146101d557806318160ddd1461021257806323b872dd1461023d57806324e0febc14610259575b600080fd5b34801561017957600080fd5b50610194600480360381019061018f919061246a565b610669565b6040516101a191906124b2565b60405180910390f35b3480156101b657600080fd5b506101bf61080f565b6040516101cc919061255d565b60405180910390f35b3480156101e157600080fd5b506101fc60048036038101906101f791906125b5565b61089d565b6040516102099190612623565b60405180910390f35b34801561021e57600080fd5b506102276108da565b604051610234919061264d565b60405180910390f35b61025760048036038101906102529190612694565b6108e4565b005b34801561026557600080fd5b50610280600480360381019061027b919061271d565b610953565b60405161028d9190612759565b60405180910390f35b3480156102a257600080fd5b506102bd60048036038101906102b89190612774565b61096b565b6040516102ca9190612759565b60405180910390f35b3480156102df57600080fd5b506102fa60048036038101906102f59190612805565b610b16565b6040516103079190612759565b60405180910390f35b61032a60048036038101906103259190612694565b610c17565b005b34801561033857600080fd5b50610353600480360381019061034e919061286c565b610c86565b60405161036091906124b2565b60405180910390f35b34801561037557600080fd5b50610390600480360381019061038b91906125b5565b610f5e565b60405161039d9190612759565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c891906128ac565b610f82565b6040516103dd94939291906128fb565b60405180910390f35b3480156103f257600080fd5b5061040d600480360381019061040891906125b5565b61100e565b60405161041a9190612623565b60405180910390f35b34801561042f57600080fd5b5061044a60048036038101906104459190612940565b61104a565b604051610457919061264d565b60405180910390f35b34801561046c57600080fd5b50610475611051565b6040516104829190612623565b60405180910390f35b34801561049757600080fd5b506104a0611075565b6040516104ad919061255d565b60405180910390f35b3480156104c257600080fd5b506104dd60048036038101906104d89190612999565b611103565b005b3480156104eb57600080fd5b50610506600480360381019061050191906129d9565b6113a5565b6040516105139190612759565b60405180910390f35b61053660048036038101906105319190612b4e565b611507565b005b34801561054457600080fd5b5061055f600480360381019061055a9190612bd1565b6115de565b60405161056c9190612c3d565b60405180910390f35b34801561058157600080fd5b5061059c600480360381019061059791906125b5565b6116b1565b6040516105a9919061255d565b60405180910390f35b3480156105be57600080fd5b506105d960048036038101906105d4919061271d565b611761565b6040516105e6919061255d565b60405180910390f35b3480156105fb57600080fd5b5061061660048036038101906106119190612c58565b611d7c565b60405161062391906124b2565b60405180910390f35b34801561063857600080fd5b50610653600480360381019061064e919061271d565b611e14565b6040516106609190612759565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106bd576001905061080a565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361070f576001905061080a565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610761576001905061080a565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107b3576001905061080a565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610805576001905061080a565b600090505b919050565b6006805461081c90612cc7565b80601f016020809104026020016040519081016040528092919081815260200182805461084890612cc7565b80156108955780601f1061086a57610100808354040283529160200191610895565b820191906000526020600020905b81548152906001019060200180831161087857829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108f284848484611ec0565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60008060026000858152602001908152602001600020838154811061099357610992612cf8565b5b9060005260206000200190508060000160129054906101000a900460ff16156109bb57600080fd5b6000831480156109e9575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15610a4857600181600001600c8282829054906101000a900465ffffffffffff16610a149190612d56565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550610a4085856113a5565b915050610b0f565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa057600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff1681600001600c9054906101000a900465ffffffffffff1665ffffffffffff1610610ae857600080fd5b610b0b85858584600001600c9054906101000a900465ffffffffffff168561212a565b9150505b9392505050565b600080600260008681526020019081526020016000208481548110610b3e57610b3d612cf8565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ba257600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610bcd57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610610bff57600080fd5b610c0c868686868561212a565b915050949350505050565b6060610c2584848484611ec0565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ce457600080fd5b610cec6123bc565b600260008781526020019081526020016000208054905092506000831115610dbc57600060026000888152602001908152602001600020600081548110610d3657610d35612cf8565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610d6857600080fd5b60026000878152602001908152602001600020600184610d889190612d90565b81548110610d9957610d98612cf8565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1691505b84816000019065ffffffffffff16908165ffffffffffff16815250508482610de49190612d56565b816020019065ffffffffffff16908165ffffffffffff168152505060026000878152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548165ffffffffffff021916908365ffffffffffff16021790555060608201518160000160126101000a81548160ff0219169083151502179055505050600186908060018154018082558091505060019003906000526020600020016000909190919091505560008565ffffffffffff1603610f3357600160086000828254610f279190612dc4565b92505081905550610f55565b8465ffffffffffff1660086000828254610f4d9190612dc4565b925050819055505b50505092915050565b60018181548110610f6e57600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610f9e57600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900465ffffffffffff16908060000160129054906101000a900460ff16905084565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6007805461108290612cc7565b80601f01602080910402602001604051908101604052809291908181526020018280546110ae90612cc7565b80156110fb5780601f106110d0576101008083540402835291602001916110fb565b820191906000526020600020905b8154815290600101906020018083116110de57829003601f168201915b505050505081565b801561122457600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111a157600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061133c565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036112bc57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161139991906124b2565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461140357600080fd5b600160026000868152602001908152602001600020805490501461142657600080fd5b60006002600086815260200190815260200160002060008154811061144e5761144d612cf8565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461148057600080fd5b60006001026003600086815260200190815260200160002054146114a357600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b61151384848484611ec0565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e60006001026040516115d09190612759565b60405180910390a450505050565b6000808290505b600260008681526020019081526020016000208054905081101561168557836fffffffffffffffffffffffffffffffff1660026000878152602001908152602001600020828154811061163b5761163a612cf8565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1665ffffffffffff16111561167257809150506116aa565b808061167d90612df8565b9150506115e5565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90505b9392505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161170d9190612759565b602060405180830381865afa15801561172a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174e9190612e55565b905061175981611761565b915050919050565b606080600080604767ffffffffffffffff81111561178257611781612a23565b5b6040519080825280601f01601f1916602001820160405280156117b45781602001600182028036833780820191505090505b5092507f7300000000000000000000000000000000000000000000000000000000000000836000815181106117ec576117eb612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6800000000000000000000000000000000000000000000000000000000000000836001815181106118505761184f612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6100000000000000000000000000000000000000000000000000000000000000836002815181106118b4576118b3612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f32000000000000000000000000000000000000000000000000000000000000008360038151811061191857611917612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061197c5761197b612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3600000000000000000000000000000000000000000000000000000000000000836005815181106119e0576119df612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a0000000000000000000000000000000000000000000000000000000000000083600681518110611a4457611a43612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611d7057600460f0878360208110611a9a57611a99612cf8565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff161015611b7257603083611b099190612e8f565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611b3e57611b3d612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611be4565b605783611b7f9190612e8f565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611bb457611bb3612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611bf957611bf8612cf8565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611cd057603083611c5b9190612e8f565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611c8b9190612dc4565b81518110611c9c57611c9b612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611d4e565b605783611cdd9190612e8f565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611d0d9190612dc4565b81518110611d1e57611d1d612cf8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611d5b9190612dc4565b91508080611d6890612df8565b915050611a7a565b50829350505050919050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008060036000848152602001908152602001600020549050611e36816122c7565b611e3f57600080fd5b611e48816122f9565b15611e565782915050611ebb565b7effffffffff00000000000000000000000000000000000000000000000000006001028116905060d081908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611f17919061264d565b602060405180830381865afa158015611f34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f589190612ed9565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611f9257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146120c6573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806120bc57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6120c557600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612123838561232b565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000088600190041692506014879060020a02831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461219b57600080fd5b8460000160129054906101000a900460ff166121fd5784600001600c9054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16146121fc5760018560000160126101000a81548160ff0219169083151502179055505b5b64ffffffffff886001900416915060d0829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff1682179150600185600001600c8282829054906101000a900465ffffffffffff1661227b9190612d56565b92506101000a81548165ffffffffffff021916908365ffffffffffff16021790555081600102600360008381526020019081526020016000208190555080935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361235b57600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060800160405280600065ffffffffffff168152602001600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61244781612412565b811461245257600080fd5b50565b6000813590506124648161243e565b92915050565b6000602082840312156124805761247f612408565b5b600061248e84828501612455565b91505092915050565b60008115159050919050565b6124ac81612497565b82525050565b60006020820190506124c760008301846124a3565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156125075780820151818401526020810190506124ec565b60008484015250505050565b6000601f19601f8301169050919050565b600061252f826124cd565b61253981856124d8565b93506125498185602086016124e9565b61255281612513565b840191505092915050565b600060208201905081810360008301526125778184612524565b905092915050565b6000819050919050565b6125928161257f565b811461259d57600080fd5b50565b6000813590506125af81612589565b92915050565b6000602082840312156125cb576125ca612408565b5b60006125d9848285016125a0565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061260d826125e2565b9050919050565b61261d81612602565b82525050565b60006020820190506126386000830184612614565b92915050565b6126478161257f565b82525050565b6000602082019050612662600083018461263e565b92915050565b61267181612602565b811461267c57600080fd5b50565b60008135905061268e81612668565b92915050565b6000806000606084860312156126ad576126ac612408565b5b60006126bb8682870161267f565b93505060206126cc8682870161267f565b92505060406126dd868287016125a0565b9150509250925092565b6000819050919050565b6126fa816126e7565b811461270557600080fd5b50565b600081359050612717816126f1565b92915050565b60006020828403121561273357612732612408565b5b600061274184828501612708565b91505092915050565b612753816126e7565b82525050565b600060208201905061276e600083018461274a565b92915050565b60008060006060848603121561278d5761278c612408565b5b600061279b8682870161267f565b93505060206127ac86828701612708565b92505060406127bd868287016125a0565b9150509250925092565b600065ffffffffffff82169050919050565b6127e2816127c7565b81146127ed57600080fd5b50565b6000813590506127ff816127d9565b92915050565b6000806000806080858703121561281f5761281e612408565b5b600061282d8782880161267f565b945050602061283e87828801612708565b935050604061284f878288016125a0565b9250506060612860878288016127f0565b91505092959194509250565b6000806040838503121561288357612882612408565b5b600061289185828601612708565b92505060206128a2858286016127f0565b9150509250929050565b600080604083850312156128c3576128c2612408565b5b60006128d185828601612708565b92505060206128e2858286016125a0565b9150509250929050565b6128f5816127c7565b82525050565b600060808201905061291060008301876128ec565b61291d60208301866128ec565b61292a60408301856128ec565b61293760608301846124a3565b95945050505050565b60006020828403121561295657612955612408565b5b60006129648482850161267f565b91505092915050565b61297681612497565b811461298157600080fd5b50565b6000813590506129938161296d565b92915050565b600080604083850312156129b0576129af612408565b5b60006129be8582860161267f565b92505060206129cf85828601612984565b9150509250929050565b600080604083850312156129f0576129ef612408565b5b60006129fe8582860161267f565b9250506020612a0f85828601612708565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612a5b82612513565b810181811067ffffffffffffffff82111715612a7a57612a79612a23565b5b80604052505050565b6000612a8d6123fe565b9050612a998282612a52565b919050565b600067ffffffffffffffff821115612ab957612ab8612a23565b5b612ac282612513565b9050602081019050919050565b82818337600083830152505050565b6000612af1612aec84612a9e565b612a83565b905082815260208101848484011115612b0d57612b0c612a1e565b5b612b18848285612acf565b509392505050565b600082601f830112612b3557612b34612a19565b5b8135612b45848260208601612ade565b91505092915050565b60008060008060808587031215612b6857612b67612408565b5b6000612b768782880161267f565b9450506020612b878782880161267f565b9350506040612b98878288016125a0565b925050606085013567ffffffffffffffff811115612bb957612bb861240d565b5b612bc587828801612b20565b91505092959194509250565b600080600060608486031215612bea57612be9612408565b5b6000612bf886828701612708565b9350506020612c09868287016125a0565b9250506040612c1a868287016125a0565b9150509250925092565b6000819050919050565b612c3781612c24565b82525050565b6000602082019050612c526000830184612c2e565b92915050565b60008060408385031215612c6f57612c6e612408565b5b6000612c7d8582860161267f565b9250506020612c8e8582860161267f565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612cdf57607f821691505b602082108103612cf257612cf1612c98565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612d61826127c7565b9150612d6c836127c7565b9250828201905065ffffffffffff811115612d8a57612d89612d27565b5b92915050565b6000612d9b8261257f565b9150612da68361257f565b9250828203905081811115612dbe57612dbd612d27565b5b92915050565b6000612dcf8261257f565b9150612dda8361257f565b9250828201905080821115612df257612df1612d27565b5b92915050565b6000612e038261257f565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612e3557612e34612d27565b5b600182019050919050565b600081519050612e4f816126f1565b92915050565b600060208284031215612e6b57612e6a612408565b5b6000612e7984828501612e40565b91505092915050565b600060ff82169050919050565b6000612e9a82612e82565b9150612ea583612e82565b9250828201905060ff811115612ebe57612ebd612d27565b5b92915050565b600081519050612ed381612668565b92915050565b600060208284031215612eef57612eee612408565b5b6000612efd84828501612ec4565b9150509291505056fea2646970667358221220a62f827589f16aecc656da96e430b2614d60fe5c431eea0396000834def84cf064736f6c63430008110033
+\ 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":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint256","name":"_superIndex","type":"uint256"},{"internalType":"uint256","name":"_startAt","type":"uint256"}],"name":"batchOf","outputs":[{"internalType":"int256","name":"","type":"int256"}],"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"}],"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"}],"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":"_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":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint256","name":"_superIndex","type":"uint256"},{"internalType":"uint256","name":"_startAt","type":"uint256"}],"name":"batchOf","outputs":[{"internalType":"int256","name":"","type":"int256"}],"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"}]
diff --git a/python/eth_craft_nft/nft.py b/python/eth_craft_nft/nft.py
@@ -134,7 +134,6 @@ class CraftNFT(ERC721):
return o
-
def batch_of(self, contract_address, token_id, super_index, start_at=0, max_batches=0, sender_address=ZERO_ADDRESS, id_generator=None):
j = JSONRPCRequest(id_generator)
o = j.template()
@@ -209,16 +208,30 @@ class CraftNFT(ERC721):
return o
- def mint_to(self, contract_address, sender_address, recipient, token_id, batch, tx_format=TxFormat.JSONRPC):
+ def mint_to(self, contract_address, sender_address, recipient, token_id, batch, index=None, tx_format=TxFormat.JSONRPC):
enc = ABIContractEncoder()
- enc.method('mintFromBatchTo')
- enc.typ(ABIContractType.ADDRESS)
- enc.typ(ABIContractType.BYTES32)
- enc.typ(ABIContractType.UINT256)
- enc.address(recipient)
- enc.bytes32(token_id)
- enc.uint256(batch)
- data = enc.get()
+
+ if index != None:
+ enc.method('mintExactFromBatchTo')
+ enc.typ(ABIContractType.ADDRESS)
+ enc.typ(ABIContractType.BYTES32)
+ enc.typ(ABIContractType.UINT256)
+ enc.typ(ABIContractType.UINT48)
+ enc.address(recipient)
+ enc.bytes32(token_id)
+ enc.uint256(batch)
+ enc.uintn(index, 48)
+ data = enc.get()
+ else:
+ enc.method('mintFromBatchTo')
+ enc.typ(ABIContractType.ADDRESS)
+ enc.typ(ABIContractType.BYTES32)
+ enc.typ(ABIContractType.UINT256)
+ enc.address(recipient)
+ enc.bytes32(token_id)
+ enc.uint256(batch)
+ data = enc.get()
+
tx = self.template(sender_address, contract_address, use_nonce=True)
tx = self.set_code(tx, data)
tx = self.finalize(tx, tx_format)
diff --git a/python/tests/test_basic.py b/python/tests/test_basic.py
@@ -227,7 +227,7 @@ class Test(EthTesterCase):
self.assertEqual(r['status'], 1)
expected_id = hash_of_foo[:64-10] + '0000000000'
- o = c.get_token_raw(self.address, expected_id, sender_address=self.accounts[0])
+ o = c.get_token(self.address, expected_id, sender_address=self.accounts[0])
r = self.rpc.do(o)
o = c.owner_of(self.address, int(expected_id, 16), sender_address=self.accounts[0])
@@ -242,7 +242,7 @@ class Test(EthTesterCase):
self.assertEqual(r['status'], 1)
expected_id = hash_of_foo[:64-10] + '0000000001'
- o = c.get_token_raw(self.address, expected_id, sender_address=self.accounts[0])
+ o = c.get_token(self.address, expected_id, sender_address=self.accounts[0])
r = self.rpc.do(o)
o = c.owner_of(self.address, int(expected_id, 16), sender_address=self.accounts[0])
@@ -347,7 +347,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)
- o = c.get_token_raw(self.address, hash_of_foo, sender_address=self.accounts[0])
+ o = c.get_token(self.address, hash_of_foo, sender_address=self.accounts[0])
r = self.rpc.do(o)
o = c.get_digest(self.address, hash_of_foo, sender_address=self.accounts[0])
diff --git a/python/tests/test_numbered.py b/python/tests/test_numbered.py
@@ -0,0 +1,160 @@
+# standard imports
+import os
+import unittest
+import json
+import logging
+
+# external imports
+from chainlib.eth.unittest.ethtester import EthTesterCase
+from chainlib.connection import RPCConnection
+from chainlib.eth.nonce import RPCNonceOracle
+from chainlib.eth.address import to_checksum_address
+from chainlib.eth.tx import (
+ receipt,
+ transaction,
+ TxFormat,
+ )
+from chainlib.eth.contract import (
+ abi_decode_single,
+ ABIContractType,
+ )
+from chainlib.eth.address import is_same_address
+from chainlib.error import JSONRPCException
+from chainlib.eth.constant import ZERO_ADDRESS
+from hexathon import (
+ add_0x,
+ strip_0x,
+ )
+from chainlib.eth.tx import TxFormat
+from chainlib.eth.contract import ABIContractEncoder
+from chainlib.eth.contract import ABIContractType
+
+
+# local imports
+from eth_craft_nft import CraftNFT
+from eth_craft_nft.error import InvalidBatchError
+
+logging.basicConfig(level=logging.DEBUG)
+logg = logging.getLogger()
+
+testdir = os.path.dirname(__file__)
+
+hash_of_foo = '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
+hash_of_bar = 'fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9'
+
+
+class Test(EthTesterCase):
+
+ def setUp(self):
+ super(Test, self).setUp()
+ nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
+ c = CraftNFT(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
+ (tx_hash, o) = c.constructor(self.accounts[0], 'DevBadge', 'DEV')
+ self.conn = RPCConnection.connect(self.chain_spec, 'default')
+ r = self.conn.do(o)
+ logg.debug('deployed with hash {}'.format(r))
+
+ o = receipt(r)
+ r = self.conn.do(o)
+ self.address = to_checksum_address(r['contract_address'])
+
+
+ def test_set_numbered(self):
+ nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
+ c = CraftNFT(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
+
+ (tx_hash_hex, o) = c.allocate(self.address, self.accounts[0], hash_of_foo, amount=2)
+ 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)
+ spec = c.parse_token_spec(r)
+
+
+ def test_mint_number(self):
+ nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
+ c = CraftNFT(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
+
+ (tx_hash_hex, o) = c.allocate(self.address, self.accounts[0], hash_of_foo, amount=1000)
+ self.rpc.do(o)
+
+ (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[9], hash_of_foo, 0, index=666)
+ self.rpc.do(o)
+ o = receipt(tx_hash_hex)
+ r = self.conn.do(o)
+ self.assertEqual(r['status'], 1)
+
+ expected_id = hash_of_foo[:64-10] + '000000029a'
+ o = c.get_token(self.address, expected_id, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ content = c.parse_token(r, hash_of_foo)
+
+ (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[9], hash_of_foo, 0, index=666)
+ self.rpc.do(o)
+ o = receipt(tx_hash_hex)
+ r = self.conn.do(o)
+ self.assertEqual(r['status'], 0)
+
+
+ def test_mint_auto_after_number(self):
+ nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
+ c = CraftNFT(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
+
+ (tx_hash_hex, o) = c.allocate(self.address, self.accounts[0], hash_of_foo, amount=10)
+ self.rpc.do(o)
+
+ (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[9], hash_of_foo, 0, index=2)
+ self.rpc.do(o)
+
+ expected_id = hash_of_foo[:64-10] + '000000029a'
+ o = c.get_token(self.address, expected_id, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ content = c.parse_token(r, hash_of_foo)
+
+ (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[9], hash_of_foo, 0)
+ self.rpc.do(o)
+ o = receipt(tx_hash_hex)
+ r = self.conn.do(o)
+ self.assertEqual(r['status'], 0)
+
+
+ def test_complete_number(self):
+ nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
+ c = CraftNFT(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
+
+ (tx_hash_hex, o) = c.allocate(self.address, self.accounts[0], hash_of_foo, amount=3)
+ self.rpc.do(o)
+
+ (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[9], hash_of_foo, 0, index=1)
+ self.rpc.do(o)
+ o = receipt(tx_hash_hex)
+ r = self.conn.do(o)
+ self.assertEqual(r['status'], 1)
+
+ (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[9], hash_of_foo, 0, index=2)
+ self.rpc.do(o)
+ o = receipt(tx_hash_hex)
+ r = self.conn.do(o)
+ self.assertEqual(r['status'], 1)
+
+ (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[9], hash_of_foo, 0, index=0)
+ self.rpc.do(o)
+ o = receipt(tx_hash_hex)
+ r = self.conn.do(o)
+ self.assertEqual(r['status'], 1)
+
+ (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[9], hash_of_foo, 0, index=3)
+ self.rpc.do(o)
+ o = receipt(tx_hash_hex)
+ r = self.conn.do(o)
+ self.assertEqual(r['status'], 0)
+
+ (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[9], hash_of_foo, 0, index=2)
+ self.rpc.do(o)
+ o = receipt(tx_hash_hex)
+ r = self.conn.do(o)
+ self.assertEqual(r['status'], 0)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/python/tests/test_spec.py b/python/tests/test_spec.py
@@ -0,0 +1,84 @@
+# standard imports
+import os
+import unittest
+import json
+import logging
+
+# external imports
+from chainlib.eth.unittest.ethtester import EthTesterCase
+from chainlib.connection import RPCConnection
+from chainlib.eth.nonce import RPCNonceOracle
+from chainlib.eth.address import to_checksum_address
+from chainlib.eth.tx import (
+ receipt,
+ transaction,
+ TxFormat,
+ )
+from chainlib.eth.contract import (
+ abi_decode_single,
+ ABIContractType,
+ )
+from chainlib.eth.address import is_same_address
+from chainlib.error import JSONRPCException
+from chainlib.eth.constant import ZERO_ADDRESS
+from hexathon import (
+ add_0x,
+ strip_0x,
+ )
+from chainlib.eth.tx import TxFormat
+from chainlib.eth.contract import ABIContractEncoder
+from chainlib.eth.contract import ABIContractType
+
+
+# local imports
+from eth_craft_nft import CraftNFT
+from eth_craft_nft.error import InvalidBatchError
+
+logging.basicConfig(level=logging.DEBUG)
+logg = logging.getLogger()
+
+testdir = os.path.dirname(__file__)
+
+hash_of_foo = '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
+hash_of_bar = 'fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9'
+
+
+class Test(EthTesterCase):
+
+ def setUp(self):
+ super(Test, self).setUp()
+ nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
+ c = CraftNFT(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
+ (tx_hash, o) = c.constructor(self.accounts[0], 'DevBadge', 'DEV')
+ self.conn = RPCConnection.connect(self.chain_spec, 'default')
+ r = self.conn.do(o)
+ logg.debug('deployed with hash {}'.format(r))
+
+ o = receipt(r)
+ r = self.conn.do(o)
+ self.address = to_checksum_address(r['contract_address'])
+
+
+ def test_allocate_mint_spec(self):
+ nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
+ c = CraftNFT(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
+
+ (tx_hash_hex, o) = c.allocate(self.address, self.accounts[0], hash_of_foo, amount=2)
+ self.rpc.do(o)
+
+ (tx_hash_hex, o) = c.allocate(self.address, self.accounts[0], hash_of_foo, amount=3)
+ self.rpc.do(o)
+
+ (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[9], hash_of_foo, 1)
+ self.rpc.do(o)
+
+ o = c.get_token_spec(self.address, hash_of_foo, 1, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ spec = c.parse_token_spec(r)
+ self.assertEqual(spec.count, 3)
+ self.assertEqual(spec.cumulative_count, 5)
+ self.assertEqual(spec.cursor, 1)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/solidity/CraftNFT.sol b/solidity/CraftNFT.sol
@@ -7,6 +7,7 @@ contract CraftNFT {
uint48 count;
uint48 cumulativeCount;
uint48 cursor;
+ bool sparse;
}
address public owner;
bytes32[] public tokens;
@@ -67,6 +68,7 @@ contract CraftNFT {
uint256 l;
uint48 _cumulativeCount;
require(msg.sender == owner);
+
tokenSpec memory _token;
l = token[content].length;
@@ -127,29 +129,59 @@ contract CraftNFT {
}
function mintFromBatchTo(address _recipient, bytes32 _content, uint256 _batch) public returns (bytes32) {
- uint256 left;
- uint256 right;
tokenSpec storage spec;
spec = token[_content][_batch];
+
+ require(!spec.sparse);
if (_batch == 0 && spec.count == 0) {
spec.cursor += 1;
return mintTo(_recipient, _content);
}
require(msg.sender == owner);
require(spec.cursor < spec.count);
+ return mintBatchCore(_recipient, _content, _batch, spec.cursor, spec);
+ }
+
+
+ function mintExactFromBatchTo(address _recipient, bytes32 _content, uint256 _batch, uint48 _index) public returns (bytes32) {
+ tokenSpec storage spec;
+
+ spec = token[_content][_batch];
+ require(msg.sender == owner);
+ require(spec.count > 0);
+ require(_index < spec.count);
+ return mintBatchCore(_recipient, _content, _batch, _index, spec);
+ }
+
+
+ function mintBatchCore(address _recipient, bytes32 _content, uint256 _batch, uint48 _index, tokenSpec storage _spec) private returns (bytes32) {
+ uint256 left;
+ uint256 right;
+ bytes32 k;
+
+ left = uint256(_content) & 0xffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000;
+ left |= (_batch << 20);
+ left |= _index;
+ k = bytes32(left);
+
+ require(mintedToken[k] == bytes32(0x00));
+
+ if (!_spec.sparse) {
+ if (_index != _spec.cursor) {
+ _spec.sparse = true;
+ }
+ }
right = uint256(_content) & ((1 << 40) - 1);
right <<= 208;
right |= (1 << 255);
right |= uint160(_recipient);
- left = uint256(_content) & 0xffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000;
- left |= (_batch << 20);
- left |= spec.cursor;
+ _spec.cursor += 1;
+ mintedToken[k] = bytes32(right);
- spec.cursor += 1;
- mintedToken[bytes32(left)] = bytes32(right);
+ return k;
}
// ERC-721