commit 0c15f77d76b89d644abf9ac4d6d8b97e492863b8 parent ee11a2404493084545dbb5291e1de8c0339dfff1 Author: lash <dev@holbrook.no> Date: Fri, 23 Dec 2022 06:49:53 +0000 Implement token count balance per address in contract Diffstat:
M | Makefile | | | 12 | +++++++++--- |
M | js/contract/CraftNFT.bin | | | 4 | ++-- |
M | python/craft_nft/data/CraftNFT.bin | | | 4 | ++-- |
M | python/tests/test_basic.py | | | 66 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
M | solidity/CraftNFT.sol | | | 22 | ++++++++++++++++++---- |
5 files changed, 97 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile @@ -1,6 +1,6 @@ -all: solidity js python +all: solidity js python aux -.PHONY: js python solidity +.PHONY: js python solidity wala js: make -C js @@ -11,6 +11,12 @@ python: solidity: make -C solidity install - + +wala: + git clone git://defalsify.org/wala.git + cd wala && cargo build --all-features + +aux: wala + test: make -C python test diff --git a/js/contract/CraftNFT.bin b/js/contract/CraftNFT.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b50604051620035e3380380620035e3833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b612f88806200065b6000396000f3fe608060405260043610610183576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100ee578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f146105ba578063e985e9c5146105f7578063f117e17314610634578063f9613ab21461067157610183565b8063b88d4fde14610524578063c87b56dd14610540578063c9796c391461057d57610183565b80638da5cb5b1461040057806395d89b411461042b578063a22cb46514610456578063adf288df1461047f578063b1a6afd3146104bc578063b242e534146104e757610183565b806342842e0e1161014057806342842e0e146102b15780634d03546a146102cd5780634f64b2be1461030a578063559f5dc9146103475780636352211e1461038657806370a08231146103c357610183565b806301ffc9a71461018857806306fdde03146101c5578063081812fc146101f057806318160ddd1461022d57806323b872dd1461025857806324e0febc14610274575b600080fd5b34801561019457600080fd5b506101af60048036038101906101aa9190612545565b6106ae565b6040516101bc919061258d565b60405180910390f35b3480156101d157600080fd5b506101da610854565b6040516101e79190612638565b60405180910390f35b3480156101fc57600080fd5b5061021760048036038101906102129190612690565b6108e2565b60405161022491906126fe565b60405180910390f35b34801561023957600080fd5b5061024261091f565b60405161024f9190612728565b60405180910390f35b610272600480360381019061026d919061276f565b610929565b005b34801561028057600080fd5b5061029b600480360381019061029691906127f8565b610998565b6040516102a89190612834565b60405180910390f35b6102cb60048036038101906102c6919061276f565b6109b0565b005b3480156102d957600080fd5b506102f460048036038101906102ef919061288d565b610a1f565b604051610301919061258d565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c9190612690565b610ca5565b60405161033e9190612834565b60405180910390f35b34801561035357600080fd5b5061036e600480360381019061036991906128cd565b610cc9565b60405161037d9392919061291c565b60405180910390f35b34801561039257600080fd5b506103ad60048036038101906103a89190612690565b610d3d565b6040516103ba91906126fe565b60405180910390f35b3480156103cf57600080fd5b506103ea60048036038101906103e59190612953565b610d79565b6040516103f79190612728565b60405180910390f35b34801561040c57600080fd5b50610415610d80565b60405161042291906126fe565b60405180910390f35b34801561043757600080fd5b50610440610da4565b60405161044d9190612638565b60405180910390f35b34801561046257600080fd5b5061047d600480360381019061047891906129ac565b610e32565b005b34801561048b57600080fd5b506104a660048036038101906104a191906129ec565b6110d4565b6040516104b39190612834565b60405180910390f35b3480156104c857600080fd5b506104d161129f565b6040516104de9190612834565b60405180910390f35b3480156104f357600080fd5b5061050e600480360381019061050991906129ac565b6112a5565b60405161051b919061258d565b60405180910390f35b61053e60048036038101906105399190612b61565b611382565b005b34801561054c57600080fd5b5061056760048036038101906105629190612690565b611459565b6040516105749190612638565b60405180910390f35b34801561058957600080fd5b506105a4600480360381019061059f91906127f8565b611509565b6040516105b19190612638565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc9190612c1e565b611b24565b6040516105ee9190612834565b60405180910390f35b34801561060357600080fd5b5061061e60048036038101906106199190612c71565b611cd7565b60405161062b919061258d565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190612cb1565b611d6f565b6040516106689190612834565b60405180910390f35b34801561067d57600080fd5b50610698600480360381019061069391906127f8565b611e74565b6040516106a59190612834565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610702576001905061084f565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610754576001905061084f565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a6576001905061084f565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f8576001905061084f565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361084a576001905061084f565b600090505b919050565b6006805461086190612d47565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90612d47565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b606061093784848484611f20565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60606109be84848484611f20565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7a57600080fd5b610a826124a6565b600260008681526020019081526020016000208054905091506000821115610aff57600060026000878152602001908152602001600020600081548110610acc57610acb612d78565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610afe57600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610c2457600160086000828254610c189190612dd6565b92505081905550610c46565b8365ffffffffffff1660086000828254610c3e9190612dd6565b925050819055505b8365ffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fb85ba54b9f6f8241b7e1499e3cfc186ac0b1c8b7100f599bf6ca6844f896c34287604051610c959190612834565b60405180910390a3505092915050565b60018181548110610cb557600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610ce557600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610db190612d47565b80601f0160208091040260200160405190810160405280929190818152602001828054610ddd90612d47565b8015610e2a5780601f10610dff57610100808354040283529160200191610e2a565b820191906000526020600020905b815481529060010190602001808311610e0d57829003601f168201915b505050505081565b8015610f5357600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ed057600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061106b565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610feb57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516110c8919061258d565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461113257600080fd5b600160026000868152602001908152602001600020805490501461115557600080fd5b60006002600086815260200190815260200160002060008154811061117d5761117c612d78565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146111af57600080fd5b60006001026003600086815260200190815260200160002054146111d257600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc000000000000000000000000000000000000000000000000000000000000000821791508160010260036000868152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8866001900460405161128c9190612728565b60405180910390a3839250505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461130057600080fd5b600060149054906101000a900460ff161561131a57600080fd5b811561133c576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555092915050565b61138e84848484611f20565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161144b9190612834565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016114b59190612834565b602060405180830381865afa1580156114d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f69190612e1f565b905061150181611509565b915050919050565b606080600080604767ffffffffffffffff81111561152a57611529612a36565b5b6040519080825280601f01601f19166020018201604052801561155c5781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061159457611593612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6800000000000000000000000000000000000000000000000000000000000000836001815181106115f8576115f7612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061165c5761165b612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3200000000000000000000000000000000000000000000000000000000000000836003815181106116c0576116bf612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061172457611723612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061178857611787612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a00000000000000000000000000000000000000000000000000000000000000836006815181106117ec576117eb612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611b1857600460f087836020811061184257611841612d78565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff16101561191a576030836118b19190612e59565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106118e6576118e5612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061198c565b6057836119279190612e59565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061195c5761195b612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106119a1576119a0612d78565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611a7857603083611a039190612e59565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611a339190612dd6565b81518110611a4457611a43612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611af6565b605783611a859190612e59565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611ab59190612dd6565b81518110611ac657611ac5612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611b039190612dd6565b91508080611b1090612e8e565b915050611822565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611b5057611b4f612d78565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611b7857600080fd5b60008361ffff16148015611baa575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611c095760018160000160068282829054906101000a900465ffffffffffff16611bd59190612ed6565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611c0185856110d4565b915050611cd0565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c6157600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611ca957600080fd5b611ccc8585858460000160069054906101000a900465ffffffffffff168561218a565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611d9b57611d9a612d78565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611dff57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611e2a57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611e5c57600080fd5b611e69868686868561218a565b915050949350505050565b60008060036000848152602001908152602001600020549050611e96816123b1565b611e9f57600080fd5b611ea8816123e3565b15611eb65782915050611f1b565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611f779190612728565b602060405180830381865afa158015611f94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb89190612f25565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611ff257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612126573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061211c57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61212557600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506121838385612415565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461221d57600080fd5b84600001600c9054906101000a900460ff1661227f578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff161461227e57600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff166123009190612ed6565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161239a9190612728565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361244557600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612522816124ed565b811461252d57600080fd5b50565b60008135905061253f81612519565b92915050565b60006020828403121561255b5761255a6124e3565b5b600061256984828501612530565b91505092915050565b60008115159050919050565b61258781612572565b82525050565b60006020820190506125a2600083018461257e565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156125e25780820151818401526020810190506125c7565b60008484015250505050565b6000601f19601f8301169050919050565b600061260a826125a8565b61261481856125b3565b93506126248185602086016125c4565b61262d816125ee565b840191505092915050565b6000602082019050818103600083015261265281846125ff565b905092915050565b6000819050919050565b61266d8161265a565b811461267857600080fd5b50565b60008135905061268a81612664565b92915050565b6000602082840312156126a6576126a56124e3565b5b60006126b48482850161267b565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006126e8826126bd565b9050919050565b6126f8816126dd565b82525050565b600060208201905061271360008301846126ef565b92915050565b6127228161265a565b82525050565b600060208201905061273d6000830184612719565b92915050565b61274c816126dd565b811461275757600080fd5b50565b60008135905061276981612743565b92915050565b600080600060608486031215612788576127876124e3565b5b60006127968682870161275a565b93505060206127a78682870161275a565b92505060406127b88682870161267b565b9150509250925092565b6000819050919050565b6127d5816127c2565b81146127e057600080fd5b50565b6000813590506127f2816127cc565b92915050565b60006020828403121561280e5761280d6124e3565b5b600061281c848285016127e3565b91505092915050565b61282e816127c2565b82525050565b60006020820190506128496000830184612825565b92915050565b600065ffffffffffff82169050919050565b61286a8161284f565b811461287557600080fd5b50565b60008135905061288781612861565b92915050565b600080604083850312156128a4576128a36124e3565b5b60006128b2858286016127e3565b92505060206128c385828601612878565b9150509250929050565b600080604083850312156128e4576128e36124e3565b5b60006128f2858286016127e3565b92505060206129038582860161267b565b9150509250929050565b6129168161284f565b82525050565b6000606082019050612931600083018661290d565b61293e602083018561290d565b61294b604083018461257e565b949350505050565b600060208284031215612969576129686124e3565b5b60006129778482850161275a565b91505092915050565b61298981612572565b811461299457600080fd5b50565b6000813590506129a681612980565b92915050565b600080604083850312156129c3576129c26124e3565b5b60006129d18582860161275a565b92505060206129e285828601612997565b9150509250929050565b60008060408385031215612a0357612a026124e3565b5b6000612a118582860161275a565b9250506020612a22858286016127e3565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612a6e826125ee565b810181811067ffffffffffffffff82111715612a8d57612a8c612a36565b5b80604052505050565b6000612aa06124d9565b9050612aac8282612a65565b919050565b600067ffffffffffffffff821115612acc57612acb612a36565b5b612ad5826125ee565b9050602081019050919050565b82818337600083830152505050565b6000612b04612aff84612ab1565b612a96565b905082815260208101848484011115612b2057612b1f612a31565b5b612b2b848285612ae2565b509392505050565b600082601f830112612b4857612b47612a2c565b5b8135612b58848260208601612af1565b91505092915050565b60008060008060808587031215612b7b57612b7a6124e3565b5b6000612b898782880161275a565b9450506020612b9a8782880161275a565b9350506040612bab8782880161267b565b925050606085013567ffffffffffffffff811115612bcc57612bcb6124e8565b5b612bd887828801612b33565b91505092959194509250565b600061ffff82169050919050565b612bfb81612be4565b8114612c0657600080fd5b50565b600081359050612c1881612bf2565b92915050565b600080600060608486031215612c3757612c366124e3565b5b6000612c458682870161275a565b9350506020612c56868287016127e3565b9250506040612c6786828701612c09565b9150509250925092565b60008060408385031215612c8857612c876124e3565b5b6000612c968582860161275a565b9250506020612ca78582860161275a565b9150509250929050565b60008060008060808587031215612ccb57612cca6124e3565b5b6000612cd98782880161275a565b9450506020612cea878288016127e3565b9350506040612cfb87828801612c09565b9250506060612d0c87828801612878565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612d5f57607f821691505b602082108103612d7257612d71612d18565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612de18261265a565b9150612dec8361265a565b9250828201905080821115612e0457612e03612da7565b5b92915050565b600081519050612e19816127cc565b92915050565b600060208284031215612e3557612e346124e3565b5b6000612e4384828501612e0a565b91505092915050565b600060ff82169050919050565b6000612e6482612e4c565b9150612e6f83612e4c565b9250828201905060ff811115612e8857612e87612da7565b5b92915050565b6000612e998261265a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612ecb57612eca612da7565b5b600182019050919050565b6000612ee18261284f565b9150612eec8361284f565b9250828201905065ffffffffffff811115612f0a57612f09612da7565b5b92915050565b600081519050612f1f81612743565b92915050565b600060208284031215612f3b57612f3a6124e3565b5b6000612f4984828501612f10565b9150509291505056fea264697066735822122039548f2e189dd59057eeed2670a3d8e45fe27e25c8bfe6d0099cbe13589ccc6764736f6c63430008110033 -\ No newline at end of file +60806040523480156200001157600080fd5b50604051620037b9380380620037b9833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b61315e806200065b6000396000f3fe608060405260043610610183576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100ee578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f146105ba578063e985e9c5146105f7578063f117e17314610634578063f9613ab21461067157610183565b8063b88d4fde14610524578063c87b56dd14610540578063c9796c391461057d57610183565b80638da5cb5b1461040057806395d89b411461042b578063a22cb46514610456578063adf288df1461047f578063b1a6afd3146104bc578063b242e534146104e757610183565b806342842e0e1161014057806342842e0e146102b15780634d03546a146102cd5780634f64b2be1461030a578063559f5dc9146103475780636352211e1461038657806370a08231146103c357610183565b806301ffc9a71461018857806306fdde03146101c5578063081812fc146101f057806318160ddd1461022d57806323b872dd1461025857806324e0febc14610274575b600080fd5b34801561019457600080fd5b506101af60048036038101906101aa91906126e7565b6106ae565b6040516101bc919061272f565b60405180910390f35b3480156101d157600080fd5b506101da610854565b6040516101e791906127da565b60405180910390f35b3480156101fc57600080fd5b5061021760048036038101906102129190612832565b6108e2565b60405161022491906128a0565b60405180910390f35b34801561023957600080fd5b5061024261091f565b60405161024f91906128ca565b60405180910390f35b610272600480360381019061026d9190612911565b610929565b005b34801561028057600080fd5b5061029b6004803603810190610296919061299a565b610998565b6040516102a891906129d6565b60405180910390f35b6102cb60048036038101906102c69190612911565b6109b0565b005b3480156102d957600080fd5b506102f460048036038101906102ef9190612a2f565b610a1f565b604051610301919061272f565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c9190612832565b610ca9565b60405161033e91906129d6565b60405180910390f35b34801561035357600080fd5b5061036e60048036038101906103699190612a6f565b610ccd565b60405161037d93929190612abe565b60405180910390f35b34801561039257600080fd5b506103ad60048036038101906103a89190612832565b610d41565b6040516103ba91906128a0565b60405180910390f35b3480156103cf57600080fd5b506103ea60048036038101906103e59190612af5565b610d7d565b6040516103f791906128ca565b60405180910390f35b34801561040c57600080fd5b50610415610dc6565b60405161042291906128a0565b60405180910390f35b34801561043757600080fd5b50610440610dea565b60405161044d91906127da565b60405180910390f35b34801561046257600080fd5b5061047d60048036038101906104789190612b4e565b610e78565b005b34801561048b57600080fd5b506104a660048036038101906104a19190612b8e565b61111a565b6040516104b391906129d6565b60405180910390f35b3480156104c857600080fd5b506104d1611338565b6040516104de91906129d6565b60405180910390f35b3480156104f357600080fd5b5061050e60048036038101906105099190612b4e565b61133e565b60405161051b919061272f565b60405180910390f35b61053e60048036038101906105399190612d03565b61141f565b005b34801561054c57600080fd5b5061056760048036038101906105629190612832565b6114f6565b60405161057491906127da565b60405180910390f35b34801561058957600080fd5b506105a4600480360381019061059f919061299a565b6115a6565b6040516105b191906127da565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc9190612dc0565b611bc1565b6040516105ee91906129d6565b60405180910390f35b34801561060357600080fd5b5061061e60048036038101906106199190612e13565b611d74565b60405161062b919061272f565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190612e53565b611e0c565b60405161066891906129d6565b60405180910390f35b34801561067d57600080fd5b506106986004803603810190610693919061299a565b611f11565b6040516106a591906129d6565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610702576001905061084f565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610754576001905061084f565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a6576001905061084f565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f8576001905061084f565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361084a576001905061084f565b600090505b919050565b6006805461086190612ee9565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90612ee9565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b606061093784848484611fbd565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60606109be84848484611fbd565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7a57600080fd5b610a82612648565b600260008681526020019081526020016000208054905091506000821115610aff57600060026000878152602001908152602001600020600081548110610acc57610acb612f1a565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610afe57600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610c2457600160086000828254610c189190612f78565b92505081905550610c46565b8365ffffffffffff1660086000828254610c3e9190612f78565b925050819055505b8365ffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fb85ba54b9f6f8241b7e1499e3cfc186ac0b1c8b7100f599bf6ca6844f896c34287604051610c9591906129d6565b60405180910390a360019250505092915050565b60018181548110610cb957600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610ce957600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610df790612ee9565b80601f0160208091040260200160405190810160405280929190818152602001828054610e2390612ee9565b8015610e705780601f10610e4557610100808354040283529160200191610e70565b820191906000526020600020905b815481529060010190602001808311610e5357829003601f168201915b505050505081565b8015610f9957600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f1657600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506110b1565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361103157600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161110e919061272f565b60405180910390a35050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461117557600080fd5b600160026000858152602001908152602001600020805490501461119857600080fd5b6000600260008581526020019081526020016000206000815481106111c0576111bf612f1a565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146111f257600080fd5b600060010260036000858152602001908152602001600020541461121557600080fd5b8373ffffffffffffffffffffffffffffffffffffffff1690507fc000000000000000000000000000000000000000000000000000000000000000811790508060010260036000858152602001908152602001600020819055506001600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546112be9190612f78565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856001900460405161132691906128ca565b60405180910390a38291505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461139957600080fd5b600060149054906101000a900460ff16156113b357600080fd5b81156113d5576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001905092915050565b61142b84848484611fbd565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e60006001026040516114e891906129d6565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161155291906129d6565b602060405180830381865afa15801561156f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115939190612fc1565b905061159e816115a6565b915050919050565b606080600080604767ffffffffffffffff8111156115c7576115c6612bd8565b5b6040519080825280601f01601f1916602001820160405280156115f95781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061163157611630612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061169557611694612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6100000000000000000000000000000000000000000000000000000000000000836002815181106116f9576116f8612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f32000000000000000000000000000000000000000000000000000000000000008360038151811061175d5761175c612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3500000000000000000000000000000000000000000000000000000000000000836004815181106117c1576117c0612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061182557611824612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a000000000000000000000000000000000000000000000000000000000000008360068151811061188957611888612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611bb557600460f08783602081106118df576118de612f1a565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff1610156119b75760308361194e9190612ffb565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061198357611982612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611a29565b6057836119c49190612ffb565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106119f9576119f8612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611a3e57611a3d612f1a565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611b1557603083611aa09190612ffb565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611ad09190612f78565b81518110611ae157611ae0612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611b93565b605783611b229190612ffb565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611b529190612f78565b81518110611b6357611b62612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611ba09190612f78565b91508080611bad90613030565b9150506118bf565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611bed57611bec612f1a565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611c1557600080fd5b60008361ffff16148015611c47575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611ca65760018160000160068282829054906101000a900465ffffffffffff16611c729190613078565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611c9e858561111a565b915050611d6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611cfe57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611d4657600080fd5b611d698585858460000160069054906101000a900465ffffffffffff16856122d5565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611e3857611e37612f1a565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e9c57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611ec757600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611ef957600080fd5b611f0686868686856122d5565b915050949350505050565b60008060036000848152602001908152602001600020549050611f3381612553565b611f3c57600080fd5b611f4581612585565b15611f535782915050611fb8565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161201491906128ca565b602060405180830381865afa158015612031573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061205591906130c7565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461208f57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146121c3573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806121b957503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6121c257600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061222083856125b7565b6001600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461227091906130f4565b925050819055506001600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122c79190612f78565b925050819055505050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461236857600080fd5b84600001600c9054906101000a900460ff166123ca578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16146123c957600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff1661244b9190613078565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055506001600a60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124d89190612f78565b925050819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161253c91906128ca565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000808360010290506003600082815260200190815260200160002054600190049150600082036125e757600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6126c48161268f565b81146126cf57600080fd5b50565b6000813590506126e1816126bb565b92915050565b6000602082840312156126fd576126fc612685565b5b600061270b848285016126d2565b91505092915050565b60008115159050919050565b61272981612714565b82525050565b60006020820190506127446000830184612720565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612784578082015181840152602081019050612769565b60008484015250505050565b6000601f19601f8301169050919050565b60006127ac8261274a565b6127b68185612755565b93506127c6818560208601612766565b6127cf81612790565b840191505092915050565b600060208201905081810360008301526127f481846127a1565b905092915050565b6000819050919050565b61280f816127fc565b811461281a57600080fd5b50565b60008135905061282c81612806565b92915050565b60006020828403121561284857612847612685565b5b60006128568482850161281d565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061288a8261285f565b9050919050565b61289a8161287f565b82525050565b60006020820190506128b56000830184612891565b92915050565b6128c4816127fc565b82525050565b60006020820190506128df60008301846128bb565b92915050565b6128ee8161287f565b81146128f957600080fd5b50565b60008135905061290b816128e5565b92915050565b60008060006060848603121561292a57612929612685565b5b6000612938868287016128fc565b9350506020612949868287016128fc565b925050604061295a8682870161281d565b9150509250925092565b6000819050919050565b61297781612964565b811461298257600080fd5b50565b6000813590506129948161296e565b92915050565b6000602082840312156129b0576129af612685565b5b60006129be84828501612985565b91505092915050565b6129d081612964565b82525050565b60006020820190506129eb60008301846129c7565b92915050565b600065ffffffffffff82169050919050565b612a0c816129f1565b8114612a1757600080fd5b50565b600081359050612a2981612a03565b92915050565b60008060408385031215612a4657612a45612685565b5b6000612a5485828601612985565b9250506020612a6585828601612a1a565b9150509250929050565b60008060408385031215612a8657612a85612685565b5b6000612a9485828601612985565b9250506020612aa58582860161281d565b9150509250929050565b612ab8816129f1565b82525050565b6000606082019050612ad36000830186612aaf565b612ae06020830185612aaf565b612aed6040830184612720565b949350505050565b600060208284031215612b0b57612b0a612685565b5b6000612b19848285016128fc565b91505092915050565b612b2b81612714565b8114612b3657600080fd5b50565b600081359050612b4881612b22565b92915050565b60008060408385031215612b6557612b64612685565b5b6000612b73858286016128fc565b9250506020612b8485828601612b39565b9150509250929050565b60008060408385031215612ba557612ba4612685565b5b6000612bb3858286016128fc565b9250506020612bc485828601612985565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612c1082612790565b810181811067ffffffffffffffff82111715612c2f57612c2e612bd8565b5b80604052505050565b6000612c4261267b565b9050612c4e8282612c07565b919050565b600067ffffffffffffffff821115612c6e57612c6d612bd8565b5b612c7782612790565b9050602081019050919050565b82818337600083830152505050565b6000612ca6612ca184612c53565b612c38565b905082815260208101848484011115612cc257612cc1612bd3565b5b612ccd848285612c84565b509392505050565b600082601f830112612cea57612ce9612bce565b5b8135612cfa848260208601612c93565b91505092915050565b60008060008060808587031215612d1d57612d1c612685565b5b6000612d2b878288016128fc565b9450506020612d3c878288016128fc565b9350506040612d4d8782880161281d565b925050606085013567ffffffffffffffff811115612d6e57612d6d61268a565b5b612d7a87828801612cd5565b91505092959194509250565b600061ffff82169050919050565b612d9d81612d86565b8114612da857600080fd5b50565b600081359050612dba81612d94565b92915050565b600080600060608486031215612dd957612dd8612685565b5b6000612de7868287016128fc565b9350506020612df886828701612985565b9250506040612e0986828701612dab565b9150509250925092565b60008060408385031215612e2a57612e29612685565b5b6000612e38858286016128fc565b9250506020612e49858286016128fc565b9150509250929050565b60008060008060808587031215612e6d57612e6c612685565b5b6000612e7b878288016128fc565b9450506020612e8c87828801612985565b9350506040612e9d87828801612dab565b9250506060612eae87828801612a1a565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612f0157607f821691505b602082108103612f1457612f13612eba565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612f83826127fc565b9150612f8e836127fc565b9250828201905080821115612fa657612fa5612f49565b5b92915050565b600081519050612fbb8161296e565b92915050565b600060208284031215612fd757612fd6612685565b5b6000612fe584828501612fac565b91505092915050565b600060ff82169050919050565b600061300682612fee565b915061301183612fee565b9250828201905060ff81111561302a57613029612f49565b5b92915050565b600061303b826127fc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361306d5761306c612f49565b5b600182019050919050565b6000613083826129f1565b915061308e836129f1565b9250828201905065ffffffffffff8111156130ac576130ab612f49565b5b92915050565b6000815190506130c1816128e5565b92915050565b6000602082840312156130dd576130dc612685565b5b60006130eb848285016130b2565b91505092915050565b60006130ff826127fc565b915061310a836127fc565b925082820390508181111561312257613121612f49565b5b9291505056fea26469706673582212204fc3103b2cd5769609fc1e51fefef01ed8a3aa10f77ef22af7a4deb17f84bdda64736f6c63430008110033 +\ No newline at end of file diff --git a/python/craft_nft/data/CraftNFT.bin b/python/craft_nft/data/CraftNFT.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b50604051620035e3380380620035e3833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b612f88806200065b6000396000f3fe608060405260043610610183576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100ee578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f146105ba578063e985e9c5146105f7578063f117e17314610634578063f9613ab21461067157610183565b8063b88d4fde14610524578063c87b56dd14610540578063c9796c391461057d57610183565b80638da5cb5b1461040057806395d89b411461042b578063a22cb46514610456578063adf288df1461047f578063b1a6afd3146104bc578063b242e534146104e757610183565b806342842e0e1161014057806342842e0e146102b15780634d03546a146102cd5780634f64b2be1461030a578063559f5dc9146103475780636352211e1461038657806370a08231146103c357610183565b806301ffc9a71461018857806306fdde03146101c5578063081812fc146101f057806318160ddd1461022d57806323b872dd1461025857806324e0febc14610274575b600080fd5b34801561019457600080fd5b506101af60048036038101906101aa9190612545565b6106ae565b6040516101bc919061258d565b60405180910390f35b3480156101d157600080fd5b506101da610854565b6040516101e79190612638565b60405180910390f35b3480156101fc57600080fd5b5061021760048036038101906102129190612690565b6108e2565b60405161022491906126fe565b60405180910390f35b34801561023957600080fd5b5061024261091f565b60405161024f9190612728565b60405180910390f35b610272600480360381019061026d919061276f565b610929565b005b34801561028057600080fd5b5061029b600480360381019061029691906127f8565b610998565b6040516102a89190612834565b60405180910390f35b6102cb60048036038101906102c6919061276f565b6109b0565b005b3480156102d957600080fd5b506102f460048036038101906102ef919061288d565b610a1f565b604051610301919061258d565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c9190612690565b610ca5565b60405161033e9190612834565b60405180910390f35b34801561035357600080fd5b5061036e600480360381019061036991906128cd565b610cc9565b60405161037d9392919061291c565b60405180910390f35b34801561039257600080fd5b506103ad60048036038101906103a89190612690565b610d3d565b6040516103ba91906126fe565b60405180910390f35b3480156103cf57600080fd5b506103ea60048036038101906103e59190612953565b610d79565b6040516103f79190612728565b60405180910390f35b34801561040c57600080fd5b50610415610d80565b60405161042291906126fe565b60405180910390f35b34801561043757600080fd5b50610440610da4565b60405161044d9190612638565b60405180910390f35b34801561046257600080fd5b5061047d600480360381019061047891906129ac565b610e32565b005b34801561048b57600080fd5b506104a660048036038101906104a191906129ec565b6110d4565b6040516104b39190612834565b60405180910390f35b3480156104c857600080fd5b506104d161129f565b6040516104de9190612834565b60405180910390f35b3480156104f357600080fd5b5061050e600480360381019061050991906129ac565b6112a5565b60405161051b919061258d565b60405180910390f35b61053e60048036038101906105399190612b61565b611382565b005b34801561054c57600080fd5b5061056760048036038101906105629190612690565b611459565b6040516105749190612638565b60405180910390f35b34801561058957600080fd5b506105a4600480360381019061059f91906127f8565b611509565b6040516105b19190612638565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc9190612c1e565b611b24565b6040516105ee9190612834565b60405180910390f35b34801561060357600080fd5b5061061e60048036038101906106199190612c71565b611cd7565b60405161062b919061258d565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190612cb1565b611d6f565b6040516106689190612834565b60405180910390f35b34801561067d57600080fd5b50610698600480360381019061069391906127f8565b611e74565b6040516106a59190612834565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610702576001905061084f565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610754576001905061084f565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a6576001905061084f565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f8576001905061084f565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361084a576001905061084f565b600090505b919050565b6006805461086190612d47565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90612d47565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b606061093784848484611f20565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60606109be84848484611f20565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7a57600080fd5b610a826124a6565b600260008681526020019081526020016000208054905091506000821115610aff57600060026000878152602001908152602001600020600081548110610acc57610acb612d78565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610afe57600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610c2457600160086000828254610c189190612dd6565b92505081905550610c46565b8365ffffffffffff1660086000828254610c3e9190612dd6565b925050819055505b8365ffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fb85ba54b9f6f8241b7e1499e3cfc186ac0b1c8b7100f599bf6ca6844f896c34287604051610c959190612834565b60405180910390a3505092915050565b60018181548110610cb557600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610ce557600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610db190612d47565b80601f0160208091040260200160405190810160405280929190818152602001828054610ddd90612d47565b8015610e2a5780601f10610dff57610100808354040283529160200191610e2a565b820191906000526020600020905b815481529060010190602001808311610e0d57829003601f168201915b505050505081565b8015610f5357600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ed057600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061106b565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610feb57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516110c8919061258d565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461113257600080fd5b600160026000868152602001908152602001600020805490501461115557600080fd5b60006002600086815260200190815260200160002060008154811061117d5761117c612d78565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146111af57600080fd5b60006001026003600086815260200190815260200160002054146111d257600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc000000000000000000000000000000000000000000000000000000000000000821791508160010260036000868152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8866001900460405161128c9190612728565b60405180910390a3839250505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461130057600080fd5b600060149054906101000a900460ff161561131a57600080fd5b811561133c576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555092915050565b61138e84848484611f20565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161144b9190612834565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016114b59190612834565b602060405180830381865afa1580156114d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f69190612e1f565b905061150181611509565b915050919050565b606080600080604767ffffffffffffffff81111561152a57611529612a36565b5b6040519080825280601f01601f19166020018201604052801561155c5781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061159457611593612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6800000000000000000000000000000000000000000000000000000000000000836001815181106115f8576115f7612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061165c5761165b612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3200000000000000000000000000000000000000000000000000000000000000836003815181106116c0576116bf612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061172457611723612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061178857611787612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a00000000000000000000000000000000000000000000000000000000000000836006815181106117ec576117eb612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611b1857600460f087836020811061184257611841612d78565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff16101561191a576030836118b19190612e59565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106118e6576118e5612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061198c565b6057836119279190612e59565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061195c5761195b612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106119a1576119a0612d78565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611a7857603083611a039190612e59565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611a339190612dd6565b81518110611a4457611a43612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611af6565b605783611a859190612e59565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611ab59190612dd6565b81518110611ac657611ac5612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611b039190612dd6565b91508080611b1090612e8e565b915050611822565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611b5057611b4f612d78565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611b7857600080fd5b60008361ffff16148015611baa575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611c095760018160000160068282829054906101000a900465ffffffffffff16611bd59190612ed6565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611c0185856110d4565b915050611cd0565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c6157600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611ca957600080fd5b611ccc8585858460000160069054906101000a900465ffffffffffff168561218a565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611d9b57611d9a612d78565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611dff57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611e2a57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611e5c57600080fd5b611e69868686868561218a565b915050949350505050565b60008060036000848152602001908152602001600020549050611e96816123b1565b611e9f57600080fd5b611ea8816123e3565b15611eb65782915050611f1b565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611f779190612728565b602060405180830381865afa158015611f94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb89190612f25565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611ff257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612126573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061211c57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61212557600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506121838385612415565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461221d57600080fd5b84600001600c9054906101000a900460ff1661227f578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff161461227e57600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff166123009190612ed6565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161239a9190612728565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361244557600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612522816124ed565b811461252d57600080fd5b50565b60008135905061253f81612519565b92915050565b60006020828403121561255b5761255a6124e3565b5b600061256984828501612530565b91505092915050565b60008115159050919050565b61258781612572565b82525050565b60006020820190506125a2600083018461257e565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156125e25780820151818401526020810190506125c7565b60008484015250505050565b6000601f19601f8301169050919050565b600061260a826125a8565b61261481856125b3565b93506126248185602086016125c4565b61262d816125ee565b840191505092915050565b6000602082019050818103600083015261265281846125ff565b905092915050565b6000819050919050565b61266d8161265a565b811461267857600080fd5b50565b60008135905061268a81612664565b92915050565b6000602082840312156126a6576126a56124e3565b5b60006126b48482850161267b565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006126e8826126bd565b9050919050565b6126f8816126dd565b82525050565b600060208201905061271360008301846126ef565b92915050565b6127228161265a565b82525050565b600060208201905061273d6000830184612719565b92915050565b61274c816126dd565b811461275757600080fd5b50565b60008135905061276981612743565b92915050565b600080600060608486031215612788576127876124e3565b5b60006127968682870161275a565b93505060206127a78682870161275a565b92505060406127b88682870161267b565b9150509250925092565b6000819050919050565b6127d5816127c2565b81146127e057600080fd5b50565b6000813590506127f2816127cc565b92915050565b60006020828403121561280e5761280d6124e3565b5b600061281c848285016127e3565b91505092915050565b61282e816127c2565b82525050565b60006020820190506128496000830184612825565b92915050565b600065ffffffffffff82169050919050565b61286a8161284f565b811461287557600080fd5b50565b60008135905061288781612861565b92915050565b600080604083850312156128a4576128a36124e3565b5b60006128b2858286016127e3565b92505060206128c385828601612878565b9150509250929050565b600080604083850312156128e4576128e36124e3565b5b60006128f2858286016127e3565b92505060206129038582860161267b565b9150509250929050565b6129168161284f565b82525050565b6000606082019050612931600083018661290d565b61293e602083018561290d565b61294b604083018461257e565b949350505050565b600060208284031215612969576129686124e3565b5b60006129778482850161275a565b91505092915050565b61298981612572565b811461299457600080fd5b50565b6000813590506129a681612980565b92915050565b600080604083850312156129c3576129c26124e3565b5b60006129d18582860161275a565b92505060206129e285828601612997565b9150509250929050565b60008060408385031215612a0357612a026124e3565b5b6000612a118582860161275a565b9250506020612a22858286016127e3565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612a6e826125ee565b810181811067ffffffffffffffff82111715612a8d57612a8c612a36565b5b80604052505050565b6000612aa06124d9565b9050612aac8282612a65565b919050565b600067ffffffffffffffff821115612acc57612acb612a36565b5b612ad5826125ee565b9050602081019050919050565b82818337600083830152505050565b6000612b04612aff84612ab1565b612a96565b905082815260208101848484011115612b2057612b1f612a31565b5b612b2b848285612ae2565b509392505050565b600082601f830112612b4857612b47612a2c565b5b8135612b58848260208601612af1565b91505092915050565b60008060008060808587031215612b7b57612b7a6124e3565b5b6000612b898782880161275a565b9450506020612b9a8782880161275a565b9350506040612bab8782880161267b565b925050606085013567ffffffffffffffff811115612bcc57612bcb6124e8565b5b612bd887828801612b33565b91505092959194509250565b600061ffff82169050919050565b612bfb81612be4565b8114612c0657600080fd5b50565b600081359050612c1881612bf2565b92915050565b600080600060608486031215612c3757612c366124e3565b5b6000612c458682870161275a565b9350506020612c56868287016127e3565b9250506040612c6786828701612c09565b9150509250925092565b60008060408385031215612c8857612c876124e3565b5b6000612c968582860161275a565b9250506020612ca78582860161275a565b9150509250929050565b60008060008060808587031215612ccb57612cca6124e3565b5b6000612cd98782880161275a565b9450506020612cea878288016127e3565b9350506040612cfb87828801612c09565b9250506060612d0c87828801612878565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612d5f57607f821691505b602082108103612d7257612d71612d18565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612de18261265a565b9150612dec8361265a565b9250828201905080821115612e0457612e03612da7565b5b92915050565b600081519050612e19816127cc565b92915050565b600060208284031215612e3557612e346124e3565b5b6000612e4384828501612e0a565b91505092915050565b600060ff82169050919050565b6000612e6482612e4c565b9150612e6f83612e4c565b9250828201905060ff811115612e8857612e87612da7565b5b92915050565b6000612e998261265a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612ecb57612eca612da7565b5b600182019050919050565b6000612ee18261284f565b9150612eec8361284f565b9250828201905065ffffffffffff811115612f0a57612f09612da7565b5b92915050565b600081519050612f1f81612743565b92915050565b600060208284031215612f3b57612f3a6124e3565b5b6000612f4984828501612f10565b9150509291505056fea264697066735822122039548f2e189dd59057eeed2670a3d8e45fe27e25c8bfe6d0099cbe13589ccc6764736f6c63430008110033 -\ No newline at end of file +60806040523480156200001157600080fd5b50604051620037b9380380620037b9833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b61315e806200065b6000396000f3fe608060405260043610610183576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100ee578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f146105ba578063e985e9c5146105f7578063f117e17314610634578063f9613ab21461067157610183565b8063b88d4fde14610524578063c87b56dd14610540578063c9796c391461057d57610183565b80638da5cb5b1461040057806395d89b411461042b578063a22cb46514610456578063adf288df1461047f578063b1a6afd3146104bc578063b242e534146104e757610183565b806342842e0e1161014057806342842e0e146102b15780634d03546a146102cd5780634f64b2be1461030a578063559f5dc9146103475780636352211e1461038657806370a08231146103c357610183565b806301ffc9a71461018857806306fdde03146101c5578063081812fc146101f057806318160ddd1461022d57806323b872dd1461025857806324e0febc14610274575b600080fd5b34801561019457600080fd5b506101af60048036038101906101aa91906126e7565b6106ae565b6040516101bc919061272f565b60405180910390f35b3480156101d157600080fd5b506101da610854565b6040516101e791906127da565b60405180910390f35b3480156101fc57600080fd5b5061021760048036038101906102129190612832565b6108e2565b60405161022491906128a0565b60405180910390f35b34801561023957600080fd5b5061024261091f565b60405161024f91906128ca565b60405180910390f35b610272600480360381019061026d9190612911565b610929565b005b34801561028057600080fd5b5061029b6004803603810190610296919061299a565b610998565b6040516102a891906129d6565b60405180910390f35b6102cb60048036038101906102c69190612911565b6109b0565b005b3480156102d957600080fd5b506102f460048036038101906102ef9190612a2f565b610a1f565b604051610301919061272f565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c9190612832565b610ca9565b60405161033e91906129d6565b60405180910390f35b34801561035357600080fd5b5061036e60048036038101906103699190612a6f565b610ccd565b60405161037d93929190612abe565b60405180910390f35b34801561039257600080fd5b506103ad60048036038101906103a89190612832565b610d41565b6040516103ba91906128a0565b60405180910390f35b3480156103cf57600080fd5b506103ea60048036038101906103e59190612af5565b610d7d565b6040516103f791906128ca565b60405180910390f35b34801561040c57600080fd5b50610415610dc6565b60405161042291906128a0565b60405180910390f35b34801561043757600080fd5b50610440610dea565b60405161044d91906127da565b60405180910390f35b34801561046257600080fd5b5061047d60048036038101906104789190612b4e565b610e78565b005b34801561048b57600080fd5b506104a660048036038101906104a19190612b8e565b61111a565b6040516104b391906129d6565b60405180910390f35b3480156104c857600080fd5b506104d1611338565b6040516104de91906129d6565b60405180910390f35b3480156104f357600080fd5b5061050e60048036038101906105099190612b4e565b61133e565b60405161051b919061272f565b60405180910390f35b61053e60048036038101906105399190612d03565b61141f565b005b34801561054c57600080fd5b5061056760048036038101906105629190612832565b6114f6565b60405161057491906127da565b60405180910390f35b34801561058957600080fd5b506105a4600480360381019061059f919061299a565b6115a6565b6040516105b191906127da565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc9190612dc0565b611bc1565b6040516105ee91906129d6565b60405180910390f35b34801561060357600080fd5b5061061e60048036038101906106199190612e13565b611d74565b60405161062b919061272f565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190612e53565b611e0c565b60405161066891906129d6565b60405180910390f35b34801561067d57600080fd5b506106986004803603810190610693919061299a565b611f11565b6040516106a591906129d6565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610702576001905061084f565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610754576001905061084f565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a6576001905061084f565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f8576001905061084f565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361084a576001905061084f565b600090505b919050565b6006805461086190612ee9565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90612ee9565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b606061093784848484611fbd565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60606109be84848484611fbd565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7a57600080fd5b610a82612648565b600260008681526020019081526020016000208054905091506000821115610aff57600060026000878152602001908152602001600020600081548110610acc57610acb612f1a565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610afe57600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610c2457600160086000828254610c189190612f78565b92505081905550610c46565b8365ffffffffffff1660086000828254610c3e9190612f78565b925050819055505b8365ffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fb85ba54b9f6f8241b7e1499e3cfc186ac0b1c8b7100f599bf6ca6844f896c34287604051610c9591906129d6565b60405180910390a360019250505092915050565b60018181548110610cb957600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610ce957600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610df790612ee9565b80601f0160208091040260200160405190810160405280929190818152602001828054610e2390612ee9565b8015610e705780601f10610e4557610100808354040283529160200191610e70565b820191906000526020600020905b815481529060010190602001808311610e5357829003601f168201915b505050505081565b8015610f9957600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f1657600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506110b1565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361103157600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161110e919061272f565b60405180910390a35050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461117557600080fd5b600160026000858152602001908152602001600020805490501461119857600080fd5b6000600260008581526020019081526020016000206000815481106111c0576111bf612f1a565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146111f257600080fd5b600060010260036000858152602001908152602001600020541461121557600080fd5b8373ffffffffffffffffffffffffffffffffffffffff1690507fc000000000000000000000000000000000000000000000000000000000000000811790508060010260036000858152602001908152602001600020819055506001600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546112be9190612f78565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856001900460405161132691906128ca565b60405180910390a38291505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461139957600080fd5b600060149054906101000a900460ff16156113b357600080fd5b81156113d5576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001905092915050565b61142b84848484611fbd565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e60006001026040516114e891906129d6565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161155291906129d6565b602060405180830381865afa15801561156f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115939190612fc1565b905061159e816115a6565b915050919050565b606080600080604767ffffffffffffffff8111156115c7576115c6612bd8565b5b6040519080825280601f01601f1916602001820160405280156115f95781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061163157611630612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061169557611694612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6100000000000000000000000000000000000000000000000000000000000000836002815181106116f9576116f8612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f32000000000000000000000000000000000000000000000000000000000000008360038151811061175d5761175c612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3500000000000000000000000000000000000000000000000000000000000000836004815181106117c1576117c0612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061182557611824612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a000000000000000000000000000000000000000000000000000000000000008360068151811061188957611888612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611bb557600460f08783602081106118df576118de612f1a565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff1610156119b75760308361194e9190612ffb565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061198357611982612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611a29565b6057836119c49190612ffb565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106119f9576119f8612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611a3e57611a3d612f1a565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611b1557603083611aa09190612ffb565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611ad09190612f78565b81518110611ae157611ae0612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611b93565b605783611b229190612ffb565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611b529190612f78565b81518110611b6357611b62612f1a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611ba09190612f78565b91508080611bad90613030565b9150506118bf565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611bed57611bec612f1a565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611c1557600080fd5b60008361ffff16148015611c47575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611ca65760018160000160068282829054906101000a900465ffffffffffff16611c729190613078565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611c9e858561111a565b915050611d6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611cfe57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611d4657600080fd5b611d698585858460000160069054906101000a900465ffffffffffff16856122d5565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611e3857611e37612f1a565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e9c57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611ec757600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611ef957600080fd5b611f0686868686856122d5565b915050949350505050565b60008060036000848152602001908152602001600020549050611f3381612553565b611f3c57600080fd5b611f4581612585565b15611f535782915050611fb8565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161201491906128ca565b602060405180830381865afa158015612031573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061205591906130c7565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461208f57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146121c3573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806121b957503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6121c257600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061222083856125b7565b6001600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461227091906130f4565b925050819055506001600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122c79190612f78565b925050819055505050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461236857600080fd5b84600001600c9054906101000a900460ff166123ca578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16146123c957600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff1661244b9190613078565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055506001600a60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124d89190612f78565b925050819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161253c91906128ca565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000808360010290506003600082815260200190815260200160002054600190049150600082036125e757600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6126c48161268f565b81146126cf57600080fd5b50565b6000813590506126e1816126bb565b92915050565b6000602082840312156126fd576126fc612685565b5b600061270b848285016126d2565b91505092915050565b60008115159050919050565b61272981612714565b82525050565b60006020820190506127446000830184612720565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612784578082015181840152602081019050612769565b60008484015250505050565b6000601f19601f8301169050919050565b60006127ac8261274a565b6127b68185612755565b93506127c6818560208601612766565b6127cf81612790565b840191505092915050565b600060208201905081810360008301526127f481846127a1565b905092915050565b6000819050919050565b61280f816127fc565b811461281a57600080fd5b50565b60008135905061282c81612806565b92915050565b60006020828403121561284857612847612685565b5b60006128568482850161281d565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061288a8261285f565b9050919050565b61289a8161287f565b82525050565b60006020820190506128b56000830184612891565b92915050565b6128c4816127fc565b82525050565b60006020820190506128df60008301846128bb565b92915050565b6128ee8161287f565b81146128f957600080fd5b50565b60008135905061290b816128e5565b92915050565b60008060006060848603121561292a57612929612685565b5b6000612938868287016128fc565b9350506020612949868287016128fc565b925050604061295a8682870161281d565b9150509250925092565b6000819050919050565b61297781612964565b811461298257600080fd5b50565b6000813590506129948161296e565b92915050565b6000602082840312156129b0576129af612685565b5b60006129be84828501612985565b91505092915050565b6129d081612964565b82525050565b60006020820190506129eb60008301846129c7565b92915050565b600065ffffffffffff82169050919050565b612a0c816129f1565b8114612a1757600080fd5b50565b600081359050612a2981612a03565b92915050565b60008060408385031215612a4657612a45612685565b5b6000612a5485828601612985565b9250506020612a6585828601612a1a565b9150509250929050565b60008060408385031215612a8657612a85612685565b5b6000612a9485828601612985565b9250506020612aa58582860161281d565b9150509250929050565b612ab8816129f1565b82525050565b6000606082019050612ad36000830186612aaf565b612ae06020830185612aaf565b612aed6040830184612720565b949350505050565b600060208284031215612b0b57612b0a612685565b5b6000612b19848285016128fc565b91505092915050565b612b2b81612714565b8114612b3657600080fd5b50565b600081359050612b4881612b22565b92915050565b60008060408385031215612b6557612b64612685565b5b6000612b73858286016128fc565b9250506020612b8485828601612b39565b9150509250929050565b60008060408385031215612ba557612ba4612685565b5b6000612bb3858286016128fc565b9250506020612bc485828601612985565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612c1082612790565b810181811067ffffffffffffffff82111715612c2f57612c2e612bd8565b5b80604052505050565b6000612c4261267b565b9050612c4e8282612c07565b919050565b600067ffffffffffffffff821115612c6e57612c6d612bd8565b5b612c7782612790565b9050602081019050919050565b82818337600083830152505050565b6000612ca6612ca184612c53565b612c38565b905082815260208101848484011115612cc257612cc1612bd3565b5b612ccd848285612c84565b509392505050565b600082601f830112612cea57612ce9612bce565b5b8135612cfa848260208601612c93565b91505092915050565b60008060008060808587031215612d1d57612d1c612685565b5b6000612d2b878288016128fc565b9450506020612d3c878288016128fc565b9350506040612d4d8782880161281d565b925050606085013567ffffffffffffffff811115612d6e57612d6d61268a565b5b612d7a87828801612cd5565b91505092959194509250565b600061ffff82169050919050565b612d9d81612d86565b8114612da857600080fd5b50565b600081359050612dba81612d94565b92915050565b600080600060608486031215612dd957612dd8612685565b5b6000612de7868287016128fc565b9350506020612df886828701612985565b9250506040612e0986828701612dab565b9150509250925092565b60008060408385031215612e2a57612e29612685565b5b6000612e38858286016128fc565b9250506020612e49858286016128fc565b9150509250929050565b60008060008060808587031215612e6d57612e6c612685565b5b6000612e7b878288016128fc565b9450506020612e8c87828801612985565b9350506040612e9d87828801612dab565b9250506060612eae87828801612a1a565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612f0157607f821691505b602082108103612f1457612f13612eba565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612f83826127fc565b9150612f8e836127fc565b9250828201905080821115612fa657612fa5612f49565b5b92915050565b600081519050612fbb8161296e565b92915050565b600060208284031215612fd757612fd6612685565b5b6000612fe584828501612fac565b91505092915050565b600060ff82169050919050565b600061300682612fee565b915061301183612fee565b9250828201905060ff81111561302a57613029612f49565b5b92915050565b600061303b826127fc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361306d5761306c612f49565b5b600182019050919050565b6000613083826129f1565b915061308e836129f1565b9250828201905065ffffffffffff8111156130ac576130ab612f49565b5b92915050565b6000815190506130c1816128e5565b92915050565b6000602082840312156130dd576130dc612685565b5b60006130eb848285016130b2565b91505092915050565b60006130ff826127fc565b915061310a836127fc565b925082820390508181111561312257613121612f49565b5b9291505056fea26469706673582212204fc3103b2cd5769609fc1e51fefef01ed8a3aa10f77ef22af7a4deb17f84bdda64736f6c63430008110033 +\ No newline at end of file diff --git a/python/tests/test_basic.py b/python/tests/test_basic.py @@ -33,6 +33,7 @@ from chainlib.eth.contract import ABIContractEncoder from craft_nft import CraftNFT from craft_nft.error import InvalidBatchError from craft_nft.eth import ABIContractType +from craft_nft.nft import to_batch_key logging.basicConfig(level=logging.DEBUG) logg = logging.getLogger() @@ -496,5 +497,70 @@ class Test(EthTesterCase): self.assertEqual(strip_0x(r), hash_of_bar) + def test_balance(self): + nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) + c = CraftNFT(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + + (tx_hash_hex, o) = c.allocate(self.address, self.accounts[0], hash_of_foo, amount=3) + self.rpc.do(o) + + (tx_hash_hex, o) = c.allocate(self.address, self.accounts[0], hash_of_bar, amount=0) + self.rpc.do(o) + + o = c.balance(self.address, self.accounts[1], sender_address=self.accounts[0]) + r = self.rpc.do(o) + balance = c.parse_balance(r) + self.assertEqual(balance, 0) + + (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[1], hash_of_foo, 0) + self.rpc.do(o) + + (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[1], hash_of_foo, 0) + self.rpc.do(o) + + (tx_hash_hex, o) = c.mint_to(self.address, self.accounts[0], self.accounts[1], hash_of_bar, 0) + self.rpc.do(o) + + o = c.balance(self.address, self.accounts[1], sender_address=self.accounts[0]) + r = self.rpc.do(o) + balance = c.parse_balance(r) + self.assertEqual(balance, 3) + + nonce_oracle = RPCNonceOracle(self.accounts[1], self.rpc) + c = CraftNFT(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + expected_id = to_batch_key(hash_of_foo, 0, 1) + (tx_hash_hex, o) = c.transfer_from(self.address, self.accounts[1], self.accounts[1], self.accounts[2], int(expected_id, 16)) + self.rpc.do(o) + o = receipt(tx_hash_hex) + r = self.conn.do(o) + self.assertEqual(r['status'], 1) + + o = c.balance(self.address, self.accounts[1], sender_address=self.accounts[0]) + r = self.rpc.do(o) + balance = c.parse_balance(r) + self.assertEqual(balance, 2) + + o = c.balance(self.address, self.accounts[2], sender_address=self.accounts[0]) + r = self.rpc.do(o) + balance = c.parse_balance(r) + self.assertEqual(balance, 1) + + (tx_hash_hex, o) = c.transfer_from(self.address, self.accounts[1], self.accounts[1], self.accounts[3], int(hash_of_bar, 16)) + self.rpc.do(o) + o = receipt(tx_hash_hex) + r = self.conn.do(o) + self.assertEqual(r['status'], 1) + + o = c.balance(self.address, self.accounts[1], sender_address=self.accounts[0]) + r = self.rpc.do(o) + balance = c.parse_balance(r) + self.assertEqual(balance, 1) + + o = c.balance(self.address, self.accounts[3], sender_address=self.accounts[0]) + r = self.rpc.do(o) + balance = c.parse_balance(r) + self.assertEqual(balance, 1) + + if __name__ == '__main__': unittest.main() diff --git a/solidity/CraftNFT.sol b/solidity/CraftNFT.sol @@ -1,5 +1,6 @@ pragma solidity >= 0.8.0; +// SPDX-License-Identifier: GPL-3.0-or-later contract CraftNFT { // Defines the behavior of a single token batch. @@ -52,6 +53,9 @@ contract CraftNFT { // The digest of a human-readable resource that describes the rationale and terms for all tokens created by this contract. bytes32 public declaration; + // Balance + mapping ( address => uint256 ) balance; + // ERC-721 event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); // ERC-721 @@ -83,15 +87,16 @@ contract CraftNFT { ownerFinal = true; } owner = _newOwner; + return true; } // Check bit that is always set on the content data when a token has been minted. - function isActive(bytes32 _tokenContent) private view returns(bool) { + function isActive(bytes32 _tokenContent) private pure returns(bool) { return uint256(_tokenContent) & 0x8000000000000000000000000000000000000000000000000000000000000000 > 0; } // Returns true if the content data belongs to a Unique Token - function isSingle(bytes32 _tokenContent) private view returns(bool) { + function isSingle(bytes32 _tokenContent) private pure returns(bool) { return uint256(_tokenContent) & 0x4000000000000000000000000000000000000000000000000000000000000000 > 0; } @@ -135,6 +140,7 @@ contract CraftNFT { supply += count; } emit Allocate(msg.sender, count, content); + return true; } // Find the token batch which contains the given index. @@ -151,7 +157,6 @@ contract CraftNFT { // Mint a unique token. The method will fail if the token was allocated as a batch. function mintTo(address _recipient, bytes32 _content) public returns (bytes32) { uint256 right; - uint256 first; require(msg.sender == owner); require(token[_content].length == 1); @@ -161,6 +166,9 @@ contract CraftNFT { right = uint160(_recipient); right |= (3 << 254); mintedToken[_content] = bytes32(right); + + balance[_recipient] += 1; + emit Mint(msg.sender, _recipient, uint256(_content)); return _content; @@ -245,6 +253,9 @@ contract CraftNFT { _spec.cursor += 1; mintedToken[k] = bytes32(right); + + balance[_recipient] += 1; + emit Mint(msg.sender, _recipient, left); return k; @@ -252,7 +263,7 @@ contract CraftNFT { // ERC-721 function balanceOf(address _owner) external view returns (uint256) { - return 0; + return balance[_owner]; } // ERC-721 @@ -298,6 +309,9 @@ contract CraftNFT { tokenAllowance[_tokenId] = address(0); setTokenOwner(_tokenId, _to); + + balance[_from] -= 1; + balance[_to] += 1; } // ERC-721