craft-nft

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

commit 2e32f28d04a8a6b11a5b13d7d23441d3390a886d
parent fc9bca6b6ad3a5d314e9a708493359d3247f6633
Author: lash <dev@holbrook.no>
Date:   Tue,  7 Feb 2023 06:02:52 +0000

change tokenURI to explicit URL, add base url

Diffstat:
Mjs/contract/CraftNFT.bin | 4++--
Mjs/contract/CraftNFT.json | 2+-
Mpython/craft_nft/data/CraftNFT.bin | 4++--
Mpython/craft_nft/data/CraftNFT.json | 2+-
Mpython/craft_nft/nft.py | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpython/craft_nft/runnable/allocate.py | 2++
Mpython/tests/test_basic.py | 1+
Apython/tests/test_uri.py | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msolidity/CraftNFT.sol | 73++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
9 files changed, 247 insertions(+), 15 deletions(-)

diff --git a/js/contract/CraftNFT.bin b/js/contract/CraftNFT.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b506040516200385b3803806200385b833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b613200806200065b6000396000f3fe608060405260043610610183576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100ee578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f146105ba578063e985e9c5146105f7578063f117e17314610634578063f9613ab21461067157610183565b8063b88d4fde14610524578063c87b56dd14610540578063c9796c391461057d57610183565b80638da5cb5b1461040057806395d89b411461042b578063a22cb46514610456578063adf288df1461047f578063b1a6afd3146104bc578063b242e534146104e757610183565b806342842e0e1161014057806342842e0e146102b15780634d03546a146102cd5780634f64b2be1461030a578063559f5dc9146103475780636352211e1461038657806370a08231146103c357610183565b806301ffc9a71461018857806306fdde03146101c5578063081812fc146101f057806318160ddd1461022d57806323b872dd1461025857806324e0febc14610274575b600080fd5b34801561019457600080fd5b506101af60048036038101906101aa91906126e2565b6106ae565b6040516101bc919061272a565b60405180910390f35b3480156101d157600080fd5b506101da610854565b6040516101e791906127d5565b60405180910390f35b3480156101fc57600080fd5b506102176004803603810190610212919061282d565b6108e2565b604051610224919061289b565b60405180910390f35b34801561023957600080fd5b5061024261091f565b60405161024f91906128c5565b60405180910390f35b610272600480360381019061026d919061290c565b610929565b005b34801561028057600080fd5b5061029b60048036038101906102969190612995565b610994565b6040516102a891906129d1565b60405180910390f35b6102cb60048036038101906102c6919061290c565b6109ac565b005b3480156102d957600080fd5b506102f460048036038101906102ef9190612a2a565b610a17565b604051610301919061272a565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c919061282d565b610ca1565b60405161033e91906129d1565b60405180910390f35b34801561035357600080fd5b5061036e60048036038101906103699190612a6a565b610cc5565b60405161037d93929190612ab9565b60405180910390f35b34801561039257600080fd5b506103ad60048036038101906103a8919061282d565b610d39565b6040516103ba919061289b565b60405180910390f35b3480156103cf57600080fd5b506103ea60048036038101906103e59190612af0565b610d75565b6040516103f791906128c5565b60405180910390f35b34801561040c57600080fd5b50610415610dbe565b604051610422919061289b565b60405180910390f35b34801561043757600080fd5b50610440610de2565b60405161044d91906127d5565b60405180910390f35b34801561046257600080fd5b5061047d60048036038101906104789190612b49565b610e70565b005b34801561048b57600080fd5b506104a660048036038101906104a19190612b89565b611112565b6040516104b391906129d1565b60405180910390f35b3480156104c857600080fd5b506104d1611330565b6040516104de91906129d1565b60405180910390f35b3480156104f357600080fd5b5061050e60048036038101906105099190612b49565b611336565b60405161051b919061272a565b60405180910390f35b61053e60048036038101906105399190612cfe565b611417565b005b34801561054c57600080fd5b506105676004803603810190610562919061282d565b6114f2565b60405161057491906127d5565b60405180910390f35b34801561058957600080fd5b506105a4600480360381019061059f9190612995565b6115a2565b6040516105b191906127d5565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc9190612dbb565b611bbd565b6040516105ee91906129d1565b60405180910390f35b34801561060357600080fd5b5061061e60048036038101906106199190612e0e565b611d70565b60405161062b919061272a565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190612e4e565b611e08565b60405161066891906129d1565b60405180910390f35b34801561067d57600080fd5b5061069860048036038101906106939190612995565b611f0d565b6040516106a591906129d1565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610702576001905061084f565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610754576001905061084f565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a6576001905061084f565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f8576001905061084f565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361084a576001905061084f565b600090505b919050565b6006805461086190612ee4565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90612ee4565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b610934838383611fb9565b808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60036020528060005260406000206000915090505481565b6109b7838383611fb9565b808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7257600080fd5b610a7a612643565b600260008681526020019081526020016000208054905091506000821115610af757600060026000878152602001908152602001600020600081548110610ac457610ac3612f15565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610af657600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610c1c57600160086000828254610c109190612f73565b92505081905550610c3e565b8365ffffffffffff1660086000828254610c369190612f73565b925050819055505b8365ffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fb85ba54b9f6f8241b7e1499e3cfc186ac0b1c8b7100f599bf6ca6844f896c34287604051610c8d91906129d1565b60405180910390a360019250505092915050565b60018181548110610cb157600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610ce157600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610def90612ee4565b80601f0160208091040260200160405190810160405280929190818152602001828054610e1b90612ee4565b8015610e685780601f10610e3d57610100808354040283529160200191610e68565b820191906000526020600020905b815481529060010190602001808311610e4b57829003601f168201915b505050505081565b8015610f9157600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f0e57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506110a9565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361102957600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611106919061272a565b60405180910390a35050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461116d57600080fd5b600160026000858152602001908152602001600020805490501461119057600080fd5b6000600260008581526020019081526020016000206000815481106111b8576111b7612f15565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146111ea57600080fd5b600060010260036000858152602001908152602001600020541461120d57600080fd5b8373ffffffffffffffffffffffffffffffffffffffff1690507fc000000000000000000000000000000000000000000000000000000000000000811790508060010260036000858152602001908152602001600020819055506001600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546112b69190612f73565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856001900460405161131e91906128c5565b60405180910390a38291505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461139157600080fd5b600060149054906101000a900460ff16156113ab57600080fd5b81156113cd576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001905092915050565b611422848484611fb9565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e846114d790612fe7565b6040516114e491906129d1565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161154e91906129d1565b602060405180830381865afa15801561156b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158f9190613063565b905061159a816115a2565b915050919050565b606080600080604767ffffffffffffffff8111156115c3576115c2612bd3565b5b6040519080825280601f01601f1916602001820160405280156115f55781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061162d5761162c612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061169157611690612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6100000000000000000000000000000000000000000000000000000000000000836002815181106116f5576116f4612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f32000000000000000000000000000000000000000000000000000000000000008360038151811061175957611758612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3500000000000000000000000000000000000000000000000000000000000000836004815181106117bd576117bc612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061182157611820612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a000000000000000000000000000000000000000000000000000000000000008360068151811061188557611884612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611bb157600460f08783602081106118db576118da612f15565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff1610156119b35760308361194a919061309d565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061197f5761197e612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611a25565b6057836119c0919061309d565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106119f5576119f4612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611a3a57611a39612f15565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611b1157603083611a9c919061309d565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611acc9190612f73565b81518110611add57611adc612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611b8f565b605783611b1e919061309d565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611b4e9190612f73565b81518110611b5f57611b5e612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611b9c9190612f73565b91508080611ba9906130d2565b9150506118bb565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611be957611be8612f15565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611c1157600080fd5b60008361ffff16148015611c43575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611ca25760018160000160068282829054906101000a900465ffffffffffff16611c6e919061311a565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611c9a8585611112565b915050611d69565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611cfa57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611d4257600080fd5b611d658585858460000160069054906101000a900465ffffffffffff16856122d0565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611e3457611e33612f15565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e9857600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611ec357600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611ef557600080fd5b611f0286868686856122d0565b915050949350505050565b60008060036000848152602001908152602001600020549050611f2f8161254e565b611f3857600080fd5b611f4181612580565b15611f4f5782915050611fb4565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161201091906128c5565b602060405180830381865afa15801561202d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120519190613169565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461208b57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146121bf573373ffffffffffffffffffffffffffffffffffffffff166004600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806121b557503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6121be57600080fd5b5b60006004600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061221c82846125b2565b6001600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461226c9190613196565b925050819055506001600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122c39190612f73565b9250508190555050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461236357600080fd5b84600001600c9054906101000a900460ff166123c5578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16146123c457600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff16612446919061311a565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055506001600a60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124d39190612f73565b925050819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161253791906128c5565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000808360010290506003600082815260200190815260200160002054600190049150600082036125e257600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6126bf8161268a565b81146126ca57600080fd5b50565b6000813590506126dc816126b6565b92915050565b6000602082840312156126f8576126f7612680565b5b6000612706848285016126cd565b91505092915050565b60008115159050919050565b6127248161270f565b82525050565b600060208201905061273f600083018461271b565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561277f578082015181840152602081019050612764565b60008484015250505050565b6000601f19601f8301169050919050565b60006127a782612745565b6127b18185612750565b93506127c1818560208601612761565b6127ca8161278b565b840191505092915050565b600060208201905081810360008301526127ef818461279c565b905092915050565b6000819050919050565b61280a816127f7565b811461281557600080fd5b50565b60008135905061282781612801565b92915050565b60006020828403121561284357612842612680565b5b600061285184828501612818565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006128858261285a565b9050919050565b6128958161287a565b82525050565b60006020820190506128b0600083018461288c565b92915050565b6128bf816127f7565b82525050565b60006020820190506128da60008301846128b6565b92915050565b6128e98161287a565b81146128f457600080fd5b50565b600081359050612906816128e0565b92915050565b60008060006060848603121561292557612924612680565b5b6000612933868287016128f7565b9350506020612944868287016128f7565b925050604061295586828701612818565b9150509250925092565b6000819050919050565b6129728161295f565b811461297d57600080fd5b50565b60008135905061298f81612969565b92915050565b6000602082840312156129ab576129aa612680565b5b60006129b984828501612980565b91505092915050565b6129cb8161295f565b82525050565b60006020820190506129e660008301846129c2565b92915050565b600065ffffffffffff82169050919050565b612a07816129ec565b8114612a1257600080fd5b50565b600081359050612a24816129fe565b92915050565b60008060408385031215612a4157612a40612680565b5b6000612a4f85828601612980565b9250506020612a6085828601612a15565b9150509250929050565b60008060408385031215612a8157612a80612680565b5b6000612a8f85828601612980565b9250506020612aa085828601612818565b9150509250929050565b612ab3816129ec565b82525050565b6000606082019050612ace6000830186612aaa565b612adb6020830185612aaa565b612ae8604083018461271b565b949350505050565b600060208284031215612b0657612b05612680565b5b6000612b14848285016128f7565b91505092915050565b612b268161270f565b8114612b3157600080fd5b50565b600081359050612b4381612b1d565b92915050565b60008060408385031215612b6057612b5f612680565b5b6000612b6e858286016128f7565b9250506020612b7f85828601612b34565b9150509250929050565b60008060408385031215612ba057612b9f612680565b5b6000612bae858286016128f7565b9250506020612bbf85828601612980565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612c0b8261278b565b810181811067ffffffffffffffff82111715612c2a57612c29612bd3565b5b80604052505050565b6000612c3d612676565b9050612c498282612c02565b919050565b600067ffffffffffffffff821115612c6957612c68612bd3565b5b612c728261278b565b9050602081019050919050565b82818337600083830152505050565b6000612ca1612c9c84612c4e565b612c33565b905082815260208101848484011115612cbd57612cbc612bce565b5b612cc8848285612c7f565b509392505050565b600082601f830112612ce557612ce4612bc9565b5b8135612cf5848260208601612c8e565b91505092915050565b60008060008060808587031215612d1857612d17612680565b5b6000612d26878288016128f7565b9450506020612d37878288016128f7565b9350506040612d4887828801612818565b925050606085013567ffffffffffffffff811115612d6957612d68612685565b5b612d7587828801612cd0565b91505092959194509250565b600061ffff82169050919050565b612d9881612d81565b8114612da357600080fd5b50565b600081359050612db581612d8f565b92915050565b600080600060608486031215612dd457612dd3612680565b5b6000612de2868287016128f7565b9350506020612df386828701612980565b9250506040612e0486828701612da6565b9150509250925092565b60008060408385031215612e2557612e24612680565b5b6000612e33858286016128f7565b9250506020612e44858286016128f7565b9150509250929050565b60008060008060808587031215612e6857612e67612680565b5b6000612e76878288016128f7565b9450506020612e8787828801612980565b9350506040612e9887828801612da6565b9250506060612ea987828801612a15565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612efc57607f821691505b602082108103612f0f57612f0e612eb5565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612f7e826127f7565b9150612f89836127f7565b9250828201905080821115612fa157612fa0612f44565b5b92915050565b600081519050919050565b6000819050602082019050919050565b6000612fce825161295f565b80915050919050565b60008160020a8302905092915050565b6000612ff282612fa7565b82612ffc84612fb2565b905061300781612fc2565b92506020821015613047576130427fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83602003600802612fd7565b831692505b5050919050565b60008151905061305d81612969565b92915050565b60006020828403121561307957613078612680565b5b60006130878482850161304e565b91505092915050565b600060ff82169050919050565b60006130a882613090565b91506130b383613090565b9250828201905060ff8111156130cc576130cb612f44565b5b92915050565b60006130dd826127f7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361310f5761310e612f44565b5b600182019050919050565b6000613125826129ec565b9150613130836129ec565b9250828201905065ffffffffffff81111561314e5761314d612f44565b5b92915050565b600081519050613163816128e0565b92915050565b60006020828403121561317f5761317e612680565b5b600061318d84828501613154565b91505092915050565b60006131a1826127f7565b91506131ac836127f7565b92508282039050818111156131c4576131c3612f44565b5b9291505056fea2646970667358221220fe8cb8e6c3aa02a6a48c9690e8826550c4e7e6bcffb3fe21531acd66f434529164736f6c63430008110033 -\ No newline at end of file +60806040523480156200001157600080fd5b506040516200432738038062004327833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b613ccc806200065b6000396000f3fe6080604052600436106101d4576000357c01000000000000000000000000000000000000000000000000000000009004806370a0823111610109578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f1461069c578063e985e9c5146106d9578063f117e17314610716578063f9613ab214610753576101d4565b8063b88d4fde14610606578063c87b56dd14610622578063c9796c391461065f576101d4565b8063a22cb465116100e3578063a22cb46514610538578063adf288df14610561578063b1a6afd31461059e578063b242e534146105c9576101d4565b806370a08231146104a55780638da5cb5b146104e257806395d89b411461050d576101d4565b806342842e0e116101765780634f64b2be116101505780634f64b2be146103af578063559f5dc9146103ec5780636352211e1461042b57806369e85c7114610468576101d4565b806342842e0e1461032d57806349f2553a146103495780634d03546a14610372576101d4565b806318160ddd116101b257806318160ddd1461027e57806323b872dd146102a957806324e0febc146102c557806340c84b0e14610302576101d4565b806301ffc9a7146101d957806306fdde0314610216578063081812fc14610241575b600080fd5b3480156101e557600080fd5b5061020060048036038101906101fb9190612e26565b610790565b60405161020d9190612e6e565b60405180910390f35b34801561022257600080fd5b5061022b610936565b6040516102389190612f19565b60405180910390f35b34801561024d57600080fd5b5061026860048036038101906102639190612f71565b6109c4565b6040516102759190612fdf565b60405180910390f35b34801561028a57600080fd5b50610293610a01565b6040516102a09190613009565b60405180910390f35b6102c360048036038101906102be9190613050565b610a0b565b005b3480156102d157600080fd5b506102ec60048036038101906102e791906130d9565b610a76565b6040516102f99190613115565b60405180910390f35b34801561030e57600080fd5b50610317610a8e565b6040516103249190613185565b60405180910390f35b61034760048036038101906103429190613050565b610b1c565b005b34801561035557600080fd5b50610370600480360381019061036b91906132dc565b610b87565b005b34801561037e57600080fd5b5061039960048036038101906103949190613363565b610e9f565b6040516103a69190612e6e565b60405180910390f35b3480156103bb57600080fd5b506103d660048036038101906103d19190612f71565b611129565b6040516103e39190613115565b60405180910390f35b3480156103f857600080fd5b50610413600480360381019061040e91906133a3565b61114d565b604051610422939291906133f2565b60405180910390f35b34801561043757600080fd5b50610452600480360381019061044d9190612f71565b6111c1565b60405161045f9190612fdf565b60405180910390f35b34801561047457600080fd5b5061048f600480360381019061048a91906130d9565b6111fd565b60405161049c9190612f19565b60405180910390f35b3480156104b157600080fd5b506104cc60048036038101906104c79190613429565b611416565b6040516104d99190613009565b60405180910390f35b3480156104ee57600080fd5b506104f761145f565b6040516105049190612fdf565b60405180910390f35b34801561051957600080fd5b50610522611483565b60405161052f9190612f19565b60405180910390f35b34801561054457600080fd5b5061055f600480360381019061055a9190613482565b611511565b005b34801561056d57600080fd5b50610588600480360381019061058391906134c2565b6117b3565b6040516105959190613115565b60405180910390f35b3480156105aa57600080fd5b506105b36119d1565b6040516105c09190613115565b60405180910390f35b3480156105d557600080fd5b506105f060048036038101906105eb9190613482565b6119d7565b6040516105fd9190612e6e565b60405180910390f35b610620600480360381019061061b91906135a3565b611ab8565b005b34801561062e57600080fd5b5061064960048036038101906106449190612f71565b611b93565b6040516106569190612f19565b60405180910390f35b34801561066b57600080fd5b50610686600480360381019061068191906130d9565b611ba8565b6040516106939190612f19565b60405180910390f35b3480156106a857600080fd5b506106c360048036038101906106be9190613660565b611fa2565b6040516106d09190613115565b60405180910390f35b3480156106e557600080fd5b5061070060048036038101906106fb91906136b3565b612155565b60405161070d9190612e6e565b60405180910390f35b34801561072257600080fd5b5061073d600480360381019061073891906136f3565b6121ed565b60405161074a9190613115565b60405180910390f35b34801561075f57600080fd5b5061077a600480360381019061077591906130d9565b6122f2565b6040516107879190613115565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107e45760019050610931565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036108365760019050610931565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036108885760019050610931565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036108da5760019050610931565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361092c5760019050610931565b600090505b919050565b6006805461094390613789565b80601f016020809104026020016040519081016040528092919081815260200182805461096f90613789565b80156109bc5780601f10610991576101008083540402835291602001916109bc565b820191906000526020600020905b81548152906001019060200180831161099f57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b610a1683838361239e565b808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60036020528060005260406000206000915090505481565b600a8054610a9b90613789565b80601f0160208091040260200160405190810160405280929190818152602001828054610ac790613789565b8015610b145780601f10610ae957610100808354040283529160200191610b14565b820191906000526020600020905b815481529060010190602001808311610af757829003601f168201915b505050505081565b610b2783838361239e565b808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b606060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610be457600080fd5b82915081519050602f7f01000000000000000000000000000000000000000000000000000000000000000282600183610c1d91906137e9565b81518110610c2e57610c2d61381d565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610cae578080610caa9061384c565b9150505b8067ffffffffffffffff811115610cc857610cc76131b1565b5b6040519080825280601f01601f191660200182016040528015610cfa5781602001600182028036833780820191505090505b50600a9081610d099190613a46565b5060005b8251811015610dfa57828181518110610d2957610d2861381d565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002600a828154610d8190613789565b8110610d9057610d8f61381d565b5b815460011615610daf5790600052602060002090602091828204019190065b601f036101000a81548160ff021916907f0100000000000000000000000000000000000000000000000000000000000000840402179055508080610df29061384c565b915050610d0d565b5081518114610e9a577f2f00000000000000000000000000000000000000000000000000000000000000600a83518154610e3390613789565b8110610e4257610e4161381d565b5b815460011615610e615790600052602060002090602091828204019190065b601f036101000a81548160ff021916907f0100000000000000000000000000000000000000000000000000000000000000840402179055505b505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610efa57600080fd5b610f02612d87565b600260008681526020019081526020016000208054905091506000821115610f7f57600060026000878152602001908152602001600020600081548110610f4c57610f4b61381d565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610f7e57600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff16036110a4576001600860008282546110989190613b18565b925050819055506110c6565b8365ffffffffffff16600860008282546110be9190613b18565b925050819055505b8365ffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fb85ba54b9f6f8241b7e1499e3cfc186ac0b1c8b7100f599bf6ca6844f896c342876040516111159190613115565b60405180910390a360019250505092915050565b6001818154811061113957600080fd5b906000526020600020016000915090505481565b6002602052816000526040600020818154811061116957600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6060806060600061120d856126b5565b9150600a805461121c90613789565b9050905080825161122d9190613b18565b67ffffffffffffffff811115611246576112456131b1565b5b6040519080825280601f01601f1916602001820160405280156112785781602001600182028036833780820191505090505b50925060005b8181101561133d57600a81815461129490613789565b81106112a3576112a261381d565b5b8154600116156112c25790600052602060002090602091828204019190065b9054901a7f0100000000000000000000000000000000000000000000000000000000000000028482815181106112fb576112fa61381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806113359061384c565b91505061127e565b5060005b825181101561140a5782818151811061135d5761135c61381d565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000028483815181106113ba576113b961381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535081806113f49061384c565b92505080806114029061384c565b915050611341565b50829350505050919050565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6007805461149090613789565b80601f01602080910402602001604051908101604052809291908181526020018280546114bc90613789565b80156115095780601f106114de57610100808354040283529160200191611509565b820191906000526020600020905b8154815290600101906020018083116114ec57829003601f168201915b505050505081565b801561163257600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115af57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061174a565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036116ca57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516117a79190612e6e565b60405180910390a35050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461180e57600080fd5b600160026000858152602001908152602001600020805490501461183157600080fd5b6000600260008581526020019081526020016000206000815481106118595761185861381d565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461188b57600080fd5b60006001026003600085815260200190815260200160002054146118ae57600080fd5b8373ffffffffffffffffffffffffffffffffffffffff1690507fc000000000000000000000000000000000000000000000000000000000000000811790508060010260036000858152602001908152602001600020819055506001600b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546119579190613b18565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f885600190046040516119bf9190613009565b60405180910390a38291505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a3257600080fd5b600060149054906101000a900460ff1615611a4c57600080fd5b8115611a6e576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001905092915050565b611ac384848461239e565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e84611b7890613b71565b604051611b859190613115565b60405180910390a450505050565b6060611ba1826001026111fd565b9050919050565b60608060606000611bb8856126b5565b9150604767ffffffffffffffff811115611bd557611bd46131b1565b5b6040519080825280601f01601f191660200182016040528015611c075781602001600182028036833780820191505090505b5092507f730000000000000000000000000000000000000000000000000000000000000083600081518110611c3f57611c3e61381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f680000000000000000000000000000000000000000000000000000000000000083600181518110611ca357611ca261381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f610000000000000000000000000000000000000000000000000000000000000083600281518110611d0757611d0661381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f320000000000000000000000000000000000000000000000000000000000000083600381518110611d6b57611d6a61381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f350000000000000000000000000000000000000000000000000000000000000083600481518110611dcf57611dce61381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f360000000000000000000000000000000000000000000000000000000000000083600581518110611e3357611e3261381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a0000000000000000000000000000000000000000000000000000000000000083600681518110611e9757611e9661381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6040811015611f9657828181518110611ee957611ee861381d565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002848381518110611f4657611f4561381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508180611f809061384c565b9250508080611f8e9061384c565b915050611ecd565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611fce57611fcd61381d565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611ff657600080fd5b60008361ffff16148015612028575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b156120875760018160000160068282829054906101000a900465ffffffffffff166120539190613bd8565b92506101000a81548165ffffffffffff021916908365ffffffffffff16021790555061207f85856117b3565b91505061214e565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146120df57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff161061212757600080fd5b61214a8585858460000160069054906101000a900465ffffffffffff1685612a14565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff16815481106122195761221861381d565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461227d57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff16116122a857600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff16106122da57600080fd5b6122e78686868685612a14565b915050949350505050565b6000806003600084815260200190815260200160002054905061231481612c92565b61231d57600080fd5b61232681612cc4565b156123345782915050612399565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016123f59190613009565b602060405180830381865afa158015612412573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124369190613c27565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461247057600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146125a4573373ffffffffffffffffffffffffffffffffffffffff166004600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061259a57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6125a357600080fd5b5b60006004600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506126018284612cf6565b6001600b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461265191906137e9565b925050819055506001600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546126a89190613b18565b9250508190555050505050565b606080600080604067ffffffffffffffff8111156126d6576126d56131b1565b5b6040519080825280601f01601f1916602001820160405280156127085781602001600182028036833780820191505090505b5092506000905060005b6020811015612a0857600460f08783602081106127325761273161381d565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff16101561280a576030836127a19190613c61565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106127d6576127d561381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061287c565b6057836128179190613c61565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061284c5761284b61381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106128915761289061381d565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015612968576030836128f39190613c61565b7f010000000000000000000000000000000000000000000000000000000000000002846001846129239190613b18565b815181106129345761293361381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506129e6565b6057836129759190613c61565b7f010000000000000000000000000000000000000000000000000000000000000002846001846129a59190613b18565b815181106129b6576129b561381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b6002826129f39190613b18565b91508080612a009061384c565b915050612712565b50829350505050919050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff16831792508260010290506000600102600360008381526020019081526020016000205414612aa757600080fd5b84600001600c9054906101000a900460ff16612b09578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff1614612b0857600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff16612b8a9190613bd8565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055506001600b60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612c179190613b18565b925050819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f885604051612c7b9190613009565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b600080836001029050600360008281526020019081526020016000205460019004915060008203612d2657600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612e0381612dce565b8114612e0e57600080fd5b50565b600081359050612e2081612dfa565b92915050565b600060208284031215612e3c57612e3b612dc4565b5b6000612e4a84828501612e11565b91505092915050565b60008115159050919050565b612e6881612e53565b82525050565b6000602082019050612e836000830184612e5f565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612ec3578082015181840152602081019050612ea8565b60008484015250505050565b6000601f19601f8301169050919050565b6000612eeb82612e89565b612ef58185612e94565b9350612f05818560208601612ea5565b612f0e81612ecf565b840191505092915050565b60006020820190508181036000830152612f338184612ee0565b905092915050565b6000819050919050565b612f4e81612f3b565b8114612f5957600080fd5b50565b600081359050612f6b81612f45565b92915050565b600060208284031215612f8757612f86612dc4565b5b6000612f9584828501612f5c565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612fc982612f9e565b9050919050565b612fd981612fbe565b82525050565b6000602082019050612ff46000830184612fd0565b92915050565b61300381612f3b565b82525050565b600060208201905061301e6000830184612ffa565b92915050565b61302d81612fbe565b811461303857600080fd5b50565b60008135905061304a81613024565b92915050565b60008060006060848603121561306957613068612dc4565b5b60006130778682870161303b565b93505060206130888682870161303b565b925050604061309986828701612f5c565b9150509250925092565b6000819050919050565b6130b6816130a3565b81146130c157600080fd5b50565b6000813590506130d3816130ad565b92915050565b6000602082840312156130ef576130ee612dc4565b5b60006130fd848285016130c4565b91505092915050565b61310f816130a3565b82525050565b600060208201905061312a6000830184613106565b92915050565b600081519050919050565b600082825260208201905092915050565b600061315782613130565b613161818561313b565b9350613171818560208601612ea5565b61317a81612ecf565b840191505092915050565b6000602082019050818103600083015261319f818461314c565b905092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6131e982612ecf565b810181811067ffffffffffffffff82111715613208576132076131b1565b5b80604052505050565b600061321b612dba565b905061322782826131e0565b919050565b600067ffffffffffffffff821115613247576132466131b1565b5b61325082612ecf565b9050602081019050919050565b82818337600083830152505050565b600061327f61327a8461322c565b613211565b90508281526020810184848401111561329b5761329a6131ac565b5b6132a684828561325d565b509392505050565b600082601f8301126132c3576132c26131a7565b5b81356132d384826020860161326c565b91505092915050565b6000602082840312156132f2576132f1612dc4565b5b600082013567ffffffffffffffff8111156133105761330f612dc9565b5b61331c848285016132ae565b91505092915050565b600065ffffffffffff82169050919050565b61334081613325565b811461334b57600080fd5b50565b60008135905061335d81613337565b92915050565b6000806040838503121561337a57613379612dc4565b5b6000613388858286016130c4565b92505060206133998582860161334e565b9150509250929050565b600080604083850312156133ba576133b9612dc4565b5b60006133c8858286016130c4565b92505060206133d985828601612f5c565b9150509250929050565b6133ec81613325565b82525050565b600060608201905061340760008301866133e3565b61341460208301856133e3565b6134216040830184612e5f565b949350505050565b60006020828403121561343f5761343e612dc4565b5b600061344d8482850161303b565b91505092915050565b61345f81612e53565b811461346a57600080fd5b50565b60008135905061347c81613456565b92915050565b6000806040838503121561349957613498612dc4565b5b60006134a78582860161303b565b92505060206134b88582860161346d565b9150509250929050565b600080604083850312156134d9576134d8612dc4565b5b60006134e78582860161303b565b92505060206134f8858286016130c4565b9150509250929050565b600067ffffffffffffffff82111561351d5761351c6131b1565b5b61352682612ecf565b9050602081019050919050565b600061354661354184613502565b613211565b905082815260208101848484011115613562576135616131ac565b5b61356d84828561325d565b509392505050565b600082601f83011261358a576135896131a7565b5b813561359a848260208601613533565b91505092915050565b600080600080608085870312156135bd576135bc612dc4565b5b60006135cb8782880161303b565b94505060206135dc8782880161303b565b93505060406135ed87828801612f5c565b925050606085013567ffffffffffffffff81111561360e5761360d612dc9565b5b61361a87828801613575565b91505092959194509250565b600061ffff82169050919050565b61363d81613626565b811461364857600080fd5b50565b60008135905061365a81613634565b92915050565b60008060006060848603121561367957613678612dc4565b5b60006136878682870161303b565b9350506020613698868287016130c4565b92505060406136a98682870161364b565b9150509250925092565b600080604083850312156136ca576136c9612dc4565b5b60006136d88582860161303b565b92505060206136e98582860161303b565b9150509250929050565b6000806000806080858703121561370d5761370c612dc4565b5b600061371b8782880161303b565b945050602061372c878288016130c4565b935050604061373d8782880161364b565b925050606061374e8782880161334e565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806137a157607f821691505b6020821081036137b4576137b361375a565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006137f482612f3b565b91506137ff83612f3b565b9250828203905081811115613817576138166137ba565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061385782612f3b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613889576138886137ba565b5b600182019050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b6000600883026138f97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826138b9565b61390386836138b9565b95508019841693508086168417925050509392505050565b6000819050919050565b600061394061393b61393684612f3b565b61391b565b612f3b565b9050919050565b6000819050919050565b61395a83613925565b61396e61396682613947565b8484546138c9565b825550505050565b600090565b613983613976565b61398e818484613951565b505050565b5b818110156139b2576139a760008261397b565b600181019050613994565b5050565b601f8211156139f7576139c881613894565b6139d1846138a9565b810160208510156139e0578190505b6139f46139ec856138a9565b830182613993565b50505b505050565b60008160020a8304905092915050565b6000613a1d600019846008026139fc565b1980831691505092915050565b6000613a368383613a0c565b9150826002028217905092915050565b613a4f82613130565b67ffffffffffffffff811115613a6857613a676131b1565b5b613a728254613789565b613a7d8282856139b6565b600060209050601f831160018114613ab05760008415613a9e578287015190505b613aa88582613a2a565b865550613b10565b601f198416613abe86613894565b60005b82811015613ae657848901518255600182019150602085019450602081019050613ac1565b86831015613b035784890151613aff601f891682613a0c565b8355505b6001600288020188555050505b505050505050565b6000613b2382612f3b565b9150613b2e83612f3b565b9250828201905080821115613b4657613b456137ba565b5b92915050565b6000819050602082019050919050565b6000613b6882516130a3565b80915050919050565b6000613b7c82613130565b82613b8684613b4c565b9050613b9181613b5c565b92506020821015613bd157613bcc7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff836020036008026138b9565b831692505b5050919050565b6000613be382613325565b9150613bee83613325565b9250828201905065ffffffffffff811115613c0c57613c0b6137ba565b5b92915050565b600081519050613c2181613024565b92915050565b600060208284031215613c3d57613c3c612dc4565b5b6000613c4b84828501613c12565b91505092915050565b600060ff82169050919050565b6000613c6c82613c54565b9150613c7783613c54565b9250828201905060ff811115613c9057613c8f6137ba565b5b9291505056fea264697066735822122077361d598f679782404ae11030ea625cd25005a2e158b847efb53141c9485e9b64736f6c63430008110033 +\ 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":"_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"}] +[{"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":"baseURL","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"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":"string","name":"_baseString","type":"string"}],"name":"setBaseURL","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":"_data","type":"bytes32"}],"name":"toURL","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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/data/CraftNFT.bin b/python/craft_nft/data/CraftNFT.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b506040516200385b3803806200385b833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b613200806200065b6000396000f3fe608060405260043610610183576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100ee578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f146105ba578063e985e9c5146105f7578063f117e17314610634578063f9613ab21461067157610183565b8063b88d4fde14610524578063c87b56dd14610540578063c9796c391461057d57610183565b80638da5cb5b1461040057806395d89b411461042b578063a22cb46514610456578063adf288df1461047f578063b1a6afd3146104bc578063b242e534146104e757610183565b806342842e0e1161014057806342842e0e146102b15780634d03546a146102cd5780634f64b2be1461030a578063559f5dc9146103475780636352211e1461038657806370a08231146103c357610183565b806301ffc9a71461018857806306fdde03146101c5578063081812fc146101f057806318160ddd1461022d57806323b872dd1461025857806324e0febc14610274575b600080fd5b34801561019457600080fd5b506101af60048036038101906101aa91906126e2565b6106ae565b6040516101bc919061272a565b60405180910390f35b3480156101d157600080fd5b506101da610854565b6040516101e791906127d5565b60405180910390f35b3480156101fc57600080fd5b506102176004803603810190610212919061282d565b6108e2565b604051610224919061289b565b60405180910390f35b34801561023957600080fd5b5061024261091f565b60405161024f91906128c5565b60405180910390f35b610272600480360381019061026d919061290c565b610929565b005b34801561028057600080fd5b5061029b60048036038101906102969190612995565b610994565b6040516102a891906129d1565b60405180910390f35b6102cb60048036038101906102c6919061290c565b6109ac565b005b3480156102d957600080fd5b506102f460048036038101906102ef9190612a2a565b610a17565b604051610301919061272a565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c919061282d565b610ca1565b60405161033e91906129d1565b60405180910390f35b34801561035357600080fd5b5061036e60048036038101906103699190612a6a565b610cc5565b60405161037d93929190612ab9565b60405180910390f35b34801561039257600080fd5b506103ad60048036038101906103a8919061282d565b610d39565b6040516103ba919061289b565b60405180910390f35b3480156103cf57600080fd5b506103ea60048036038101906103e59190612af0565b610d75565b6040516103f791906128c5565b60405180910390f35b34801561040c57600080fd5b50610415610dbe565b604051610422919061289b565b60405180910390f35b34801561043757600080fd5b50610440610de2565b60405161044d91906127d5565b60405180910390f35b34801561046257600080fd5b5061047d60048036038101906104789190612b49565b610e70565b005b34801561048b57600080fd5b506104a660048036038101906104a19190612b89565b611112565b6040516104b391906129d1565b60405180910390f35b3480156104c857600080fd5b506104d1611330565b6040516104de91906129d1565b60405180910390f35b3480156104f357600080fd5b5061050e60048036038101906105099190612b49565b611336565b60405161051b919061272a565b60405180910390f35b61053e60048036038101906105399190612cfe565b611417565b005b34801561054c57600080fd5b506105676004803603810190610562919061282d565b6114f2565b60405161057491906127d5565b60405180910390f35b34801561058957600080fd5b506105a4600480360381019061059f9190612995565b6115a2565b6040516105b191906127d5565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc9190612dbb565b611bbd565b6040516105ee91906129d1565b60405180910390f35b34801561060357600080fd5b5061061e60048036038101906106199190612e0e565b611d70565b60405161062b919061272a565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190612e4e565b611e08565b60405161066891906129d1565b60405180910390f35b34801561067d57600080fd5b5061069860048036038101906106939190612995565b611f0d565b6040516106a591906129d1565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610702576001905061084f565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610754576001905061084f565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107a6576001905061084f565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107f8576001905061084f565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361084a576001905061084f565b600090505b919050565b6006805461086190612ee4565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90612ee4565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b610934838383611fb9565b808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60036020528060005260406000206000915090505481565b6109b7838383611fb9565b808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7257600080fd5b610a7a612643565b600260008681526020019081526020016000208054905091506000821115610af757600060026000878152602001908152602001600020600081548110610ac457610ac3612f15565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610af657600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff1603610c1c57600160086000828254610c109190612f73565b92505081905550610c3e565b8365ffffffffffff1660086000828254610c369190612f73565b925050819055505b8365ffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fb85ba54b9f6f8241b7e1499e3cfc186ac0b1c8b7100f599bf6ca6844f896c34287604051610c8d91906129d1565b60405180910390a360019250505092915050565b60018181548110610cb157600080fd5b906000526020600020016000915090505481565b60026020528160005260406000208181548110610ce157600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610def90612ee4565b80601f0160208091040260200160405190810160405280929190818152602001828054610e1b90612ee4565b8015610e685780601f10610e3d57610100808354040283529160200191610e68565b820191906000526020600020905b815481529060010190602001808311610e4b57829003601f168201915b505050505081565b8015610f9157600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f0e57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506110a9565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361102957600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611106919061272a565b60405180910390a35050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461116d57600080fd5b600160026000858152602001908152602001600020805490501461119057600080fd5b6000600260008581526020019081526020016000206000815481106111b8576111b7612f15565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff16146111ea57600080fd5b600060010260036000858152602001908152602001600020541461120d57600080fd5b8373ffffffffffffffffffffffffffffffffffffffff1690507fc000000000000000000000000000000000000000000000000000000000000000811790508060010260036000858152602001908152602001600020819055506001600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546112b69190612f73565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856001900460405161131e91906128c5565b60405180910390a38291505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461139157600080fd5b600060149054906101000a900460ff16156113ab57600080fd5b81156113cd576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001905092915050565b611422848484611fb9565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e846114d790612fe7565b6040516114e491906129d1565b60405180910390a450505050565b606060003073ffffffffffffffffffffffffffffffffffffffff1663f9613ab2846001026040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161154e91906129d1565b602060405180830381865afa15801561156b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158f9190613063565b905061159a816115a2565b915050919050565b606080600080604767ffffffffffffffff8111156115c3576115c2612bd3565b5b6040519080825280601f01601f1916602001820160405280156115f55781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061162d5761162c612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061169157611690612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6100000000000000000000000000000000000000000000000000000000000000836002815181106116f5576116f4612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f32000000000000000000000000000000000000000000000000000000000000008360038151811061175957611758612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3500000000000000000000000000000000000000000000000000000000000000836004815181106117bd576117bc612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061182157611820612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a000000000000000000000000000000000000000000000000000000000000008360068151811061188557611884612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611bb157600460f08783602081106118db576118da612f15565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff1610156119b35760308361194a919061309d565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061197f5761197e612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611a25565b6057836119c0919061309d565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106119f5576119f4612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611a3a57611a39612f15565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611b1157603083611a9c919061309d565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611acc9190612f73565b81518110611add57611adc612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611b8f565b605783611b1e919061309d565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611b4e9190612f73565b81518110611b5f57611b5e612f15565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611b9c9190612f73565b91508080611ba9906130d2565b9150506118bb565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611be957611be8612f15565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611c1157600080fd5b60008361ffff16148015611c43575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b15611ca25760018160000160068282829054906101000a900465ffffffffffff16611c6e919061311a565b92506101000a81548165ffffffffffff021916908365ffffffffffff160217905550611c9a8585611112565b915050611d69565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611cfa57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff1610611d4257600080fd5b611d658585858460000160069054906101000a900465ffffffffffff16856122d0565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff1681548110611e3457611e33612f15565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e9857600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff1611611ec357600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff1610611ef557600080fd5b611f0286868686856122d0565b915050949350505050565b60008060036000848152602001908152602001600020549050611f2f8161254e565b611f3857600080fd5b611f4181612580565b15611f4f5782915050611fb4565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161201091906128c5565b602060405180830381865afa15801561202d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120519190613169565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461208b57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146121bf573373ffffffffffffffffffffffffffffffffffffffff166004600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806121b557503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6121be57600080fd5b5b60006004600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061221c82846125b2565b6001600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461226c9190613196565b925050819055506001600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122c39190612f73565b9250508190555050505050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff1683179250826001029050600060010260036000838152602001908152602001600020541461236357600080fd5b84600001600c9054906101000a900460ff166123c5578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16146123c457600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff16612446919061311a565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055506001600a60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124d39190612f73565b925050819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161253791906128c5565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000808360010290506003600082815260200190815260200160002054600190049150600082036125e257600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6126bf8161268a565b81146126ca57600080fd5b50565b6000813590506126dc816126b6565b92915050565b6000602082840312156126f8576126f7612680565b5b6000612706848285016126cd565b91505092915050565b60008115159050919050565b6127248161270f565b82525050565b600060208201905061273f600083018461271b565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561277f578082015181840152602081019050612764565b60008484015250505050565b6000601f19601f8301169050919050565b60006127a782612745565b6127b18185612750565b93506127c1818560208601612761565b6127ca8161278b565b840191505092915050565b600060208201905081810360008301526127ef818461279c565b905092915050565b6000819050919050565b61280a816127f7565b811461281557600080fd5b50565b60008135905061282781612801565b92915050565b60006020828403121561284357612842612680565b5b600061285184828501612818565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006128858261285a565b9050919050565b6128958161287a565b82525050565b60006020820190506128b0600083018461288c565b92915050565b6128bf816127f7565b82525050565b60006020820190506128da60008301846128b6565b92915050565b6128e98161287a565b81146128f457600080fd5b50565b600081359050612906816128e0565b92915050565b60008060006060848603121561292557612924612680565b5b6000612933868287016128f7565b9350506020612944868287016128f7565b925050604061295586828701612818565b9150509250925092565b6000819050919050565b6129728161295f565b811461297d57600080fd5b50565b60008135905061298f81612969565b92915050565b6000602082840312156129ab576129aa612680565b5b60006129b984828501612980565b91505092915050565b6129cb8161295f565b82525050565b60006020820190506129e660008301846129c2565b92915050565b600065ffffffffffff82169050919050565b612a07816129ec565b8114612a1257600080fd5b50565b600081359050612a24816129fe565b92915050565b60008060408385031215612a4157612a40612680565b5b6000612a4f85828601612980565b9250506020612a6085828601612a15565b9150509250929050565b60008060408385031215612a8157612a80612680565b5b6000612a8f85828601612980565b9250506020612aa085828601612818565b9150509250929050565b612ab3816129ec565b82525050565b6000606082019050612ace6000830186612aaa565b612adb6020830185612aaa565b612ae8604083018461271b565b949350505050565b600060208284031215612b0657612b05612680565b5b6000612b14848285016128f7565b91505092915050565b612b268161270f565b8114612b3157600080fd5b50565b600081359050612b4381612b1d565b92915050565b60008060408385031215612b6057612b5f612680565b5b6000612b6e858286016128f7565b9250506020612b7f85828601612b34565b9150509250929050565b60008060408385031215612ba057612b9f612680565b5b6000612bae858286016128f7565b9250506020612bbf85828601612980565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612c0b8261278b565b810181811067ffffffffffffffff82111715612c2a57612c29612bd3565b5b80604052505050565b6000612c3d612676565b9050612c498282612c02565b919050565b600067ffffffffffffffff821115612c6957612c68612bd3565b5b612c728261278b565b9050602081019050919050565b82818337600083830152505050565b6000612ca1612c9c84612c4e565b612c33565b905082815260208101848484011115612cbd57612cbc612bce565b5b612cc8848285612c7f565b509392505050565b600082601f830112612ce557612ce4612bc9565b5b8135612cf5848260208601612c8e565b91505092915050565b60008060008060808587031215612d1857612d17612680565b5b6000612d26878288016128f7565b9450506020612d37878288016128f7565b9350506040612d4887828801612818565b925050606085013567ffffffffffffffff811115612d6957612d68612685565b5b612d7587828801612cd0565b91505092959194509250565b600061ffff82169050919050565b612d9881612d81565b8114612da357600080fd5b50565b600081359050612db581612d8f565b92915050565b600080600060608486031215612dd457612dd3612680565b5b6000612de2868287016128f7565b9350506020612df386828701612980565b9250506040612e0486828701612da6565b9150509250925092565b60008060408385031215612e2557612e24612680565b5b6000612e33858286016128f7565b9250506020612e44858286016128f7565b9150509250929050565b60008060008060808587031215612e6857612e67612680565b5b6000612e76878288016128f7565b9450506020612e8787828801612980565b9350506040612e9887828801612da6565b9250506060612ea987828801612a15565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612efc57607f821691505b602082108103612f0f57612f0e612eb5565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612f7e826127f7565b9150612f89836127f7565b9250828201905080821115612fa157612fa0612f44565b5b92915050565b600081519050919050565b6000819050602082019050919050565b6000612fce825161295f565b80915050919050565b60008160020a8302905092915050565b6000612ff282612fa7565b82612ffc84612fb2565b905061300781612fc2565b92506020821015613047576130427fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83602003600802612fd7565b831692505b5050919050565b60008151905061305d81612969565b92915050565b60006020828403121561307957613078612680565b5b60006130878482850161304e565b91505092915050565b600060ff82169050919050565b60006130a882613090565b91506130b383613090565b9250828201905060ff8111156130cc576130cb612f44565b5b92915050565b60006130dd826127f7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361310f5761310e612f44565b5b600182019050919050565b6000613125826129ec565b9150613130836129ec565b9250828201905065ffffffffffff81111561314e5761314d612f44565b5b92915050565b600081519050613163816128e0565b92915050565b60006020828403121561317f5761317e612680565b5b600061318d84828501613154565b91505092915050565b60006131a1826127f7565b91506131ac836127f7565b92508282039050818111156131c4576131c3612f44565b5b9291505056fea2646970667358221220fe8cb8e6c3aa02a6a48c9690e8826550c4e7e6bcffb3fe21531acd66f434529164736f6c63430008110033 -\ No newline at end of file +60806040523480156200001157600080fd5b506040516200432738038062004327833981810160405281019062000037919062000279565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060098190555082600690816200008f919062000564565b508160079081620000a1919062000564565b505050506200064b565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200011482620000c9565b810181811067ffffffffffffffff82111715620001365762000135620000da565b5b80604052505050565b60006200014b620000ab565b905062000159828262000109565b919050565b600067ffffffffffffffff8211156200017c576200017b620000da565b5b6200018782620000c9565b9050602081019050919050565b60005b83811015620001b457808201518184015260208101905062000197565b60008484015250505050565b6000620001d7620001d1846200015e565b6200013f565b905082815260208101848484011115620001f657620001f5620000c4565b5b6200020384828562000194565b509392505050565b600082601f830112620002235762000222620000bf565b5b815162000235848260208601620001c0565b91505092915050565b6000819050919050565b62000253816200023e565b81146200025f57600080fd5b50565b600081519050620002738162000248565b92915050565b600080600060608486031215620002955762000294620000b5565b5b600084015167ffffffffffffffff811115620002b657620002b5620000ba565b5b620002c4868287016200020b565b935050602084015167ffffffffffffffff811115620002e857620002e7620000ba565b5b620002f6868287016200020b565b9250506040620003098682870162000262565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036657607f821691505b6020821081036200037c576200037b6200031e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003a7565b620003f58683620003a7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004426200043c62000436846200040d565b62000417565b6200040d565b9050919050565b6000819050919050565b6200045e8362000421565b620004766200046d8262000449565b848454620003b7565b825550505050565b600090565b6200048d6200047e565b6200049a81848462000453565b505050565b5b81811015620004c257620004b660008262000483565b600181019050620004a0565b5050565b601f8211156200051157620004db8162000382565b620004e68462000397565b81016020851015620004f6578190505b6200050e620005058562000397565b8301826200049f565b50505b505050565b60008160020a8304905092915050565b6000620005396000198460080262000516565b1980831691505092915050565b600062000554838362000526565b9150826002028217905092915050565b6200056f8262000313565b67ffffffffffffffff8111156200058b576200058a620000da565b5b6200059782546200034d565b620005a4828285620004c6565b600060209050601f831160018114620005dc5760008415620005c7578287015190505b620005d3858262000546565b86555062000643565b601f198416620005ec8662000382565b60005b828110156200061657848901518255600182019150602085019450602081019050620005ef565b8683101562000636578489015162000632601f89168262000526565b8355505b6001600288020188555050505b505050505050565b613ccc806200065b6000396000f3fe6080604052600436106101d4576000357c01000000000000000000000000000000000000000000000000000000009004806370a0823111610109578063b88d4fde116100a7578063d824ee4f11610081578063d824ee4f1461069c578063e985e9c5146106d9578063f117e17314610716578063f9613ab214610753576101d4565b8063b88d4fde14610606578063c87b56dd14610622578063c9796c391461065f576101d4565b8063a22cb465116100e3578063a22cb46514610538578063adf288df14610561578063b1a6afd31461059e578063b242e534146105c9576101d4565b806370a08231146104a55780638da5cb5b146104e257806395d89b411461050d576101d4565b806342842e0e116101765780634f64b2be116101505780634f64b2be146103af578063559f5dc9146103ec5780636352211e1461042b57806369e85c7114610468576101d4565b806342842e0e1461032d57806349f2553a146103495780634d03546a14610372576101d4565b806318160ddd116101b257806318160ddd1461027e57806323b872dd146102a957806324e0febc146102c557806340c84b0e14610302576101d4565b806301ffc9a7146101d957806306fdde0314610216578063081812fc14610241575b600080fd5b3480156101e557600080fd5b5061020060048036038101906101fb9190612e26565b610790565b60405161020d9190612e6e565b60405180910390f35b34801561022257600080fd5b5061022b610936565b6040516102389190612f19565b60405180910390f35b34801561024d57600080fd5b5061026860048036038101906102639190612f71565b6109c4565b6040516102759190612fdf565b60405180910390f35b34801561028a57600080fd5b50610293610a01565b6040516102a09190613009565b60405180910390f35b6102c360048036038101906102be9190613050565b610a0b565b005b3480156102d157600080fd5b506102ec60048036038101906102e791906130d9565b610a76565b6040516102f99190613115565b60405180910390f35b34801561030e57600080fd5b50610317610a8e565b6040516103249190613185565b60405180910390f35b61034760048036038101906103429190613050565b610b1c565b005b34801561035557600080fd5b50610370600480360381019061036b91906132dc565b610b87565b005b34801561037e57600080fd5b5061039960048036038101906103949190613363565b610e9f565b6040516103a69190612e6e565b60405180910390f35b3480156103bb57600080fd5b506103d660048036038101906103d19190612f71565b611129565b6040516103e39190613115565b60405180910390f35b3480156103f857600080fd5b50610413600480360381019061040e91906133a3565b61114d565b604051610422939291906133f2565b60405180910390f35b34801561043757600080fd5b50610452600480360381019061044d9190612f71565b6111c1565b60405161045f9190612fdf565b60405180910390f35b34801561047457600080fd5b5061048f600480360381019061048a91906130d9565b6111fd565b60405161049c9190612f19565b60405180910390f35b3480156104b157600080fd5b506104cc60048036038101906104c79190613429565b611416565b6040516104d99190613009565b60405180910390f35b3480156104ee57600080fd5b506104f761145f565b6040516105049190612fdf565b60405180910390f35b34801561051957600080fd5b50610522611483565b60405161052f9190612f19565b60405180910390f35b34801561054457600080fd5b5061055f600480360381019061055a9190613482565b611511565b005b34801561056d57600080fd5b50610588600480360381019061058391906134c2565b6117b3565b6040516105959190613115565b60405180910390f35b3480156105aa57600080fd5b506105b36119d1565b6040516105c09190613115565b60405180910390f35b3480156105d557600080fd5b506105f060048036038101906105eb9190613482565b6119d7565b6040516105fd9190612e6e565b60405180910390f35b610620600480360381019061061b91906135a3565b611ab8565b005b34801561062e57600080fd5b5061064960048036038101906106449190612f71565b611b93565b6040516106569190612f19565b60405180910390f35b34801561066b57600080fd5b50610686600480360381019061068191906130d9565b611ba8565b6040516106939190612f19565b60405180910390f35b3480156106a857600080fd5b506106c360048036038101906106be9190613660565b611fa2565b6040516106d09190613115565b60405180910390f35b3480156106e557600080fd5b5061070060048036038101906106fb91906136b3565b612155565b60405161070d9190612e6e565b60405180910390f35b34801561072257600080fd5b5061073d600480360381019061073891906136f3565b6121ed565b60405161074a9190613115565b60405180910390f35b34801561075f57600080fd5b5061077a600480360381019061077591906130d9565b6122f2565b6040516107879190613115565b60405180910390f35b60006380ac58cd7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107e45760019050610931565b635b5e139f7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036108365760019050610931565b63780e9d637c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036108885760019050610931565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036108da5760019050610931565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361092c5760019050610931565b600090505b919050565b6006805461094390613789565b80601f016020809104026020016040519081016040528092919081815260200182805461096f90613789565b80156109bc5780601f10610991576101008083540402835291602001916109bc565b820191906000526020600020905b81548152906001019060200180831161099f57829003601f168201915b505050505081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600854905090565b610a1683838361239e565b808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60036020528060005260406000206000915090505481565b600a8054610a9b90613789565b80601f0160208091040260200160405190810160405280929190818152602001828054610ac790613789565b8015610b145780601f10610ae957610100808354040283529160200191610b14565b820191906000526020600020905b815481529060010190602001808311610af757829003601f168201915b505050505081565b610b2783838361239e565b808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b606060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610be457600080fd5b82915081519050602f7f01000000000000000000000000000000000000000000000000000000000000000282600183610c1d91906137e9565b81518110610c2e57610c2d61381d565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610cae578080610caa9061384c565b9150505b8067ffffffffffffffff811115610cc857610cc76131b1565b5b6040519080825280601f01601f191660200182016040528015610cfa5781602001600182028036833780820191505090505b50600a9081610d099190613a46565b5060005b8251811015610dfa57828181518110610d2957610d2861381d565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002600a828154610d8190613789565b8110610d9057610d8f61381d565b5b815460011615610daf5790600052602060002090602091828204019190065b601f036101000a81548160ff021916907f0100000000000000000000000000000000000000000000000000000000000000840402179055508080610df29061384c565b915050610d0d565b5081518114610e9a577f2f00000000000000000000000000000000000000000000000000000000000000600a83518154610e3390613789565b8110610e4257610e4161381d565b5b815460011615610e615790600052602060002090602091828204019190065b601f036101000a81548160ff021916907f0100000000000000000000000000000000000000000000000000000000000000840402179055505b505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610efa57600080fd5b610f02612d87565b600260008681526020019081526020016000208054905091506000821115610f7f57600060026000878152602001908152602001600020600081548110610f4c57610f4b61381d565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff1611610f7e57600080fd5b5b83816000019065ffffffffffff16908165ffffffffffff168152505060026000868152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548165ffffffffffff021916908365ffffffffffff16021790555060208201518160000160066101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001600c6101000a81548160ff0219169083151502179055505050600185908060018154018082558091505060019003906000526020600020016000909190919091505560008465ffffffffffff16036110a4576001600860008282546110989190613b18565b925050819055506110c6565b8365ffffffffffff16600860008282546110be9190613b18565b925050819055505b8365ffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fb85ba54b9f6f8241b7e1499e3cfc186ac0b1c8b7100f599bf6ca6844f896c342876040516111159190613115565b60405180910390a360019250505092915050565b6001818154811061113957600080fd5b906000526020600020016000915090505481565b6002602052816000526040600020818154811061116957600080fd5b90600052602060002001600091509150508060000160009054906101000a900465ffffffffffff16908060000160069054906101000a900465ffffffffffff169080600001600c9054906101000a900460ff16905083565b600080600360008460010281526020019081526020016000205490506060819060020a026c010000000000000000000000009004915050919050565b6060806060600061120d856126b5565b9150600a805461121c90613789565b9050905080825161122d9190613b18565b67ffffffffffffffff811115611246576112456131b1565b5b6040519080825280601f01601f1916602001820160405280156112785781602001600182028036833780820191505090505b50925060005b8181101561133d57600a81815461129490613789565b81106112a3576112a261381d565b5b8154600116156112c25790600052602060002090602091828204019190065b9054901a7f0100000000000000000000000000000000000000000000000000000000000000028482815181106112fb576112fa61381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806113359061384c565b91505061127e565b5060005b825181101561140a5782818151811061135d5761135c61381d565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000028483815181106113ba576113b961381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535081806113f49061384c565b92505080806114029061384c565b915050611341565b50829350505050919050565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6007805461149090613789565b80601f01602080910402602001604051908101604052809291908181526020018280546114bc90613789565b80156115095780601f106114de57610100808354040283529160200191611509565b820191906000526020600020905b8154815290600101906020018083116114ec57829003601f168201915b505050505081565b801561163257600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115af57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061174a565b600073ffffffffffffffffffffffffffffffffffffffff16600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036116ca57600080fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516117a79190612e6e565b60405180910390a35050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461180e57600080fd5b600160026000858152602001908152602001600020805490501461183157600080fd5b6000600260008581526020019081526020016000206000815481106118595761185861381d565b5b9060005260206000200160000160009054906101000a900465ffffffffffff1665ffffffffffff161461188b57600080fd5b60006001026003600085815260200190815260200160002054146118ae57600080fd5b8373ffffffffffffffffffffffffffffffffffffffff1690507fc000000000000000000000000000000000000000000000000000000000000000811790508060010260036000858152602001908152602001600020819055506001600b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546119579190613b18565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f885600190046040516119bf9190613009565b60405180910390a38291505092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a3257600080fd5b600060149054906101000a900460ff1615611a4c57600080fd5b8115611a6e576001600060146101000a81548160ff0219169083151502179055505b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001905092915050565b611ac384848461239e565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e84611b7890613b71565b604051611b859190613115565b60405180910390a450505050565b6060611ba1826001026111fd565b9050919050565b60608060606000611bb8856126b5565b9150604767ffffffffffffffff811115611bd557611bd46131b1565b5b6040519080825280601f01601f191660200182016040528015611c075781602001600182028036833780820191505090505b5092507f730000000000000000000000000000000000000000000000000000000000000083600081518110611c3f57611c3e61381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f680000000000000000000000000000000000000000000000000000000000000083600181518110611ca357611ca261381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f610000000000000000000000000000000000000000000000000000000000000083600281518110611d0757611d0661381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f320000000000000000000000000000000000000000000000000000000000000083600381518110611d6b57611d6a61381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f350000000000000000000000000000000000000000000000000000000000000083600481518110611dcf57611dce61381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f360000000000000000000000000000000000000000000000000000000000000083600581518110611e3357611e3261381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a0000000000000000000000000000000000000000000000000000000000000083600681518110611e9757611e9661381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6040811015611f9657828181518110611ee957611ee861381d565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002848381518110611f4657611f4561381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508180611f809061384c565b9250508080611f8e9061384c565b915050611ecd565b50829350505050919050565b600080600260008581526020019081526020016000208361ffff1681548110611fce57611fcd61381d565b5b90600052602060002001905080600001600c9054906101000a900460ff1615611ff657600080fd5b60008361ffff16148015612028575060008160000160009054906101000a900465ffffffffffff1665ffffffffffff16145b156120875760018160000160068282829054906101000a900465ffffffffffff166120539190613bd8565b92506101000a81548165ffffffffffff021916908365ffffffffffff16021790555061207f85856117b3565b91505061214e565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146120df57600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168160000160069054906101000a900465ffffffffffff1665ffffffffffff161061212757600080fd5b61214a8585858460000160069054906101000a900465ffffffffffff1685612a14565b9150505b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080600260008681526020019081526020016000208461ffff16815481106122195761221861381d565b5b90600052602060002001905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461227d57600080fd5b60008160000160009054906101000a900465ffffffffffff1665ffffffffffff16116122a857600080fd5b8060000160009054906101000a900465ffffffffffff1665ffffffffffff168365ffffffffffff16106122da57600080fd5b6122e78686868685612a14565b915050949350505050565b6000806003600084815260200190815260200160002054905061231481612c92565b61231d57600080fd5b61232681612cc4565b156123345782915050612399565b7effffffffffffffff00000000000000000000000000000000000000000000006001028116905060b881908060020a820491505090507fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000600102831681179050809150505b919050565b60003073ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016123f59190613009565b602060405180830381865afa158015612412573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124369190613c27565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461247057600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146125a4573373ffffffffffffffffffffffffffffffffffffffff166004600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061259a57503373ffffffffffffffffffffffffffffffffffffffff16600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6125a357600080fd5b5b60006004600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506126018284612cf6565b6001600b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461265191906137e9565b925050819055506001600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546126a89190613b18565b9250508190555050505050565b606080600080604067ffffffffffffffff8111156126d6576126d56131b1565b5b6040519080825280601f01601f1916602001820160405280156127085781602001600182028036833780820191505090505b5092506000905060005b6020811015612a0857600460f08783602081106127325761273161381d565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff16101561280a576030836127a19190613c61565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106127d6576127d561381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061287c565b6057836128179190613c61565b7f01000000000000000000000000000000000000000000000000000000000000000284838151811061284c5761284b61381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f8682602081106128915761289061381d565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015612968576030836128f39190613c61565b7f010000000000000000000000000000000000000000000000000000000000000002846001846129239190613b18565b815181106129345761293361381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506129e6565b6057836129759190613c61565b7f010000000000000000000000000000000000000000000000000000000000000002846001846129a59190613b18565b815181106129b6576129b561381d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b6002826129f39190613b18565b91508080612a009061384c565b915050612712565b50829350505050919050565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008860019004169250603067ffffffffffffffff8861ffff161667ffffffffffffffff169060020a0267ffffffffffffffff16831792508565ffffffffffff16831792508260010290506000600102600360008381526020019081526020016000205414612aa757600080fd5b84600001600c9054906101000a900460ff16612b09578460000160069054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff1614612b0857600185600001600c6101000a81548160ff0219169083151502179055505b5b67ffffffffffffffff886001900416915060b8829060020a0291507f8000000000000000000000000000000000000000000000000000000000000000821791508873ffffffffffffffffffffffffffffffffffffffff168217915060018560000160068282829054906101000a900465ffffffffffff16612b8a9190613bd8565b92506101000a81548165ffffffffffff021916908365ffffffffffff1602179055508160010260036000838152602001908152602001600020819055506001600b60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612c179190613b18565b925050819055508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f885604051612c7b9190613009565b60405180910390a380935050505095945050505050565b6000807f8000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b6000807f4000000000000000000000000000000000000000000000000000000000000000836001900416119050919050565b600080836001029050600360008281526020019081526020016000205460019004915060008203612d2657600080fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000821691508273ffffffffffffffffffffffffffffffffffffffff168217915081600102600360008381526020019081526020016000208190555050505050565b6040518060600160405280600065ffffffffffff168152602001600065ffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612e0381612dce565b8114612e0e57600080fd5b50565b600081359050612e2081612dfa565b92915050565b600060208284031215612e3c57612e3b612dc4565b5b6000612e4a84828501612e11565b91505092915050565b60008115159050919050565b612e6881612e53565b82525050565b6000602082019050612e836000830184612e5f565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612ec3578082015181840152602081019050612ea8565b60008484015250505050565b6000601f19601f8301169050919050565b6000612eeb82612e89565b612ef58185612e94565b9350612f05818560208601612ea5565b612f0e81612ecf565b840191505092915050565b60006020820190508181036000830152612f338184612ee0565b905092915050565b6000819050919050565b612f4e81612f3b565b8114612f5957600080fd5b50565b600081359050612f6b81612f45565b92915050565b600060208284031215612f8757612f86612dc4565b5b6000612f9584828501612f5c565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612fc982612f9e565b9050919050565b612fd981612fbe565b82525050565b6000602082019050612ff46000830184612fd0565b92915050565b61300381612f3b565b82525050565b600060208201905061301e6000830184612ffa565b92915050565b61302d81612fbe565b811461303857600080fd5b50565b60008135905061304a81613024565b92915050565b60008060006060848603121561306957613068612dc4565b5b60006130778682870161303b565b93505060206130888682870161303b565b925050604061309986828701612f5c565b9150509250925092565b6000819050919050565b6130b6816130a3565b81146130c157600080fd5b50565b6000813590506130d3816130ad565b92915050565b6000602082840312156130ef576130ee612dc4565b5b60006130fd848285016130c4565b91505092915050565b61310f816130a3565b82525050565b600060208201905061312a6000830184613106565b92915050565b600081519050919050565b600082825260208201905092915050565b600061315782613130565b613161818561313b565b9350613171818560208601612ea5565b61317a81612ecf565b840191505092915050565b6000602082019050818103600083015261319f818461314c565b905092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6131e982612ecf565b810181811067ffffffffffffffff82111715613208576132076131b1565b5b80604052505050565b600061321b612dba565b905061322782826131e0565b919050565b600067ffffffffffffffff821115613247576132466131b1565b5b61325082612ecf565b9050602081019050919050565b82818337600083830152505050565b600061327f61327a8461322c565b613211565b90508281526020810184848401111561329b5761329a6131ac565b5b6132a684828561325d565b509392505050565b600082601f8301126132c3576132c26131a7565b5b81356132d384826020860161326c565b91505092915050565b6000602082840312156132f2576132f1612dc4565b5b600082013567ffffffffffffffff8111156133105761330f612dc9565b5b61331c848285016132ae565b91505092915050565b600065ffffffffffff82169050919050565b61334081613325565b811461334b57600080fd5b50565b60008135905061335d81613337565b92915050565b6000806040838503121561337a57613379612dc4565b5b6000613388858286016130c4565b92505060206133998582860161334e565b9150509250929050565b600080604083850312156133ba576133b9612dc4565b5b60006133c8858286016130c4565b92505060206133d985828601612f5c565b9150509250929050565b6133ec81613325565b82525050565b600060608201905061340760008301866133e3565b61341460208301856133e3565b6134216040830184612e5f565b949350505050565b60006020828403121561343f5761343e612dc4565b5b600061344d8482850161303b565b91505092915050565b61345f81612e53565b811461346a57600080fd5b50565b60008135905061347c81613456565b92915050565b6000806040838503121561349957613498612dc4565b5b60006134a78582860161303b565b92505060206134b88582860161346d565b9150509250929050565b600080604083850312156134d9576134d8612dc4565b5b60006134e78582860161303b565b92505060206134f8858286016130c4565b9150509250929050565b600067ffffffffffffffff82111561351d5761351c6131b1565b5b61352682612ecf565b9050602081019050919050565b600061354661354184613502565b613211565b905082815260208101848484011115613562576135616131ac565b5b61356d84828561325d565b509392505050565b600082601f83011261358a576135896131a7565b5b813561359a848260208601613533565b91505092915050565b600080600080608085870312156135bd576135bc612dc4565b5b60006135cb8782880161303b565b94505060206135dc8782880161303b565b93505060406135ed87828801612f5c565b925050606085013567ffffffffffffffff81111561360e5761360d612dc9565b5b61361a87828801613575565b91505092959194509250565b600061ffff82169050919050565b61363d81613626565b811461364857600080fd5b50565b60008135905061365a81613634565b92915050565b60008060006060848603121561367957613678612dc4565b5b60006136878682870161303b565b9350506020613698868287016130c4565b92505060406136a98682870161364b565b9150509250925092565b600080604083850312156136ca576136c9612dc4565b5b60006136d88582860161303b565b92505060206136e98582860161303b565b9150509250929050565b6000806000806080858703121561370d5761370c612dc4565b5b600061371b8782880161303b565b945050602061372c878288016130c4565b935050604061373d8782880161364b565b925050606061374e8782880161334e565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806137a157607f821691505b6020821081036137b4576137b361375a565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006137f482612f3b565b91506137ff83612f3b565b9250828203905081811115613817576138166137ba565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061385782612f3b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613889576138886137ba565b5b600182019050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b6000600883026138f97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826138b9565b61390386836138b9565b95508019841693508086168417925050509392505050565b6000819050919050565b600061394061393b61393684612f3b565b61391b565b612f3b565b9050919050565b6000819050919050565b61395a83613925565b61396e61396682613947565b8484546138c9565b825550505050565b600090565b613983613976565b61398e818484613951565b505050565b5b818110156139b2576139a760008261397b565b600181019050613994565b5050565b601f8211156139f7576139c881613894565b6139d1846138a9565b810160208510156139e0578190505b6139f46139ec856138a9565b830182613993565b50505b505050565b60008160020a8304905092915050565b6000613a1d600019846008026139fc565b1980831691505092915050565b6000613a368383613a0c565b9150826002028217905092915050565b613a4f82613130565b67ffffffffffffffff811115613a6857613a676131b1565b5b613a728254613789565b613a7d8282856139b6565b600060209050601f831160018114613ab05760008415613a9e578287015190505b613aa88582613a2a565b865550613b10565b601f198416613abe86613894565b60005b82811015613ae657848901518255600182019150602085019450602081019050613ac1565b86831015613b035784890151613aff601f891682613a0c565b8355505b6001600288020188555050505b505050505050565b6000613b2382612f3b565b9150613b2e83612f3b565b9250828201905080821115613b4657613b456137ba565b5b92915050565b6000819050602082019050919050565b6000613b6882516130a3565b80915050919050565b6000613b7c82613130565b82613b8684613b4c565b9050613b9181613b5c565b92506020821015613bd157613bcc7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff836020036008026138b9565b831692505b5050919050565b6000613be382613325565b9150613bee83613325565b9250828201905065ffffffffffff811115613c0c57613c0b6137ba565b5b92915050565b600081519050613c2181613024565b92915050565b600060208284031215613c3d57613c3c612dc4565b5b6000613c4b84828501613c12565b91505092915050565b600060ff82169050919050565b6000613c6c82613c54565b9150613c7783613c54565b9250828201905060ff811115613c9057613c8f6137ba565b5b9291505056fea264697066735822122077361d598f679782404ae11030ea625cd25005a2e158b847efb53141c9485e9b64736f6c63430008110033 +\ 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":"_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"}] +[{"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":"baseURL","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"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":"string","name":"_baseString","type":"string"}],"name":"setBaseURL","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":"_data","type":"bytes32"}],"name":"toURL","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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 @@ -223,6 +223,69 @@ class CraftNFT(ERC721): return o + def set_base_url(self, contract_address, sender_address, url, amount=0, tx_format=TxFormat.JSONRPC): + enc = ABIContractEncoder() + enc.method('setBaseURL') + enc.typ(ABIContractType.STRING) + enc.string(url) + data = enc.get() + tx = self.template(sender_address, contract_address, use_nonce=True) + tx = self.set_code(tx, data) + tx = self.finalize(tx, tx_format) + return tx + + + def to_uri(self, contract_address, token_id, sender_address=ZERO_ADDRESS, id_generator=None): + j = JSONRPCRequest(id_generator) + o = j.template() + o['method'] = 'eth_call' + enc = ABIContractEncoder() + enc.method('toURI') + enc.typ(ABIContractType.BYTES32) + enc.bytes32(token_id) + data = add_0x(enc.get()) + tx = self.template(sender_address, contract_address) + tx = self.set_code(tx, data) + o['params'].append(self.normalize(tx)) + o['params'].append('latest') + o = j.finalize(o) + return o + + + def to_url(self, contract_address, token_id, sender_address=ZERO_ADDRESS, id_generator=None): + j = JSONRPCRequest(id_generator) + o = j.template() + o['method'] = 'eth_call' + enc = ABIContractEncoder() + enc.method('toURL') + enc.typ(ABIContractType.BYTES32) + enc.bytes32(token_id) + data = add_0x(enc.get()) + tx = self.template(sender_address, contract_address) + tx = self.set_code(tx, data) + o['params'].append(self.normalize(tx)) + o['params'].append('latest') + o = j.finalize(o) + return o + + + def token_uri(self, contract_address, token_num_id, sender_address=ZERO_ADDRESS, id_generator=None): + j = JSONRPCRequest(id_generator) + o = j.template() + o['method'] = 'eth_call' + enc = ABIContractEncoder() + enc.method('tokenURI') + enc.typ(ABIContractType.UINT256) + enc.uint256(token_num_id) + data = add_0x(enc.get()) + tx = self.template(sender_address, contract_address) + tx = self.set_code(tx, data) + o['params'].append(self.normalize(tx)) + o['params'].append('latest') + o = j.finalize(o) + return o + + def mint_to(self, contract_address, sender_address, recipient, token_id, batch, index=None, tx_format=TxFormat.JSONRPC): enc = ABIContractEncoder() @@ -291,3 +354,8 @@ class CraftNFT(ERC721): o.index = int(token_id[52:64], 16) o.token_id = token_id[:48] + v[2:18] return o + + + def parse_uri(self, v): + r = abi_decode_single(ABIContractType.STRING, v) + return r diff --git a/python/craft_nft/runnable/allocate.py b/python/craft_nft/runnable/allocate.py @@ -39,6 +39,8 @@ logg = logging.getLogger() def process_config_local(config, arg, args, flags): + if config.get('_EXEC_ADDRESS') == None: + raise ValueError('exec address required') token_id = strip_0x(config.get('_POSARG')) bytes.fromhex(token_id) config.add(token_id, '_TOKEN_ID', False) diff --git a/python/tests/test_basic.py b/python/tests/test_basic.py @@ -59,6 +59,7 @@ class Test(EthTesterCase): r = self.conn.do(o) self.address = to_checksum_address(r['contract_address']) + def test_allocate(self): nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) c = CraftNFT(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) diff --git a/python/tests/test_uri.py b/python/tests/test_uri.py @@ -0,0 +1,106 @@ +# standard imports +import os +import unittest +import json +import logging + +# external imports +from chainlib.eth.unittest.ethtester import EthTesterCase +from chainlib.connection import RPCConnection +from chainlib.eth.nonce import RPCNonceOracle +from chainlib.eth.address import to_checksum_address +from chainlib.eth.tx import ( + receipt, + transaction, + TxFormat, + ) +from chainlib.eth.contract import ( + abi_decode_single, + ABIContractType, + ) +from chainlib.eth.address import is_same_address +from chainlib.error import JSONRPCException +from chainlib.eth.constant import ZERO_ADDRESS +from hexathon import ( + add_0x, + strip_0x, + ) +from chainlib.eth.tx import TxFormat +from chainlib.eth.contract import ABIContractEncoder + + +# local imports +from craft_nft import CraftNFT +from craft_nft.error import InvalidBatchError +from craft_nft.eth import ABIContractType +from craft_nft.nft import to_batch_key + +logging.basicConfig(level=logging.DEBUG) +logg = logging.getLogger() + +testdir = os.path.dirname(__file__) + +hash_of_foo = '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae' +hash_of_bar = 'fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9' + + +class TestURI(EthTesterCase): + + def setUp(self): + super(TestURI, self).setUp() + nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) + c = CraftNFT(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + (tx_hash, o) = c.constructor(self.accounts[0], 'DevBadge', 'DEV') + self.conn = RPCConnection.connect(self.chain_spec, 'default') + r = self.conn.do(o) + logg.debug('deployed with hash {}'.format(r)) + + o = receipt(r) + r = self.conn.do(o) + self.address = to_checksum_address(r['contract_address']) + + + def test_base_uri(self): + nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) + c = CraftNFT(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + + o = c.to_uri(self.address, hash_of_foo, sender_address=self.accounts[0]) + r = self.rpc.do(o) + uri = c.parse_uri(r) + self.assertEqual('sha256:' + hash_of_foo, uri) + + + def test_explicit_url(self): + nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) + c = CraftNFT(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + + (tx_hash_hex, o) = c.set_base_url(self.address, self.accounts[0], 'http://localhost') + self.rpc.do(o) + o = receipt(tx_hash_hex) + r = self.conn.do(o) + self.assertEqual(r['status'], 1) + + o = c.to_url(self.address, hash_of_foo, sender_address=self.accounts[0]) + r = self.rpc.do(o) + uri = c.parse_uri(r) + self.assertEqual('http://localhost/' + hash_of_foo, uri) + + o = c.token_uri(self.address, int(hash_of_foo, 16), sender_address=self.accounts[0]) + r = self.rpc.do(o) + uri = c.parse_uri(r) + self.assertEqual('http://localhost/' + hash_of_foo, uri) + + (tx_hash_hex, o) = c.set_base_url(self.address, self.accounts[0], 'https://example.org/') + self.rpc.do(o) + o = receipt(tx_hash_hex) + r = self.conn.do(o) + self.assertEqual(r['status'], 1) + + o = c.to_url(self.address, hash_of_bar, sender_address=self.accounts[0]) + r = self.rpc.do(o) + uri = c.parse_uri(r) + self.assertEqual('https://example.org/' + hash_of_bar, uri) + + +if __name__ == '__main__': + unittest.main() diff --git a/solidity/CraftNFT.sol b/solidity/CraftNFT.sol @@ -53,6 +53,9 @@ contract CraftNFT { // The digest of a human-readable resource that describes the rationale and terms for all tokens created by this contract. bytes32 public declaration; + // Editable base URI against which to look up token data by token id + bytes public baseURL; + // Balance mapping ( address => uint256 ) balance; @@ -333,12 +336,34 @@ contract CraftNFT { emit Transfer(_from, _to, _tokenId); } + // Allow mutable explicit url base + function setBaseURL(string memory _baseString) public { + bytes memory _base; + uint256 l; + require(msg.sender == owner); + + _base = bytes(_baseString); + l = _base.length; + if (_base[l-1] != 0x2f) { + l++; + } + baseURL = new bytes(l); + for (uint256 i = 0; i < _base.length; i++) { + baseURL[i] = _base[i]; + } + if (l != _base.length) { + baseURL[_base.length] = "/"; + } + } + // create sha256 scheme URI from tokenId function toURI(bytes32 _data) public pure returns(string memory) { bytes memory out; - uint8 t; + bytes memory _hexDigest; uint256 c; + _hexDigest = hexDigest(_data); + out = new bytes(64 + 7); out[0] = "s"; out[1] = "h"; @@ -348,7 +373,42 @@ contract CraftNFT { out[5] = "6"; out[6] = ":"; - c = 7; + c = 7; + for (uint256 i = 0; i < 64; i++) { + out[c] = _hexDigest[i]; + c++; + } + + return string(out); + } + + function toURL(bytes32 _data) public view returns(string memory) { + bytes memory out; + bytes memory _hexDigest; + uint256 c; + + _hexDigest = hexDigest(_data); + + c = baseURL.length; + out = new bytes(_hexDigest.length + c); + + for (uint256 i = 0; i < c; i++) { + out[i] = baseURL[i]; + } + for (uint256 i = 0; i < _hexDigest.length; i++) { + out[c] = _hexDigest[i]; + c++; + } + return string(out); + } + + function hexDigest(bytes32 _data) private pure returns(bytes memory) { + bytes memory out; + uint8 t; + uint256 c; + + out = new bytes(64); + c = 0; for (uint256 i = 0; i < 32; i++) { t = (uint8(_data[i]) & 0xf0) >> 4; if (t < 10) { @@ -364,19 +424,14 @@ contract CraftNFT { } c += 2; } - return string(out); + return out; } // ERC-721 (Metadata - optional) function tokenURI(uint256 _tokenId) public view returns (string memory) { - bytes32 digest; - - digest = this.getDigest(bytes32(_tokenId)); - - return toURI(digest); + return toURL(bytes32(_tokenId)); } - // EIP-165 function supportsInterface(bytes4 interfaceID) external pure returns (bool) { if (interfaceID == 0x80ac58cd) { // EIP 721