commit 3e9a8e746529fbb6b6c72f22a0dcbeed02754c57 parent 4acd3076355f41a4e5629b6d659f84e9dda5c3e1 Author: lash <dev@holbrook.no> Date: Sat, 17 Dec 2022 23:33:29 +0000 Add supply increments on allocate Diffstat:
M | js/contract/CraftNFT.bin | | | 4 | ++-- |
M | js/index.html | | | 2 | ++ |
M | js/manual_test_browser.js | | | 1 | + |
M | js/src/common.js | | | 1 | + |
M | js/src/engine.js | | | 6 | ++++++ |
M | python/eth_craft_nft/data/CraftNFT.bin | | | 4 | ++-- |
A | python/tests/test_supply.py | | | 109 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
M | solidity/CraftNFT.sol | | | 6 | ++++++ |
8 files changed, 129 insertions(+), 4 deletions(-)
diff --git a/js/contract/CraftNFT.bin b/js/contract/CraftNFT.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b506040516200323238038062003232833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600690816200008891906200050c565b5080600790816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612c2f80620006036000396000f3fe60806040526004361061015d576000357c0100000000000000000000000000000000000000000000000000000000900480636352211e116100d3578063b88d4fde1161008c578063b88d4fde146104d3578063bee2c0b5146104ef578063c87b56dd1461052c578063c9796c3914610569578063e985e9c5146105a6578063f9613ab2146105e35761015d565b80636352211e1461039d57806370a08231146103da5780638da5cb5b1461041757806395d89b4114610442578063a22cb4651461046d578063adf288df146104965761015d565b806324e0febc1161012557806324e0febc1461024e57806325cbaa181461028b57806342842e0e146102c85780634d03546a146102e45780634f64b2be14610321578063559f5dc91461035e5761015d565b806301ffc9a71461016257806306fdde031461019f578063081812fc146101ca57806318160ddd1461020757806323b872dd14610232575b600080fd5b34801561016e57600080fd5b50610189600480360381019061018491906121d2565b610620565b604051610196919061221a565b60405180910390f35b3480156101ab57600080fd5b506101b46107c6565b6040516101c191906122c5565b60405180910390f35b3480156101d657600080fd5b506101f160048036038101906101ec919061231d565b610854565b6040516101fe919061238b565b60405180910390f35b34801561021357600080fd5b5061021c610891565b60405161022991906123b5565b60405180910390f35b61024c600480360381019061024791906123fc565b61089b565b005b34801561025a57600080fd5b5061027560048036038101906102709190612485565b61090a565b60405161028291906124c1565b60405180910390f35b34801561029757600080fd5b506102b260048036038101906102ad91906124dc565b610922565b6040516102bf91906124c1565b60405180910390f35b6102e260048036038101906102dd91906123fc565b610ba9565b005b3480156102f057600080fd5b5061030b6004803603810190610306919061256d565b610c18565b604051610318919061221a565b60405180910390f35b34801561032d57600080fd5b506103486004803603810190610343919061231d565b610e7f565b60405161035591906124c1565b60405180910390f35b34801561036a57600080fd5b50610385600480360381019061038091906125ad565b610ea3565b604051610394939291906125fc565b60405180910390f35b3480156103a957600080fd5b506103c460048036038101906103bf919061231d565b610f1c565b6040516103d1919061238b565b60405180910390f35b3480156103e657600080fd5b5061040160048036038101906103fc9190612633565b610f58565b60405161040e91906123b5565b60405180910390f35b34801561042357600080fd5b5061042c610f5f565b604051610439919061238b565b60405180910390f35b34801561044e57600080fd5b50610457610f83565b60405161046491906122c5565b60405180910390f35b34801561047957600080fd5b50610494600480360381019061048f919061268c565b611011565b005b3480156104a257600080fd5b506104bd60048036038101906104b891906126cc565b6112b3565b6040516104ca91906124c1565b60405180910390f35b6104ed60048036038101906104e89190612841565b611415565b005b3480156104fb57600080fd5b50610516600480360381019061051191906128c4565b6114ec565b6040516105239190612930565b60405180910390f35b34801561053857600080fd5b50610553600480360381019061054e919061231d565b6115bf565b60405161056091906122c5565b60405180910390f35b34801561057557600080fd5b50610590600480360381019061058b9190612485565b61166f565b60405161059d91906122c5565b60405180910390f35b3480156105b257600080fd5b506105cd60048036038101906105c8919061294b565b611c8a565b6040516105da919061221a565b60405180910390f35b3480156105ef57600080fd5b5061060a60048036038101906106059190612485565b611d22565b60405161061791906124c1565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361067457600190506107c1565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106c657600190506107c1565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361071857600190506107c1565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361076a57600190506107c1565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107bc57600190506107c1565b600090505b919050565b600680546107d3906129ba565b80601f01602080910402602001604051908101604052809291908181526020018280546107ff906129ba565b801561084c5780601f106108215761010080835404028352916020019161084c565b820191906000526020600020905b81548152906001019060200180831161082f57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108a984848484611dce565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60008060008060026000878152602001908152602001600020858154811061094d5761094c6129eb565b5b906000526020600020019050600085148015610987575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b156109e857600181600001600c8282829054906101000a900465ffffffffffff166109b29190612a49565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055506109de87876112b3565b9350505050610ba2565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a4057600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff1681600001600c9054906101000a900465ffffffffffff1665ffffffffffff1610610a8857600080fd5b64ffffffffff866001900416915060d0829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508673ffffffffffffffffffffffffffffffffffffffff16821791507fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000086600190041692506014859060020a028317925080600001600c9054906101000a900465ffffffffffff1665ffffffffffff1683179250600181600001600c8282829054906101000a900465ffffffffffff16610b5e9190612a49565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000856001028152602001908152602001600020819055505050505b9392505050565b6060610bb784848484611dce565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c7657600080fd5b610c7e61212d565b600260008781526020019081526020016000208054905092506000831115610d4e57600060026000888152602001908152602001600020600081548110610cc857610cc76129eb565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610cfa57600080fd5b60026000878152602001908152602001600020600184610d1a9190612a83565b81548110610d2b57610d2a6129eb565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1691505b84816000019065ffffffffffff16908165ffffffffffff16815250508482610d769190612a49565b816020019065ffffffffffff16908165ffffffffffff168152505060026000878152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548165ffffffffffff021916908365ffffffffffff1602179055505050600186908060018154018082558091505060019003906000526020600020016000909190919091505550505092915050565b60018181548110610e8f57600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610ebf57600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900465ffffffffffff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610f90906129ba565b80601f0160208091040260200160405190810160405280929190818152602001828054610fbc906129ba565b80156110095780601f10610fde57610100808354040283529160200191611009565b820191906000526020600020905b815481529060010190602001808311610fec57829003601f168201915b505050505081565b801561113257600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110af57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061124a565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036111ca57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516112a7919061221a565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461131157600080fd5b600160026000868152602001908152602001600020805490501461133457600080fd5b60006002600086815260200190815260200160002060008154811061135c5761135b6129eb565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461138e57600080fd5b60006001026003600086815260200190815260200160002054146113b157600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b61142184848484611dce565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e60006001026040516114de91906124c1565b60405180910390a450505050565b6000808290505b600260008681526020019081526020016000208054905081101561159357836fffffffffffffffffffffffffffffffff16600260008781526020019081526020016000208281548110611549576115486129eb565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1665ffffffffffff16111561158057809150506115b8565b808061158b90612ab7565b9150506114f3565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90505b9392505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161161b91906124c1565b602060405180830381865afa158015611638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165c9190612b14565b90506116678161166f565b915050919050565b606080600080604767ffffffffffffffff8111156116905761168f612716565b5b6040519080825280601f01601f1916602001820160405280156116c25781602001600182028036833780820191505090505b5092507f7300000000000000000000000000000000000000000000000000000000000000836000815181106116fa576116f96129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061175e5761175d6129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6100000000000000000000000000000000000000000000000000000000000000836002815181106117c2576117c16129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f320000000000000000000000000000000000000000000000000000000000000083600381518110611826576118256129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061188a576118896129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3600000000000000000000000000000000000000000000000000000000000000836005815181106118ee576118ed6129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a0000000000000000000000000000000000000000000000000000000000000083600681518110611952576119516129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611c7e57600460f08783602081106119a8576119a76129eb565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff161015611a8057603083611a179190612b4e565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611a4c57611a4b6129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611af2565b605783611a8d9190612b4e565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611ac257611ac16129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611b0757611b066129eb565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611bde57603083611b699190612b4e565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611b999190612b83565b81518110611baa57611ba96129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611c5c565b605783611beb9190612b4e565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611c1b9190612b83565b81518110611c2c57611c2b6129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611c699190612b83565b91508080611c7690612ab7565b915050611988565b50829350505050919050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008060036000848152602001908152602001600020549050611d4481612038565b611d4d57600080fd5b611d568161206a565b15611d645782915050611dc9565b7effffffffff00000000000000000000000000000000000000000000000000006001028116905060d081908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611e2591906123b5565b602060405180830381865afa158015611e42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e669190612bcc565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611ea057600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614611fd4573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611fca57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b611fd357600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612031838561209c565b5050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000808360010290506003600082815260200190815260200160002054600190049150600082036120cc57600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff168152602001600065ffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6121af8161217a565b81146121ba57600080fd5b50565b6000813590506121cc816121a6565b92915050565b6000602082840312156121e8576121e7612170565b5b60006121f6848285016121bd565b91505092915050565b60008115159050919050565b612214816121ff565b82525050565b600060208201905061222f600083018461220b565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561226f578082015181840152602081019050612254565b60008484015250505050565b6000601f19601f8301169050919050565b600061229782612235565b6122a18185612240565b93506122b1818560208601612251565b6122ba8161227b565b840191505092915050565b600060208201905081810360008301526122df818461228c565b905092915050565b6000819050919050565b6122fa816122e7565b811461230557600080fd5b50565b600081359050612317816122f1565b92915050565b60006020828403121561233357612332612170565b5b600061234184828501612308565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006123758261234a565b9050919050565b6123858161236a565b82525050565b60006020820190506123a0600083018461237c565b92915050565b6123af816122e7565b82525050565b60006020820190506123ca60008301846123a6565b92915050565b6123d98161236a565b81146123e457600080fd5b50565b6000813590506123f6816123d0565b92915050565b60008060006060848603121561241557612414612170565b5b6000612423868287016123e7565b9350506020612434868287016123e7565b925050604061244586828701612308565b9150509250925092565b6000819050919050565b6124628161244f565b811461246d57600080fd5b50565b60008135905061247f81612459565b92915050565b60006020828403121561249b5761249a612170565b5b60006124a984828501612470565b91505092915050565b6124bb8161244f565b82525050565b60006020820190506124d660008301846124b2565b92915050565b6000806000606084860312156124f5576124f4612170565b5b6000612503868287016123e7565b935050602061251486828701612470565b925050604061252586828701612308565b9150509250925092565b600065ffffffffffff82169050919050565b61254a8161252f565b811461255557600080fd5b50565b60008135905061256781612541565b92915050565b6000806040838503121561258457612583612170565b5b600061259285828601612470565b92505060206125a385828601612558565b9150509250929050565b600080604083850312156125c4576125c3612170565b5b60006125d285828601612470565b92505060206125e385828601612308565b9150509250929050565b6125f68161252f565b82525050565b600060608201905061261160008301866125ed565b61261e60208301856125ed565b61262b60408301846125ed565b949350505050565b60006020828403121561264957612648612170565b5b6000612657848285016123e7565b91505092915050565b612669816121ff565b811461267457600080fd5b50565b60008135905061268681612660565b92915050565b600080604083850312156126a3576126a2612170565b5b60006126b1858286016123e7565b92505060206126c285828601612677565b9150509250929050565b600080604083850312156126e3576126e2612170565b5b60006126f1858286016123e7565b925050602061270285828601612470565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61274e8261227b565b810181811067ffffffffffffffff8211171561276d5761276c612716565b5b80604052505050565b6000612780612166565b905061278c8282612745565b919050565b600067ffffffffffffffff8211156127ac576127ab612716565b5b6127b58261227b565b9050602081019050919050565b82818337600083830152505050565b60006127e46127df84612791565b612776565b905082815260208101848484011115612800576127ff612711565b5b61280b8482856127c2565b509392505050565b600082601f8301126128285761282761270c565b5b81356128388482602086016127d1565b91505092915050565b6000806000806080858703121561285b5761285a612170565b5b6000612869878288016123e7565b945050602061287a878288016123e7565b935050604061288b87828801612308565b925050606085013567ffffffffffffffff8111156128ac576128ab612175565b5b6128b887828801612813565b91505092959194509250565b6000806000606084860312156128dd576128dc612170565b5b60006128eb86828701612470565b93505060206128fc86828701612308565b925050604061290d86828701612308565b9150509250925092565b6000819050919050565b61292a81612917565b82525050565b60006020820190506129456000830184612921565b92915050565b6000806040838503121561296257612961612170565b5b6000612970858286016123e7565b9250506020612981858286016123e7565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806129d257607f821691505b6020821081036129e5576129e461298b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612a548261252f565b9150612a5f8361252f565b9250828201905065ffffffffffff811115612a7d57612a7c612a1a565b5b92915050565b6000612a8e826122e7565b9150612a99836122e7565b9250828203905081811115612ab157612ab0612a1a565b5b92915050565b6000612ac2826122e7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612af457612af3612a1a565b5b600182019050919050565b600081519050612b0e81612459565b92915050565b600060208284031215612b2a57612b29612170565b5b6000612b3884828501612aff565b91505092915050565b600060ff82169050919050565b6000612b5982612b41565b9150612b6483612b41565b9250828201905060ff811115612b7d57612b7c612a1a565b5b92915050565b6000612b8e826122e7565b9150612b99836122e7565b9250828201905080821115612bb157612bb0612a1a565b5b92915050565b600081519050612bc6816123d0565b92915050565b600060208284031215612be257612be1612170565b5b6000612bf084828501612bb7565b9150509291505056fea2646970667358221220616703ca0b9a7a2c34d80d5970395c4799bbbd57fb29aa781c8b4c20882e1bab64736f6c63430008110033 -\ No newline at end of file +60806040523480156200001157600080fd5b506040516200328338038062003283833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600690816200008891906200050c565b5080600790816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612c8080620006036000396000f3fe60806040526004361061015d576000357c0100000000000000000000000000000000000000000000000000000000900480636352211e116100d3578063b88d4fde1161008c578063b88d4fde146104d3578063bee2c0b5146104ef578063c87b56dd1461052c578063c9796c3914610569578063e985e9c5146105a6578063f9613ab2146105e35761015d565b80636352211e1461039d57806370a08231146103da5780638da5cb5b1461041757806395d89b4114610442578063a22cb4651461046d578063adf288df146104965761015d565b806324e0febc1161012557806324e0febc1461024e57806325cbaa181461028b57806342842e0e146102c85780634d03546a146102e45780634f64b2be14610321578063559f5dc91461035e5761015d565b806301ffc9a71461016257806306fdde031461019f578063081812fc146101ca57806318160ddd1461020757806323b872dd14610232575b600080fd5b34801561016e57600080fd5b5061018960048036038101906101849190612223565b610620565b604051610196919061226b565b60405180910390f35b3480156101ab57600080fd5b506101b46107c6565b6040516101c19190612316565b60405180910390f35b3480156101d657600080fd5b506101f160048036038101906101ec919061236e565b610854565b6040516101fe91906123dc565b60405180910390f35b34801561021357600080fd5b5061021c610891565b6040516102299190612406565b60405180910390f35b61024c6004803603810190610247919061244d565b61089b565b005b34801561025a57600080fd5b50610275600480360381019061027091906124d6565b61090a565b6040516102829190612512565b60405180910390f35b34801561029757600080fd5b506102b260048036038101906102ad919061252d565b610922565b6040516102bf9190612512565b60405180910390f35b6102e260048036038101906102dd919061244d565b610ba9565b005b3480156102f057600080fd5b5061030b600480360381019061030691906125be565b610c18565b604051610318919061226b565b60405180910390f35b34801561032d57600080fd5b506103486004803603810190610343919061236e565b610ed0565b6040516103559190612512565b60405180910390f35b34801561036a57600080fd5b50610385600480360381019061038091906125fe565b610ef4565b6040516103949392919061264d565b60405180910390f35b3480156103a957600080fd5b506103c460048036038101906103bf919061236e565b610f6d565b6040516103d191906123dc565b60405180910390f35b3480156103e657600080fd5b5061040160048036038101906103fc9190612684565b610fa9565b60405161040e9190612406565b60405180910390f35b34801561042357600080fd5b5061042c610fb0565b60405161043991906123dc565b60405180910390f35b34801561044e57600080fd5b50610457610fd4565b6040516104649190612316565b60405180910390f35b34801561047957600080fd5b50610494600480360381019061048f91906126dd565b611062565b005b3480156104a257600080fd5b506104bd60048036038101906104b8919061271d565b611304565b6040516104ca9190612512565b60405180910390f35b6104ed60048036038101906104e89190612892565b611466565b005b3480156104fb57600080fd5b5061051660048036038101906105119190612915565b61153d565b6040516105239190612981565b60405180910390f35b34801561053857600080fd5b50610553600480360381019061054e919061236e565b611610565b6040516105609190612316565b60405180910390f35b34801561057557600080fd5b50610590600480360381019061058b91906124d6565b6116c0565b60405161059d9190612316565b60405180910390f35b3480156105b257600080fd5b506105cd60048036038101906105c8919061299c565b611cdb565b6040516105da919061226b565b60405180910390f35b3480156105ef57600080fd5b5061060a600480360381019061060591906124d6565b611d73565b6040516106179190612512565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361067457600190506107c1565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106c657600190506107c1565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361071857600190506107c1565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361076a57600190506107c1565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107bc57600190506107c1565b600090505b919050565b600680546107d390612a0b565b80601f01602080910402602001604051908101604052809291908181526020018280546107ff90612a0b565b801561084c5780601f106108215761010080835404028352916020019161084c565b820191906000526020600020905b81548152906001019060200180831161082f57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108a984848484611e1f565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60008060008060026000878152602001908152602001600020858154811061094d5761094c612a3c565b5b906000526020600020019050600085148015610987575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b156109e857600181600001600c8282829054906101000a900465ffffffffffff166109b29190612a9a565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055506109de8787611304565b9350505050610ba2565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a4057600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff1681600001600c9054906101000a900465ffffffffffff1665ffffffffffff1610610a8857600080fd5b64ffffffffff866001900416915060d0829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508673ffffffffffffffffffffffffffffffffffffffff16821791507fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000086600190041692506014859060020a028317925080600001600c9054906101000a900465ffffffffffff1665ffffffffffff1683179250600181600001600c8282829054906101000a900465ffffffffffff16610b5e9190612a9a565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000856001028152602001908152602001600020819055505050505b9392505050565b6060610bb784848484611e1f565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c7657600080fd5b610c7e61217e565b600260008781526020019081526020016000208054905092506000831115610d4e57600060026000888152602001908152602001600020600081548110610cc857610cc7612a3c565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610cfa57600080fd5b60026000878152602001908152602001600020600184610d1a9190612ad4565b81548110610d2b57610d2a612a3c565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1691505b84816000019065ffffffffffff16908165ffffffffffff16815250508482610d769190612a9a565b816020019065ffffffffffff16908165ffffffffffff168152505060026000878152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548165ffffffffffff021916908365ffffffffffff1602179055505050600186908060018154018082558091505060019003906000526020600020016000909190919091505560008565ffffffffffff1603610ea557600160086000828254610e999190612b08565b92505081905550610ec7565b8465ffffffffffff1660086000828254610ebf9190612b08565b925050819055505b50505092915050565b60018181548110610ee057600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610f1057600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900465ffffffffffff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610fe190612a0b565b80601f016020809104026020016040519081016040528092919081815260200182805461100d90612a0b565b801561105a5780601f1061102f5761010080835404028352916020019161105a565b820191906000526020600020905b81548152906001019060200180831161103d57829003601f168201915b505050505081565b801561118357600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461110057600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061129b565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361121b57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516112f8919061226b565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461136257600080fd5b600160026000868152602001908152602001600020805490501461138557600080fd5b6000600260008681526020019081526020016000206000815481106113ad576113ac612a3c565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146113df57600080fd5b600060010260036000868152602001908152602001600020541461140257600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b61147284848484611e1f565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161152f9190612512565b60405180910390a450505050565b6000808290505b60026000868152602001908152602001600020805490508110156115e457836fffffffffffffffffffffffffffffffff1660026000878152602001908152602001600020828154811061159a57611599612a3c565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1665ffffffffffff1611156115d15780915050611609565b80806115dc90612b3c565b915050611544565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90505b9392505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161166c9190612512565b602060405180830381865afa158015611689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ad9190612b99565b90506116b8816116c0565b915050919050565b606080600080604767ffffffffffffffff8111156116e1576116e0612767565b5b6040519080825280601f01601f1916602001820160405280156117135781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061174b5761174a612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6800000000000000000000000000000000000000000000000000000000000000836001815181106117af576117ae612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061181357611812612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f32000000000000000000000000000000000000000000000000000000000000008360038151811061187757611876612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3500000000000000000000000000000000000000000000000000000000000000836004815181106118db576118da612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061193f5761193e612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a00000000000000000000000000000000000000000000000000000000000000836006815181106119a3576119a2612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611ccf57600460f08783602081106119f9576119f8612a3c565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff161015611ad157603083611a689190612bd3565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611a9d57611a9c612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611b43565b605783611ade9190612bd3565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611b1357611b12612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611b5857611b57612a3c565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611c2f57603083611bba9190612bd3565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611bea9190612b08565b81518110611bfb57611bfa612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611cad565b605783611c3c9190612bd3565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611c6c9190612b08565b81518110611c7d57611c7c612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611cba9190612b08565b91508080611cc790612b3c565b9150506119d9565b50829350505050919050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008060036000848152602001908152602001600020549050611d9581612089565b611d9e57600080fd5b611da7816120bb565b15611db55782915050611e1a565b7effffffffff00000000000000000000000000000000000000000000000000006001028116905060d081908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611e769190612406565b602060405180830381865afa158015611e93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb79190612c1d565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611ef157600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612025573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061201b57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61202457600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061208283856120ed565b5050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361211d57600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff168152602001600065ffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612200816121cb565b811461220b57600080fd5b50565b60008135905061221d816121f7565b92915050565b600060208284031215612239576122386121c1565b5b60006122478482850161220e565b91505092915050565b60008115159050919050565b61226581612250565b82525050565b6000602082019050612280600083018461225c565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156122c05780820151818401526020810190506122a5565b60008484015250505050565b6000601f19601f8301169050919050565b60006122e882612286565b6122f28185612291565b93506123028185602086016122a2565b61230b816122cc565b840191505092915050565b6000602082019050818103600083015261233081846122dd565b905092915050565b6000819050919050565b61234b81612338565b811461235657600080fd5b50565b60008135905061236881612342565b92915050565b600060208284031215612384576123836121c1565b5b600061239284828501612359565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006123c68261239b565b9050919050565b6123d6816123bb565b82525050565b60006020820190506123f160008301846123cd565b92915050565b61240081612338565b82525050565b600060208201905061241b60008301846123f7565b92915050565b61242a816123bb565b811461243557600080fd5b50565b60008135905061244781612421565b92915050565b600080600060608486031215612466576124656121c1565b5b600061247486828701612438565b935050602061248586828701612438565b925050604061249686828701612359565b9150509250925092565b6000819050919050565b6124b3816124a0565b81146124be57600080fd5b50565b6000813590506124d0816124aa565b92915050565b6000602082840312156124ec576124eb6121c1565b5b60006124fa848285016124c1565b91505092915050565b61250c816124a0565b82525050565b60006020820190506125276000830184612503565b92915050565b600080600060608486031215612546576125456121c1565b5b600061255486828701612438565b9350506020612565868287016124c1565b925050604061257686828701612359565b9150509250925092565b600065ffffffffffff82169050919050565b61259b81612580565b81146125a657600080fd5b50565b6000813590506125b881612592565b92915050565b600080604083850312156125d5576125d46121c1565b5b60006125e3858286016124c1565b92505060206125f4858286016125a9565b9150509250929050565b60008060408385031215612615576126146121c1565b5b6000612623858286016124c1565b925050602061263485828601612359565b9150509250929050565b61264781612580565b82525050565b6000606082019050612662600083018661263e565b61266f602083018561263e565b61267c604083018461263e565b949350505050565b60006020828403121561269a576126996121c1565b5b60006126a884828501612438565b91505092915050565b6126ba81612250565b81146126c557600080fd5b50565b6000813590506126d7816126b1565b92915050565b600080604083850312156126f4576126f36121c1565b5b600061270285828601612438565b9250506020612713858286016126c8565b9150509250929050565b60008060408385031215612734576127336121c1565b5b600061274285828601612438565b9250506020612753858286016124c1565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61279f826122cc565b810181811067ffffffffffffffff821117156127be576127bd612767565b5b80604052505050565b60006127d16121b7565b90506127dd8282612796565b919050565b600067ffffffffffffffff8211156127fd576127fc612767565b5b612806826122cc565b9050602081019050919050565b82818337600083830152505050565b6000612835612830846127e2565b6127c7565b90508281526020810184848401111561285157612850612762565b5b61285c848285612813565b509392505050565b600082601f8301126128795761287861275d565b5b8135612889848260208601612822565b91505092915050565b600080600080608085870312156128ac576128ab6121c1565b5b60006128ba87828801612438565b94505060206128cb87828801612438565b93505060406128dc87828801612359565b925050606085013567ffffffffffffffff8111156128fd576128fc6121c6565b5b61290987828801612864565b91505092959194509250565b60008060006060848603121561292e5761292d6121c1565b5b600061293c868287016124c1565b935050602061294d86828701612359565b925050604061295e86828701612359565b9150509250925092565b6000819050919050565b61297b81612968565b82525050565b60006020820190506129966000830184612972565b92915050565b600080604083850312156129b3576129b26121c1565b5b60006129c185828601612438565b92505060206129d285828601612438565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612a2357607f821691505b602082108103612a3657612a356129dc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612aa582612580565b9150612ab083612580565b9250828201905065ffffffffffff811115612ace57612acd612a6b565b5b92915050565b6000612adf82612338565b9150612aea83612338565b9250828203905081811115612b0257612b01612a6b565b5b92915050565b6000612b1382612338565b9150612b1e83612338565b9250828201905080821115612b3657612b35612a6b565b5b92915050565b6000612b4782612338565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612b7957612b78612a6b565b5b600182019050919050565b600081519050612b93816124aa565b92915050565b600060208284031215612baf57612bae6121c1565b5b6000612bbd84828501612b84565b91505092915050565b600060ff82169050919050565b6000612bde82612bc6565b9150612be983612bc6565b9250828201905060ff811115612c0257612c01612a6b565b5b92915050565b600081519050612c1781612421565b92915050565b600060208284031215612c3357612c326121c1565b5b6000612c4184828501612c08565b9150509291505056fea2646970667358221220ff70abaa1d8ea33cee12b101e3f02d2dfbbeed2445c3856b47f871b5955c653c64736f6c63430008110033 +\ No newline at end of file diff --git a/js/index.html b/js/index.html @@ -36,6 +36,8 @@ a:hover { <dd id="data_name"></dd> <dt>symbol</dt> <dd id="data_symbol"></dd> + <dt>supply</dt> + <dd id="data_supply"></dd> </dl> </dd> </dl> diff --git a/js/manual_test_browser.js b/js/manual_test_browser.js @@ -177,6 +177,7 @@ async function run(w3, generated_session) { document.getElementById('data_contract').innerHTML = session.contractAddress; document.getElementById('data_name').innerHTML = session.name; document.getElementById('data_symbol').innerHTML = session.symbol; + document.getElementById('data_supply').innerHTML = session.supply; document.getElementById('panel_submit').addEventListener('click', generatePayload); document.getElementById('mint_submit').addEventListener('click', generateMint); window.craftnft.getTokens(w3, session, (tokenId) => { diff --git a/js/src/common.js b/js/src/common.js @@ -4,6 +4,7 @@ var session = { contract: undefined, name: undefined, symbol: undefined, + supply: 0, }; diff --git a/js/src/engine.js b/js/src/engine.js @@ -25,10 +25,16 @@ async function startSession(w3, config, session, runner) { session.contract = loadContract(w3, config); session.name = await session.contract.methods.name().call({from: session.account}); session.symbol = await session.contract.methods.symbol().call({from: session.account}); + session.supply = await session.contract.methods.totalSupply().call({from: session.account}); console.debug('session', session); runner(w3, session); } +async function refreshSession(session) { + session.supply = await session.contract.methods.totalSupply().call({from: session.account}); + return session; +} + async function getTokens(w3, session, callback) { let i = 0; while (true) { diff --git a/python/eth_craft_nft/data/CraftNFT.bin b/python/eth_craft_nft/data/CraftNFT.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b506040516200323238038062003232833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600690816200008891906200050c565b5080600790816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612c2f80620006036000396000f3fe60806040526004361061015d576000357c0100000000000000000000000000000000000000000000000000000000900480636352211e116100d3578063b88d4fde1161008c578063b88d4fde146104d3578063bee2c0b5146104ef578063c87b56dd1461052c578063c9796c3914610569578063e985e9c5146105a6578063f9613ab2146105e35761015d565b80636352211e1461039d57806370a08231146103da5780638da5cb5b1461041757806395d89b4114610442578063a22cb4651461046d578063adf288df146104965761015d565b806324e0febc1161012557806324e0febc1461024e57806325cbaa181461028b57806342842e0e146102c85780634d03546a146102e45780634f64b2be14610321578063559f5dc91461035e5761015d565b806301ffc9a71461016257806306fdde031461019f578063081812fc146101ca57806318160ddd1461020757806323b872dd14610232575b600080fd5b34801561016e57600080fd5b50610189600480360381019061018491906121d2565b610620565b604051610196919061221a565b60405180910390f35b3480156101ab57600080fd5b506101b46107c6565b6040516101c191906122c5565b60405180910390f35b3480156101d657600080fd5b506101f160048036038101906101ec919061231d565b610854565b6040516101fe919061238b565b60405180910390f35b34801561021357600080fd5b5061021c610891565b60405161022991906123b5565b60405180910390f35b61024c600480360381019061024791906123fc565b61089b565b005b34801561025a57600080fd5b5061027560048036038101906102709190612485565b61090a565b60405161028291906124c1565b60405180910390f35b34801561029757600080fd5b506102b260048036038101906102ad91906124dc565b610922565b6040516102bf91906124c1565b60405180910390f35b6102e260048036038101906102dd91906123fc565b610ba9565b005b3480156102f057600080fd5b5061030b6004803603810190610306919061256d565b610c18565b604051610318919061221a565b60405180910390f35b34801561032d57600080fd5b506103486004803603810190610343919061231d565b610e7f565b60405161035591906124c1565b60405180910390f35b34801561036a57600080fd5b50610385600480360381019061038091906125ad565b610ea3565b604051610394939291906125fc565b60405180910390f35b3480156103a957600080fd5b506103c460048036038101906103bf919061231d565b610f1c565b6040516103d1919061238b565b60405180910390f35b3480156103e657600080fd5b5061040160048036038101906103fc9190612633565b610f58565b60405161040e91906123b5565b60405180910390f35b34801561042357600080fd5b5061042c610f5f565b604051610439919061238b565b60405180910390f35b34801561044e57600080fd5b50610457610f83565b60405161046491906122c5565b60405180910390f35b34801561047957600080fd5b50610494600480360381019061048f919061268c565b611011565b005b3480156104a257600080fd5b506104bd60048036038101906104b891906126cc565b6112b3565b6040516104ca91906124c1565b60405180910390f35b6104ed60048036038101906104e89190612841565b611415565b005b3480156104fb57600080fd5b50610516600480360381019061051191906128c4565b6114ec565b6040516105239190612930565b60405180910390f35b34801561053857600080fd5b50610553600480360381019061054e919061231d565b6115bf565b60405161056091906122c5565b60405180910390f35b34801561057557600080fd5b50610590600480360381019061058b9190612485565b61166f565b60405161059d91906122c5565b60405180910390f35b3480156105b257600080fd5b506105cd60048036038101906105c8919061294b565b611c8a565b6040516105da919061221a565b60405180910390f35b3480156105ef57600080fd5b5061060a60048036038101906106059190612485565b611d22565b60405161061791906124c1565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361067457600190506107c1565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106c657600190506107c1565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361071857600190506107c1565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361076a57600190506107c1565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107bc57600190506107c1565b600090505b919050565b600680546107d3906129ba565b80601f01602080910402602001604051908101604052809291908181526020018280546107ff906129ba565b801561084c5780601f106108215761010080835404028352916020019161084c565b820191906000526020600020905b81548152906001019060200180831161082f57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108a984848484611dce565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60008060008060026000878152602001908152602001600020858154811061094d5761094c6129eb565b5b906000526020600020019050600085148015610987575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b156109e857600181600001600c8282829054906101000a900465ffffffffffff166109b29190612a49565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055506109de87876112b3565b9350505050610ba2565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a4057600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff1681600001600c9054906101000a900465ffffffffffff1665ffffffffffff1610610a8857600080fd5b64ffffffffff866001900416915060d0829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508673ffffffffffffffffffffffffffffffffffffffff16821791507fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000086600190041692506014859060020a028317925080600001600c9054906101000a900465ffffffffffff1665ffffffffffff1683179250600181600001600c8282829054906101000a900465ffffffffffff16610b5e9190612a49565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000856001028152602001908152602001600020819055505050505b9392505050565b6060610bb784848484611dce565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c7657600080fd5b610c7e61212d565b600260008781526020019081526020016000208054905092506000831115610d4e57600060026000888152602001908152602001600020600081548110610cc857610cc76129eb565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610cfa57600080fd5b60026000878152602001908152602001600020600184610d1a9190612a83565b81548110610d2b57610d2a6129eb565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1691505b84816000019065ffffffffffff16908165ffffffffffff16815250508482610d769190612a49565b816020019065ffffffffffff16908165ffffffffffff168152505060026000878152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548165ffffffffffff021916908365ffffffffffff1602179055505050600186908060018154018082558091505060019003906000526020600020016000909190919091505550505092915050565b60018181548110610e8f57600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610ebf57600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900465ffffffffffff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610f90906129ba565b80601f0160208091040260200160405190810160405280929190818152602001828054610fbc906129ba565b80156110095780601f10610fde57610100808354040283529160200191611009565b820191906000526020600020905b815481529060010190602001808311610fec57829003601f168201915b505050505081565b801561113257600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110af57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061124a565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036111ca57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516112a7919061221a565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461131157600080fd5b600160026000868152602001908152602001600020805490501461133457600080fd5b60006002600086815260200190815260200160002060008154811061135c5761135b6129eb565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461138e57600080fd5b60006001026003600086815260200190815260200160002054146113b157600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b61142184848484611dce565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e60006001026040516114de91906124c1565b60405180910390a450505050565b6000808290505b600260008681526020019081526020016000208054905081101561159357836fffffffffffffffffffffffffffffffff16600260008781526020019081526020016000208281548110611549576115486129eb565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1665ffffffffffff16111561158057809150506115b8565b808061158b90612ab7565b9150506114f3565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90505b9392505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161161b91906124c1565b602060405180830381865afa158015611638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165c9190612b14565b90506116678161166f565b915050919050565b606080600080604767ffffffffffffffff8111156116905761168f612716565b5b6040519080825280601f01601f1916602001820160405280156116c25781602001600182028036833780820191505090505b5092507f7300000000000000000000000000000000000000000000000000000000000000836000815181106116fa576116f96129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061175e5761175d6129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6100000000000000000000000000000000000000000000000000000000000000836002815181106117c2576117c16129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f320000000000000000000000000000000000000000000000000000000000000083600381518110611826576118256129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061188a576118896129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3600000000000000000000000000000000000000000000000000000000000000836005815181106118ee576118ed6129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a0000000000000000000000000000000000000000000000000000000000000083600681518110611952576119516129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611c7e57600460f08783602081106119a8576119a76129eb565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff161015611a8057603083611a179190612b4e565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611a4c57611a4b6129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611af2565b605783611a8d9190612b4e565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611ac257611ac16129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611b0757611b066129eb565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611bde57603083611b699190612b4e565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611b999190612b83565b81518110611baa57611ba96129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611c5c565b605783611beb9190612b4e565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611c1b9190612b83565b81518110611c2c57611c2b6129eb565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611c699190612b83565b91508080611c7690612ab7565b915050611988565b50829350505050919050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008060036000848152602001908152602001600020549050611d4481612038565b611d4d57600080fd5b611d568161206a565b15611d645782915050611dc9565b7effffffffff00000000000000000000000000000000000000000000000000006001028116905060d081908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611e2591906123b5565b602060405180830381865afa158015611e42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e669190612bcc565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611ea057600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614611fd4573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611fca57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b611fd357600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612031838561209c565b5050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000808360010290506003600082815260200190815260200160002054600190049150600082036120cc57600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff168152602001600065ffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6121af8161217a565b81146121ba57600080fd5b50565b6000813590506121cc816121a6565b92915050565b6000602082840312156121e8576121e7612170565b5b60006121f6848285016121bd565b91505092915050565b60008115159050919050565b612214816121ff565b82525050565b600060208201905061222f600083018461220b565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561226f578082015181840152602081019050612254565b60008484015250505050565b6000601f19601f8301169050919050565b600061229782612235565b6122a18185612240565b93506122b1818560208601612251565b6122ba8161227b565b840191505092915050565b600060208201905081810360008301526122df818461228c565b905092915050565b6000819050919050565b6122fa816122e7565b811461230557600080fd5b50565b600081359050612317816122f1565b92915050565b60006020828403121561233357612332612170565b5b600061234184828501612308565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006123758261234a565b9050919050565b6123858161236a565b82525050565b60006020820190506123a0600083018461237c565b92915050565b6123af816122e7565b82525050565b60006020820190506123ca60008301846123a6565b92915050565b6123d98161236a565b81146123e457600080fd5b50565b6000813590506123f6816123d0565b92915050565b60008060006060848603121561241557612414612170565b5b6000612423868287016123e7565b9350506020612434868287016123e7565b925050604061244586828701612308565b9150509250925092565b6000819050919050565b6124628161244f565b811461246d57600080fd5b50565b60008135905061247f81612459565b92915050565b60006020828403121561249b5761249a612170565b5b60006124a984828501612470565b91505092915050565b6124bb8161244f565b82525050565b60006020820190506124d660008301846124b2565b92915050565b6000806000606084860312156124f5576124f4612170565b5b6000612503868287016123e7565b935050602061251486828701612470565b925050604061252586828701612308565b9150509250925092565b600065ffffffffffff82169050919050565b61254a8161252f565b811461255557600080fd5b50565b60008135905061256781612541565b92915050565b6000806040838503121561258457612583612170565b5b600061259285828601612470565b92505060206125a385828601612558565b9150509250929050565b600080604083850312156125c4576125c3612170565b5b60006125d285828601612470565b92505060206125e385828601612308565b9150509250929050565b6125f68161252f565b82525050565b600060608201905061261160008301866125ed565b61261e60208301856125ed565b61262b60408301846125ed565b949350505050565b60006020828403121561264957612648612170565b5b6000612657848285016123e7565b91505092915050565b612669816121ff565b811461267457600080fd5b50565b60008135905061268681612660565b92915050565b600080604083850312156126a3576126a2612170565b5b60006126b1858286016123e7565b92505060206126c285828601612677565b9150509250929050565b600080604083850312156126e3576126e2612170565b5b60006126f1858286016123e7565b925050602061270285828601612470565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61274e8261227b565b810181811067ffffffffffffffff8211171561276d5761276c612716565b5b80604052505050565b6000612780612166565b905061278c8282612745565b919050565b600067ffffffffffffffff8211156127ac576127ab612716565b5b6127b58261227b565b9050602081019050919050565b82818337600083830152505050565b60006127e46127df84612791565b612776565b905082815260208101848484011115612800576127ff612711565b5b61280b8482856127c2565b509392505050565b600082601f8301126128285761282761270c565b5b81356128388482602086016127d1565b91505092915050565b6000806000806080858703121561285b5761285a612170565b5b6000612869878288016123e7565b945050602061287a878288016123e7565b935050604061288b87828801612308565b925050606085013567ffffffffffffffff8111156128ac576128ab612175565b5b6128b887828801612813565b91505092959194509250565b6000806000606084860312156128dd576128dc612170565b5b60006128eb86828701612470565b93505060206128fc86828701612308565b925050604061290d86828701612308565b9150509250925092565b6000819050919050565b61292a81612917565b82525050565b60006020820190506129456000830184612921565b92915050565b6000806040838503121561296257612961612170565b5b6000612970858286016123e7565b9250506020612981858286016123e7565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806129d257607f821691505b6020821081036129e5576129e461298b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612a548261252f565b9150612a5f8361252f565b9250828201905065ffffffffffff811115612a7d57612a7c612a1a565b5b92915050565b6000612a8e826122e7565b9150612a99836122e7565b9250828203905081811115612ab157612ab0612a1a565b5b92915050565b6000612ac2826122e7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612af457612af3612a1a565b5b600182019050919050565b600081519050612b0e81612459565b92915050565b600060208284031215612b2a57612b29612170565b5b6000612b3884828501612aff565b91505092915050565b600060ff82169050919050565b6000612b5982612b41565b9150612b6483612b41565b9250828201905060ff811115612b7d57612b7c612a1a565b5b92915050565b6000612b8e826122e7565b9150612b99836122e7565b9250828201905080821115612bb157612bb0612a1a565b5b92915050565b600081519050612bc6816123d0565b92915050565b600060208284031215612be257612be1612170565b5b6000612bf084828501612bb7565b9150509291505056fea2646970667358221220616703ca0b9a7a2c34d80d5970395c4799bbbd57fb29aa781c8b4c20882e1bab64736f6c63430008110033 -\ No newline at end of file +60806040523480156200001157600080fd5b506040516200328338038062003283833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600690816200008891906200050c565b5080600790816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612c8080620006036000396000f3fe60806040526004361061015d576000357c0100000000000000000000000000000000000000000000000000000000900480636352211e116100d3578063b88d4fde1161008c578063b88d4fde146104d3578063bee2c0b5146104ef578063c87b56dd1461052c578063c9796c3914610569578063e985e9c5146105a6578063f9613ab2146105e35761015d565b80636352211e1461039d57806370a08231146103da5780638da5cb5b1461041757806395d89b4114610442578063a22cb4651461046d578063adf288df146104965761015d565b806324e0febc1161012557806324e0febc1461024e57806325cbaa181461028b57806342842e0e146102c85780634d03546a146102e45780634f64b2be14610321578063559f5dc91461035e5761015d565b806301ffc9a71461016257806306fdde031461019f578063081812fc146101ca57806318160ddd1461020757806323b872dd14610232575b600080fd5b34801561016e57600080fd5b5061018960048036038101906101849190612223565b610620565b604051610196919061226b565b60405180910390f35b3480156101ab57600080fd5b506101b46107c6565b6040516101c19190612316565b60405180910390f35b3480156101d657600080fd5b506101f160048036038101906101ec919061236e565b610854565b6040516101fe91906123dc565b60405180910390f35b34801561021357600080fd5b5061021c610891565b6040516102299190612406565b60405180910390f35b61024c6004803603810190610247919061244d565b61089b565b005b34801561025a57600080fd5b50610275600480360381019061027091906124d6565b61090a565b6040516102829190612512565b60405180910390f35b34801561029757600080fd5b506102b260048036038101906102ad919061252d565b610922565b6040516102bf9190612512565b60405180910390f35b6102e260048036038101906102dd919061244d565b610ba9565b005b3480156102f057600080fd5b5061030b600480360381019061030691906125be565b610c18565b604051610318919061226b565b60405180910390f35b34801561032d57600080fd5b506103486004803603810190610343919061236e565b610ed0565b6040516103559190612512565b60405180910390f35b34801561036a57600080fd5b50610385600480360381019061038091906125fe565b610ef4565b6040516103949392919061264d565b60405180910390f35b3480156103a957600080fd5b506103c460048036038101906103bf919061236e565b610f6d565b6040516103d191906123dc565b60405180910390f35b3480156103e657600080fd5b5061040160048036038101906103fc9190612684565b610fa9565b60405161040e9190612406565b60405180910390f35b34801561042357600080fd5b5061042c610fb0565b60405161043991906123dc565b60405180910390f35b34801561044e57600080fd5b50610457610fd4565b6040516104649190612316565b60405180910390f35b34801561047957600080fd5b50610494600480360381019061048f91906126dd565b611062565b005b3480156104a257600080fd5b506104bd60048036038101906104b8919061271d565b611304565b6040516104ca9190612512565b60405180910390f35b6104ed60048036038101906104e89190612892565b611466565b005b3480156104fb57600080fd5b5061051660048036038101906105119190612915565b61153d565b6040516105239190612981565b60405180910390f35b34801561053857600080fd5b50610553600480360381019061054e919061236e565b611610565b6040516105609190612316565b60405180910390f35b34801561057557600080fd5b50610590600480360381019061058b91906124d6565b6116c0565b60405161059d9190612316565b60405180910390f35b3480156105b257600080fd5b506105cd60048036038101906105c8919061299c565b611cdb565b6040516105da919061226b565b60405180910390f35b3480156105ef57600080fd5b5061060a600480360381019061060591906124d6565b611d73565b6040516106179190612512565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361067457600190506107c1565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106c657600190506107c1565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361071857600190506107c1565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361076a57600190506107c1565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107bc57600190506107c1565b600090505b919050565b600680546107d390612a0b565b80601f01602080910402602001604051908101604052809291908181526020018280546107ff90612a0b565b801561084c5780601f106108215761010080835404028352916020019161084c565b820191906000526020600020905b81548152906001019060200180831161082f57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108a984848484611e1f565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60008060008060026000878152602001908152602001600020858154811061094d5761094c612a3c565b5b906000526020600020019050600085148015610987575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b156109e857600181600001600c8282829054906101000a900465ffffffffffff166109b29190612a9a565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055506109de8787611304565b9350505050610ba2565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a4057600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff1681600001600c9054906101000a900465ffffffffffff1665ffffffffffff1610610a8857600080fd5b64ffffffffff866001900416915060d0829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508673ffffffffffffffffffffffffffffffffffffffff16821791507fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000086600190041692506014859060020a028317925080600001600c9054906101000a900465ffffffffffff1665ffffffffffff1683179250600181600001600c8282829054906101000a900465ffffffffffff16610b5e9190612a9a565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000856001028152602001908152602001600020819055505050505b9392505050565b6060610bb784848484611e1f565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c7657600080fd5b610c7e61217e565b600260008781526020019081526020016000208054905092506000831115610d4e57600060026000888152602001908152602001600020600081548110610cc857610cc7612a3c565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610cfa57600080fd5b60026000878152602001908152602001600020600184610d1a9190612ad4565b81548110610d2b57610d2a612a3c565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1691505b84816000019065ffffffffffff16908165ffffffffffff16815250508482610d769190612a9a565b816020019065ffffffffffff16908165ffffffffffff168152505060026000878152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548165ffffffffffff021916908365ffffffffffff1602179055505050600186908060018154018082558091505060019003906000526020600020016000909190919091505560008565ffffffffffff1603610ea557600160086000828254610e999190612b08565b92505081905550610ec7565b8465ffffffffffff1660086000828254610ebf9190612b08565b925050819055505b50505092915050565b60018181548110610ee057600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610f1057600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900465ffffffffffff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610fe190612a0b565b80601f016020809104026020016040519081016040528092919081815260200182805461100d90612a0b565b801561105a5780601f1061102f5761010080835404028352916020019161105a565b820191906000526020600020905b81548152906001019060200180831161103d57829003601f168201915b505050505081565b801561118357600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461110057600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061129b565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361121b57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516112f8919061226b565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461136257600080fd5b600160026000868152602001908152602001600020805490501461138557600080fd5b6000600260008681526020019081526020016000206000815481106113ad576113ac612a3c565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146113df57600080fd5b600060010260036000868152602001908152602001600020541461140257600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b61147284848484611e1f565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161152f9190612512565b60405180910390a450505050565b6000808290505b60026000868152602001908152602001600020805490508110156115e457836fffffffffffffffffffffffffffffffff1660026000878152602001908152602001600020828154811061159a57611599612a3c565b5b9060005260206000200160000160069054906101000a900465ffffffffffff1665ffffffffffff1611156115d15780915050611609565b80806115dc90612b3c565b915050611544565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90505b9392505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161166c9190612512565b602060405180830381865afa158015611689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ad9190612b99565b90506116b8816116c0565b915050919050565b606080600080604767ffffffffffffffff8111156116e1576116e0612767565b5b6040519080825280601f01601f1916602001820160405280156117135781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061174b5761174a612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6800000000000000000000000000000000000000000000000000000000000000836001815181106117af576117ae612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061181357611812612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f32000000000000000000000000000000000000000000000000000000000000008360038151811061187757611876612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3500000000000000000000000000000000000000000000000000000000000000836004815181106118db576118da612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061193f5761193e612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a00000000000000000000000000000000000000000000000000000000000000836006815181106119a3576119a2612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611ccf57600460f08783602081106119f9576119f8612a3c565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff161015611ad157603083611a689190612bd3565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611a9d57611a9c612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611b43565b605783611ade9190612bd3565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611b1357611b12612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611b5857611b57612a3c565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611c2f57603083611bba9190612bd3565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611bea9190612b08565b81518110611bfb57611bfa612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611cad565b605783611c3c9190612bd3565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611c6c9190612b08565b81518110611c7d57611c7c612a3c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611cba9190612b08565b91508080611cc790612b3c565b9150506119d9565b50829350505050919050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008060036000848152602001908152602001600020549050611d9581612089565b611d9e57600080fd5b611da7816120bb565b15611db55782915050611e1a565b7effffffffff00000000000000000000000000000000000000000000000000006001028116905060d081908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611e769190612406565b602060405180830381865afa158015611e93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb79190612c1d565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611ef157600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612025573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061201b57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61202457600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061208283856120ed565b5050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361211d57600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff168152602001600065ffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612200816121cb565b811461220b57600080fd5b50565b60008135905061221d816121f7565b92915050565b600060208284031215612239576122386121c1565b5b60006122478482850161220e565b91505092915050565b60008115159050919050565b61226581612250565b82525050565b6000602082019050612280600083018461225c565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156122c05780820151818401526020810190506122a5565b60008484015250505050565b6000601f19601f8301169050919050565b60006122e882612286565b6122f28185612291565b93506123028185602086016122a2565b61230b816122cc565b840191505092915050565b6000602082019050818103600083015261233081846122dd565b905092915050565b6000819050919050565b61234b81612338565b811461235657600080fd5b50565b60008135905061236881612342565b92915050565b600060208284031215612384576123836121c1565b5b600061239284828501612359565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006123c68261239b565b9050919050565b6123d6816123bb565b82525050565b60006020820190506123f160008301846123cd565b92915050565b61240081612338565b82525050565b600060208201905061241b60008301846123f7565b92915050565b61242a816123bb565b811461243557600080fd5b50565b60008135905061244781612421565b92915050565b600080600060608486031215612466576124656121c1565b5b600061247486828701612438565b935050602061248586828701612438565b925050604061249686828701612359565b9150509250925092565b6000819050919050565b6124b3816124a0565b81146124be57600080fd5b50565b6000813590506124d0816124aa565b92915050565b6000602082840312156124ec576124eb6121c1565b5b60006124fa848285016124c1565b91505092915050565b61250c816124a0565b82525050565b60006020820190506125276000830184612503565b92915050565b600080600060608486031215612546576125456121c1565b5b600061255486828701612438565b9350506020612565868287016124c1565b925050604061257686828701612359565b9150509250925092565b600065ffffffffffff82169050919050565b61259b81612580565b81146125a657600080fd5b50565b6000813590506125b881612592565b92915050565b600080604083850312156125d5576125d46121c1565b5b60006125e3858286016124c1565b92505060206125f4858286016125a9565b9150509250929050565b60008060408385031215612615576126146121c1565b5b6000612623858286016124c1565b925050602061263485828601612359565b9150509250929050565b61264781612580565b82525050565b6000606082019050612662600083018661263e565b61266f602083018561263e565b61267c604083018461263e565b949350505050565b60006020828403121561269a576126996121c1565b5b60006126a884828501612438565b91505092915050565b6126ba81612250565b81146126c557600080fd5b50565b6000813590506126d7816126b1565b92915050565b600080604083850312156126f4576126f36121c1565b5b600061270285828601612438565b9250506020612713858286016126c8565b9150509250929050565b60008060408385031215612734576127336121c1565b5b600061274285828601612438565b9250506020612753858286016124c1565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61279f826122cc565b810181811067ffffffffffffffff821117156127be576127bd612767565b5b80604052505050565b60006127d16121b7565b90506127dd8282612796565b919050565b600067ffffffffffffffff8211156127fd576127fc612767565b5b612806826122cc565b9050602081019050919050565b82818337600083830152505050565b6000612835612830846127e2565b6127c7565b90508281526020810184848401111561285157612850612762565b5b61285c848285612813565b509392505050565b600082601f8301126128795761287861275d565b5b8135612889848260208601612822565b91505092915050565b600080600080608085870312156128ac576128ab6121c1565b5b60006128ba87828801612438565b94505060206128cb87828801612438565b93505060406128dc87828801612359565b925050606085013567ffffffffffffffff8111156128fd576128fc6121c6565b5b61290987828801612864565b91505092959194509250565b60008060006060848603121561292e5761292d6121c1565b5b600061293c868287016124c1565b935050602061294d86828701612359565b925050604061295e86828701612359565b9150509250925092565b6000819050919050565b61297b81612968565b82525050565b60006020820190506129966000830184612972565b92915050565b600080604083850312156129b3576129b26121c1565b5b60006129c185828601612438565b92505060206129d285828601612438565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612a2357607f821691505b602082108103612a3657612a356129dc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612aa582612580565b9150612ab083612580565b9250828201905065ffffffffffff811115612ace57612acd612a6b565b5b92915050565b6000612adf82612338565b9150612aea83612338565b9250828203905081811115612b0257612b01612a6b565b5b92915050565b6000612b1382612338565b9150612b1e83612338565b9250828201905080821115612b3657612b35612a6b565b5b92915050565b6000612b4782612338565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612b7957612b78612a6b565b5b600182019050919050565b600081519050612b93816124aa565b92915050565b600060208284031215612baf57612bae6121c1565b5b6000612bbd84828501612b84565b91505092915050565b600060ff82169050919050565b6000612bde82612bc6565b9150612be983612bc6565b9250828201905060ff811115612c0257612c01612a6b565b5b92915050565b600081519050612c1781612421565b92915050565b600060208284031215612c3357612c326121c1565b5b6000612c4184828501612c08565b9150509291505056fea2646970667358221220ff70abaa1d8ea33cee12b101e3f02d2dfbbeed2445c3856b47f871b5955c653c64736f6c63430008110033 +\ No newline at end of file diff --git a/python/tests/test_supply.py b/python/tests/test_supply.py @@ -0,0 +1,109 @@ +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_supply_single(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) + self.rpc.do(o) + + o = c.total_supply(self.address, sender_address=self.accounts[0]) + r = self.rpc.do(o) + supply = c.parse_total_supply(r) + self.assertEqual(supply, 1); + + + def test_supply_batch(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=9) + self.rpc.do(o) + + o = c.total_supply(self.address, sender_address=self.accounts[0]) + r = self.rpc.do(o) + supply = c.parse_total_supply(r) + self.assertEqual(supply, 9); + + + + def test_supply_mixed(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=0) + self.rpc.do(o) + + (tx_hash_hex, o) = c.allocate(self.address, self.accounts[0], hash_of_bar, amount=10) + self.rpc.do(o) + + (tx_hash_hex, o) = c.allocate(self.address, self.accounts[0], hash_of_bar, amount=5) + self.rpc.do(o) + + o = c.total_supply(self.address, sender_address=self.accounts[0]) + r = self.rpc.do(o) + supply = c.parse_total_supply(r) + self.assertEqual(supply, 16); + + +if __name__ == '__main__': + unittest.main() + diff --git a/solidity/CraftNFT.sol b/solidity/CraftNFT.sol @@ -79,6 +79,12 @@ contract CraftNFT { _token.cumulativeCount = _cumulativeCount + count; token[content].push(_token); tokens.push(content); + + if (count == 0) { + supply += 1; + } else { + supply += count; + } } function batchOf(bytes32 _content, uint256 _superIndex, uint256 _startAt) public view returns(int256) {