commit eb3abcbf7e0af66e014bc04d4c36c7a499bd3d32
parent b61382d39c6a178ab832a929a48557b0cb23aa66
Author: lash <dev@holbrook.no>
Date: Wed, 21 Dec 2022 20:04:14 +0000
Add token id option to dump, fix page reload bug in js ui mint
Diffstat:
13 files changed, 76 insertions(+), 45 deletions(-)
diff --git a/js/ISSUES b/js/ISSUES
@@ -1,3 +1 @@
-- 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.
+- The example application does not properly handle 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 @@
-60806040523480156200001157600080fd5b506040516200352338038062003523833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b612ec8806200065b6000396000f3fe608060405260043610610183576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100ee578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f146105ba578063e985e9c5146105f7578063f117e17314610634578063f9613ab21461067157610183565b8063b88d4fde14610524578063c87b56dd14610540578063c9796c391461057d57610183565b80638da5cb5b1461040057806395d89b411461042b578063a22cb46514610456578063adf288df1461047f578063b1a6afd3146104bc578063b242e534146104e757610183565b806342842e0e1161014057806342842e0e146102b15780634d03546a146102cd5780634f64b2be1461030a578063559f5dc9146103475780636352211e1461038657806370a08231146103c357610183565b806301ffc9a71461018857806306fdde03146101c5578063081812fc146101f057806318160ddd1461022d57806323b872dd1461025857806324e0febc14610274575b600080fd5b34801561019457600080fd5b506101af60048036038101906101aa9190612485565b6106ae565b6040516101bc91906124cd565b60405180910390f35b3480156101d157600080fd5b506101da610854565b6040516101e79190612578565b60405180910390f35b3480156101fc57600080fd5b50610217600480360381019061021291906125d0565b6108e2565b604051610224919061263e565b60405180910390f35b34801561023957600080fd5b5061024261091f565b60405161024f9190612668565b60405180910390f35b610272600480360381019061026d91906126af565b610929565b005b34801561028057600080fd5b5061029b60048036038101906102969190612738565b610998565b6040516102a89190612774565b60405180910390f35b6102cb60048036038101906102c691906126af565b6109b0565b005b3480156102d957600080fd5b506102f460048036038101906102ef91906127cd565b610a1f565b60405161030191906124cd565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c91906125d0565b610c4e565b60405161033e9190612774565b60405180910390f35b34801561035357600080fd5b5061036e6004803603810190610369919061280d565b610c72565b60405161037d9392919061285c565b60405180910390f35b34801561039257600080fd5b506103ad60048036038101906103a891906125d0565b610ce6565b6040516103ba919061263e565b60405180910390f35b3480156103cf57600080fd5b506103ea60048036038101906103e59190612893565b610d22565b6040516103f79190612668565b60405180910390f35b34801561040c57600080fd5b50610415610d29565b604051610422919061263e565b60405180910390f35b34801561043757600080fd5b50610440610d4d565b60405161044d9190612578565b60405180910390f35b34801561046257600080fd5b5061047d600480360381019061047891906128ec565b610ddb565b005b34801561048b57600080fd5b506104a660048036038101906104a1919061292c565b61107d565b6040516104b39190612774565b60405180910390f35b3480156104c857600080fd5b506104d16111df565b6040516104de9190612774565b60405180910390f35b3480156104f357600080fd5b5061050e600480360381019061050991906128ec565b6111e5565b60405161051b91906124cd565b60405180910390f35b61053e60048036038101906105399190612aa1565b6112c2565b005b34801561054c57600080fd5b50610567600480360381019061056291906125d0565b611399565b6040516105749190612578565b60405180910390f35b34801561058957600080fd5b506105a4600480360381019061059f9190612738565b611449565b6040516105b19190612578565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc9190612b5e565b611a64565b6040516105ee9190612774565b60405180910390f35b34801561060357600080fd5b5061061e60048036038101906106199190612bb1565b611c17565b60405161062b91906124cd565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190612bf1565b611caf565b6040516106689190612774565b60405180910390f35b34801561067d57600080fd5b5061069860048036038101906106939190612738565b611db4565b6040516106a59190612774565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610702576001905061084f565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610754576001905061084f565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a6576001905061084f565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f8576001905061084f565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361084a576001905061084f565b600090505b919050565b6006805461086190612c87565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90612c87565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b606061093784848484611e60565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60606109be84848484611e60565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7a57600080fd5b610a826123e6565b600260008681526020019081526020016000208054905091506000821115610aff57600060026000878152602001908152602001600020600081548110610acc57610acb612cb8565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610afe57600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610c2457600160086000828254610c189190612d16565b92505081905550610c46565b8365ffffffffffff1660086000828254610c3e9190612d16565b925050819055505b505092915050565b60018181548110610c5e57600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610c8e57600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610d5a90612c87565b80601f0160208091040260200160405190810160405280929190818152602001828054610d8690612c87565b8015610dd35780601f10610da857610100808354040283529160200191610dd3565b820191906000526020600020905b815481529060010190602001808311610db657829003601f168201915b505050505081565b8015610efc57600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e7957600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611014565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f9457600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161107191906124cd565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146110db57600080fd5b60016002600086815260200190815260200160002080549050146110fe57600080fd5b60006002600086815260200190815260200160002060008154811061112657611125612cb8565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461115857600080fd5b600060010260036000868152602001908152602001600020541461117b57600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461124057600080fd5b600060149054906101000a900460ff161561125a57600080fd5b811561127c576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555092915050565b6112ce84848484611e60565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161138b9190612774565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016113f59190612774565b602060405180830381865afa158015611412573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114369190612d5f565b905061144181611449565b915050919050565b606080600080604767ffffffffffffffff81111561146a57611469612976565b5b6040519080825280601f01601f19166020018201604052801561149c5781602001600182028036833780820191505090505b5092507f7300000000000000000000000000000000000000000000000000000000000000836000815181106114d4576114d3612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061153857611537612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061159c5761159b612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f320000000000000000000000000000000000000000000000000000000000000083600381518110611600576115ff612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061166457611663612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3600000000000000000000000000000000000000000000000000000000000000836005815181106116c8576116c7612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a000000000000000000000000000000000000000000000000000000000000008360068151811061172c5761172b612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611a5857600460f087836020811061178257611781612cb8565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff16101561185a576030836117f19190612d99565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061182657611825612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506118cc565b6057836118679190612d99565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061189c5761189b612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106118e1576118e0612cb8565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff1610156119b8576030836119439190612d99565b7f010000000000000000000000000000000000000000000000000000000000000002846001846119739190612d16565b8151811061198457611983612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611a36565b6057836119c59190612d99565b7f010000000000000000000000000000000000000000000000000000000000000002846001846119f59190612d16565b81518110611a0657611a05612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611a439190612d16565b91508080611a5090612dce565b915050611762565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611a9057611a8f612cb8565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611ab857600080fd5b60008361ffff16148015611aea575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611b495760018160000160068282829054906101000a900465ffffffffffff16611b159190612e16565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611b41858561107d565b915050611c10565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611ba157600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611be957600080fd5b611c0c8585858460000160069054906101000a900465ffffffffffff16856120ca565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611cdb57611cda612cb8565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d3f57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611d6a57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611d9c57600080fd5b611da986868686856120ca565b915050949350505050565b60008060036000848152602001908152602001600020549050611dd6816122f1565b611ddf57600080fd5b611de881612323565b15611df65782915050611e5b565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611eb79190612668565b602060405180830381865afa158015611ed4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef89190612e65565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611f3257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612066573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061205c57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61206557600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506120c38385612355565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461215d57600080fd5b84600001600c9054906101000a900460ff166121bf578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16146121be57600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff166122409190612e16565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516122da9190612668565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361238557600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6124628161242d565b811461246d57600080fd5b50565b60008135905061247f81612459565b92915050565b60006020828403121561249b5761249a612423565b5b60006124a984828501612470565b91505092915050565b60008115159050919050565b6124c7816124b2565b82525050565b60006020820190506124e260008301846124be565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612522578082015181840152602081019050612507565b60008484015250505050565b6000601f19601f8301169050919050565b600061254a826124e8565b61255481856124f3565b9350612564818560208601612504565b61256d8161252e565b840191505092915050565b60006020820190508181036000830152612592818461253f565b905092915050565b6000819050919050565b6125ad8161259a565b81146125b857600080fd5b50565b6000813590506125ca816125a4565b92915050565b6000602082840312156125e6576125e5612423565b5b60006125f4848285016125bb565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612628826125fd565b9050919050565b6126388161261d565b82525050565b6000602082019050612653600083018461262f565b92915050565b6126628161259a565b82525050565b600060208201905061267d6000830184612659565b92915050565b61268c8161261d565b811461269757600080fd5b50565b6000813590506126a981612683565b92915050565b6000806000606084860312156126c8576126c7612423565b5b60006126d68682870161269a565b93505060206126e78682870161269a565b92505060406126f8868287016125bb565b9150509250925092565b6000819050919050565b61271581612702565b811461272057600080fd5b50565b6000813590506127328161270c565b92915050565b60006020828403121561274e5761274d612423565b5b600061275c84828501612723565b91505092915050565b61276e81612702565b82525050565b60006020820190506127896000830184612765565b92915050565b600065ffffffffffff82169050919050565b6127aa8161278f565b81146127b557600080fd5b50565b6000813590506127c7816127a1565b92915050565b600080604083850312156127e4576127e3612423565b5b60006127f285828601612723565b9250506020612803858286016127b8565b9150509250929050565b6000806040838503121561282457612823612423565b5b600061283285828601612723565b9250506020612843858286016125bb565b9150509250929050565b6128568161278f565b82525050565b6000606082019050612871600083018661284d565b61287e602083018561284d565b61288b60408301846124be565b949350505050565b6000602082840312156128a9576128a8612423565b5b60006128b78482850161269a565b91505092915050565b6128c9816124b2565b81146128d457600080fd5b50565b6000813590506128e6816128c0565b92915050565b6000806040838503121561290357612902612423565b5b60006129118582860161269a565b9250506020612922858286016128d7565b9150509250929050565b6000806040838503121561294357612942612423565b5b60006129518582860161269a565b925050602061296285828601612723565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6129ae8261252e565b810181811067ffffffffffffffff821117156129cd576129cc612976565b5b80604052505050565b60006129e0612419565b90506129ec82826129a5565b919050565b600067ffffffffffffffff821115612a0c57612a0b612976565b5b612a158261252e565b9050602081019050919050565b82818337600083830152505050565b6000612a44612a3f846129f1565b6129d6565b905082815260208101848484011115612a6057612a5f612971565b5b612a6b848285612a22565b509392505050565b600082601f830112612a8857612a8761296c565b5b8135612a98848260208601612a31565b91505092915050565b60008060008060808587031215612abb57612aba612423565b5b6000612ac98782880161269a565b9450506020612ada8782880161269a565b9350506040612aeb878288016125bb565b925050606085013567ffffffffffffffff811115612b0c57612b0b612428565b5b612b1887828801612a73565b91505092959194509250565b600061ffff82169050919050565b612b3b81612b24565b8114612b4657600080fd5b50565b600081359050612b5881612b32565b92915050565b600080600060608486031215612b7757612b76612423565b5b6000612b858682870161269a565b9350506020612b9686828701612723565b9250506040612ba786828701612b49565b9150509250925092565b60008060408385031215612bc857612bc7612423565b5b6000612bd68582860161269a565b9250506020612be78582860161269a565b9150509250929050565b60008060008060808587031215612c0b57612c0a612423565b5b6000612c198782880161269a565b9450506020612c2a87828801612723565b9350506040612c3b87828801612b49565b9250506060612c4c878288016127b8565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612c9f57607f821691505b602082108103612cb257612cb1612c58565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612d218261259a565b9150612d2c8361259a565b9250828201905080821115612d4457612d43612ce7565b5b92915050565b600081519050612d598161270c565b92915050565b600060208284031215612d7557612d74612423565b5b6000612d8384828501612d4a565b91505092915050565b600060ff82169050919050565b6000612da482612d8c565b9150612daf83612d8c565b9250828201905060ff811115612dc857612dc7612ce7565b5b92915050565b6000612dd98261259a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612e0b57612e0a612ce7565b5b600182019050919050565b6000612e218261278f565b9150612e2c8361278f565b9250828201905065ffffffffffff811115612e4a57612e49612ce7565b5b92915050565b600081519050612e5f81612683565b92915050565b600060208284031215612e7b57612e7a612423565b5b6000612e8984828501612e50565b9150509291505056fea2646970667358221220c5b23cab869d4e037c83c77206702df56e1fe8ddb4d03e7479348923baf58bc264736f6c63430008110033
-\ No newline at end of file
+60806040523480156200001157600080fd5b50604051620035e3380380620035e3833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b612f88806200065b6000396000f3fe608060405260043610610183576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100ee578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f146105ba578063e985e9c5146105f7578063f117e17314610634578063f9613ab21461067157610183565b8063b88d4fde14610524578063c87b56dd14610540578063c9796c391461057d57610183565b80638da5cb5b1461040057806395d89b411461042b578063a22cb46514610456578063adf288df1461047f578063b1a6afd3146104bc578063b242e534146104e757610183565b806342842e0e1161014057806342842e0e146102b15780634d03546a146102cd5780634f64b2be1461030a578063559f5dc9146103475780636352211e1461038657806370a08231146103c357610183565b806301ffc9a71461018857806306fdde03146101c5578063081812fc146101f057806318160ddd1461022d57806323b872dd1461025857806324e0febc14610274575b600080fd5b34801561019457600080fd5b506101af60048036038101906101aa9190612545565b6106ae565b6040516101bc919061258d565b60405180910390f35b3480156101d157600080fd5b506101da610854565b6040516101e79190612638565b60405180910390f35b3480156101fc57600080fd5b5061021760048036038101906102129190612690565b6108e2565b60405161022491906126fe565b60405180910390f35b34801561023957600080fd5b5061024261091f565b60405161024f9190612728565b60405180910390f35b610272600480360381019061026d919061276f565b610929565b005b34801561028057600080fd5b5061029b600480360381019061029691906127f8565b610998565b6040516102a89190612834565b60405180910390f35b6102cb60048036038101906102c6919061276f565b6109b0565b005b3480156102d957600080fd5b506102f460048036038101906102ef919061288d565b610a1f565b604051610301919061258d565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c9190612690565b610ca5565b60405161033e9190612834565b60405180910390f35b34801561035357600080fd5b5061036e600480360381019061036991906128cd565b610cc9565b60405161037d9392919061291c565b60405180910390f35b34801561039257600080fd5b506103ad60048036038101906103a89190612690565b610d3d565b6040516103ba91906126fe565b60405180910390f35b3480156103cf57600080fd5b506103ea60048036038101906103e59190612953565b610d79565b6040516103f79190612728565b60405180910390f35b34801561040c57600080fd5b50610415610d80565b60405161042291906126fe565b60405180910390f35b34801561043757600080fd5b50610440610da4565b60405161044d9190612638565b60405180910390f35b34801561046257600080fd5b5061047d600480360381019061047891906129ac565b610e32565b005b34801561048b57600080fd5b506104a660048036038101906104a191906129ec565b6110d4565b6040516104b39190612834565b60405180910390f35b3480156104c857600080fd5b506104d161129f565b6040516104de9190612834565b60405180910390f35b3480156104f357600080fd5b5061050e600480360381019061050991906129ac565b6112a5565b60405161051b919061258d565b60405180910390f35b61053e60048036038101906105399190612b61565b611382565b005b34801561054c57600080fd5b5061056760048036038101906105629190612690565b611459565b6040516105749190612638565b60405180910390f35b34801561058957600080fd5b506105a4600480360381019061059f91906127f8565b611509565b6040516105b19190612638565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc9190612c1e565b611b24565b6040516105ee9190612834565b60405180910390f35b34801561060357600080fd5b5061061e60048036038101906106199190612c71565b611cd7565b60405161062b919061258d565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190612cb1565b611d6f565b6040516106689190612834565b60405180910390f35b34801561067d57600080fd5b50610698600480360381019061069391906127f8565b611e74565b6040516106a59190612834565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610702576001905061084f565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610754576001905061084f565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a6576001905061084f565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f8576001905061084f565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361084a576001905061084f565b600090505b919050565b6006805461086190612d47565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90612d47565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b606061093784848484611f20565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60606109be84848484611f20565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7a57600080fd5b610a826124a6565b600260008681526020019081526020016000208054905091506000821115610aff57600060026000878152602001908152602001600020600081548110610acc57610acb612d78565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610afe57600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610c2457600160086000828254610c189190612dd6565b92505081905550610c46565b8365ffffffffffff1660086000828254610c3e9190612dd6565b925050819055505b8365ffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fb85ba54b9f6f8241b7e1499e3cfc186ac0b1c8b7100f599bf6ca6844f896c34287604051610c959190612834565b60405180910390a3505092915050565b60018181548110610cb557600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610ce557600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610db190612d47565b80601f0160208091040260200160405190810160405280929190818152602001828054610ddd90612d47565b8015610e2a5780601f10610dff57610100808354040283529160200191610e2a565b820191906000526020600020905b815481529060010190602001808311610e0d57829003601f168201915b505050505081565b8015610f5357600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ed057600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061106b565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610feb57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516110c8919061258d565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461113257600080fd5b600160026000868152602001908152602001600020805490501461115557600080fd5b60006002600086815260200190815260200160002060008154811061117d5761117c612d78565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146111af57600080fd5b60006001026003600086815260200190815260200160002054146111d257600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc000000000000000000000000000000000000000000000000000000000000000821791508160010260036000868152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8866001900460405161128c9190612728565b60405180910390a3839250505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461130057600080fd5b600060149054906101000a900460ff161561131a57600080fd5b811561133c576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555092915050565b61138e84848484611f20565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161144b9190612834565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016114b59190612834565b602060405180830381865afa1580156114d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f69190612e1f565b905061150181611509565b915050919050565b606080600080604767ffffffffffffffff81111561152a57611529612a36565b5b6040519080825280601f01601f19166020018201604052801561155c5781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061159457611593612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6800000000000000000000000000000000000000000000000000000000000000836001815181106115f8576115f7612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061165c5761165b612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3200000000000000000000000000000000000000000000000000000000000000836003815181106116c0576116bf612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061172457611723612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061178857611787612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a00000000000000000000000000000000000000000000000000000000000000836006815181106117ec576117eb612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611b1857600460f087836020811061184257611841612d78565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff16101561191a576030836118b19190612e59565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106118e6576118e5612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061198c565b6057836119279190612e59565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061195c5761195b612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106119a1576119a0612d78565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611a7857603083611a039190612e59565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611a339190612dd6565b81518110611a4457611a43612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611af6565b605783611a859190612e59565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611ab59190612dd6565b81518110611ac657611ac5612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611b039190612dd6565b91508080611b1090612e8e565b915050611822565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611b5057611b4f612d78565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611b7857600080fd5b60008361ffff16148015611baa575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611c095760018160000160068282829054906101000a900465ffffffffffff16611bd59190612ed6565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611c0185856110d4565b915050611cd0565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c6157600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611ca957600080fd5b611ccc8585858460000160069054906101000a900465ffffffffffff168561218a565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611d9b57611d9a612d78565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611dff57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611e2a57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611e5c57600080fd5b611e69868686868561218a565b915050949350505050565b60008060036000848152602001908152602001600020549050611e96816123b1565b611e9f57600080fd5b611ea8816123e3565b15611eb65782915050611f1b565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611f779190612728565b602060405180830381865afa158015611f94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb89190612f25565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611ff257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612126573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061211c57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61212557600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506121838385612415565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461221d57600080fd5b84600001600c9054906101000a900460ff1661227f578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff161461227e57600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff166123009190612ed6565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161239a9190612728565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361244557600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612522816124ed565b811461252d57600080fd5b50565b60008135905061253f81612519565b92915050565b60006020828403121561255b5761255a6124e3565b5b600061256984828501612530565b91505092915050565b60008115159050919050565b61258781612572565b82525050565b60006020820190506125a2600083018461257e565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156125e25780820151818401526020810190506125c7565b60008484015250505050565b6000601f19601f8301169050919050565b600061260a826125a8565b61261481856125b3565b93506126248185602086016125c4565b61262d816125ee565b840191505092915050565b6000602082019050818103600083015261265281846125ff565b905092915050565b6000819050919050565b61266d8161265a565b811461267857600080fd5b50565b60008135905061268a81612664565b92915050565b6000602082840312156126a6576126a56124e3565b5b60006126b48482850161267b565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006126e8826126bd565b9050919050565b6126f8816126dd565b82525050565b600060208201905061271360008301846126ef565b92915050565b6127228161265a565b82525050565b600060208201905061273d6000830184612719565b92915050565b61274c816126dd565b811461275757600080fd5b50565b60008135905061276981612743565b92915050565b600080600060608486031215612788576127876124e3565b5b60006127968682870161275a565b93505060206127a78682870161275a565b92505060406127b88682870161267b565b9150509250925092565b6000819050919050565b6127d5816127c2565b81146127e057600080fd5b50565b6000813590506127f2816127cc565b92915050565b60006020828403121561280e5761280d6124e3565b5b600061281c848285016127e3565b91505092915050565b61282e816127c2565b82525050565b60006020820190506128496000830184612825565b92915050565b600065ffffffffffff82169050919050565b61286a8161284f565b811461287557600080fd5b50565b60008135905061288781612861565b92915050565b600080604083850312156128a4576128a36124e3565b5b60006128b2858286016127e3565b92505060206128c385828601612878565b9150509250929050565b600080604083850312156128e4576128e36124e3565b5b60006128f2858286016127e3565b92505060206129038582860161267b565b9150509250929050565b6129168161284f565b82525050565b6000606082019050612931600083018661290d565b61293e602083018561290d565b61294b604083018461257e565b949350505050565b600060208284031215612969576129686124e3565b5b60006129778482850161275a565b91505092915050565b61298981612572565b811461299457600080fd5b50565b6000813590506129a681612980565b92915050565b600080604083850312156129c3576129c26124e3565b5b60006129d18582860161275a565b92505060206129e285828601612997565b9150509250929050565b60008060408385031215612a0357612a026124e3565b5b6000612a118582860161275a565b9250506020612a22858286016127e3565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612a6e826125ee565b810181811067ffffffffffffffff82111715612a8d57612a8c612a36565b5b80604052505050565b6000612aa06124d9565b9050612aac8282612a65565b919050565b600067ffffffffffffffff821115612acc57612acb612a36565b5b612ad5826125ee565b9050602081019050919050565b82818337600083830152505050565b6000612b04612aff84612ab1565b612a96565b905082815260208101848484011115612b2057612b1f612a31565b5b612b2b848285612ae2565b509392505050565b600082601f830112612b4857612b47612a2c565b5b8135612b58848260208601612af1565b91505092915050565b60008060008060808587031215612b7b57612b7a6124e3565b5b6000612b898782880161275a565b9450506020612b9a8782880161275a565b9350506040612bab8782880161267b565b925050606085013567ffffffffffffffff811115612bcc57612bcb6124e8565b5b612bd887828801612b33565b91505092959194509250565b600061ffff82169050919050565b612bfb81612be4565b8114612c0657600080fd5b50565b600081359050612c1881612bf2565b92915050565b600080600060608486031215612c3757612c366124e3565b5b6000612c458682870161275a565b9350506020612c56868287016127e3565b9250506040612c6786828701612c09565b9150509250925092565b60008060408385031215612c8857612c876124e3565b5b6000612c968582860161275a565b9250506020612ca78582860161275a565b9150509250929050565b60008060008060808587031215612ccb57612cca6124e3565b5b6000612cd98782880161275a565b9450506020612cea878288016127e3565b9350506040612cfb87828801612c09565b9250506060612d0c87828801612878565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612d5f57607f821691505b602082108103612d7257612d71612d18565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612de18261265a565b9150612dec8361265a565b9250828201905080821115612e0457612e03612da7565b5b92915050565b600081519050612e19816127cc565b92915050565b600060208284031215612e3557612e346124e3565b5b6000612e4384828501612e0a565b91505092915050565b600060ff82169050919050565b6000612e6482612e4c565b9150612e6f83612e4c565b9250828201905060ff811115612e8857612e87612da7565b5b92915050565b6000612e998261265a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612ecb57612eca612da7565b5b600182019050919050565b6000612ee18261284f565b9150612eec8361284f565b9250828201905065ffffffffffff811115612f0a57612f09612da7565b5b92915050565b600081519050612f1f81612743565b92915050565b600060208284031215612f3b57612f3a6124e3565b5b6000612f4984828501612f10565b9150509291505056fea264697066735822122039548f2e189dd59057eeed2670a3d8e45fe27e25c8bfe6d0099cbe13589ccc6764736f6c63430008110033
+\ 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":"address","name":"_newOwner","type":"address"},{"internalType":"bool","name":"_final","type":"bool"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","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":"_minter","type":"address"},{"indexed":true,"internalType":"uint48","name":"_count","type":"uint48"},{"indexed":false,"internalType":"bytes32","name":"_tokenId","type":"bytes32"}],"name":"Allocate","type":"event"},{"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
@@ -52,11 +52,11 @@ label:after {
<form id="panel" action="#" onSubmit="return false;">
<input type="text" id="panel_title" name="title" />
<label for="panel_title">Title</label>
- <input type="text" id="panel_description" name="description" />
+ <textarea id="panel_description" name="description"></textarea>
<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">allocate</button>
+ <button id="panel_submit" onClick='return false;'>allocate</button>
</form>
</div>
<div id="detail">
@@ -92,7 +92,7 @@ label:after {
<input type="text" id="token_mint_index" />
<label for="token_mint_number">Number</label>
</span>
- <button id="mint_submit">mint</button>
+ <button id="mint_submit" onClick='return false;' >mint</button>
</form>
</div>
<h2>Tokens</h2>
diff --git a/js/manual_test_browser.js b/js/manual_test_browser.js
@@ -59,7 +59,6 @@ async function generateAllocation() {
name: undefined,
description: undefined,
amount: 0,
- parent_nft: undefined,
};
let amount = document.getElementById('panel_amount').value;
@@ -114,6 +113,7 @@ async function generateMint() {
let batch = document.getElementById('token_mint_batch').innerHTML;
batch = parseInt(batch, 10);
+
const recipient = document.getElementById('token_mint_recipient').value;
let index = undefined;
@@ -133,7 +133,7 @@ async function generateMint() {
composed: false,
});
window.dispatchEvent(tokenRequestEvent);
- uiViewToken(tokenId);
+ //uiViewToken(tokenId);
}
@@ -280,8 +280,14 @@ async function run(w3, generated_session) {
document.getElementById('data_name').innerHTML = session.name;
document.getElementById('data_symbol').innerHTML = session.symbol;
document.getElementById('data_supply').innerHTML = session.supply;
- document.getElementById('panel_submit').addEventListener('click', generateAllocation);
- document.getElementById('mint_submit').addEventListener('click', generateMint);
+ document.getElementById('panel_submit').addEventListener('click', () => {
+ generateAllocation();
+ return false;
+ });
+ document.getElementById('mint_submit').addEventListener('click', () => {
+ generateMint();
+ return false;
+ });
if (session.contentGateway !== undefined) {
declarationUrl = session.contentGateway.url(session.declarationHash);
diff --git a/js/src/common.js b/js/src/common.js
@@ -27,14 +27,11 @@ var session = {
window.addEventListener('load', async () => {
const provider = window.craftnft.loadProvider();
const conn = window.craftnft.loadConn(provider);
- // TODO: if provider state changes (e.g. metamask change account) we need to catch this and update the session.
- // however, none of the suggestions tried so far worked (accountsChanged on provider, update on conn.provider publicconfigstore ...
-// window.addEventListener('update', async (e) => {
-// const oldAccount = session.account;
-// const newAccount = await conn.eth.getAccounts();
-// session.account = newAccount[0];
-// console.log('account changed from ' + oldACcount + ' to ' + session.account);
-// });
+
+ provider.on('accountsChanged', function(e) {
+ console.debug('accountschanged', e);
+ });
+
let config = undefined;
let rs = await fetch('settings.json');
@@ -55,6 +52,20 @@ window.addEventListener('load', async () => {
config.abi = abi
config.bin = bin
+ // This is handler code for the Allocate event
+ // Unfortunately, at least with openethereum 3.3.3, it does not post the log object, but the block header instead.
+ let ev = conn.eth.subscribe('logs', {
+ address: config.contract,
+ topics: ['0xb85ba54b9f6f8241b7e1499e3cfc186ac0b1c8b7100f599bf6ca6844f896c342'],
+ }, (e, r) => {
+ console.debug('results of subscribe', e, r);
+ });
+
+ provider.on('message', (m) => {
+ console.debug('metamask log message for Allocate', m);
+ });
+
+
// run() is defined in the implementation file.
window.craftnft.startSession(conn, config, session, run);
});
@@ -63,7 +74,7 @@ window.addEventListener('load', async () => {
/**
* Emitted when the user requests a token allocation with the UI.
*/
-window.addEventListener('tokenRequest', async(e) => {
+window.addEventListener('tokenRequest', (e) => {
window.craftnft.allocateToken(session, e.detail.digest, e.detail.tokenData.amount);
});
@@ -71,6 +82,7 @@ window.addEventListener('tokenRequest', async(e) => {
/**
* Emitted when the user requests a token minting with the UI.
*/
-window.addEventListener('tokenMint', async(e) => {
+window.addEventListener('tokenMint', (e) => {
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
@@ -126,20 +126,16 @@ async function allocateToken(session, tokenId, amount) {
async function mintToken(session, tokenId, batch, recipient, index) {
const w3 = new Web3();
const address = await w3.utils.toChecksumAddress(recipient);
- 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);
+ if (index === undefined || isNaN(index)) {
+ session.contract.methods.mintFromBatchTo(address, '0x' + tokenId, batch).send({
+ from: session.account,
+ value: 0,
+ });
+ } else {
+ session.contract.methods.mintExactFromBatchTo(address, '0x' + tokenId, batch, index).send({
+ from: session.account,
+ value: 0,
+ });
}
}
diff --git a/python/craft_nft/data/CraftNFT.bin b/python/craft_nft/data/CraftNFT.bin
@@ -1 +1 @@
-60806040523480156200001157600080fd5b506040516200352338038062003523833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b612ec8806200065b6000396000f3fe608060405260043610610183576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100ee578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f146105ba578063e985e9c5146105f7578063f117e17314610634578063f9613ab21461067157610183565b8063b88d4fde14610524578063c87b56dd14610540578063c9796c391461057d57610183565b80638da5cb5b1461040057806395d89b411461042b578063a22cb46514610456578063adf288df1461047f578063b1a6afd3146104bc578063b242e534146104e757610183565b806342842e0e1161014057806342842e0e146102b15780634d03546a146102cd5780634f64b2be1461030a578063559f5dc9146103475780636352211e1461038657806370a08231146103c357610183565b806301ffc9a71461018857806306fdde03146101c5578063081812fc146101f057806318160ddd1461022d57806323b872dd1461025857806324e0febc14610274575b600080fd5b34801561019457600080fd5b506101af60048036038101906101aa9190612485565b6106ae565b6040516101bc91906124cd565b60405180910390f35b3480156101d157600080fd5b506101da610854565b6040516101e79190612578565b60405180910390f35b3480156101fc57600080fd5b50610217600480360381019061021291906125d0565b6108e2565b604051610224919061263e565b60405180910390f35b34801561023957600080fd5b5061024261091f565b60405161024f9190612668565b60405180910390f35b610272600480360381019061026d91906126af565b610929565b005b34801561028057600080fd5b5061029b60048036038101906102969190612738565b610998565b6040516102a89190612774565b60405180910390f35b6102cb60048036038101906102c691906126af565b6109b0565b005b3480156102d957600080fd5b506102f460048036038101906102ef91906127cd565b610a1f565b60405161030191906124cd565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c91906125d0565b610c4e565b60405161033e9190612774565b60405180910390f35b34801561035357600080fd5b5061036e6004803603810190610369919061280d565b610c72565b60405161037d9392919061285c565b60405180910390f35b34801561039257600080fd5b506103ad60048036038101906103a891906125d0565b610ce6565b6040516103ba919061263e565b60405180910390f35b3480156103cf57600080fd5b506103ea60048036038101906103e59190612893565b610d22565b6040516103f79190612668565b60405180910390f35b34801561040c57600080fd5b50610415610d29565b604051610422919061263e565b60405180910390f35b34801561043757600080fd5b50610440610d4d565b60405161044d9190612578565b60405180910390f35b34801561046257600080fd5b5061047d600480360381019061047891906128ec565b610ddb565b005b34801561048b57600080fd5b506104a660048036038101906104a1919061292c565b61107d565b6040516104b39190612774565b60405180910390f35b3480156104c857600080fd5b506104d16111df565b6040516104de9190612774565b60405180910390f35b3480156104f357600080fd5b5061050e600480360381019061050991906128ec565b6111e5565b60405161051b91906124cd565b60405180910390f35b61053e60048036038101906105399190612aa1565b6112c2565b005b34801561054c57600080fd5b50610567600480360381019061056291906125d0565b611399565b6040516105749190612578565b60405180910390f35b34801561058957600080fd5b506105a4600480360381019061059f9190612738565b611449565b6040516105b19190612578565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc9190612b5e565b611a64565b6040516105ee9190612774565b60405180910390f35b34801561060357600080fd5b5061061e60048036038101906106199190612bb1565b611c17565b60405161062b91906124cd565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190612bf1565b611caf565b6040516106689190612774565b60405180910390f35b34801561067d57600080fd5b5061069860048036038101906106939190612738565b611db4565b6040516106a59190612774565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610702576001905061084f565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610754576001905061084f565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a6576001905061084f565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f8576001905061084f565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361084a576001905061084f565b600090505b919050565b6006805461086190612c87565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90612c87565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b606061093784848484611e60565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60606109be84848484611e60565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7a57600080fd5b610a826123e6565b600260008681526020019081526020016000208054905091506000821115610aff57600060026000878152602001908152602001600020600081548110610acc57610acb612cb8565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610afe57600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610c2457600160086000828254610c189190612d16565b92505081905550610c46565b8365ffffffffffff1660086000828254610c3e9190612d16565b925050819055505b505092915050565b60018181548110610c5e57600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610c8e57600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610d5a90612c87565b80601f0160208091040260200160405190810160405280929190818152602001828054610d8690612c87565b8015610dd35780601f10610da857610100808354040283529160200191610dd3565b820191906000526020600020905b815481529060010190602001808311610db657829003601f168201915b505050505081565b8015610efc57600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e7957600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611014565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f9457600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161107191906124cd565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146110db57600080fd5b60016002600086815260200190815260200160002080549050146110fe57600080fd5b60006002600086815260200190815260200160002060008154811061112657611125612cb8565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461115857600080fd5b600060010260036000868152602001908152602001600020541461117b57600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc00000000000000000000000000000000000000000000000000000000000000082179150816001026003600086815260200190815260200160002081905550839250505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461124057600080fd5b600060149054906101000a900460ff161561125a57600080fd5b811561127c576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555092915050565b6112ce84848484611e60565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161138b9190612774565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016113f59190612774565b602060405180830381865afa158015611412573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114369190612d5f565b905061144181611449565b915050919050565b606080600080604767ffffffffffffffff81111561146a57611469612976565b5b6040519080825280601f01601f19166020018201604052801561149c5781602001600182028036833780820191505090505b5092507f7300000000000000000000000000000000000000000000000000000000000000836000815181106114d4576114d3612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061153857611537612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061159c5761159b612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f320000000000000000000000000000000000000000000000000000000000000083600381518110611600576115ff612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061166457611663612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3600000000000000000000000000000000000000000000000000000000000000836005815181106116c8576116c7612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a000000000000000000000000000000000000000000000000000000000000008360068151811061172c5761172b612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611a5857600460f087836020811061178257611781612cb8565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff16101561185a576030836117f19190612d99565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061182657611825612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506118cc565b6057836118679190612d99565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061189c5761189b612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106118e1576118e0612cb8565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff1610156119b8576030836119439190612d99565b7f010000000000000000000000000000000000000000000000000000000000000002846001846119739190612d16565b8151811061198457611983612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611a36565b6057836119c59190612d99565b7f010000000000000000000000000000000000000000000000000000000000000002846001846119f59190612d16565b81518110611a0657611a05612cb8565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611a439190612d16565b91508080611a5090612dce565b915050611762565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611a9057611a8f612cb8565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611ab857600080fd5b60008361ffff16148015611aea575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611b495760018160000160068282829054906101000a900465ffffffffffff16611b159190612e16565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611b41858561107d565b915050611c10565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611ba157600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611be957600080fd5b611c0c8585858460000160069054906101000a900465ffffffffffff16856120ca565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611cdb57611cda612cb8565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d3f57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611d6a57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611d9c57600080fd5b611da986868686856120ca565b915050949350505050565b60008060036000848152602001908152602001600020549050611dd6816122f1565b611ddf57600080fd5b611de881612323565b15611df65782915050611e5b565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611eb79190612668565b602060405180830381865afa158015611ed4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef89190612e65565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611f3257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612066573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061205c57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61206557600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506120c38385612355565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461215d57600080fd5b84600001600c9054906101000a900460ff166121bf578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16146121be57600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff166122409190612e16565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516122da9190612668565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361238557600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6124628161242d565b811461246d57600080fd5b50565b60008135905061247f81612459565b92915050565b60006020828403121561249b5761249a612423565b5b60006124a984828501612470565b91505092915050565b60008115159050919050565b6124c7816124b2565b82525050565b60006020820190506124e260008301846124be565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612522578082015181840152602081019050612507565b60008484015250505050565b6000601f19601f8301169050919050565b600061254a826124e8565b61255481856124f3565b9350612564818560208601612504565b61256d8161252e565b840191505092915050565b60006020820190508181036000830152612592818461253f565b905092915050565b6000819050919050565b6125ad8161259a565b81146125b857600080fd5b50565b6000813590506125ca816125a4565b92915050565b6000602082840312156125e6576125e5612423565b5b60006125f4848285016125bb565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612628826125fd565b9050919050565b6126388161261d565b82525050565b6000602082019050612653600083018461262f565b92915050565b6126628161259a565b82525050565b600060208201905061267d6000830184612659565b92915050565b61268c8161261d565b811461269757600080fd5b50565b6000813590506126a981612683565b92915050565b6000806000606084860312156126c8576126c7612423565b5b60006126d68682870161269a565b93505060206126e78682870161269a565b92505060406126f8868287016125bb565b9150509250925092565b6000819050919050565b61271581612702565b811461272057600080fd5b50565b6000813590506127328161270c565b92915050565b60006020828403121561274e5761274d612423565b5b600061275c84828501612723565b91505092915050565b61276e81612702565b82525050565b60006020820190506127896000830184612765565b92915050565b600065ffffffffffff82169050919050565b6127aa8161278f565b81146127b557600080fd5b50565b6000813590506127c7816127a1565b92915050565b600080604083850312156127e4576127e3612423565b5b60006127f285828601612723565b9250506020612803858286016127b8565b9150509250929050565b6000806040838503121561282457612823612423565b5b600061283285828601612723565b9250506020612843858286016125bb565b9150509250929050565b6128568161278f565b82525050565b6000606082019050612871600083018661284d565b61287e602083018561284d565b61288b60408301846124be565b949350505050565b6000602082840312156128a9576128a8612423565b5b60006128b78482850161269a565b91505092915050565b6128c9816124b2565b81146128d457600080fd5b50565b6000813590506128e6816128c0565b92915050565b6000806040838503121561290357612902612423565b5b60006129118582860161269a565b9250506020612922858286016128d7565b9150509250929050565b6000806040838503121561294357612942612423565b5b60006129518582860161269a565b925050602061296285828601612723565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6129ae8261252e565b810181811067ffffffffffffffff821117156129cd576129cc612976565b5b80604052505050565b60006129e0612419565b90506129ec82826129a5565b919050565b600067ffffffffffffffff821115612a0c57612a0b612976565b5b612a158261252e565b9050602081019050919050565b82818337600083830152505050565b6000612a44612a3f846129f1565b6129d6565b905082815260208101848484011115612a6057612a5f612971565b5b612a6b848285612a22565b509392505050565b600082601f830112612a8857612a8761296c565b5b8135612a98848260208601612a31565b91505092915050565b60008060008060808587031215612abb57612aba612423565b5b6000612ac98782880161269a565b9450506020612ada8782880161269a565b9350506040612aeb878288016125bb565b925050606085013567ffffffffffffffff811115612b0c57612b0b612428565b5b612b1887828801612a73565b91505092959194509250565b600061ffff82169050919050565b612b3b81612b24565b8114612b4657600080fd5b50565b600081359050612b5881612b32565b92915050565b600080600060608486031215612b7757612b76612423565b5b6000612b858682870161269a565b9350506020612b9686828701612723565b9250506040612ba786828701612b49565b9150509250925092565b60008060408385031215612bc857612bc7612423565b5b6000612bd68582860161269a565b9250506020612be78582860161269a565b9150509250929050565b60008060008060808587031215612c0b57612c0a612423565b5b6000612c198782880161269a565b9450506020612c2a87828801612723565b9350506040612c3b87828801612b49565b9250506060612c4c878288016127b8565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612c9f57607f821691505b602082108103612cb257612cb1612c58565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612d218261259a565b9150612d2c8361259a565b9250828201905080821115612d4457612d43612ce7565b5b92915050565b600081519050612d598161270c565b92915050565b600060208284031215612d7557612d74612423565b5b6000612d8384828501612d4a565b91505092915050565b600060ff82169050919050565b6000612da482612d8c565b9150612daf83612d8c565b9250828201905060ff811115612dc857612dc7612ce7565b5b92915050565b6000612dd98261259a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612e0b57612e0a612ce7565b5b600182019050919050565b6000612e218261278f565b9150612e2c8361278f565b9250828201905065ffffffffffff811115612e4a57612e49612ce7565b5b92915050565b600081519050612e5f81612683565b92915050565b600060208284031215612e7b57612e7a612423565b5b6000612e8984828501612e50565b9150509291505056fea2646970667358221220c5b23cab869d4e037c83c77206702df56e1fe8ddb4d03e7479348923baf58bc264736f6c63430008110033
-\ No newline at end of file
+60806040523480156200001157600080fd5b50604051620035e3380380620035e3833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b612f88806200065b6000396000f3fe608060405260043610610183576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100ee578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f146105ba578063e985e9c5146105f7578063f117e17314610634578063f9613ab21461067157610183565b8063b88d4fde14610524578063c87b56dd14610540578063c9796c391461057d57610183565b80638da5cb5b1461040057806395d89b411461042b578063a22cb46514610456578063adf288df1461047f578063b1a6afd3146104bc578063b242e534146104e757610183565b806342842e0e1161014057806342842e0e146102b15780634d03546a146102cd5780634f64b2be1461030a578063559f5dc9146103475780636352211e1461038657806370a08231146103c357610183565b806301ffc9a71461018857806306fdde03146101c5578063081812fc146101f057806318160ddd1461022d57806323b872dd1461025857806324e0febc14610274575b600080fd5b34801561019457600080fd5b506101af60048036038101906101aa9190612545565b6106ae565b6040516101bc919061258d565b60405180910390f35b3480156101d157600080fd5b506101da610854565b6040516101e79190612638565b60405180910390f35b3480156101fc57600080fd5b5061021760048036038101906102129190612690565b6108e2565b60405161022491906126fe565b60405180910390f35b34801561023957600080fd5b5061024261091f565b60405161024f9190612728565b60405180910390f35b610272600480360381019061026d919061276f565b610929565b005b34801561028057600080fd5b5061029b600480360381019061029691906127f8565b610998565b6040516102a89190612834565b60405180910390f35b6102cb60048036038101906102c6919061276f565b6109b0565b005b3480156102d957600080fd5b506102f460048036038101906102ef919061288d565b610a1f565b604051610301919061258d565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c9190612690565b610ca5565b60405161033e9190612834565b60405180910390f35b34801561035357600080fd5b5061036e600480360381019061036991906128cd565b610cc9565b60405161037d9392919061291c565b60405180910390f35b34801561039257600080fd5b506103ad60048036038101906103a89190612690565b610d3d565b6040516103ba91906126fe565b60405180910390f35b3480156103cf57600080fd5b506103ea60048036038101906103e59190612953565b610d79565b6040516103f79190612728565b60405180910390f35b34801561040c57600080fd5b50610415610d80565b60405161042291906126fe565b60405180910390f35b34801561043757600080fd5b50610440610da4565b60405161044d9190612638565b60405180910390f35b34801561046257600080fd5b5061047d600480360381019061047891906129ac565b610e32565b005b34801561048b57600080fd5b506104a660048036038101906104a191906129ec565b6110d4565b6040516104b39190612834565b60405180910390f35b3480156104c857600080fd5b506104d161129f565b6040516104de9190612834565b60405180910390f35b3480156104f357600080fd5b5061050e600480360381019061050991906129ac565b6112a5565b60405161051b919061258d565b60405180910390f35b61053e60048036038101906105399190612b61565b611382565b005b34801561054c57600080fd5b5061056760048036038101906105629190612690565b611459565b6040516105749190612638565b60405180910390f35b34801561058957600080fd5b506105a4600480360381019061059f91906127f8565b611509565b6040516105b19190612638565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc9190612c1e565b611b24565b6040516105ee9190612834565b60405180910390f35b34801561060357600080fd5b5061061e60048036038101906106199190612c71565b611cd7565b60405161062b919061258d565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190612cb1565b611d6f565b6040516106689190612834565b60405180910390f35b34801561067d57600080fd5b50610698600480360381019061069391906127f8565b611e74565b6040516106a59190612834565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610702576001905061084f565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610754576001905061084f565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a6576001905061084f565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f8576001905061084f565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361084a576001905061084f565b600090505b919050565b6006805461086190612d47565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90612d47565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b606061093784848484611f20565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60036020528060005260406000206000915090505481565b60606109be84848484611f20565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7a57600080fd5b610a826124a6565b600260008681526020019081526020016000208054905091506000821115610aff57600060026000878152602001908152602001600020600081548110610acc57610acb612d78565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610afe57600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610c2457600160086000828254610c189190612dd6565b92505081905550610c46565b8365ffffffffffff1660086000828254610c3e9190612dd6565b925050819055505b8365ffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fb85ba54b9f6f8241b7e1499e3cfc186ac0b1c8b7100f599bf6ca6844f896c34287604051610c959190612834565b60405180910390a3505092915050565b60018181548110610cb557600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610ce557600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610db190612d47565b80601f0160208091040260200160405190810160405280929190818152602001828054610ddd90612d47565b8015610e2a5780601f10610dff57610100808354040283529160200191610e2a565b820191906000526020600020905b815481529060010190602001808311610e0d57829003601f168201915b505050505081565b8015610f5357600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ed057600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061106b565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610feb57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516110c8919061258d565b60405180910390a35050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461113257600080fd5b600160026000868152602001908152602001600020805490501461115557600080fd5b60006002600086815260200190815260200160002060008154811061117d5761117c612d78565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146111af57600080fd5b60006001026003600086815260200190815260200160002054146111d257600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1691507fc000000000000000000000000000000000000000000000000000000000000000821791508160010260036000868152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8866001900460405161128c9190612728565b60405180910390a3839250505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461130057600080fd5b600060149054906101000a900460ff161561131a57600080fd5b811561133c576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555092915050565b61138e84848484611f20565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600060010260405161144b9190612834565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016114b59190612834565b602060405180830381865afa1580156114d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f69190612e1f565b905061150181611509565b915050919050565b606080600080604767ffffffffffffffff81111561152a57611529612a36565b5b6040519080825280601f01601f19166020018201604052801561155c5781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061159457611593612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6800000000000000000000000000000000000000000000000000000000000000836001815181106115f8576115f7612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061165c5761165b612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3200000000000000000000000000000000000000000000000000000000000000836003815181106116c0576116bf612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061172457611723612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061178857611787612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a00000000000000000000000000000000000000000000000000000000000000836006815181106117ec576117eb612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611b1857600460f087836020811061184257611841612d78565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff16101561191a576030836118b19190612e59565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106118e6576118e5612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061198c565b6057836119279190612e59565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061195c5761195b612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106119a1576119a0612d78565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611a7857603083611a039190612e59565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611a339190612dd6565b81518110611a4457611a43612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611af6565b605783611a859190612e59565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611ab59190612dd6565b81518110611ac657611ac5612d78565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611b039190612dd6565b91508080611b1090612e8e565b915050611822565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611b5057611b4f612d78565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611b7857600080fd5b60008361ffff16148015611baa575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611c095760018160000160068282829054906101000a900465ffffffffffff16611bd59190612ed6565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611c0185856110d4565b915050611cd0565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c6157600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611ca957600080fd5b611ccc8585858460000160069054906101000a900465ffffffffffff168561218a565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611d9b57611d9a612d78565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611dff57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611e2a57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611e5c57600080fd5b611e69868686868561218a565b915050949350505050565b60008060036000848152602001908152602001600020549050611e96816123b1565b611e9f57600080fd5b611ea8816123e3565b15611eb65782915050611f1b565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611f779190612728565b602060405180830381865afa158015611f94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb89190612f25565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611ff257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612126573373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061211c57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61212557600080fd5b5b60006004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506121838385612415565b5050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461221d57600080fd5b84600001600c9054906101000a900460ff1661227f578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff161461227e57600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff166123009190612ed6565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161239a9190612728565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b60008083600102905060036000828152602001908152602001600020546001900491506000820361244557600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612522816124ed565b811461252d57600080fd5b50565b60008135905061253f81612519565b92915050565b60006020828403121561255b5761255a6124e3565b5b600061256984828501612530565b91505092915050565b60008115159050919050565b61258781612572565b82525050565b60006020820190506125a2600083018461257e565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156125e25780820151818401526020810190506125c7565b60008484015250505050565b6000601f19601f8301169050919050565b600061260a826125a8565b61261481856125b3565b93506126248185602086016125c4565b61262d816125ee565b840191505092915050565b6000602082019050818103600083015261265281846125ff565b905092915050565b6000819050919050565b61266d8161265a565b811461267857600080fd5b50565b60008135905061268a81612664565b92915050565b6000602082840312156126a6576126a56124e3565b5b60006126b48482850161267b565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006126e8826126bd565b9050919050565b6126f8816126dd565b82525050565b600060208201905061271360008301846126ef565b92915050565b6127228161265a565b82525050565b600060208201905061273d6000830184612719565b92915050565b61274c816126dd565b811461275757600080fd5b50565b60008135905061276981612743565b92915050565b600080600060608486031215612788576127876124e3565b5b60006127968682870161275a565b93505060206127a78682870161275a565b92505060406127b88682870161267b565b9150509250925092565b6000819050919050565b6127d5816127c2565b81146127e057600080fd5b50565b6000813590506127f2816127cc565b92915050565b60006020828403121561280e5761280d6124e3565b5b600061281c848285016127e3565b91505092915050565b61282e816127c2565b82525050565b60006020820190506128496000830184612825565b92915050565b600065ffffffffffff82169050919050565b61286a8161284f565b811461287557600080fd5b50565b60008135905061288781612861565b92915050565b600080604083850312156128a4576128a36124e3565b5b60006128b2858286016127e3565b92505060206128c385828601612878565b9150509250929050565b600080604083850312156128e4576128e36124e3565b5b60006128f2858286016127e3565b92505060206129038582860161267b565b9150509250929050565b6129168161284f565b82525050565b6000606082019050612931600083018661290d565b61293e602083018561290d565b61294b604083018461257e565b949350505050565b600060208284031215612969576129686124e3565b5b60006129778482850161275a565b91505092915050565b61298981612572565b811461299457600080fd5b50565b6000813590506129a681612980565b92915050565b600080604083850312156129c3576129c26124e3565b5b60006129d18582860161275a565b92505060206129e285828601612997565b9150509250929050565b60008060408385031215612a0357612a026124e3565b5b6000612a118582860161275a565b9250506020612a22858286016127e3565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612a6e826125ee565b810181811067ffffffffffffffff82111715612a8d57612a8c612a36565b5b80604052505050565b6000612aa06124d9565b9050612aac8282612a65565b919050565b600067ffffffffffffffff821115612acc57612acb612a36565b5b612ad5826125ee565b9050602081019050919050565b82818337600083830152505050565b6000612b04612aff84612ab1565b612a96565b905082815260208101848484011115612b2057612b1f612a31565b5b612b2b848285612ae2565b509392505050565b600082601f830112612b4857612b47612a2c565b5b8135612b58848260208601612af1565b91505092915050565b60008060008060808587031215612b7b57612b7a6124e3565b5b6000612b898782880161275a565b9450506020612b9a8782880161275a565b9350506040612bab8782880161267b565b925050606085013567ffffffffffffffff811115612bcc57612bcb6124e8565b5b612bd887828801612b33565b91505092959194509250565b600061ffff82169050919050565b612bfb81612be4565b8114612c0657600080fd5b50565b600081359050612c1881612bf2565b92915050565b600080600060608486031215612c3757612c366124e3565b5b6000612c458682870161275a565b9350506020612c56868287016127e3565b9250506040612c6786828701612c09565b9150509250925092565b60008060408385031215612c8857612c876124e3565b5b6000612c968582860161275a565b9250506020612ca78582860161275a565b9150509250929050565b60008060008060808587031215612ccb57612cca6124e3565b5b6000612cd98782880161275a565b9450506020612cea878288016127e3565b9350506040612cfb87828801612c09565b9250506060612d0c87828801612878565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612d5f57607f821691505b602082108103612d7257612d71612d18565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612de18261265a565b9150612dec8361265a565b9250828201905080821115612e0457612e03612da7565b5b92915050565b600081519050612e19816127cc565b92915050565b600060208284031215612e3557612e346124e3565b5b6000612e4384828501612e0a565b91505092915050565b600060ff82169050919050565b6000612e6482612e4c565b9150612e6f83612e4c565b9250828201905060ff811115612e8857612e87612da7565b5b92915050565b6000612e998261265a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612ecb57612eca612da7565b5b600182019050919050565b6000612ee18261284f565b9150612eec8361284f565b9250828201905065ffffffffffff811115612f0a57612f09612da7565b5b92915050565b600081519050612f1f81612743565b92915050565b600060208284031215612f3b57612f3a6124e3565b5b6000612f4984828501612f10565b9150509291505056fea264697066735822122039548f2e189dd59057eeed2670a3d8e45fe27e25c8bfe6d0099cbe13589ccc6764736f6c63430008110033
+\ 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":"address","name":"_newOwner","type":"address"},{"internalType":"bool","name":"_final","type":"bool"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","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":"_minter","type":"address"},{"indexed":true,"internalType":"uint48","name":"_count","type":"uint48"},{"indexed":false,"internalType":"bytes32","name":"_tokenId","type":"bytes32"}],"name":"Allocate","type":"event"},{"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
@@ -253,9 +253,6 @@ class CraftNFT(ERC721):
return tx
- # def to_index_id(self, token_id, batch, index):
-
-
@classmethod
def parse_batch_of(self, v):
r = abi_decode_single(ABIContractType.UINT256, v)
diff --git a/python/craft_nft/runnable/dump.py b/python/craft_nft/runnable/dump.py
@@ -54,6 +54,13 @@ def process_config_local(config, arg, args, flags):
config.add(contract, '_CONTRACT', False)
config.add(100000, '_FEE_LIMIT', True)
+
+ token_id = None
+ if args.token_id != None:
+ token_id = strip_0x(args.token_id)
+ bytes.fromhex(token_id)
+ config.add(token_id, '_TOKEN_ID', False)
+
return config
@@ -64,6 +71,7 @@ flags = arg_flags.STD_READ | arg_flags.EXEC | arg_flags.TAB
argparser = chainlib.eth.cli.ArgumentParser()
argparser = process_args(argparser, arg, flags)
+argparser.add_argument('--token-id', dest='token_id', type=str, help='List mints for this token id only')
argparser.add_argument('contract_address', type=str, help='Token contract address (may also be specified by -e)')
args = argparser.parse_args()
@@ -136,6 +144,11 @@ def main():
outkeys = config.get('_OUTARG')
i = 0
+
+ if config.get('_TOKEN_ID') != None:
+ render_token(c, conn, token_address, config.get('_TOKEN_ID'))
+ return
+
while True:
o = c.token_at(token_address, i)
r = None
diff --git a/python/craft_nft/runnable/mint.py b/python/craft_nft/runnable/mint.py
@@ -45,6 +45,7 @@ def process_config_local(config, arg, args, flags):
config.add(token_id, '_TOKEN_ID', False)
config.add(args.batch, '_TOKEN_BATCH', False)
+ config.add(args.index, '_TOKEN_INDEX', False)
if args.fee_limit == None:
config.add(200000, '_FEE_LIMIT', True)
@@ -59,6 +60,8 @@ def process_settings_local(settings, config):
recipient = to_checksum_address(config.get('_POSARG'))
settings.set('RECIPIENT', recipient)
+ settings.set('TOKEN_INDEX', config.get('_TOKEN_INDEX'))
+
if (config.get('_TOKEN_BATCH') != None):
settings.set('TOKEN_BATCH', config.get('_TOKEN_BATCH'))
return settings
@@ -93,7 +96,8 @@ argparser = chainlib.eth.cli.ArgumentParser()
argparser = process_args(argparser, arg, flags)
argparser.add_argument('--token-id', type=str, required=True, help='Token id to mint from')
argparser.add_argument('--check', action='store_true', help='Only check whether a token can be minted')
-argparser.add_argument('--batch', type=int, help='Mint from the given batch. If not specified, the first mintable batch will be used')
+argparser.add_argument('--batch', type=int, default=0, help='Mint from the given batch. If not specified, the first mintable batch will be used')
+argparser.add_argument('--index', type=int, help='Index of token in batch to mint. If not specified, will mint next available index.')
argparser.add_argument('token_recipient', type=str, nargs='*', help='Recipient address')
args = argparser.parse_args(sys.argv[1:])
@@ -126,6 +130,7 @@ def main():
settings.get('RECIPIENT'),
settings.get('TOKEN_ID'),
settings.get('TOKEN_BATCH'),
+ index=settings.get('TOKEN_INDEX'),
)
if config.get('_RPC_SEND'):
diff --git a/solidity/CraftNFT.sol b/solidity/CraftNFT.sol
@@ -62,7 +62,9 @@ contract CraftNFT {
event TransferWithData(address indexed _from, address indexed _to, uint256 indexed _tokenId, bytes32 _data);
// Minter
- event Mint(address indexed _minter, address indexed _beneficiary, uint256 value);
+ event Mint(address indexed _minter, address indexed _beneficiary, uint256 _value);
+
+ event Allocate(address indexed _minter, uint48 indexed _count, bytes32 _tokenId);
constructor(string memory _name, string memory _symbol, bytes32 _declaration) {
owner = msg.sender;
@@ -132,6 +134,7 @@ contract CraftNFT {
} else {
supply += count;
}
+ emit Allocate(msg.sender, count, content);
}
// Find the token batch which contains the given index.
@@ -158,6 +161,7 @@ contract CraftNFT {
right = uint160(_recipient);
right |= (3 << 254);
mintedToken[_content] = bytes32(right);
+ emit Mint(msg.sender, _recipient, uint256(_content));
return _content;
}