-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.exported.js
1 lines (1 loc) · 70.2 KB
/
.exported.js
1
module.exports = {"abi":[{"constant":true,"inputs":[{"name":"_interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"nftArtistSignature","outputs":[{"name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"_name","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_approved","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"wetrustSigner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"uint256"}],"name":"recipientUpdates","outputs":[{"name":"id","type":"bytes32"},{"name":"createdAt","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"_owner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hostname","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"getOwnedTokenList","outputs":[{"name":"tokenList","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"_symbol","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"nft","outputs":[{"name":"owner","type":"address"},{"name":"approval","type":"address"},{"name":"traits","type":"bytes32"},{"name":"edition","type":"uint16"},{"name":"nftType","type":"bytes4"},{"name":"recipientId","type":"bytes32"},{"name":"createdAt","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_operator","type":"address"},{"name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wetrustManager","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"recipients","outputs":[{"name":"name","type":"string"},{"name":"url","type":"string"},{"name":"owner","type":"address"},{"name":"nftCount","type":"uint256"},{"name":"exists","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"signer","type":"address"},{"name":"manager","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"recipientId","type":"bytes32"},{"indexed":false,"name":"updateId","type":"bytes32"}],"name":"RecipientUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_approved","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":false,"name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"constant":false,"inputs":[{"name":"tokenId","type":"uint256"},{"name":"receiver","type":"address"},{"name":"recipientId","type":"bytes32"},{"name":"traits","type":"bytes32"},{"name":"nftType","type":"bytes4"}],"name":"createNFT","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"signedMessage","type":"bytes"}],"name":"redeemToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"recipientId","type":"bytes32"},{"name":"name","type":"string"},{"name":"url","type":"string"},{"name":"owner","type":"address"}],"name":"addRecipient","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"recipientId","type":"bytes32"},{"name":"updateId","type":"bytes32"}],"name":"addRecipientUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"recipientId","type":"bytes32"},{"name":"name","type":"string"},{"name":"url","type":"string"},{"name":"owner","type":"address"}],"name":"updateRecipientInfo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"nftId","type":"uint256"},{"name":"artistSignature","type":"bytes"}],"name":"addArtistSignature","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newAddress","type":"address"}],"name":"changeWeTrustSigner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"recipientId","type":"bytes32"}],"name":"getUpdateCount","outputs":[{"name":"count","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenId","type":"uint256"},{"name":"nftType","type":"bytes4"},{"name":"traits","type":"bytes32"},{"name":"recipientId","type":"bytes32"}],"name":"createRedeemMessageHash","outputs":[{"name":"msgHash","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"nextNFTcount","type":"uint256"}],"name":"determineEdition","outputs":[{"name":"edition","type":"uint16"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"newHostName","type":"string"},{"name":"newName","type":"string"},{"name":"newSymbol","type":"string"}],"name":"setNFTContractInfo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x60806040526040805190810160405280600d81526020017f57655472757374204e6966747900000000000000000000000000000000000000815250600190805190602001906200005192919062000367565b506040805190810160405280600481526020017f5350524e00000000000000000000000000000000000000000000000000000000815250600290805190602001906200009f92919062000367565b506040805190810160405280602081526020017f68747470733a2f2f737072696e672e776574727573742e696f2f73686962612f81525060039080519060200190620000ed92919062000367565b50348015620000fb57600080fd5b5060405160408062005fcd833981018060405281019080805190602001909291908051906020019092919050505060016000806301ffc9a77c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548160ff021916908315150217905550600160008063780e9d637c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600080635b5e139f7c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548160ff02191690831515021790555060016000806380ac58cd7c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548160ff02191690831515021790555081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505062000416565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620003aa57805160ff1916838001178555620003db565b82800160010185558215620003db579182015b82811115620003da578251825591602001919060010190620003bd565b5b509050620003ea9190620003ee565b5090565b6200041391905b808211156200040f576000816000905550600101620003f5565b5090565b90565b615ba780620004266000396000f3006080604052600436106101cd576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301ffc9a7146101d2578063024cc06d1461023657806302b43e8f1461031357806306fdde03146103b9578063081812fc14610449578063095ea7b3146104b65780631000d2781461050357806313b4d1861461055a57806316c38b3c146105b857806316d41a5a146105e757806318160ddd1461065257806323b872dd1461067d5780632f745c59146106ea57806342842e0e1461074b5780634f6ccce7146107b8578063503e9d33146107f95780635c975abb1461083c57806360d2bee91461086b5780636352211e146108de5780636f4a5a351461094b57806370a08231146109db5780637cae6cb514610a325780637ff70a8914610a7b5780638b3294e514610b135780638c0b158814610b525780638d4d801c14610be457806394fdbbb214610cc157806395d89b4114610d4f5780639d0214cb14610ddf578063a22cb46514610ef8578063b88d4fde14610f47578063c87b56dd14610fcc578063d3f4e3e914611072578063e48341db146110c9578063e5ef8abb1461110e578063e985e9c514611269578063ea9ce8fd146112e4575b600080fd5b3480156101de57600080fd5b5061021c60048036038101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061134d565b604051808215151515815260200191505060405180910390f35b34801561024257600080fd5b506103116004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113b4565b005b34801561031f57600080fd5b5061033e6004803603810190808035906020019092919050505061172e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561037e578082015181840152602081019050610363565b50505050905090810190601f1680156103ab5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103c557600080fd5b506103ce6117de565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561040e5780820151818401526020810190506103f3565b50505050905090810190601f16801561043b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561045557600080fd5b5061047460048036038101908080359060200190929190505050611880565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104c257600080fd5b50610501600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061199d565b005b34801561050f57600080fd5b50610518611dcc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561056657600080fd5b50610593600480360381019080803560001916906020019092919080359060200190929190505050611df2565b6040518083600019166000191681526020018281526020019250505060405180910390f35b3480156105c457600080fd5b506105e5600480360381019080803515159060200190929190505050611e32565b005b3480156105f357600080fd5b50610650600480360381019080803590602001908201803590602001919091929391929390803590602001908201803590602001919091929391929390803590602001908201803590602001919091929391929390505050611f3a565b005b34801561065e57600080fd5b50610667612063565b6040518082815260200191505060405180910390f35b34801561068957600080fd5b506106e8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612070565b005b3480156106f657600080fd5b50610735600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506124de565b6040518082815260200191505060405180910390f35b34801561075757600080fd5b506107b6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506125be565b005b3480156107c457600080fd5b506107e3600480360381019080803590602001909291905050506125df565b6040518082815260200191505060405180910390f35b34801561080557600080fd5b5061083a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061267e565b005b34801561084857600080fd5b50610851612858565b604051808215151515815260200191505060405180910390f35b34801561087757600080fd5b506108dc60048036038101908080359060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061286b565b005b3480156108ea57600080fd5b5061090960048036038101908080359060200190929190505050612af2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561095757600080fd5b50610960612c0f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156109a0578082015181840152602081019050610985565b50505050905090810190601f1680156109cd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156109e757600080fd5b50610a1c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612cad565b6040518082815260200191505060405180910390f35b348015610a3e57600080fd5b50610a5d60048036038101908080359060200190929190505050612da0565b604051808261ffff1661ffff16815260200191505060405180910390f35b348015610a8757600080fd5b50610abc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612e0d565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610aff578082015181840152602081019050610ae4565b505050509050019250505060405180910390f35b348015610b1f57600080fd5b50610b5060048036038101908080356000191690602001909291908035600019169060200190929190505050612ea4565b005b348015610b5e57600080fd5b50610be260048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190803560001916906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050613216565b005b348015610bf057600080fd5b50610cbf6004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506134c2565b005b348015610ccd57600080fd5b50610d316004803603810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919080356000191690602001909291908035600019169060200190929190505050613874565b60405180826000191660001916815260200191505060405180910390f35b348015610d5b57600080fd5b50610d646139ab565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610da4578082015181840152602081019050610d89565b50505050905090810190601f168015610dd15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610deb57600080fd5b50610e0a60048036038101908080359060200190929190505050613a4d565b604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200186600019166000191681526020018561ffff1661ffff168152602001847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001836000191660001916815260200182815260200197505050505050505060405180910390f35b348015610f0457600080fd5b50610f45600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050613b06565b005b348015610f5357600080fd5b50610fca600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001919091929391929390505050613cae565b005b348015610fd857600080fd5b50610ff760048036038101908080359060200190929190505050613cf3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561103757808201518184015260208101905061101c565b50505050905090810190601f1680156110645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561107e57600080fd5b50611087613da0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156110d557600080fd5b506110f86004803603810190808035600019169060200190929190505050613dc6565b6040518082815260200191505060405180910390f35b34801561111a57600080fd5b5061113d6004803603810190808035600019169060200190929190505050613dee565b6040518080602001806020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185815260200184151515158152602001838103835288818151815260200191508051906020019080838360005b838110156111c35780820151818401526020810190506111a8565b50505050905090810190601f1680156111f05780820380516001836020036101000a031916815260200191505b50838103825287818151815260200191508051906020019080838360005b8381101561122957808201518184015260208101905061120e565b50505050905090810190601f1680156112565780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b34801561127557600080fd5b506112ca600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613f81565b604051808215151515815260200191505060405180910390f35b3480156112f057600080fd5b5061134b600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050614163565b005b6000806000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff169050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561149f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f73656e646572206d7573742062652066726f6d2057655472757374205369676e81526020017f657220416464726573730000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600960149054906101000a900460ff1615151561154a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f636f6e74726163742069732063757272656e746c7920696e207061757365642081526020017f737461746500000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b83600a6000826000191660001916815260200190815260200160002060040160009054906101000a900460ff1615156115eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f526563697069656e74204d75737420657869737400000000000000000000000081525060200191505060405180910390fd5b60008451111515611664576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f6e616d65206d757374206e6f7420626520656d70747920737472696e6700000081525060200191505060405180910390fd5b83600a6000876000191660001916815260200190815260200160002060000190805190602001906116969291906159aa565b5082600a6000876000191660001916815260200190815260200160002060010190805190602001906116c99291906159aa565b5081600a6000876000191660001916815260200190815260200160002060020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050565b600c6020528060005260406000206000915090508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117d65780601f106117ab576101008083540402835291602001916117d6565b820191906000526020600020905b8154815290600101906020018083116117b957829003601f168201915b505050505081565b606060018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156118765780601f1061184b57610100808354040283529160200191611876565b820191906000526020600020905b81548152906001019060200180831161185957829003601f168201915b5050505050905090565b600081600073ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561195e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4f776e6572206d75737420657869737420666f72207468697320746f6b656e0081525060200191505060405180910390fd5b6004600084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b60008160006004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480611a9b5750600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515611b35576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001807f53656e646572206973206e6f7420616e20617574686f72697a6564206f70657281526020017f61746f72206f66207468697320746f6b656e000000000000000000000000000081525060400191505060405180910390fd5b83600073ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515611c11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4f776e6572206d75737420657869737420666f72207468697320746f6b656e0081525060200191505060405180910390fd5b6004600086815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1693508373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614151515611d14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d8152602001807f617070726f76656420616464726573732063616e6e6f74206265206f776e657281526020017f206f662074686520746f6b656e0000000000000000000000000000000000000081525060400191505060405180910390fd5b856004600087815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550848673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b60205281600052604060002081815481101515611e0d57fe5b9060005260206000209060020201600091509150508060000154908060010154905082565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001807f73656e646572206d7573742062652066726f6d2057655472757374204d616e6181526020017f676572204164647265737300000000000000000000000000000000000000000081525060400191505060405180910390fd5b80600960146101000a81548160ff02191690831515021790555050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612025576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001807f73656e646572206d7573742062652066726f6d2057655472757374204d616e6181526020017f676572204164647265737300000000000000000000000000000000000000000081525060400191505060405180910390fd5b858560039190612036929190615a2a565b50838360019190612048929190615a2a565b5081816002919061205a929190615a2a565b50505050505050565b6000600580549050905090565b600082600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515612118576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f41646472657373206d757374206265206e6f6e207a65726f206164647265737381525060200191505060405180910390fd5b8260006004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806121c157503373ffffffffffffffffffffffffffffffffffffffff166121a983611880565b73ffffffffffffffffffffffffffffffffffffffff16145b806122525750600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15156122ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001807f53656e64657220646f6573206e6f742068617665207065726d697373696f6e2081526020017f746f207472616e73666572207468697320546f6b656e0000000000000000000081525060400191505060405180910390fd5b84600073ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515156123c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4f776e6572206d75737420657869737420666f72207468697320746f6b656e0081525060200191505060405180910390fd5b6004600087815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1694508773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415156124ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f66726f6d2061646472657373206d757374206265206f776e6572206f6620746f81526020017f6b656e496400000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6124d4878761470f565b5050505050505050565b60006124e983612cad565b8210151561255f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f696e646578206f7574206f662072616e6765000000000000000000000000000081525060200191505060405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020828154811015156125ab57fe5b9060005260206000200154905092915050565b6125da83838360206040519081016040528060008152506147c7565b505050565b60006005805490508210151561265d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f696e646578206f7574206f662072616e6765000000000000000000000000000081525060200191505060405180910390fd5b60058281548110151561266c57fe5b90600052602060002001549050919050565b600960149054906101000a900460ff16151515612729576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f636f6e74726163742069732063757272656e746c7920696e207061757365642081526020017f737461746500000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612814576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001807f73656e646572206d7573742062652066726f6d2057655472757374204d616e6181526020017f676572204164647265737300000000000000000000000000000000000000000081525060400191505060405180910390fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600960149054906101000a900460ff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612956576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f73656e646572206d7573742062652066726f6d2057655472757374205369676e81526020017f657220416464726573730000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600960149054906101000a900460ff16151515612a01576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f636f6e74726163742069732063757272656e746c7920696e207061757365642081526020017f737461746500000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6000600c6000848152602001908152602001600020805460018160011615610100020316600290049050141515612ac6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d8152602001807f417274697374205369676e617475726520616c7265616479206578697374206681526020017f6f72207468697320746f6b656e0000000000000000000000000000000000000081525060400191505060405180910390fd5b80600c60008481526020019081526020016000209080519060200190612aed929190615aaa565b505050565b600081600073ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515612bd0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4f776e6572206d75737420657869737420666f72207468697320746f6b656e0081525060200191505060405180910390fd5b6004600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b60038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612ca55780601f10612c7a57610100808354040283529160200191612ca5565b820191906000526020600020905b815481529060010190602001808311612c8857829003601f168201915b505050505081565b600081600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515612d55576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f41646472657373206d757374206265206e6f6e207a65726f206164647265737381525060200191505060405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050915050919050565b60008060006192e1905080841015612ddd5761012c6032612dcb60018703610258026109c401614edc565b01811515612dd557fe5b049150612df3565b6010611388828603811515612dee57fe5b040191505b611388821115612e035761138891505b8192505050919050565b6060600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015612e9857602002820191906000526020600020905b815481526020019060010190808311612e84575b50505050509050919050565b600960149054906101000a900460ff16151515612f4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f636f6e74726163742069732063757272656e746c7920696e207061757365642081526020017f737461746500000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b81600a6000826000191660001916815260200190815260200160002060040160009054906101000a900460ff161515612ff0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f526563697069656e74204d75737420657869737400000000000000000000000081525060200191505060405180910390fd5b82600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806130b65750600a6000826000191660001916815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515613150576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001807f73656e646572206d7573742062652066726f6d2057655472757374206f72205281526020017f6563697069656e742773206f776e65722061646472657373000000000000000081525060400191505060405180910390fd5b600b600085600019166000191681526020019081526020016000206040805190810160405280856000191681526020014281525090806001815401808255809150509060018203906000526020600020906002020160009091929091909150600082015181600001906000191690556020820151816001015550505083600019167f724ec1338c53d3f1f20f15b3bd0abd74ff600129ff940cb5a1b71f25edd716628460405180826000191660001916815260200191505060405180910390a250505050565b84600073ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515613317576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001807f4f776e6572206d757374206e6f7420657869737420666f72207468697320746f81526020017f6b656e000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f73656e646572206d7573742062652066726f6d2057655472757374205369676e81526020017f657220416464726573730000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600960149054906101000a900460ff161515156134ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f636f6e74726163742069732063757272656e746c7920696e207061757365642081526020017f737461746500000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6134ba8686868686614f27565b505050505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156135ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f73656e646572206d7573742062652066726f6d2057655472757374205369676e81526020017f657220416464726573730000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600960149054906101000a900460ff16151515613658576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f636f6e74726163742069732063757272656e746c7920696e207061757365642081526020017f737461746500000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b83600a6000826000191660001916815260200190815260200160002060040160009054906101000a900460ff161515156136fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f526563697069656e74204d757374206e6f74206578697374730000000000000081525060200191505060405180910390fd5b60008451111515613773576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f6e616d65206d757374206e6f7420626520656d70747920737472696e6700000081525060200191505060405180910390fd5b83600a6000876000191660001916815260200190815260200160002060000190805190602001906137a59291906159aa565b5082600a6000876000191660001916815260200190815260200160002060010190805190602001906137d89291906159aa565b5081600a6000876000191660001916815260200190815260200160002060020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600a6000876000191660001916815260200190815260200160002060040160006101000a81548160ff0219169083151502179055505050505050565b60003085858585604051602001808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401858152602001847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260040183600019166000191681526020018260001916600019168152602001955050505050506040516020818303038152906040526040518082805190602001908083835b602083101515613974578051825260208201915060208101905060208303925061394f565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050949350505050565b606060028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613a435780601f10613a1857610100808354040283529160200191613a43565b820191906000526020600020905b815481529060010190602001808311613a2657829003601f168201915b5050505050905090565b60046020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030160009054906101000a900461ffff16908060030160029054906101000a90047c010000000000000000000000000000000000000000000000000000000002908060040154908060050154905087565b81600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515613bac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f41646472657373206d757374206265206e6f6e207a65726f206164647265737381525060200191505060405180910390fd5b81600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3184604051808215151515815260200191505060405180910390a3505050565b613cec85858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506147c7565b5050505050565b6060613d9960038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613d8e5780601f10613d6357610100808354040283529160200191613d8e565b820191906000526020600020905b815481529060010190602001808311613d7157829003601f168201915b505050505083615246565b9050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600b60008360001916600019168152602001908152602001600020805490509050919050565b600a602052806000526040600020600091509050806000018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613e9a5780601f10613e6f57610100808354040283529160200191613e9a565b820191906000526020600020905b815481529060010190602001808311613e7d57829003601f168201915b505050505090806001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613f385780601f10613f0d57610100808354040283529160200191613f38565b820191906000526020600020905b815481529060010190602001808311613f1b57829003601f168201915b5050505050908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154908060040160009054906101000a900460ff16905085565b600082600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515614029576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f41646472657373206d757374206265206e6f6e207a65726f206164647265737381525060200191505060405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156140cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f41646472657373206d757374206265206e6f6e207a65726f206164647265737381525060200191505060405180910390fd5b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169250505092915050565b600080600080600080600080600060606000806000600960149054906101000a900460ff16151515614223576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f636f6e74726163742069732063757272656e746c7920696e207061757365642081526020017f737461746500000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6040805190810160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250935060208e01519c5060408e01519b5060608e01519a5060648e0151995060848e0151985060a48e0151975060c48e0151965060e48e015195503073ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff1614151561435c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001807f54686973207369676e6564204d657373616765206973206e6f74206d65616e7481526020017f20666f72207468697320736d61727420636f6e7472616374000000000000000081525060400191505060405180910390fd5b857f010000000000000000000000000000000000000000000000000000000000000090049450601b8560ff16101561439557601b850194505b600073ffffffffffffffffffffffffffffffffffffffff16600460008e815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515614495576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f5468697320746f6b656e20686173206265656e2072656465656d656420616c7281526020017f656164790000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6144a18c8c8c8c613874565b925083836040516020018083805190602001908083835b6020831015156144dd57805182526020820191506020810190506020830392506144b8565b6001836020036101000a0380198251168184511680821785525050505050509050018260001916600019168152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831015156145555780518252602082019150602081019050602083039250614530565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150600182868a8a604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af11580156145fb573d6000803e3d6000fd5b505050602060405103519050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156146f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d8152602001807f5765547275737420646964206e6f7420617574686f72697a656420746869732081526020017f72656465656d207363726970740000000000000000000000000000000000000081525060400191505060405180910390fd5b6146ff8c338b8d8f614f27565b5050505050505050505050505050565b60006004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050614753826154e1565b61475d818361558a565b61476783836157d3565b818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60008084600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515614870576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f41646472657373206d757374206265206e6f6e207a65726f206164647265737381525060200191505060405180910390fd5b8460006004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16148061491957503373ffffffffffffffffffffffffffffffffffffffff1661490183611880565b73ffffffffffffffffffffffffffffffffffffffff16145b806149aa5750600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515614a44576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001807f53656e64657220646f6573206e6f742068617665207065726d697373696f6e2081526020017f746f207472616e73666572207468697320546f6b656e0000000000000000000081525060400191505060405180910390fd5b86600073ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515614b20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4f776e6572206d75737420657869737420666f72207468697320746f6b656e0081525060200191505060405180910390fd5b6004600089815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1695508973ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141515614c22576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f66726f6d2061646472657373206d757374206265206f776e6572206f6620746f81526020017f6b656e496400000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b614c2c898961470f565b614c4b8973ffffffffffffffffffffffffffffffffffffffff16615997565b15614ed0578873ffffffffffffffffffffffffffffffffffffffff1663150b7a02338c8b8b6040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614d45578082015181840152602081019050614d2a565b50505050905090810190601f168015614d725780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015614d9457600080fd5b505af1158015614da8573d6000803e3d6000fd5b505050506040513d6020811015614dbe57600080fd5b8101908080519060200190929190505050945063150b7a027c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141515614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260398152602001807f726563696576657220636f6e747261637420646964206e6f742072657475726e81526020017f2074686520636f72726563742072657475726e2076616c75650000000000000081525060400191505060405180910390fd5b5b50505050505050505050565b600080600260018401811515614eee57fe5b0490508291505b81811015614f21578091506002818285811515614f0e57fe5b0401811515614f1957fe5b049050614ef5565b50919050565b82600a6000826000191660001916815260200190815260200160002060040160009054906101000a900460ff161515614fc8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f526563697069656e74204d75737420657869737400000000000000000000000081525060200191505060405180910390fd5b846004600088815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260046000888152602001908152602001600020600201816000191690555083600460008881526020019081526020016000206004018160001916905550816004600088815260200190815260200160002060030160026101000a81548163ffffffff02191690837c0100000000000000000000000000000000000000000000000000000000900402179055504260046000888152602001908152602001600020600501819055506150ef6001600a600087600019166000191681526020019081526020016000206003015401612da0565b6004600088815260200190815260200160002060030160006101000a81548161ffff021916908361ffff160217905550600a6000856000191660001916815260200190815260200160002060030160008154809291906001019190505550600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208690806001815401808255809150509060018203906000526020600020016000909192909190915055506005869080600181540180825580915050906001820390600052602060002001600090919290919091505550858573ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b606060006060600080606080600060649650866040519080825280601f01601f19166020018201604052801561528b5781602001602082028038833980820191505090505b509550600094505b60008914151561532a57600a898115156152a957fe5b069350600a898115156152b857fe5b049850836030017f01000000000000000000000000000000000000000000000000000000000000000286868060010197508151811015156152f557fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350615293565b899250848351016040519080825280601f01601f1916602001820160405280156153635781602001602082028038833980820191505090505b509150600090505b825181101561541857828181518110151561538257fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000282828151811015156153db57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808060010191505061536b565b600090505b848110156154d1578581600187030381518110151561543857fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002828451830181518110151561549457fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808060010191505061541d565b8197505050505050505092915050565b600073ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515615587576004600082815260200190815260200160002060010160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555b50565b6000808373ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561568c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f66726f6d2061646472657373206d757374206265206f776e6572206f6620746f81526020017f6b656e496400000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209150600082805490501115156156dd57fe5b600090505b8180549050811015615794578282828154811015156156fd57fe5b906000526020600020015414156157875781600183805490500381548110151561572357fe5b9060005260206000200154828281548110151561573c57fe5b906000526020600020018190555081600183805490500381548110151561575f57fe5b9060005260206000200160009055818054809190600190036157819190615b2a565b50615794565b80806001019150506156e2565b6004600084815260200190815260200160002060000160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550505050565b80600073ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156158d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001807f4f776e6572206d757374206e6f7420657869737420666f72207468697320746f81526020017f6b656e000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b826004600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020829080600181540180825580915050906001820390600052602060002001600090919290919091505550505050565b600080823b905060008111915050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106159eb57805160ff1916838001178555615a19565b82800160010185558215615a19579182015b82811115615a185782518255916020019190600101906159fd565b5b509050615a269190615b56565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10615a6b57803560ff1916838001178555615a99565b82800160010185558215615a99579182015b82811115615a98578235825591602001919060010190615a7d565b5b509050615aa69190615b56565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10615aeb57805160ff1916838001178555615b19565b82800160010185558215615b19579182015b82811115615b18578251825591602001919060010190615afd565b5b509050615b269190615b56565b5090565b815481835581811115615b5157818360005260206000209182019101615b509190615b56565b5b505050565b615b7891905b80821115615b74576000816000905550600101615b5c565b5090565b905600a165627a7a72305820f405b2a2e02d3165a2896a05b254b010d26d2c49d886ec673b0065910aaffd700029","sourceMap":"97:12509:2:-;;;4482:32:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;4560:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;4661:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3088:136:2;8:9:-1;5:2;;;30:1;27;20:12;5:2;3088:136:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;443:4:7;409:19;:31;429:10;409:31;;;;;;;;;;;;;;;;;:38;;;;;;;;;;;;;;;;;;5635:4:1;5601:19;:31;5621:10;5601:31;;;;;;;;;;;;;;;;;:38;;;;;;;;;;;;;;;;;;5703:4;5669:19;:31;5689:10;5669:31;;;;;;;;;;;;;;;;;:38;;;;;;;;;;;;;;;;;;5769:4;5735:19;:31;5755:10;5735:31;;;;;;;;;;;;;;;;;:38;;;;;;;;;;;;;;;;;;3177:6:2;3161:13;;:22;;;;;;;;;;;;;;;;;;3210:7;3193:14;;:24;;;;;;;;;;;;;;;;;;3088:136;;97:12509;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;","source":"pragma solidity ^0.4.24;\n\nimport \"./NFToken.sol\";\n\n//@dev Implemention of NFT for WeTrust Spring\ncontract SpringNFT is NFToken{\n\n\n //////////////////////////////\n // Events\n /////////////////////////////\n event RecipientUpdate(bytes32 indexed recipientId, bytes32 updateId);\n\n //////////////////////////////\n // Modifiers\n /////////////////////////////\n\n /**\n * @dev Guarrentees that recipient Exists\n * @param id receipientId to check\n */\n modifier recipientExists(bytes32 id) {\n require(recipients[id].exists, \"Recipient Must exist\");\n _;\n }\n\n /**\n * @dev Guarrentees that recipient does not Exists\n * @param id receipientId to check\n */\n modifier recipientDoesNotExists(bytes32 id) {\n require(!recipients[id].exists, \"Recipient Must not exists\");\n _;\n }\n\n /**\n * @dev Guarrentees that msg.sender is wetrust owned signer address\n */\n modifier onlyByWeTrustSigner() {\n require(msg.sender == wetrustSigner, \"sender must be from WeTrust Signer Address\");\n _;\n }\n\n /**\n * @dev Guarrentees that msg.sender is wetrust owned manager address\n */\n modifier onlyByWeTrustManager() {\n require(msg.sender == wetrustManager, \"sender must be from WeTrust Manager Address\");\n _;\n }\n\n /**\n * @dev Guarrentees that msg.sender is either wetrust recipient\n * @param id receipientId to check\n */\n modifier onlyByWeTrustOrRecipient(bytes32 id) {\n require(msg.sender == wetrustSigner || msg.sender == recipients[id].owner, \"sender must be from WeTrust or Recipient's owner address\");\n _;\n }\n\n /**\n * @dev Guarrentees that contract is not in paused state\n */\n modifier onlyWhenNotPaused() {\n require(!paused, \"contract is currently in paused state\");\n _;\n }\n\n //////////////////////////////\n // Storage Variables\n /////////////////////////////\n\n /**\n * @dev wetrust controlled address that is used to create new NFTs\n */\n address public wetrustSigner;\n\n /**\n *@dev wetrust controlled address that is used to switch the signer address\n */\n address public wetrustManager;\n\n /**\n * @dev if paused is true, suspend most of contract's functionality\n */\n bool public paused;\n\n /**\n * @dev mapping of recipients from WeTrust Spring platform\n */\n mapping(bytes32 => Recipient) public recipients;\n /**\n * @dev mapping to a list of updates made by recipients\n */\n mapping(bytes32 => Update[]) public recipientUpdates;\n\n /**\n * @dev Stores the Artist signed Message who created the NFT\n */\n mapping (uint256 => bytes) public nftArtistSignature;\n\n struct Update {\n bytes32 id;\n uint256 createdAt;\n }\n\n struct Recipient {\n string name;\n string url;\n address owner;\n uint256 nftCount;\n bool exists;\n }\n\n //////////////////////////////\n // Public functions\n /////////////////////////////\n\n /**\n * @dev contract constructor\n */\n constructor (address signer, address manager) NFToken() public {\n wetrustSigner = signer;\n wetrustManager = manager;\n }\n\n /**\n * @dev Create a new NFT\n * @param tokenId create new NFT with this tokenId\n * @param receiver the owner of the new NFT\n * @param recipientId The issuer of the NFT\n * @param traits NFT Traits\n * @param nftType Type of the NFT\n */\n\n function createNFT(\n uint256 tokenId,\n address receiver,\n bytes32 recipientId,\n bytes32 traits,\n bytes4 nftType)\n noOwnerExists(tokenId)\n onlyByWeTrustSigner\n onlyWhenNotPaused public\n {\n mint(tokenId, receiver, recipientId, traits, nftType);\n }\n\n /**\n * @dev Allows anyone to redeem a token by providing a signed Message from Spring platform\n * @param signedMessage A signed Message containing the NFT parameter from Spring platform\n * The Signed Message must be concatenated in the following format\n * - address to (the smart contract address)\n * - uint256 tokenId\n * - bytes4 nftType\n * - bytes32 traits\n * - bytes32 recipientId\n * - bytes32 r of Signature\n * - bytes32 s of Signature\n * - uint8 v of Signature\n */\n function redeemToken(bytes signedMessage) onlyWhenNotPaused public {\n address to;\n uint256 tokenId;\n bytes4 nftType;\n bytes32 traits;\n bytes32 recipientId;\n bytes32 r;\n bytes32 s;\n byte vInByte;\n uint8 v;\n string memory prefix = \"\\x19Ethereum Signed Message:\\n32\";\n\n assembly {\n to := mload(add(signedMessage, 32))\n tokenId := mload(add(signedMessage, 64))\n nftType := mload(add(signedMessage, 96)) // first 32 bytes are data padding\n traits := mload(add(signedMessage, 100))\n recipientId := mload(add(signedMessage, 132))\n r := mload(add(signedMessage, 164))\n s := mload(add(signedMessage, 196))\n vInByte := mload(add(signedMessage, 228))\n }\n require(to == address(this), \"This signed Message is not meant for this smart contract\");\n v = uint8(vInByte);\n if (v < 27) {\n v += 27;\n }\n\n require(nft[tokenId].owner == address(0), \"This token has been redeemed already\");\n bytes32 msgHash = createRedeemMessageHash(tokenId, nftType, traits, recipientId);\n bytes32 preFixedMsgHash = keccak256(\n abi.encodePacked(\n prefix,\n msgHash\n ));\n\n address signer = ecrecover(preFixedMsgHash, v, r, s);\n\n require(signer == wetrustSigner, \"WeTrust did not authorized this redeem script\");\n return mint(tokenId, msg.sender, recipientId, traits, nftType);\n }\n\n /**\n * @dev Add a new reciepient of WeTrust Spring\n * @param recipientId Unique identifier of receipient\n * @param name of the Recipient\n * @param url link to the recipient's website\n * @param owner Address owned by the recipient\n */\n function addRecipient(bytes32 recipientId, string name, string url, address owner)\n onlyByWeTrustSigner\n onlyWhenNotPaused\n recipientDoesNotExists(recipientId)\n public\n {\n require(bytes(name).length > 0, \"name must not be empty string\"); // no empty string\n\n recipients[recipientId].name = name;\n recipients[recipientId].url = url;\n recipients[recipientId].owner = owner;\n recipients[recipientId].exists = true;\n }\n\n /**\n * @dev Add an link to the update the recipient had made\n * @param recipientId The issuer of the update\n * @param updateId unique id of the update\n */\n function addRecipientUpdate(bytes32 recipientId, bytes32 updateId)\n onlyWhenNotPaused\n recipientExists(recipientId)\n onlyByWeTrustOrRecipient(recipientId)\n public\n {\n recipientUpdates[recipientId].push(Update(updateId, now));\n emit RecipientUpdate(recipientId, updateId);\n }\n\n /**\n * @dev Change recipient information\n * @param recipientId to change\n * @param name new name of the recipient\n * @param url new link of the recipient\n * @param owner new address owned by the recipient\n */\n function updateRecipientInfo(bytes32 recipientId, string name, string url, address owner)\n onlyByWeTrustSigner\n onlyWhenNotPaused\n recipientExists(recipientId)\n public\n {\n require(bytes(name).length > 0, \"name must not be empty string\"); // no empty string\n\n recipients[recipientId].name = name;\n recipients[recipientId].url = url;\n recipients[recipientId].owner = owner;\n }\n\n /**\n * @dev add a artist signed message for a particular NFT\n * @param nftId NFT to add the signature to\n * @param artistSignature Artist Signed Message\n */\n function addArtistSignature(uint256 nftId, bytes artistSignature) onlyByWeTrustSigner onlyWhenNotPaused public {\n require(nftArtistSignature[nftId].length == 0, \"Artist Signature already exist for this token\"); // make sure no prior signature exists\n\n nftArtistSignature[nftId] = artistSignature;\n }\n\n /**\n * @dev Set whether or not the contract is paused\n * @param _paused status to put the contract in\n */\n function setPaused(bool _paused) onlyByWeTrustManager public {\n paused = _paused;\n }\n\n /**\n * @dev Transfer the WeTrust signer of NFT contract to a new address\n * @param newAddress new WeTrust owned address\n */\n function changeWeTrustSigner(address newAddress) onlyWhenNotPaused onlyByWeTrustManager public {\n wetrustSigner = newAddress;\n }\n\n /**\n * @dev Returns the number of updates recipients had made\n * @param recipientId receipientId to check\n */\n function getUpdateCount(bytes32 recipientId) view public returns(uint256 count) {\n return recipientUpdates[recipientId].length;\n }\n\n /**\n * @dev returns the message hash to be signed for redeem token\n * @param tokenId id of the token to be created\n * @param nftType Type of NFT to be created\n * @param traits Traits of NFT to be created\n * @param recipientId Issuer of the NFT\n */\n function createRedeemMessageHash(\n uint256 tokenId,\n bytes4 nftType,\n bytes32 traits,\n bytes32 recipientId)\n view public returns(bytes32 msgHash)\n {\n return keccak256(\n abi.encodePacked(\n address(this),\n tokenId,\n nftType,\n traits,\n recipientId\n ));\n }\n\n /**\n * @dev Determines the edition of the NFT\n *\n * Formula based on:\n * g(x) = 150x^2 - 50x + 1 for 0 <= x <= 16\n * g(x) = 5000(x-16) + g(16) for 16 < x <= 5000\n *\n * where `x` is the edition and g(x) is the total of NFT up to x edition\n *\n * To find x:\n * x = (sqrt(2500 + (600 * (g(x) - 1))) + 50) / 300 for 1 < g(x) < 37601\n * x = min(5000, ((g(x) - 37601) / 5000) + 16) for g(x) >= 37601\n *\n * @param nextNFTcount to determine edition for\n */\n function determineEdition(uint256 nextNFTcount) pure public returns (uint16 edition) {\n uint256 output;\n uint256 valueWhenXisSixteen = 37601; // g(16)\n if (nextNFTcount < valueWhenXisSixteen) {\n output = (sqrt(2500 + (600 * (nextNFTcount - 1))) + 50) / 300;\n } else {\n output = ((nextNFTcount - valueWhenXisSixteen) / 5000) + 16;\n }\n\n if (output > 5000) {\n output = 5000;\n }\n\n edition = uint16(output); // we don't have to worry about casting because output will always be less than or equal to 5000\n }\n\n /**\n * @dev set new host name for this nft contract\n * @param newHostName new host name to use\n */\n function setNFTContractInfo(string newHostName, string newName, string newSymbol) onlyByWeTrustManager external {\n hostname = newHostName;\n nftName = newName;\n nftSymbol = newSymbol;\n }\n //////////////////////////\n // Private Functions\n /////////////////////////\n\n /**\n * @dev Find the Square root of a number\n * @param x input\n * Credit goes to: https://ethereum.stackexchange.com/questions/2910/can-i-square-root-in-solidity\n */\n\n function sqrt(uint x) pure internal returns (uint y) {\n uint z = (x + 1) / 2;\n y = x;\n while (z < y) {\n y = z;\n z = (x / z + z) / 2;\n }\n }\n\n /**\n * @dev Add the new NFT to the storage\n * @param receiver the owner of the new NFT\n * @param recipientId The issuer of the NFT\n * @param traits NFT Traits\n * @param nftType Type of the NFT\n */\n function mint(uint256 tokenId, address receiver, bytes32 recipientId, bytes32 traits, bytes4 nftType)\n recipientExists(recipientId)\n internal\n {\n nft[tokenId].owner = receiver;\n nft[tokenId].traits = traits;\n nft[tokenId].recipientId = recipientId;\n nft[tokenId].nftType = nftType;\n nft[tokenId].createdAt = now;\n nft[tokenId].edition = determineEdition(recipients[recipientId].nftCount + 1);\n\n recipients[recipientId].nftCount++;\n ownerToTokenList[receiver].push(tokenId);\n\n nftList.push(tokenId);\n\n emit Transfer(address(0), receiver, tokenId);\n }\n}\n","compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"schemaVersion":"2.0.1"};