craft-nft

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

commit b61382d39c6a178ab832a929a48557b0cb23aa66
parent 651de7d06b4721caa61237970d69d09185ef3b09
Author: lash <dev@holbrook.no>
Date:   Wed, 21 Dec 2022 17:08:57 +0000

Add number field for batched token mint in js ui

Diffstat:
Mjs/ISSUES | 4+++-
Mjs/contract/CraftNFT.bin | 4++--
Mjs/contract/CraftNFT.json | 2+-
Mjs/index.html | 51++++++++++++++++++++++++++++++---------------------
Mjs/manual_test_browser.js | 18++++++++++++++++--
Mjs/src/common.js | 2+-
Mjs/src/engine.js | 21++++++++++++++++-----
Mpython/craft_nft/data/CraftNFT.bin | 4++--
Mpython/craft_nft/data/CraftNFT.json | 2+-
Mpython/craft_nft/nft.py | 7+++++--
Mpython/craft_nft/runnable/dump.py | 15++++++++++++---
Msolidity/CraftNFT.sol | 2+-
12 files changed, 90 insertions(+), 42 deletions(-)

diff --git a/js/ISSUES b/js/ISSUES @@ -1 +1,3 @@ -- Sometimes when clicking mint the metamask signer does not trigger. If mint is clicked a second time, it always appears. Detected with metamask 10.22.2 , chromium 108.0.5359.98 +- Sometimes when clicking mint the metamask signer does not trigger. If mint is clicked a second time, it usually appears. Detected with metamask 10.22.2 and 10.23.1, chromium 108.0.5359.98. A bug report has been filed here: https://github.com/MetaMask/metamask-extension/issues/17020 + +- The example application does not detect events from Metamask, for example change of account or new mined transactions. This means that for each allocation and minting transaction, the browser must be reloaded (after the block has been mined) to reflect the state changes. diff --git a/js/contract/CraftNFT.bin b/js/contract/CraftNFT.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b50604051620033ee380380620033ee833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b612d93806200065b6000396000f3fe608060405260043610610168576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100d3578063c87b56dd1161008c578063c87b56dd146104e8578063c9796c3914610525578063d824ee4f14610562578063e985e9c51461059f578063f117e173146105dc578063f9613ab21461061957610168565b80638da5cb5b146103e557806395d89b4114610410578063a22cb4651461043b578063adf288df14610464578063b1a6afd3146104a1578063b88d4fde146104cc57610168565b806342842e0e1161012557806342842e0e146102965780634d03546a146102b25780634f64b2be146102ef578063559f5dc91461032c5780636352211e1461036b57806370a08231146103a857610168565b806301ffc9a71461016d57806306fdde03146101aa578063081812fc146101d557806318160ddd1461021257806323b872dd1461023d57806324e0febc14610259575b600080fd5b34801561017957600080fd5b50610194600480360381019061018f9190612350565b610656565b6040516101a19190612398565b60405180910390f35b3480156101b657600080fd5b506101bf6107fc565b6040516101cc9190612443565b60405180910390f35b3480156101e157600080fd5b506101fc60048036038101906101f7919061249b565b61088a565b6040516102099190612509565b60405180910390f35b34801561021e57600080fd5b506102276108c7565b6040516102349190612533565b60405180910390f35b6102576004803603810190610252919061257a565b6108d1565b005b34801561026557600080fd5b50610280600480360381019061027b9190612603565b610940565b60405161028d919061263f565b60405180910390f35b6102b060048036038101906102ab919061257a565b610958565b005b3480156102be57600080fd5b506102d960048036038101906102d49190612698565b6109c7565b6040516102e69190612398565b60405180910390f35b3480156102fb57600080fd5b506103166004803603810190610311919061249b565b610bf6565b604051610323919061263f565b60405180910390f35b34801561033857600080fd5b50610353600480360381019061034e91906126d8565b610c1a565b60405161036293929190612727565b60405180910390f35b34801561037757600080fd5b50610392600480360381019061038d919061249b565b610c8e565b60405161039f9190612509565b60405180910390f35b3480156103b457600080fd5b506103cf60048036038101906103ca919061275e565b610cca565b6040516103dc9190612533565b60405180910390f35b3480156103f157600080fd5b506103fa610cd1565b6040516104079190612509565b60405180910390f35b34801561041c57600080fd5b50610425610cf5565b6040516104329190612443565b60405180910390f35b34801561044757600080fd5b50610462600480360381019061045d91906127b7565b610d83565b005b34801561047057600080fd5b5061048b600480360381019061048691906127f7565b611025565b604051610498919061263f565b60405180910390f35b3480156104ad57600080fd5b506104b6611187565b6040516104c3919061263f565b60405180910390f35b6104e660048036038101906104e1919061296c565b61118d565b005b3480156104f457600080fd5b5061050f600480360381019061050a919061249b565b611264565b60405161051c9190612443565b60405180910390f35b34801561053157600080fd5b5061054c60048036038101906105479190612603565b611314565b6040516105599190612443565b60405180910390f35b34801561056e57600080fd5b5061058960048036038101906105849190612a29565b61192f565b604051610596919061263f565b60405180910390f35b3480156105ab57600080fd5b506105c660048036038101906105c19190612a7c565b611ae2565b6040516105d39190612398565b60405180910390f35b3480156105e857600080fd5b5061060360048036038101906105fe9190612abc565b611b7a565b604051610610919061263f565b60405180910390f35b34801561062557600080fd5b50610640600480360381019061063b9190612603565b611c7f565b60405161064d919061263f565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106aa57600190506107f7565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106fc57600190506107f7565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361074e57600190506107f7565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a057600190506107f7565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f257600190506107f7565b600090505b919050565b6006805461080990612b52565b80601f016020809104026020016040519081016040528092919081815260200182805461083590612b52565b80156108825780601f1061085757610100808354040283529160200191610882565b820191906000526020600020905b81548152906001019060200180831161086557829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108df84848484611d2b565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b606061096684848484611d2b565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a2257600080fd5b610a2a6122b1565b600260008681526020019081526020016000208054905091506000821115610aa757600060026000878152602001908152602001600020600081548110610a7457610a73612b83565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610aa657600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610bcc57600160086000828254610bc09190612be1565b92505081905550610bee565b8365ffffffffffff1660086000828254610be69190612be1565b925050819055505b505092915050565b60018181548110610c0657600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610c3657600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610d0290612b52565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2e90612b52565b8015610d7b5780601f10610d5057610100808354040283529160200191610d7b565b820191906000526020600020905b815481529060010190602001808311610d5e57829003601f168201915b505050505081565b8015610ea457600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e2157600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610fbc565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f3c57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516110199190612398565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461108357600080fd5b60016002600086815260200190815260200160002080549050146110a657600080fd5b6000600260008681526020019081526020016000206000815481106110ce576110cd612b83565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461110057600080fd5b600060010260036000868152602001908152602001600020541461112357600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b60095481565b61119984848484611d2b565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e6000600102604051611256919061263f565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016112c0919061263f565b602060405180830381865afa1580156112dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113019190612c2a565b905061130c81611314565b915050919050565b606080600080604767ffffffffffffffff81111561133557611334612841565b5b6040519080825280601f01601f1916602001820160405280156113675781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061139f5761139e612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061140357611402612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061146757611466612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3200000000000000000000000000000000000000000000000000000000000000836003815181106114cb576114ca612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061152f5761152e612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061159357611592612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a00000000000000000000000000000000000000000000000000000000000000836006815181106115f7576115f6612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b602081101561192357600460f087836020811061164d5761164c612b83565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff161015611725576030836116bc9190612c64565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106116f1576116f0612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611797565b6057836117329190612c64565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061176757611766612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106117ac576117ab612b83565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff1610156118835760308361180e9190612c64565b7f0100000000000000000000000000000000000000000000000000000000000000028460018461183e9190612be1565b8151811061184f5761184e612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611901565b6057836118909190612c64565b7f010000000000000000000000000000000000000000000000000000000000000002846001846118c09190612be1565b815181106118d1576118d0612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b60028261190e9190612be1565b9150808061191b90612c99565b91505061162d565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff168154811061195b5761195a612b83565b5b90600052602060002001905080600001600c9054906101000a900460ff161561198357600080fd5b60008361ffff161480156119b5575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611a145760018160000160068282829054906101000a900465ffffffffffff166119e09190612ce1565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611a0c8585611025565b915050611adb565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a6c57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611ab457600080fd5b611ad78585858460000160069054906101000a900465ffffffffffff1685611f95565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611ba657611ba5612b83565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c0a57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611c3557600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611c6757600080fd5b611c748686868685611f95565b915050949350505050565b60008060036000848152602001908152602001600020549050611ca1816121bc565b611caa57600080fd5b611cb3816121ee565b15611cc15782915050611d26565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611d829190612533565b602060405180830381865afa158015611d9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc39190612d30565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611dfd57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614611f31573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611f2757503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b611f3057600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611f8e8385612220565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461202857600080fd5b84600001600c9054906101000a900460ff1661208a578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff161461208957600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff1661210b9190612ce1565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516121a59190612533565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361225057600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61232d816122f8565b811461233857600080fd5b50565b60008135905061234a81612324565b92915050565b600060208284031215612366576123656122ee565b5b60006123748482850161233b565b91505092915050565b60008115159050919050565b6123928161237d565b82525050565b60006020820190506123ad6000830184612389565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156123ed5780820151818401526020810190506123d2565b60008484015250505050565b6000601f19601f8301169050919050565b6000612415826123b3565b61241f81856123be565b935061242f8185602086016123cf565b612438816123f9565b840191505092915050565b6000602082019050818103600083015261245d818461240a565b905092915050565b6000819050919050565b61247881612465565b811461248357600080fd5b50565b6000813590506124958161246f565b92915050565b6000602082840312156124b1576124b06122ee565b5b60006124bf84828501612486565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006124f3826124c8565b9050919050565b612503816124e8565b82525050565b600060208201905061251e60008301846124fa565b92915050565b61252d81612465565b82525050565b60006020820190506125486000830184612524565b92915050565b612557816124e8565b811461256257600080fd5b50565b6000813590506125748161254e565b92915050565b600080600060608486031215612593576125926122ee565b5b60006125a186828701612565565b93505060206125b286828701612565565b92505060406125c386828701612486565b9150509250925092565b6000819050919050565b6125e0816125cd565b81146125eb57600080fd5b50565b6000813590506125fd816125d7565b92915050565b600060208284031215612619576126186122ee565b5b6000612627848285016125ee565b91505092915050565b612639816125cd565b82525050565b60006020820190506126546000830184612630565b92915050565b600065ffffffffffff82169050919050565b6126758161265a565b811461268057600080fd5b50565b6000813590506126928161266c565b92915050565b600080604083850312156126af576126ae6122ee565b5b60006126bd858286016125ee565b92505060206126ce85828601612683565b9150509250929050565b600080604083850312156126ef576126ee6122ee565b5b60006126fd858286016125ee565b925050602061270e85828601612486565b9150509250929050565b6127218161265a565b82525050565b600060608201905061273c6000830186612718565b6127496020830185612718565b6127566040830184612389565b949350505050565b600060208284031215612774576127736122ee565b5b600061278284828501612565565b91505092915050565b6127948161237d565b811461279f57600080fd5b50565b6000813590506127b18161278b565b92915050565b600080604083850312156127ce576127cd6122ee565b5b60006127dc85828601612565565b92505060206127ed858286016127a2565b9150509250929050565b6000806040838503121561280e5761280d6122ee565b5b600061281c85828601612565565b925050602061282d858286016125ee565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612879826123f9565b810181811067ffffffffffffffff8211171561289857612897612841565b5b80604052505050565b60006128ab6122e4565b90506128b78282612870565b919050565b600067ffffffffffffffff8211156128d7576128d6612841565b5b6128e0826123f9565b9050602081019050919050565b82818337600083830152505050565b600061290f61290a846128bc565b6128a1565b90508281526020810184848401111561292b5761292a61283c565b5b6129368482856128ed565b509392505050565b600082601f83011261295357612952612837565b5b81356129638482602086016128fc565b91505092915050565b60008060008060808587031215612986576129856122ee565b5b600061299487828801612565565b94505060206129a587828801612565565b93505060406129b687828801612486565b925050606085013567ffffffffffffffff8111156129d7576129d66122f3565b5b6129e38782880161293e565b91505092959194509250565b600061ffff82169050919050565b612a06816129ef565b8114612a1157600080fd5b50565b600081359050612a23816129fd565b92915050565b600080600060608486031215612a4257612a416122ee565b5b6000612a5086828701612565565b9350506020612a61868287016125ee565b9250506040612a7286828701612a14565b9150509250925092565b60008060408385031215612a9357612a926122ee565b5b6000612aa185828601612565565b9250506020612ab285828601612565565b9150509250929050565b60008060008060808587031215612ad657612ad56122ee565b5b6000612ae487828801612565565b9450506020612af5878288016125ee565b9350506040612b0687828801612a14565b9250506060612b1787828801612683565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612b6a57607f821691505b602082108103612b7d57612b7c612b23565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612bec82612465565b9150612bf783612465565b9250828201905080821115612c0f57612c0e612bb2565b5b92915050565b600081519050612c24816125d7565b92915050565b600060208284031215612c4057612c3f6122ee565b5b6000612c4e84828501612c15565b91505092915050565b600060ff82169050919050565b6000612c6f82612c57565b9150612c7a83612c57565b9250828201905060ff811115612c9357612c92612bb2565b5b92915050565b6000612ca482612465565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612cd657612cd5612bb2565b5b600182019050919050565b6000612cec8261265a565b9150612cf78361265a565b9250828201905065ffffffffffff811115612d1557612d14612bb2565b5b92915050565b600081519050612d2a8161254e565b92915050565b600060208284031215612d4657612d456122ee565b5b6000612d5484828501612d1b565b9150509291505056fea26469706673582212208769dde957cdcc6fffb3bbf8362f7ba2b142b4185530e3954aa46123b54b4c3b64736f6c63430008110033 -\ No newline at end of file +60806040523480156200001157600080fd5b506040516200352338038062003523833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b612ec8806200065b6000396000f3fe608060405260043610610183576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100ee578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f146105ba578063e985e9c5146105f7578063f117e17314610634578063f9613ab21461067157610183565b8063b88d4fde14610524578063c87b56dd14610540578063c9796c391461057d57610183565b80638da5cb5b1461040057806395d89b411461042b578063a22cb46514610456578063adf288df1461047f578063b1a6afd3146104bc578063b242e534146104e757610183565b806342842e0e1161014057806342842e0e146102b15780634d03546a146102cd5780634f64b2be1461030a578063559f5dc9146103475780636352211e1461038657806370a08231146103c357610183565b806301ffc9a71461018857806306fdde03146101c5578063081812fc146101f057806318160ddd1461022d57806323b872dd1461025857806324e0febc14610274575b600080fd5b34801561019457600080fd5b506101af60048036038101906101aa9190612485565b6106ae565b6040516101bc91906124cd565b60405180910390f35b3480156101d157600080fd5b506101da610854565b6040516101e79190612578565b60405180910390f35b3480156101fc57600080fd5b50610217600480360381019061021291906125d0565b6108e2565b604051610224919061263e565b60405180910390f35b34801561023957600080fd5b5061024261091f565b60405161024f9190612668565b60405180910390f35b610272600480360381019061026d91906126af565b610929565b005b34801561028057600080fd5b5061029b60048036038101906102969190612738565b610998565b6040516102a89190612774565b60405180910390f35b6102cb60048036038101906102c691906126af565b6109b0565b005b3480156102d957600080fd5b506102f460048036038101906102ef91906127cd565b610a1f565b60405161030191906124cd565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c91906125d0565b610c4e565b60405161033e9190612774565b60405180910390f35b34801561035357600080fd5b5061036e6004803603810190610369919061280d565b610c72565b60405161037d9392919061285c565b60405180910390f35b34801561039257600080fd5b506103ad60048036038101906103a891906125d0565b610ce6565b6040516103ba919061263e565b60405180910390f35b3480156103cf57600080fd5b506103ea60048036038101906103e59190612893565b610d22565b6040516103f79190612668565b60405180910390f35b34801561040c57600080fd5b50610415610d29565b604051610422919061263e565b60405180910390f35b34801561043757600080fd5b50610440610d4d565b60405161044d9190612578565b60405180910390f35b34801561046257600080fd5b5061047d600480360381019061047891906128ec565b610ddb565b005b34801561048b57600080fd5b506104a660048036038101906104a1919061292c565b61107d565b6040516104b39190612774565b60405180910390f35b3480156104c857600080fd5b506104d16111df565b6040516104de9190612774565b60405180910390f35b3480156104f357600080fd5b5061050e600480360381019061050991906128ec565b6111e5565b60405161051b91906124cd565b60405180910390f35b61053e60048036038101906105399190612aa1565b6112c2565b005b34801561054c57600080fd5b50610567600480360381019061056291906125d0565b611399565b6040516105749190612578565b60405180910390f35b34801561058957600080fd5b506105a4600480360381019061059f9190612738565b611449565b6040516105b19190612578565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc9190612b5e565b611a64565b6040516105ee9190612774565b60405180910390f35b34801561060357600080fd5b5061061e60048036038101906106199190612bb1565b611c17565b60405161062b91906124cd565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190612bf1565b611caf565b6040516106689190612774565b60405180910390f35b34801561067d57600080fd5b5061069860048036038101906106939190612738565b611db4565b6040516106a59190612774565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610702576001905061084f565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610754576001905061084f565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a6576001905061084f565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f8576001905061084f565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361084a576001905061084f565b600090505b919050565b6006805461086190612c87565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90612c87565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b606061093784848484611e60565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60606109be84848484611e60565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7a57600080fd5b610a826123e6565b600260008681526020019081526020016000208054905091506000821115610aff57600060026000878152602001908152602001600020600081548110610acc57610acb612cb8565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610afe57600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610c2457600160086000828254610c189190612d16565b92505081905550610c46565b8365ffffffffffff1660086000828254610c3e9190612d16565b925050819055505b505092915050565b60018181548110610c5e57600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610c8e57600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610d5a90612c87565b80601f0160208091040260200160405190810160405280929190818152602001828054610d8690612c87565b8015610dd35780601f10610da857610100808354040283529160200191610dd3565b820191906000526020600020905b815481529060010190602001808311610db657829003601f168201915b505050505081565b8015610efc57600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e7957600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611014565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f9457600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161107191906124cd565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146110db57600080fd5b60016002600086815260200190815260200160002080549050146110fe57600080fd5b60006002600086815260200190815260200160002060008154811061112657611125612cb8565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461115857600080fd5b600060010260036000868152602001908152602001600020541461117b57600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461124057600080fd5b600060149054906101000a900460ff161561125a57600080fd5b811561127c576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555092915050565b6112ce84848484611e60565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161138b9190612774565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016113f59190612774565b602060405180830381865afa158015611412573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114369190612d5f565b905061144181611449565b915050919050565b606080600080604767ffffffffffffffff81111561146a57611469612976565b5b6040519080825280601f01601f19166020018201604052801561149c5781602001600182028036833780820191505090505b5092507f7300000000000000000000000000000000000000000000000000000000000000836000815181106114d4576114d3612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061153857611537612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061159c5761159b612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f320000000000000000000000000000000000000000000000000000000000000083600381518110611600576115ff612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061166457611663612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3600000000000000000000000000000000000000000000000000000000000000836005815181106116c8576116c7612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a000000000000000000000000000000000000000000000000000000000000008360068151811061172c5761172b612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611a5857600460f087836020811061178257611781612cb8565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff16101561185a576030836117f19190612d99565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061182657611825612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506118cc565b6057836118679190612d99565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061189c5761189b612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106118e1576118e0612cb8565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff1610156119b8576030836119439190612d99565b7f010000000000000000000000000000000000000000000000000000000000000002846001846119739190612d16565b8151811061198457611983612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611a36565b6057836119c59190612d99565b7f010000000000000000000000000000000000000000000000000000000000000002846001846119f59190612d16565b81518110611a0657611a05612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611a439190612d16565b91508080611a5090612dce565b915050611762565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611a9057611a8f612cb8565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611ab857600080fd5b60008361ffff16148015611aea575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611b495760018160000160068282829054906101000a900465ffffffffffff16611b159190612e16565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611b41858561107d565b915050611c10565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611ba157600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611be957600080fd5b611c0c8585858460000160069054906101000a900465ffffffffffff16856120ca565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611cdb57611cda612cb8565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d3f57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611d6a57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611d9c57600080fd5b611da986868686856120ca565b915050949350505050565b60008060036000848152602001908152602001600020549050611dd6816122f1565b611ddf57600080fd5b611de881612323565b15611df65782915050611e5b565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611eb79190612668565b602060405180830381865afa158015611ed4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef89190612e65565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611f3257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612066573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061205c57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61206557600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506120c38385612355565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461215d57600080fd5b84600001600c9054906101000a900460ff166121bf578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16146121be57600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff166122409190612e16565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516122da9190612668565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361238557600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6124628161242d565b811461246d57600080fd5b50565b60008135905061247f81612459565b92915050565b60006020828403121561249b5761249a612423565b5b60006124a984828501612470565b91505092915050565b60008115159050919050565b6124c7816124b2565b82525050565b60006020820190506124e260008301846124be565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612522578082015181840152602081019050612507565b60008484015250505050565b6000601f19601f8301169050919050565b600061254a826124e8565b61255481856124f3565b9350612564818560208601612504565b61256d8161252e565b840191505092915050565b60006020820190508181036000830152612592818461253f565b905092915050565b6000819050919050565b6125ad8161259a565b81146125b857600080fd5b50565b6000813590506125ca816125a4565b92915050565b6000602082840312156125e6576125e5612423565b5b60006125f4848285016125bb565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612628826125fd565b9050919050565b6126388161261d565b82525050565b6000602082019050612653600083018461262f565b92915050565b6126628161259a565b82525050565b600060208201905061267d6000830184612659565b92915050565b61268c8161261d565b811461269757600080fd5b50565b6000813590506126a981612683565b92915050565b6000806000606084860312156126c8576126c7612423565b5b60006126d68682870161269a565b93505060206126e78682870161269a565b92505060406126f8868287016125bb565b9150509250925092565b6000819050919050565b61271581612702565b811461272057600080fd5b50565b6000813590506127328161270c565b92915050565b60006020828403121561274e5761274d612423565b5b600061275c84828501612723565b91505092915050565b61276e81612702565b82525050565b60006020820190506127896000830184612765565b92915050565b600065ffffffffffff82169050919050565b6127aa8161278f565b81146127b557600080fd5b50565b6000813590506127c7816127a1565b92915050565b600080604083850312156127e4576127e3612423565b5b60006127f285828601612723565b9250506020612803858286016127b8565b9150509250929050565b6000806040838503121561282457612823612423565b5b600061283285828601612723565b9250506020612843858286016125bb565b9150509250929050565b6128568161278f565b82525050565b6000606082019050612871600083018661284d565b61287e602083018561284d565b61288b60408301846124be565b949350505050565b6000602082840312156128a9576128a8612423565b5b60006128b78482850161269a565b91505092915050565b6128c9816124b2565b81146128d457600080fd5b50565b6000813590506128e6816128c0565b92915050565b6000806040838503121561290357612902612423565b5b60006129118582860161269a565b9250506020612922858286016128d7565b9150509250929050565b6000806040838503121561294357612942612423565b5b60006129518582860161269a565b925050602061296285828601612723565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6129ae8261252e565b810181811067ffffffffffffffff821117156129cd576129cc612976565b5b80604052505050565b60006129e0612419565b90506129ec82826129a5565b919050565b600067ffffffffffffffff821115612a0c57612a0b612976565b5b612a158261252e565b9050602081019050919050565b82818337600083830152505050565b6000612a44612a3f846129f1565b6129d6565b905082815260208101848484011115612a6057612a5f612971565b5b612a6b848285612a22565b509392505050565b600082601f830112612a8857612a8761296c565b5b8135612a98848260208601612a31565b91505092915050565b60008060008060808587031215612abb57612aba612423565b5b6000612ac98782880161269a565b9450506020612ada8782880161269a565b9350506040612aeb878288016125bb565b925050606085013567ffffffffffffffff811115612b0c57612b0b612428565b5b612b1887828801612a73565b91505092959194509250565b600061ffff82169050919050565b612b3b81612b24565b8114612b4657600080fd5b50565b600081359050612b5881612b32565b92915050565b600080600060608486031215612b7757612b76612423565b5b6000612b858682870161269a565b9350506020612b9686828701612723565b9250506040612ba786828701612b49565b9150509250925092565b60008060408385031215612bc857612bc7612423565b5b6000612bd68582860161269a565b9250506020612be78582860161269a565b9150509250929050565b60008060008060808587031215612c0b57612c0a612423565b5b6000612c198782880161269a565b9450506020612c2a87828801612723565b9350506040612c3b87828801612b49565b9250506060612c4c878288016127b8565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612c9f57607f821691505b602082108103612cb257612cb1612c58565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612d218261259a565b9150612d2c8361259a565b9250828201905080821115612d4457612d43612ce7565b5b92915050565b600081519050612d598161270c565b92915050565b600060208284031215612d7557612d74612423565b5b6000612d8384828501612d4a565b91505092915050565b600060ff82169050919050565b6000612da482612d8c565b9150612daf83612d8c565b9250828201905060ff811115612dc857612dc7612ce7565b5b92915050565b6000612dd98261259a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612e0b57612e0a612ce7565b5b600182019050919050565b6000612e218261278f565b9150612e2c8361278f565b9250828201905065ffffffffffff811115612e4a57612e49612ce7565b5b92915050565b600081519050612e5f81612683565b92915050565b600060208284031215612e7b57612e7a612423565b5b6000612e8984828501612e50565b9150509291505056fea2646970667358221220c5b23cab869d4e037c83c77206702df56e1fe8ddb4d03e7479348923baf58bc264736f6c63430008110033 +\ No newline at end of file diff --git a/js/contract/CraftNFT.json b/js/contract/CraftNFT.json @@ -1 +1 @@ -[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"bytes32","name":"_declaration","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"TransferWithData","type":"event"},{"inputs":[{"internalType":"bytes32","name":"content","type":"bytes32"},{"internalType":"uint48","name":"count","type":"uint48"}],"name":"allocate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"declaration","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_truncatedId","type":"bytes32"}],"name":"getDigest","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint16","name":"_batch","type":"uint16"},{"internalType":"uint48","name":"_index","type":"uint48"}],"name":"mintExactFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint16","name":"_batch","type":"uint16"}],"name":"mintFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"}],"name":"mintTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"mintedToken","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"toURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"token","outputs":[{"internalType":"uint48","name":"count","type":"uint48"},{"internalType":"uint48","name":"cursor","type":"uint48"},{"internalType":"bool","name":"sparse","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"}] +[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"bytes32","name":"_declaration","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"TransferWithData","type":"event"},{"inputs":[{"internalType":"bytes32","name":"content","type":"bytes32"},{"internalType":"uint48","name":"count","type":"uint48"}],"name":"allocate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"declaration","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_truncatedId","type":"bytes32"}],"name":"getDigest","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint16","name":"_batch","type":"uint16"},{"internalType":"uint48","name":"_index","type":"uint48"}],"name":"mintExactFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint16","name":"_batch","type":"uint16"}],"name":"mintFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"}],"name":"mintTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"mintedToken","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"toURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"token","outputs":[{"internalType":"uint48","name":"count","type":"uint48"},{"internalType":"uint48","name":"cursor","type":"uint48"},{"internalType":"bool","name":"sparse","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"},{"internalType":"bool","name":"_final","type":"bool"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] diff --git a/js/index.html b/js/index.html @@ -19,32 +19,35 @@ a { text-decoration: underline; color: #0000ff; } - a:hover { cursor: pointer; } +label:after { + content: '\a'; + white-space: pre; +} </style> </head> <body> - <dl id=data"> - <dt>account</dt> - <dd id="data_account"></dd> - <dt>contract</dt> - <dd> - <dl> - <dt>address</dt> - <dd id="data_contract"></dd> - <dt>name</dt> - <dd id="data_name"></dd> - <dt>symbol</dt> - <dd id="data_symbol"></dd> - <dt>supply</dt> - <dd id="data_supply"></dd> - <dt>contract declaration</dt> - <dd id="data_declaration"></dd> - </dl> - </dd> - </dl> + <dl id=data"> + <dt>account</dt> + <dd id="data_account"></dd> + <dt>contract</dt> + <dd> + <dl> + <dt>address</dt> + <dd id="data_contract"></dd> + <dt>name</dt> + <dd id="data_name"></dd> + <dt>symbol</dt> + <dd id="data_symbol"></dd> + <dt>supply</dt> + <dd id="data_supply"></dd> + <dt>contract declaration</dt> + <dd id="data_declaration"></dd> + </dl> + </dd> + </dl> <div id="interactive"> <form id="panel" action="#" onSubmit="return false;"> <input type="text" id="panel_title" name="title" /> @@ -53,7 +56,7 @@ a:hover { <label for="panel_description">Description</label> <input type="text" id="panel_amount" name="amount" /> <label for="panel_amount">Batch size (0 or empty for unique work)</label> - <button id="panel_submit">create</button> + <button id="panel_submit">allocate</button> </form> </div> <div id="detail"> @@ -82,7 +85,13 @@ a:hover { <dd id="token_mint_batch"></dd> </dl> <form> + <input type="hidden" id="token_mint_typ" value="unique" /> <input type="text" id="token_mint_recipient" /> + <label for="token_mint_recipient">Recipient</label> + <span id="mint_index"> + <input type="text" id="token_mint_index" /> + <label for="token_mint_number">Number</label> + </span> <button id="mint_submit">mint</button> </form> </div> diff --git a/js/manual_test_browser.js b/js/manual_test_browser.js @@ -111,14 +111,22 @@ async function generateAllocation() { */ async function generateMint() { const tokenId = document.getElementById('token_mint_id').innerHTML; + let batch = document.getElementById('token_mint_batch').innerHTML; batch = parseInt(batch, 10); const recipient = document.getElementById('token_mint_recipient').value; + + let index = undefined; + if (document.getElementById('token_mint_typ').value === 'batched') { + index = parseInt(document.getElementById('token_mint_index').value, 10); + } + const tokenRequestEvent = new CustomEvent('tokenMint', { detail: { recipient: recipient, digest: tokenId, batch: batch, + index: index, }, bubbles: true, cancelable: true, @@ -172,7 +180,6 @@ async function uiViewTokenSingle(tokenId) { * Render the allocated token view. */ async function uiViewToken(tokenId) { - let tokenData = { name: '(unavailable)', description: '(unavailable)', @@ -200,7 +207,14 @@ async function uiViewToken(tokenId) { document.getElementById('token_name').innerHTML = tokenData.name; document.getElementById('token_description').innerHTML = tokenData.description; document.getElementById('token_cap').innerHTML = tokenChainData.issue.cap; - + if (tokenChainData.issue.cap == 0) { + document.getElementById('token_mint_typ').value = 'unique'; + document.getElementById('token_mint_index').value = ''; + document.getElementById('mint_index').style.visibility = 'hidden'; + } else { + document.getElementById('token_mint_typ').value = 'batched'; + document.getElementById('mint_index').style.visibility = 'inherit'; + } window.craftnft.getBatches(session, tokenId, (batch, count, cursor) => { if (batch == -1) { diff --git a/js/src/common.js b/js/src/common.js @@ -72,5 +72,5 @@ window.addEventListener('tokenRequest', async(e) => { * Emitted when the user requests a token minting with the UI. */ window.addEventListener('tokenMint', async(e) => { - window.craftnft.mintToken(session, e.detail.digest, e.detail.batch, e.detail.recipient); + window.craftnft.mintToken(session, e.detail.digest, e.detail.batch, e.detail.recipient, e.detail.index); }); diff --git a/js/src/engine.js b/js/src/engine.js @@ -123,13 +123,24 @@ async function allocateToken(session, tokenId, amount) { * @param {String} recipient of token mint * @throws free-form If transaction is refused by the client */ -async function mintToken(session, tokenId, batch, recipient) { +async function mintToken(session, tokenId, batch, recipient, index) { const w3 = new Web3(); const address = await w3.utils.toChecksumAddress(recipient); - session.contract.methods.mintFromBatchTo(address, '0x' + tokenId, batch).send({ - from: session.account, - value: 0, - }); + try { + if (index === undefined) { + await session.contract.methods.mintFromBatchTo(address, '0x' + tokenId, batch).send({ + from: session.account, + value: 0, + }); + } else { + await session.contract.methods.mintExactFromBatchTo(address, '0x' + tokenId, batch, index).send({ + from: session.account, + value: 0, + }); + } + } catch(e) { + console.error('error:', e); + } } diff --git a/python/craft_nft/data/CraftNFT.bin b/python/craft_nft/data/CraftNFT.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b50604051620033ee380380620033ee833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b612d93806200065b6000396000f3fe608060405260043610610168576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100d3578063c87b56dd1161008c578063c87b56dd146104e8578063c9796c3914610525578063d824ee4f14610562578063e985e9c51461059f578063f117e173146105dc578063f9613ab21461061957610168565b80638da5cb5b146103e557806395d89b4114610410578063a22cb4651461043b578063adf288df14610464578063b1a6afd3146104a1578063b88d4fde146104cc57610168565b806342842e0e1161012557806342842e0e146102965780634d03546a146102b25780634f64b2be146102ef578063559f5dc91461032c5780636352211e1461036b57806370a08231146103a857610168565b806301ffc9a71461016d57806306fdde03146101aa578063081812fc146101d557806318160ddd1461021257806323b872dd1461023d57806324e0febc14610259575b600080fd5b34801561017957600080fd5b50610194600480360381019061018f9190612350565b610656565b6040516101a19190612398565b60405180910390f35b3480156101b657600080fd5b506101bf6107fc565b6040516101cc9190612443565b60405180910390f35b3480156101e157600080fd5b506101fc60048036038101906101f7919061249b565b61088a565b6040516102099190612509565b60405180910390f35b34801561021e57600080fd5b506102276108c7565b6040516102349190612533565b60405180910390f35b6102576004803603810190610252919061257a565b6108d1565b005b34801561026557600080fd5b50610280600480360381019061027b9190612603565b610940565b60405161028d919061263f565b60405180910390f35b6102b060048036038101906102ab919061257a565b610958565b005b3480156102be57600080fd5b506102d960048036038101906102d49190612698565b6109c7565b6040516102e69190612398565b60405180910390f35b3480156102fb57600080fd5b506103166004803603810190610311919061249b565b610bf6565b604051610323919061263f565b60405180910390f35b34801561033857600080fd5b50610353600480360381019061034e91906126d8565b610c1a565b60405161036293929190612727565b60405180910390f35b34801561037757600080fd5b50610392600480360381019061038d919061249b565b610c8e565b60405161039f9190612509565b60405180910390f35b3480156103b457600080fd5b506103cf60048036038101906103ca919061275e565b610cca565b6040516103dc9190612533565b60405180910390f35b3480156103f157600080fd5b506103fa610cd1565b6040516104079190612509565b60405180910390f35b34801561041c57600080fd5b50610425610cf5565b6040516104329190612443565b60405180910390f35b34801561044757600080fd5b50610462600480360381019061045d91906127b7565b610d83565b005b34801561047057600080fd5b5061048b600480360381019061048691906127f7565b611025565b604051610498919061263f565b60405180910390f35b3480156104ad57600080fd5b506104b6611187565b6040516104c3919061263f565b60405180910390f35b6104e660048036038101906104e1919061296c565b61118d565b005b3480156104f457600080fd5b5061050f600480360381019061050a919061249b565b611264565b60405161051c9190612443565b60405180910390f35b34801561053157600080fd5b5061054c60048036038101906105479190612603565b611314565b6040516105599190612443565b60405180910390f35b34801561056e57600080fd5b5061058960048036038101906105849190612a29565b61192f565b604051610596919061263f565b60405180910390f35b3480156105ab57600080fd5b506105c660048036038101906105c19190612a7c565b611ae2565b6040516105d39190612398565b60405180910390f35b3480156105e857600080fd5b5061060360048036038101906105fe9190612abc565b611b7a565b604051610610919061263f565b60405180910390f35b34801561062557600080fd5b50610640600480360381019061063b9190612603565b611c7f565b60405161064d919061263f565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106aa57600190506107f7565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106fc57600190506107f7565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361074e57600190506107f7565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a057600190506107f7565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f257600190506107f7565b600090505b919050565b6006805461080990612b52565b80601f016020809104026020016040519081016040528092919081815260200182805461083590612b52565b80156108825780601f1061085757610100808354040283529160200191610882565b820191906000526020600020905b81548152906001019060200180831161086557829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b60606108df84848484611d2b565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b606061096684848484611d2b565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a2257600080fd5b610a2a6122b1565b600260008681526020019081526020016000208054905091506000821115610aa757600060026000878152602001908152602001600020600081548110610a7457610a73612b83565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610aa657600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610bcc57600160086000828254610bc09190612be1565b92505081905550610bee565b8365ffffffffffff1660086000828254610be69190612be1565b925050819055505b505092915050565b60018181548110610c0657600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610c3657600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610d0290612b52565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2e90612b52565b8015610d7b5780601f10610d5057610100808354040283529160200191610d7b565b820191906000526020600020905b815481529060010190602001808311610d5e57829003601f168201915b505050505081565b8015610ea457600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e2157600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610fbc565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f3c57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516110199190612398565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461108357600080fd5b60016002600086815260200190815260200160002080549050146110a657600080fd5b6000600260008681526020019081526020016000206000815481106110ce576110cd612b83565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461110057600080fd5b600060010260036000868152602001908152602001600020541461112357600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b60095481565b61119984848484611d2b565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e6000600102604051611256919061263f565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016112c0919061263f565b602060405180830381865afa1580156112dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113019190612c2a565b905061130c81611314565b915050919050565b606080600080604767ffffffffffffffff81111561133557611334612841565b5b6040519080825280601f01601f1916602001820160405280156113675781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061139f5761139e612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061140357611402612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061146757611466612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3200000000000000000000000000000000000000000000000000000000000000836003815181106114cb576114ca612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061152f5761152e612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061159357611592612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a00000000000000000000000000000000000000000000000000000000000000836006815181106115f7576115f6612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b602081101561192357600460f087836020811061164d5761164c612b83565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff161015611725576030836116bc9190612c64565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106116f1576116f0612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611797565b6057836117329190612c64565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061176757611766612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106117ac576117ab612b83565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff1610156118835760308361180e9190612c64565b7f0100000000000000000000000000000000000000000000000000000000000000028460018461183e9190612be1565b8151811061184f5761184e612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611901565b6057836118909190612c64565b7f010000000000000000000000000000000000000000000000000000000000000002846001846118c09190612be1565b815181106118d1576118d0612b83565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b60028261190e9190612be1565b9150808061191b90612c99565b91505061162d565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff168154811061195b5761195a612b83565b5b90600052602060002001905080600001600c9054906101000a900460ff161561198357600080fd5b60008361ffff161480156119b5575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611a145760018160000160068282829054906101000a900465ffffffffffff166119e09190612ce1565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611a0c8585611025565b915050611adb565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a6c57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611ab457600080fd5b611ad78585858460000160069054906101000a900465ffffffffffff1685611f95565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611ba657611ba5612b83565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c0a57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611c3557600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611c6757600080fd5b611c748686868685611f95565b915050949350505050565b60008060036000848152602001908152602001600020549050611ca1816121bc565b611caa57600080fd5b611cb3816121ee565b15611cc15782915050611d26565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611d829190612533565b602060405180830381865afa158015611d9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc39190612d30565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611dfd57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614611f31573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611f2757503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b611f3057600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611f8e8385612220565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461202857600080fd5b84600001600c9054906101000a900460ff1661208a578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff161461208957600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff1661210b9190612ce1565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516121a59190612533565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361225057600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61232d816122f8565b811461233857600080fd5b50565b60008135905061234a81612324565b92915050565b600060208284031215612366576123656122ee565b5b60006123748482850161233b565b91505092915050565b60008115159050919050565b6123928161237d565b82525050565b60006020820190506123ad6000830184612389565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156123ed5780820151818401526020810190506123d2565b60008484015250505050565b6000601f19601f8301169050919050565b6000612415826123b3565b61241f81856123be565b935061242f8185602086016123cf565b612438816123f9565b840191505092915050565b6000602082019050818103600083015261245d818461240a565b905092915050565b6000819050919050565b61247881612465565b811461248357600080fd5b50565b6000813590506124958161246f565b92915050565b6000602082840312156124b1576124b06122ee565b5b60006124bf84828501612486565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006124f3826124c8565b9050919050565b612503816124e8565b82525050565b600060208201905061251e60008301846124fa565b92915050565b61252d81612465565b82525050565b60006020820190506125486000830184612524565b92915050565b612557816124e8565b811461256257600080fd5b50565b6000813590506125748161254e565b92915050565b600080600060608486031215612593576125926122ee565b5b60006125a186828701612565565b93505060206125b286828701612565565b92505060406125c386828701612486565b9150509250925092565b6000819050919050565b6125e0816125cd565b81146125eb57600080fd5b50565b6000813590506125fd816125d7565b92915050565b600060208284031215612619576126186122ee565b5b6000612627848285016125ee565b91505092915050565b612639816125cd565b82525050565b60006020820190506126546000830184612630565b92915050565b600065ffffffffffff82169050919050565b6126758161265a565b811461268057600080fd5b50565b6000813590506126928161266c565b92915050565b600080604083850312156126af576126ae6122ee565b5b60006126bd858286016125ee565b92505060206126ce85828601612683565b9150509250929050565b600080604083850312156126ef576126ee6122ee565b5b60006126fd858286016125ee565b925050602061270e85828601612486565b9150509250929050565b6127218161265a565b82525050565b600060608201905061273c6000830186612718565b6127496020830185612718565b6127566040830184612389565b949350505050565b600060208284031215612774576127736122ee565b5b600061278284828501612565565b91505092915050565b6127948161237d565b811461279f57600080fd5b50565b6000813590506127b18161278b565b92915050565b600080604083850312156127ce576127cd6122ee565b5b60006127dc85828601612565565b92505060206127ed858286016127a2565b9150509250929050565b6000806040838503121561280e5761280d6122ee565b5b600061281c85828601612565565b925050602061282d858286016125ee565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612879826123f9565b810181811067ffffffffffffffff8211171561289857612897612841565b5b80604052505050565b60006128ab6122e4565b90506128b78282612870565b919050565b600067ffffffffffffffff8211156128d7576128d6612841565b5b6128e0826123f9565b9050602081019050919050565b82818337600083830152505050565b600061290f61290a846128bc565b6128a1565b90508281526020810184848401111561292b5761292a61283c565b5b6129368482856128ed565b509392505050565b600082601f83011261295357612952612837565b5b81356129638482602086016128fc565b91505092915050565b60008060008060808587031215612986576129856122ee565b5b600061299487828801612565565b94505060206129a587828801612565565b93505060406129b687828801612486565b925050606085013567ffffffffffffffff8111156129d7576129d66122f3565b5b6129e38782880161293e565b91505092959194509250565b600061ffff82169050919050565b612a06816129ef565b8114612a1157600080fd5b50565b600081359050612a23816129fd565b92915050565b600080600060608486031215612a4257612a416122ee565b5b6000612a5086828701612565565b9350506020612a61868287016125ee565b9250506040612a7286828701612a14565b9150509250925092565b60008060408385031215612a9357612a926122ee565b5b6000612aa185828601612565565b9250506020612ab285828601612565565b9150509250929050565b60008060008060808587031215612ad657612ad56122ee565b5b6000612ae487828801612565565b9450506020612af5878288016125ee565b9350506040612b0687828801612a14565b9250506060612b1787828801612683565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612b6a57607f821691505b602082108103612b7d57612b7c612b23565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612bec82612465565b9150612bf783612465565b9250828201905080821115612c0f57612c0e612bb2565b5b92915050565b600081519050612c24816125d7565b92915050565b600060208284031215612c4057612c3f6122ee565b5b6000612c4e84828501612c15565b91505092915050565b600060ff82169050919050565b6000612c6f82612c57565b9150612c7a83612c57565b9250828201905060ff811115612c9357612c92612bb2565b5b92915050565b6000612ca482612465565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612cd657612cd5612bb2565b5b600182019050919050565b6000612cec8261265a565b9150612cf78361265a565b9250828201905065ffffffffffff811115612d1557612d14612bb2565b5b92915050565b600081519050612d2a8161254e565b92915050565b600060208284031215612d4657612d456122ee565b5b6000612d5484828501612d1b565b9150509291505056fea26469706673582212208769dde957cdcc6fffb3bbf8362f7ba2b142b4185530e3954aa46123b54b4c3b64736f6c63430008110033 -\ No newline at end of file +60806040523480156200001157600080fd5b506040516200352338038062003523833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b612ec8806200065b6000396000f3fe608060405260043610610183576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100ee578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f146105ba578063e985e9c5146105f7578063f117e17314610634578063f9613ab21461067157610183565b8063b88d4fde14610524578063c87b56dd14610540578063c9796c391461057d57610183565b80638da5cb5b1461040057806395d89b411461042b578063a22cb46514610456578063adf288df1461047f578063b1a6afd3146104bc578063b242e534146104e757610183565b806342842e0e1161014057806342842e0e146102b15780634d03546a146102cd5780634f64b2be1461030a578063559f5dc9146103475780636352211e1461038657806370a08231146103c357610183565b806301ffc9a71461018857806306fdde03146101c5578063081812fc146101f057806318160ddd1461022d57806323b872dd1461025857806324e0febc14610274575b600080fd5b34801561019457600080fd5b506101af60048036038101906101aa9190612485565b6106ae565b6040516101bc91906124cd565b60405180910390f35b3480156101d157600080fd5b506101da610854565b6040516101e79190612578565b60405180910390f35b3480156101fc57600080fd5b50610217600480360381019061021291906125d0565b6108e2565b604051610224919061263e565b60405180910390f35b34801561023957600080fd5b5061024261091f565b60405161024f9190612668565b60405180910390f35b610272600480360381019061026d91906126af565b610929565b005b34801561028057600080fd5b5061029b60048036038101906102969190612738565b610998565b6040516102a89190612774565b60405180910390f35b6102cb60048036038101906102c691906126af565b6109b0565b005b3480156102d957600080fd5b506102f460048036038101906102ef91906127cd565b610a1f565b60405161030191906124cd565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c91906125d0565b610c4e565b60405161033e9190612774565b60405180910390f35b34801561035357600080fd5b5061036e6004803603810190610369919061280d565b610c72565b60405161037d9392919061285c565b60405180910390f35b34801561039257600080fd5b506103ad60048036038101906103a891906125d0565b610ce6565b6040516103ba919061263e565b60405180910390f35b3480156103cf57600080fd5b506103ea60048036038101906103e59190612893565b610d22565b6040516103f79190612668565b60405180910390f35b34801561040c57600080fd5b50610415610d29565b604051610422919061263e565b60405180910390f35b34801561043757600080fd5b50610440610d4d565b60405161044d9190612578565b60405180910390f35b34801561046257600080fd5b5061047d600480360381019061047891906128ec565b610ddb565b005b34801561048b57600080fd5b506104a660048036038101906104a1919061292c565b61107d565b6040516104b39190612774565b60405180910390f35b3480156104c857600080fd5b506104d16111df565b6040516104de9190612774565b60405180910390f35b3480156104f357600080fd5b5061050e600480360381019061050991906128ec565b6111e5565b60405161051b91906124cd565b60405180910390f35b61053e60048036038101906105399190612aa1565b6112c2565b005b34801561054c57600080fd5b50610567600480360381019061056291906125d0565b611399565b6040516105749190612578565b60405180910390f35b34801561058957600080fd5b506105a4600480360381019061059f9190612738565b611449565b6040516105b19190612578565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc9190612b5e565b611a64565b6040516105ee9190612774565b60405180910390f35b34801561060357600080fd5b5061061e60048036038101906106199190612bb1565b611c17565b60405161062b91906124cd565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190612bf1565b611caf565b6040516106689190612774565b60405180910390f35b34801561067d57600080fd5b5061069860048036038101906106939190612738565b611db4565b6040516106a59190612774565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610702576001905061084f565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610754576001905061084f565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a6576001905061084f565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f8576001905061084f565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361084a576001905061084f565b600090505b919050565b6006805461086190612c87565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90612c87565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b606061093784848484611e60565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60606109be84848484611e60565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7a57600080fd5b610a826123e6565b600260008681526020019081526020016000208054905091506000821115610aff57600060026000878152602001908152602001600020600081548110610acc57610acb612cb8565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610afe57600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610c2457600160086000828254610c189190612d16565b92505081905550610c46565b8365ffffffffffff1660086000828254610c3e9190612d16565b925050819055505b505092915050565b60018181548110610c5e57600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610c8e57600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610d5a90612c87565b80601f0160208091040260200160405190810160405280929190818152602001828054610d8690612c87565b8015610dd35780601f10610da857610100808354040283529160200191610dd3565b820191906000526020600020905b815481529060010190602001808311610db657829003601f168201915b505050505081565b8015610efc57600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e7957600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611014565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f9457600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161107191906124cd565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146110db57600080fd5b60016002600086815260200190815260200160002080549050146110fe57600080fd5b60006002600086815260200190815260200160002060008154811061112657611125612cb8565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461115857600080fd5b600060010260036000868152602001908152602001600020541461117b57600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461124057600080fd5b600060149054906101000a900460ff161561125a57600080fd5b811561127c576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555092915050565b6112ce84848484611e60565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161138b9190612774565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016113f59190612774565b602060405180830381865afa158015611412573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114369190612d5f565b905061144181611449565b915050919050565b606080600080604767ffffffffffffffff81111561146a57611469612976565b5b6040519080825280601f01601f19166020018201604052801561149c5781602001600182028036833780820191505090505b5092507f7300000000000000000000000000000000000000000000000000000000000000836000815181106114d4576114d3612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061153857611537612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061159c5761159b612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f320000000000000000000000000000000000000000000000000000000000000083600381518110611600576115ff612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061166457611663612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3600000000000000000000000000000000000000000000000000000000000000836005815181106116c8576116c7612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a000000000000000000000000000000000000000000000000000000000000008360068151811061172c5761172b612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611a5857600460f087836020811061178257611781612cb8565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff16101561185a576030836117f19190612d99565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061182657611825612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506118cc565b6057836118679190612d99565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061189c5761189b612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106118e1576118e0612cb8565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff1610156119b8576030836119439190612d99565b7f010000000000000000000000000000000000000000000000000000000000000002846001846119739190612d16565b8151811061198457611983612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611a36565b6057836119c59190612d99565b7f010000000000000000000000000000000000000000000000000000000000000002846001846119f59190612d16565b81518110611a0657611a05612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611a439190612d16565b91508080611a5090612dce565b915050611762565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611a9057611a8f612cb8565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611ab857600080fd5b60008361ffff16148015611aea575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611b495760018160000160068282829054906101000a900465ffffffffffff16611b159190612e16565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611b41858561107d565b915050611c10565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611ba157600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611be957600080fd5b611c0c8585858460000160069054906101000a900465ffffffffffff16856120ca565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611cdb57611cda612cb8565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d3f57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611d6a57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611d9c57600080fd5b611da986868686856120ca565b915050949350505050565b60008060036000848152602001908152602001600020549050611dd6816122f1565b611ddf57600080fd5b611de881612323565b15611df65782915050611e5b565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611eb79190612668565b602060405180830381865afa158015611ed4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef89190612e65565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611f3257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612066573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061205c57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61206557600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506120c38385612355565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461215d57600080fd5b84600001600c9054906101000a900460ff166121bf578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16146121be57600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff166122409190612e16565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516122da9190612668565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361238557600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6124628161242d565b811461246d57600080fd5b50565b60008135905061247f81612459565b92915050565b60006020828403121561249b5761249a612423565b5b60006124a984828501612470565b91505092915050565b60008115159050919050565b6124c7816124b2565b82525050565b60006020820190506124e260008301846124be565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612522578082015181840152602081019050612507565b60008484015250505050565b6000601f19601f8301169050919050565b600061254a826124e8565b61255481856124f3565b9350612564818560208601612504565b61256d8161252e565b840191505092915050565b60006020820190508181036000830152612592818461253f565b905092915050565b6000819050919050565b6125ad8161259a565b81146125b857600080fd5b50565b6000813590506125ca816125a4565b92915050565b6000602082840312156125e6576125e5612423565b5b60006125f4848285016125bb565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612628826125fd565b9050919050565b6126388161261d565b82525050565b6000602082019050612653600083018461262f565b92915050565b6126628161259a565b82525050565b600060208201905061267d6000830184612659565b92915050565b61268c8161261d565b811461269757600080fd5b50565b6000813590506126a981612683565b92915050565b6000806000606084860312156126c8576126c7612423565b5b60006126d68682870161269a565b93505060206126e78682870161269a565b92505060406126f8868287016125bb565b9150509250925092565b6000819050919050565b61271581612702565b811461272057600080fd5b50565b6000813590506127328161270c565b92915050565b60006020828403121561274e5761274d612423565b5b600061275c84828501612723565b91505092915050565b61276e81612702565b82525050565b60006020820190506127896000830184612765565b92915050565b600065ffffffffffff82169050919050565b6127aa8161278f565b81146127b557600080fd5b50565b6000813590506127c7816127a1565b92915050565b600080604083850312156127e4576127e3612423565b5b60006127f285828601612723565b9250506020612803858286016127b8565b9150509250929050565b6000806040838503121561282457612823612423565b5b600061283285828601612723565b9250506020612843858286016125bb565b9150509250929050565b6128568161278f565b82525050565b6000606082019050612871600083018661284d565b61287e602083018561284d565b61288b60408301846124be565b949350505050565b6000602082840312156128a9576128a8612423565b5b60006128b78482850161269a565b91505092915050565b6128c9816124b2565b81146128d457600080fd5b50565b6000813590506128e6816128c0565b92915050565b6000806040838503121561290357612902612423565b5b60006129118582860161269a565b9250506020612922858286016128d7565b9150509250929050565b6000806040838503121561294357612942612423565b5b60006129518582860161269a565b925050602061296285828601612723565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6129ae8261252e565b810181811067ffffffffffffffff821117156129cd576129cc612976565b5b80604052505050565b60006129e0612419565b90506129ec82826129a5565b919050565b600067ffffffffffffffff821115612a0c57612a0b612976565b5b612a158261252e565b9050602081019050919050565b82818337600083830152505050565b6000612a44612a3f846129f1565b6129d6565b905082815260208101848484011115612a6057612a5f612971565b5b612a6b848285612a22565b509392505050565b600082601f830112612a8857612a8761296c565b5b8135612a98848260208601612a31565b91505092915050565b60008060008060808587031215612abb57612aba612423565b5b6000612ac98782880161269a565b9450506020612ada8782880161269a565b9350506040612aeb878288016125bb565b925050606085013567ffffffffffffffff811115612b0c57612b0b612428565b5b612b1887828801612a73565b91505092959194509250565b600061ffff82169050919050565b612b3b81612b24565b8114612b4657600080fd5b50565b600081359050612b5881612b32565b92915050565b600080600060608486031215612b7757612b76612423565b5b6000612b858682870161269a565b9350506020612b9686828701612723565b9250506040612ba786828701612b49565b9150509250925092565b60008060408385031215612bc857612bc7612423565b5b6000612bd68582860161269a565b9250506020612be78582860161269a565b9150509250929050565b60008060008060808587031215612c0b57612c0a612423565b5b6000612c198782880161269a565b9450506020612c2a87828801612723565b9350506040612c3b87828801612b49565b9250506060612c4c878288016127b8565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612c9f57607f821691505b602082108103612cb257612cb1612c58565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612d218261259a565b9150612d2c8361259a565b9250828201905080821115612d4457612d43612ce7565b5b92915050565b600081519050612d598161270c565b92915050565b600060208284031215612d7557612d74612423565b5b6000612d8384828501612d4a565b91505092915050565b600060ff82169050919050565b6000612da482612d8c565b9150612daf83612d8c565b9250828201905060ff811115612dc857612dc7612ce7565b5b92915050565b6000612dd98261259a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612e0b57612e0a612ce7565b5b600182019050919050565b6000612e218261278f565b9150612e2c8361278f565b9250828201905065ffffffffffff811115612e4a57612e49612ce7565b5b92915050565b600081519050612e5f81612683565b92915050565b600060208284031215612e7b57612e7a612423565b5b6000612e8984828501612e50565b9150509291505056fea2646970667358221220c5b23cab869d4e037c83c77206702df56e1fe8ddb4d03e7479348923baf58bc264736f6c63430008110033 +\ No newline at end of file diff --git a/python/craft_nft/data/CraftNFT.json b/python/craft_nft/data/CraftNFT.json @@ -1 +1 @@ -[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"bytes32","name":"_declaration","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"TransferWithData","type":"event"},{"inputs":[{"internalType":"bytes32","name":"content","type":"bytes32"},{"internalType":"uint48","name":"count","type":"uint48"}],"name":"allocate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"declaration","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_truncatedId","type":"bytes32"}],"name":"getDigest","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint16","name":"_batch","type":"uint16"},{"internalType":"uint48","name":"_index","type":"uint48"}],"name":"mintExactFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint16","name":"_batch","type":"uint16"}],"name":"mintFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"}],"name":"mintTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"mintedToken","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"toURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"token","outputs":[{"internalType":"uint48","name":"count","type":"uint48"},{"internalType":"uint48","name":"cursor","type":"uint48"},{"internalType":"bool","name":"sparse","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"}] +[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"bytes32","name":"_declaration","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"TransferWithData","type":"event"},{"inputs":[{"internalType":"bytes32","name":"content","type":"bytes32"},{"internalType":"uint48","name":"count","type":"uint48"}],"name":"allocate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"declaration","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_truncatedId","type":"bytes32"}],"name":"getDigest","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint16","name":"_batch","type":"uint16"},{"internalType":"uint48","name":"_index","type":"uint48"}],"name":"mintExactFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"},{"internalType":"uint16","name":"_batch","type":"uint16"}],"name":"mintFromBatchTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bytes32","name":"_content","type":"bytes32"}],"name":"mintTo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"mintedToken","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"toURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"token","outputs":[{"internalType":"uint48","name":"count","type":"uint48"},{"internalType":"uint48","name":"cursor","type":"uint48"},{"internalType":"bool","name":"sparse","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"},{"internalType":"bool","name":"_final","type":"bool"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] diff --git a/python/craft_nft/nft.py b/python/craft_nft/nft.py @@ -39,9 +39,10 @@ def to_batch_key(token_id, batch, index): class TokenSpec: - def __init__(self, count, cursor): + def __init__(self, count, cursor, sparse): self.count = count self.cursor = cursor + self.sparse = sparse def __str__(self): @@ -269,10 +270,12 @@ class CraftNFT(ERC721): d = ABIContractDecoder() d.typ(ABIContractType.UINT48) d.typ(ABIContractType.UINT48) + d.typ(ABIContractType.BOOLEAN) d.val(v[:64]) d.val(v[64:128]) + d.val(v[128:192]) r = d.decode() - return TokenSpec(r[0], r[1]) + return TokenSpec(r[0], r[1], r[2]) @classmethod def parse_token(self, v, token_id): diff --git a/python/craft_nft/runnable/dump.py b/python/craft_nft/runnable/dump.py @@ -90,9 +90,18 @@ def render_token_batches(c, conn, token_address, token_id, w=sys.stdout): break spec = c.parse_token_spec(r) - for j in range(spec.cursor): - token_id_indexed = to_batch_key(token_id, i, j) - render_token_mint(c, conn, token_address, token_id_indexed, w=w) + if spec.sparse: + logg.info('sparse token issuance detected. Will iterate through {} tokens, may take a while'.format(spec.count)) + for j in range(spec.count): + token_id_indexed = to_batch_key(token_id, i, j) + try: + render_token_mint(c, conn, token_address, token_id_indexed, w=w) + except: + pass + else: + for j in range(spec.cursor): + token_id_indexed = to_batch_key(token_id, i, j) + render_token_mint(c, conn, token_address, token_id_indexed, w=w) i += 1 diff --git a/solidity/CraftNFT.sol b/solidity/CraftNFT.sol @@ -75,7 +75,7 @@ contract CraftNFT { // // If _final is true, future ownership transfers will not be permitted. function transferOwnership(address _newOwner, bool _final) public returns(bool) { - require(msg.sender, owner); + require(msg.sender == owner); require(!ownerFinal); if (_final) { ownerFinal = true;