diff --git a/python/eth_address_declarator/accounts_index/__init__.py b/python/eth_address_declarator/accounts_index/__init__.py new file mode 100644 index 0000000..8ea4c7a --- /dev/null +++ b/python/eth_address_declarator/accounts_index/__init__.py @@ -0,0 +1 @@ +from .accounts_index import * diff --git a/python/eth_address_declarator/accounts_index/accounts_index.py b/python/eth_address_declarator/accounts_index/accounts_index.py new file mode 100644 index 0000000..4b041d0 --- /dev/null +++ b/python/eth_address_declarator/accounts_index/accounts_index.py @@ -0,0 +1,54 @@ +# standard imports +import os + +# external imports +from chainlib.eth.tx import ( + TxFormat, + ) +from chainlib.eth.contract import ( + ABIContractEncoder, + ABIContractType, + ) +from eth_accounts_index.interface import AccountsIndex + +moddir = os.path.dirname(__file__) +datadir = os.path.join(moddir, '..', 'data') + + +class AccountsIndexAddressDeclarator(AccountsIndex): + + __abi = None + __bytecode = None + + @staticmethod + def abi(): + if AccountsIndexAddressDeclarator.__abi == None: + f = open(os.path.join(datadir, 'AccountsIndexAddressDeclarator.json'), 'r') + AccountsIndexAddressDeclarator.__abi = json.load(f) + f.close() + return AccountsIndexAddressDeclarator.__abi + + + @staticmethod + def bytecode(): + if AccountsIndexAddressDeclarator.__bytecode == None: + f = open(os.path.join(datadir, 'AccountsIndexAddressDeclarator.bin')) + AccountsIndexAddressDeclarator.__bytecode = f.read() + f.close() + return AccountsIndexAddressDeclarator.__bytecode + + + @staticmethod + def gas(code=None): + return 1200000 + + + def constructor(self, sender_address, context_address, address_declarator_address): + code = AccountsIndexAddressDeclarator.bytecode() + tx = self.template(sender_address, None, use_nonce=True) + enc = ABIContractEncoder() + enc.address(context_address) + enc.address(address_declarator_address) + code += enc.get() + tx = self.set_code(tx, code) + return self.build(tx) diff --git a/python/eth_address_declarator/data/AddressDeclarator.bin b/python/eth_address_declarator/data/AddressDeclarator.bin index 8d7cd25..4834db1 100644 --- a/python/eth_address_declarator/data/AddressDeclarator.bin +++ b/python/eth_address_declarator/data/AddressDeclarator.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b5060405162001c6038038062001c60833981810160405281019062000037919062000766565b606060048190806001815401808255809150506001900390600052602060002001600090919091909150908051906020019062000076929190620006de565b50600460016004805490506200008d91906200088d565b81548110620000c5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001434090806001815401808255809150506001900390600052602060002001600090919091909150556200011233836200011b640100000000026401000000009004565b50505062000a1e565b600080606060006200013d338762000384640100000000026401000000009004565b9250600160008481526020019081526020016000205490506000811415620002dd57600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506004829080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906200023c929190620006de565b506000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020869080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6001600480549050620002f191906200088d565b90508060016000858152602001908152602001600020819055506004818154811062000346577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020018590806001815401808255809150506001900390600052602060002001600090919091909150556001935050505092915050565b6000806000602867ffffffffffffffff811115620003cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015620003fe5781602001600182028036833780820191505090505b509050600085604051602001620004169190620007e4565b604051602081830303815290604052905060005b601481101562000537578181815181106200046e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002838281518110620004f2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806200052e9062000946565b9150506200042a565b50846040516020016200054b9190620007e4565b604051602081830303815290604052905060005b60148110156200067a57818181518110620005a3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283601483620005fd919062000830565b8151811062000635577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080620006719062000946565b9150506200055f565b506002826040516200068d919062000801565b602060405180830381855afa158015620006ab573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190620006d0919062000766565b925082935050505092915050565b8280548282559060005260206000209081019282156200071d579160200282015b828111156200071c578251825591602001919060010190620006ff565b5b5090506200072c919062000730565b5090565b5b808211156200074b57600081600090555060010162000731565b5090565b600081519050620007608162000a04565b92915050565b6000602082840312156200077957600080fd5b600062000789848285016200074f565b91505092915050565b620007a7620007a182620008c8565b62000994565b82525050565b6000620007ba826200081a565b620007c6818562000825565b9350620007d881856020860162000910565b80840191505092915050565b6000620007f2828462000792565b60148201915081905092915050565b60006200080f8284620007ad565b915081905092915050565b600081519050919050565b600081905092915050565b60006200083d8262000906565b91506200084a8362000906565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115620008825762000881620009bc565b5b828201905092915050565b60006200089a8262000906565b9150620008a78362000906565b925082821015620008bd57620008bc620009bc565b5b828203905092915050565b6000620008d582620008e6565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b838110156200093057808201518184015260208101905062000913565b8381111562000940576000848401525b50505050565b6000620009538262000906565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415620009895762000988620009bc565b5b600182019050919050565b6000620009a182620009a8565b9050919050565b6000620009b582620009eb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006c0100000000000000000000000082029050919050565b62000a0f81620008dc565b811462000a1b57600080fd5b50565b6112328062000a2e6000396000f3fe608060405234801561001057600080fd5b50600436106100a5576000357c0100000000000000000000000000000000000000000000000000000000900480638c661b36116100785780638c661b361461016a578063ae47ece01461019a578063d0e95db1146101ca578063ff7496b4146101fa576100a5565b806301ffc9a7146100aa57806322168e4f146100da57806350e0c6d31461010a5780637d64bf1d1461013a575b600080fd5b6100c460048036038101906100bf9190610d33565b61022a565b6040516100d19190610f10565b60405180910390f35b6100f460048036038101906100ef9190610cce565b6102d8565b6040516101019190610ed3565b60405180910390f35b610124600480360381019061011f9190610c2d565b610383565b6040516101319190610f46565b60405180910390f35b610154600480360381019061014f9190610cce565b6103ce565b6040516101619190610ed3565b60405180910390f35b610184600480360381019061017f9190610c56565b61047a565b6040516101919190610eee565b60405180910390f35b6101b460048036038101906101af9190610c92565b61053e565b6040516101c19190610f10565b60405180910390f35b6101e460048036038101906101df9190610c2d565b610790565b6040516101f19190610f46565b60405180910390f35b610214600480360381019061020f9190610d5c565b6107dc565b6040516102219190610f2b565b60405180910390f35b60006327beb9107c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561027f57600190506102d3565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156102d257600190506102d3565b5b919050565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110610350577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110610447577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905092915050565b60606000806104898585610819565b915060016000838152602001908152602001600020549050600481815481106104db577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561052f57602002820191906000526020600020905b81548152602001906001019080831161051b575b50505050509250505092915050565b6000806060600061054f3387610819565b92506001600084815260200190815260200160002054905060008114156106ec57600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060048290806001815401808255809150506001900390600052602060002001600090919091909150908051906020019061064b929190610b5a565b506000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020869080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60016004805490506106fe9190611006565b905080600160008581526020019081526020016000208190555060048181548110610752577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020018590806001815401808255809150506001900390600052602060002001600090919091909150556001935050505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b600482815481106107ec57600080fd5b90600052602060002001818154811061080457600080fd5b90600052602060002001600091509150505481565b6000806000602867ffffffffffffffff81111561085f577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156108915781602001600182028036833780820191505090505b5090506000856040516020016108a79190610ea1565b604051602081830303815290604052905060005b60148110156109c2578181815181106108fd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002838281518110610980577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806109ba906110eb565b9150506108bb565b50846040516020016109d49190610ea1565b604051602081830303815290604052905060005b6014811015610afb57818181518110610a2a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283601483610a829190610fb0565b81518110610ab9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080610af3906110eb565b9150506109e8565b50600282604051610b0c9190610ebc565b602060405180830381855afa158015610b29573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610b4c9190610d0a565b925082935050505092915050565b828054828255906000526020600020908101928215610b96579160200282015b82811115610b95578251825591602001919060010190610b7a565b5b509050610ba39190610ba7565b5090565b5b80821115610bc0576000816000905550600101610ba8565b5090565b600081359050610bd3816111a0565b92915050565b600081359050610be8816111b7565b92915050565b600081519050610bfd816111b7565b92915050565b600081359050610c12816111ce565b92915050565b600081359050610c27816111e5565b92915050565b600060208284031215610c3f57600080fd5b6000610c4d84828501610bc4565b91505092915050565b60008060408385031215610c6957600080fd5b6000610c7785828601610bc4565b9250506020610c8885828601610bc4565b9150509250929050565b60008060408385031215610ca557600080fd5b6000610cb385828601610bc4565b9250506020610cc485828601610bd9565b9150509250929050565b60008060408385031215610ce157600080fd5b6000610cef85828601610bc4565b9250506020610d0085828601610c18565b9150509250929050565b600060208284031215610d1c57600080fd5b6000610d2a84828501610bee565b91505092915050565b600060208284031215610d4557600080fd5b6000610d5384828501610c03565b91505092915050565b60008060408385031215610d6f57600080fd5b6000610d7d85828601610c18565b9250506020610d8e85828601610c18565b9150509250929050565b6000610da48383610e43565b60208301905092915050565b610db98161103a565b82525050565b610dd0610dcb8261103a565b611134565b82525050565b6000610de182610f71565b610deb8185610f94565b9350610df683610f61565b8060005b83811015610e27578151610e0e8882610d98565b9750610e1983610f87565b925050600181019050610dfa565b5085935050505092915050565b610e3d8161104c565b82525050565b610e4c81611058565b82525050565b610e5b81611058565b82525050565b6000610e6c82610f7c565b610e768185610fa5565b9350610e868185602086016110b8565b80840191505092915050565b610e9b816110ae565b82525050565b6000610ead8284610dbf565b60148201915081905092915050565b6000610ec88284610e61565b915081905092915050565b6000602082019050610ee86000830184610db0565b92915050565b60006020820190508181036000830152610f088184610dd6565b905092915050565b6000602082019050610f256000830184610e34565b92915050565b6000602082019050610f406000830184610e52565b92915050565b6000602082019050610f5b6000830184610e92565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b6000610fbb826110ae565b9150610fc6836110ae565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610ffb57610ffa611158565b5b828201905092915050565b6000611011826110ae565b915061101c836110ae565b92508282101561102f5761102e611158565b5b828203905092915050565b60006110458261108e565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b838110156110d65780820151818401526020810190506110bb565b838111156110e5576000848401525b50505050565b60006110f6826110ae565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561112957611128611158565b5b600182019050919050565b600061113f82611146565b9050919050565b600061115182611187565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006c0100000000000000000000000082029050919050565b6111a98161103a565b81146111b457600080fd5b50565b6111c081611058565b81146111cb57600080fd5b50565b6111d781611062565b81146111e257600080fd5b50565b6111ee816110ae565b81146111f957600080fd5b5056fea2646970667358221220b040785beb108ff46e86fa77d187a043667c637a67c22111c4bb08e002e764e464736f6c63430008030033 \ No newline at end of file +60806040523480156200001157600080fd5b50604051620021eb380380620021eb833981810160405281019062000037919062000991565b606060058190806001815401808255809150506001900390600052602060002001600090919091909150908051906020019062000076929190620008e7565b50600560016005805490506200008d919062000abe565b81548110620000a157620000a062000c1c565b5b9060005260206000200143409080600181540180825580915050600190039060005260206000200160009091909190915055620000ee3383620000f7640100000000026401000000009004565b50505062000cb2565b60006200010362000939565b6060600062000123328787620003c3640100000000026401000000009004565b9250600160008460006002811062000140576200013f62000c1c565b5b602002015181526020019081526020016000205490506000811415620002de57600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020329080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506005829080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906200023d929190620008e7565b506000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020869080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6001600580549050620002f2919062000abe565b905080600160008560006002811062000310576200030f62000c1c565b5b6020020151815260200190815260200160002081905550600581815481106200033e576200033d62000c1c565b5b90600052602060002001859080600181540180825580915050600190039060005260206000200160009091909190915055600160046000856001600281106200038c576200038b62000c1c565b5b6020020151815260200190815260200160002060006101000a81548160ff0219169083151502179055506001935050505092915050565b620003cd62000939565b6000620003d962000939565b6000604067ffffffffffffffff811115620003f957620003f862000c4b565b5b6040519080825280601f01601f1916602001820160405280156200042c5781602001600182028036833780820191505090505b5090506200044a878762000641640100000000026401000000009004565b925060005b6020811015620004ed578381602081106200046f576200046e62000c1c565b5b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110620004a857620004a762000c1c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080620004e49062000b77565b9150506200044f565b5060005b60208110156200059d5785816020811062000511576200051062000c1c565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000028260208362000544919062000a61565b8151811062000558576200055762000c1c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080620005949062000b77565b915050620004f1565b508282600060028110620005b657620005b562000c1c565b5b602002018181525050600281604051620005d1919062000a32565b602060405180830381855afa158015620005ef573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019062000614919062000991565b826001600281106200062b576200062a62000c1c565b5b6020020181815250508193505050509392505050565b6000806000602867ffffffffffffffff81111562000664576200066362000c4b565b5b6040519080825280601f01601f191660200182016040528015620006975781602001600182028036833780820191505090505b509050600085604051602001620006af919062000a15565b604051602081830303815290604052905060005b60148110156200078857818181518110620006e357620006e262000c1c565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283828151811062000743576200074262000c1c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806200077f9062000b77565b915050620006c3565b50846040516020016200079c919062000a15565b604051602081830303815290604052905060005b60148110156200088357818181518110620007d057620007cf62000c1c565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002836014836200082a919062000a61565b815181106200083e576200083d62000c1c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806200087a9062000b77565b915050620007b0565b5060028260405162000896919062000a32565b602060405180830381855afa158015620008b4573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190620008d9919062000991565b925082935050505092915050565b82805482825590600052602060002090810192821562000926579160200282015b828111156200092557825182559160200191906001019062000908565b5b5090506200093591906200095b565b5090565b6040518060400160405280600290602082028036833780820191505090505090565b5b80821115620009765760008160009055506001016200095c565b5090565b6000815190506200098b8162000c98565b92915050565b600060208284031215620009aa57620009a962000c7a565b5b6000620009ba848285016200097a565b91505092915050565b620009d8620009d28262000af9565b62000bc5565b82525050565b6000620009eb8262000a4b565b620009f7818562000a56565b935062000a0981856020860162000b41565b80840191505092915050565b600062000a238284620009c3565b60148201915081905092915050565b600062000a408284620009de565b915081905092915050565b600081519050919050565b600081905092915050565b600062000a6e8262000b37565b915062000a7b8362000b37565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111562000ab35762000ab262000bed565b5b828201905092915050565b600062000acb8262000b37565b915062000ad88362000b37565b92508282101562000aee5762000aed62000bed565b5b828203905092915050565b600062000b068262000b17565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101562000b6157808201518184015260208101905062000b44565b8381111562000b71576000848401525b50505050565b600062000b848262000b37565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141562000bba5762000bb962000bed565b5b600182019050919050565b600062000bd28262000bd9565b9050919050565b600062000be68262000c7f565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b60006c0100000000000000000000000082029050919050565b62000ca38162000b0d565b811462000caf57600080fd5b50565b6115298062000cc26000396000f3fe608060405234801561001057600080fd5b50600436106100b0576000357c0100000000000000000000000000000000000000000000000000000000900480638c661b36116100835780638c661b3614610175578063ae47ece0146101a5578063b68e6f31146101d5578063d0e95db114610205578063ff7496b414610235576100b0565b806301ffc9a7146100b557806322168e4f146100e557806350e0c6d3146101155780637d64bf1d14610145575b600080fd5b6100cf60048036038101906100ca9190610fbf565b610265565b6040516100dc91906111a4565b60405180910390f35b6100ff60048036038101906100fa9190610f52565b610317565b60405161010c9190611167565b60405180910390f35b61012f600480360381019061012a9190610e52565b61039c565b60405161013c91906111da565b60405180910390f35b61015f600480360381019061015a9190610f52565b6103e7565b60405161016c9190611167565b60405180910390f35b61018f600480360381019061018a9190610e7f565b61046d565b60405161019c9190611182565b60405180910390f35b6101bf60048036038101906101ba9190610f12565b61050b565b6040516101cc91906111a4565b60405180910390f35b6101ef60048036038101906101ea9190610ebf565b6107b3565b6040516101fc91906111a4565b60405180910390f35b61021f600480360381019061021a9190610e52565b61080d565b60405161022c91906111da565b60405180910390f35b61024f600480360381019061024a9190610fec565b610859565b60405161025c91906111bf565b60405180910390f35b60006327beb9107c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156102ba5760019050610312565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561030d5760019050610312565b600090505b919050565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481106103695761036861141b565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020828154811061043a5761043961141b565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905092915050565b606060008061047c8585610896565b915060016000838152602001908152602001600020549050600581815481106104a8576104a761141b565b5b906000526020600020018054806020026020016040519081016040528092919081815260200182805480156104fc57602002820191906000526020600020905b8154815260200190600101908083116104e8575b50505050509250505092915050565b6000610515610d5d565b60606000610524328787610b19565b9250600160008460006002811061053e5761053d61141b565b5b6020020151815260200190815260200160002054905060008114156106d957600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020329080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600582908060018154018082558091505060019003906000526020600020016000909190919091509080519060200190610638929190610d7f565b506000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020869080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60016005805490506106eb919061129a565b90508060016000856000600281106107065761070561141b565b5b6020020151815260200190815260200160002081905550600581815481106107315761073061141b565b5b906000526020600020018590806001815401808255809150506001900390600052602060002001600090919091909150556001600460008560016002811061077c5761077b61141b565b5b6020020151815260200190815260200160002060006101000a81548160ff0219169083151502179055506001935050505092915050565b60006107bd610d5d565b6107c8858585610b19565b905060046000826001600281106107e2576107e161141b565b5b6020020151815260200190815260200160002060009054906101000a900460ff169150509392505050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6005828154811061086957600080fd5b90600052602060002001818154811061088157600080fd5b90600052602060002001600091509150505481565b6000806000602867ffffffffffffffff8111156108b6576108b561144a565b5b6040519080825280601f01601f1916602001820160405280156108e85781602001600182028036833780820191505090505b5090506000856040516020016108fe9190611135565b604051602081830303815290604052905060005b60148110156109cd5781818151811061092e5761092d61141b565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283828151811061098b5761098a61141b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806109c59061137f565b915050610912565b50846040516020016109df9190611135565b604051602081830303815290604052905060005b6014811015610aba57818181518110610a0f57610a0e61141b565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283601483610a679190611244565b81518110610a7857610a7761141b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080610ab29061137f565b9150506109f3565b50600282604051610acb9190611150565b602060405180830381855afa158015610ae8573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610b0b9190610f92565b925082935050505092915050565b610b21610d5d565b6000610b2b610d5d565b6000604067ffffffffffffffff811115610b4857610b4761144a565b5b6040519080825280601f01601f191660200182016040528015610b7a5781602001600182028036833780820191505090505b509050610b878787610896565b925060005b6020811015610c2057838160208110610ba857610ba761141b565b5b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110610bde57610bdd61141b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080610c189061137f565b915050610b8c565b5060005b6020811015610cc457858160208110610c4057610c3f61141b565b5b1a7f01000000000000000000000000000000000000000000000000000000000000000282602083610c719190611244565b81518110610c8257610c8161141b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080610cbc9061137f565b915050610c24565b508282600060028110610cda57610cd961141b565b5b602002018181525050600281604051610cf39190611150565b602060405180830381855afa158015610d10573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610d339190610f92565b82600160028110610d4757610d4661141b565b5b6020020181815250508193505050509392505050565b6040518060400160405280600290602082028036833780820191505090505090565b828054828255906000526020600020908101928215610dbb579160200282015b82811115610dba578251825591602001919060010190610d9f565b5b509050610dc89190610dcc565b5090565b5b80821115610de5576000816000905550600101610dcd565b5090565b600081359050610df881611497565b92915050565b600081359050610e0d816114ae565b92915050565b600081519050610e22816114ae565b92915050565b600081359050610e37816114c5565b92915050565b600081359050610e4c816114dc565b92915050565b600060208284031215610e6857610e67611479565b5b6000610e7684828501610de9565b91505092915050565b60008060408385031215610e9657610e95611479565b5b6000610ea485828601610de9565b9250506020610eb585828601610de9565b9150509250929050565b600080600060608486031215610ed857610ed7611479565b5b6000610ee686828701610de9565b9350506020610ef786828701610de9565b9250506040610f0886828701610dfe565b9150509250925092565b60008060408385031215610f2957610f28611479565b5b6000610f3785828601610de9565b9250506020610f4885828601610dfe565b9150509250929050565b60008060408385031215610f6957610f68611479565b5b6000610f7785828601610de9565b9250506020610f8885828601610e3d565b9150509250929050565b600060208284031215610fa857610fa7611479565b5b6000610fb684828501610e13565b91505092915050565b600060208284031215610fd557610fd4611479565b5b6000610fe384828501610e28565b91505092915050565b6000806040838503121561100357611002611479565b5b600061101185828601610e3d565b925050602061102285828601610e3d565b9150509250929050565b600061103883836110d7565b60208301905092915050565b61104d816112ce565b82525050565b61106461105f826112ce565b6113c8565b82525050565b600061107582611205565b61107f8185611228565b935061108a836111f5565b8060005b838110156110bb5781516110a2888261102c565b97506110ad8361121b565b92505060018101905061108e565b5085935050505092915050565b6110d1816112e0565b82525050565b6110e0816112ec565b82525050565b6110ef816112ec565b82525050565b600061110082611210565b61110a8185611239565b935061111a81856020860161134c565b80840191505092915050565b61112f81611342565b82525050565b60006111418284611053565b60148201915081905092915050565b600061115c82846110f5565b915081905092915050565b600060208201905061117c6000830184611044565b92915050565b6000602082019050818103600083015261119c818461106a565b905092915050565b60006020820190506111b960008301846110c8565b92915050565b60006020820190506111d460008301846110e6565b92915050565b60006020820190506111ef6000830184611126565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600061124f82611342565b915061125a83611342565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561128f5761128e6113ec565b5b828201905092915050565b60006112a582611342565b91506112b083611342565b9250828210156112c3576112c26113ec565b5b828203905092915050565b60006112d982611322565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101561136a57808201518184015260208101905061134f565b83811115611379576000848401525b50505050565b600061138a82611342565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156113bd576113bc6113ec565b5b600182019050919050565b60006113d3826113da565b9050919050565b60006113e58261147e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b60006c0100000000000000000000000082029050919050565b6114a0816112ce565b81146114ab57600080fd5b50565b6114b7816112ec565b81146114c257600080fd5b50565b6114ce816112f6565b81146114d957600080fd5b50565b6114e581611342565b81146114f057600080fd5b5056fea2646970667358221220ae28d67ed718aa9371a0b367df98b507fbb1d1a653a6c7e8a30a2e4ad143240664736f6c63430008070033 \ No newline at end of file diff --git a/python/eth_address_declarator/data/AddressDeclarator.json b/python/eth_address_declarator/data/AddressDeclarator.json index 5f07419..d81499d 100644 --- a/python/eth_address_declarator/data/AddressDeclarator.json +++ b/python/eth_address_declarator/data/AddressDeclarator.json @@ -1 +1 @@ -[{"inputs":[{"internalType":"bytes32","name":"_initialDescription","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_declarator","type":"address"},{"indexed":false,"internalType":"address","name":"_subject","type":"address"},{"indexed":false,"internalType":"bytes32","name":"_proof","type":"bytes32"}],"name":"DeclarationAdded","type":"event"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"},{"internalType":"bytes32","name":"_proof","type":"bytes32"}],"name":"addDeclaration","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"contents","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"},{"internalType":"address","name":"_subject","type":"address"}],"name":"declaration","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"},{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"declarationAddressAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"}],"name":"declarationCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"},{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"declaratorAddressAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"}],"name":"declaratorCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}] +[{"inputs":[{"internalType":"bytes32","name":"_initialDescription","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_declarator","type":"address"},{"indexed":false,"internalType":"address","name":"_subject","type":"address"},{"indexed":false,"internalType":"bytes32","name":"_proof","type":"bytes32"}],"name":"DeclarationAdded","type":"event"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"},{"internalType":"bytes32","name":"_proof","type":"bytes32"}],"name":"addDeclaration","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"contents","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"},{"internalType":"address","name":"_subject","type":"address"}],"name":"declaration","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"},{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"declarationAddressAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"}],"name":"declarationCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"},{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"declaratorAddressAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"}],"name":"declaratorCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"},{"internalType":"address","name":"_subject","type":"address"},{"internalType":"bytes32","name":"_proof","type":"bytes32"}],"name":"haveDeclaration","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}] diff --git a/python/eth_token_index/data/TokenUniqueSymbolIndex.bin b/python/eth_token_index/data/TokenUniqueSymbolIndex.bin index fcbee38..2bc51d8 100644 --- a/python/eth_token_index/data/TokenUniqueSymbolIndex.bin +++ b/python/eth_token_index/data/TokenUniqueSymbolIndex.bin @@ -1 +1 @@ -608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610fb3806100c46000396000f3fe608060405234801561001057600080fd5b50600436106100bb576000357c0100000000000000000000000000000000000000000000000000000000900480637ef50298116100835780637ef502981461018c5780638da5cb5b146101bc578063bb34534c146101da578063e2095c071461020a578063f2fde38b1461023a576100bb565b806301ffc9a7146100c05780630a3b0a4f146100f05780630cbb0f83146101205780634420e4861461013e57806379ba50971461016e575b600080fd5b6100da60048036038101906100d59190610b81565b61026a565b6040516100e79190610ca4565b60405180910390f35b61010a60048036038101906101059190610b06565b6103c2565b6040516101179190610ca4565b60405180910390f35b6101286103d4565b6040516101359190610cbf565b60405180910390f35b61015860048036038101906101539190610b06565b6103ed565b6040516101659190610ca4565b60405180910390f35b6101766106b6565b6040516101839190610ca4565b60405180910390f35b6101a660048036038101906101a19190610b2f565b610858565b6040516101b39190610cbf565b60405180910390f35b6101c4610870565b6040516101d19190610c89565b60405180910390f35b6101f460048036038101906101ef9190610b2f565b610894565b6040516102019190610c89565b60405180910390f35b610224600480360381019061021f9190610beb565b61091a565b6040516102319190610c89565b60405180910390f35b610254600480360381019061024f9190610b06565b610994565b6040516102619190610ca4565b60405180910390f35b600063cbdb05c77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156102bf57600190506103bd565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561031257600190506103bd565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561036557600190506103bd565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156103b857600190506103bd565b600090505b919050565b60006103cd826103ed565b9050919050565b600060016003805490506103e89190610d9c565b905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461044857600080fd5b60606000806000808673ffffffffffffffffffffffffffffffffffffffff166040516024016040516020818303038152906040527f95d89b41000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516104f79190610c72565b6000604051808303816000865af19150503d8060008114610534576040519150601f19603f3d011682016040523d82523d6000602084013e610539565b606091505b50915091508161054857600080fd5b8080602001905181019061055c9190610baa565b945060028560405161056e9190610c72565b602060405180830381855afa15801561058b573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906105ae9190610b58565b935060026000858152602001908152602001600020549250600083146105d357600080fd5b60038054905060026000868152602001908152602001600020819055506003879080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016003805490506106659190610d9c565b8773ffffffffffffffffffffffffffffffffffffffff167f9cc987676e7d63379f176ea50df0ae8d2d9d1141d1231d4ce15b5965f73c943060405160405180910390a3600195505050505050919050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461071357600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b60026020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060026000848152602001908152602001600020549050600381815481106108e7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000600360018361092b9190610d46565b81548110610962577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109ef57600080fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000610a48610a4384610cff565b610cda565b905082815260208101848484011115610a6057600080fd5b610a6b848285610e4e565b509392505050565b600081359050610a8281610f21565b92915050565b600081359050610a9781610f38565b92915050565b600081519050610aac81610f38565b92915050565b600081359050610ac181610f4f565b92915050565b600082601f830112610ad857600080fd5b8151610ae8848260208601610a35565b91505092915050565b600081359050610b0081610f66565b92915050565b600060208284031215610b1857600080fd5b6000610b2684828501610a73565b91505092915050565b600060208284031215610b4157600080fd5b6000610b4f84828501610a88565b91505092915050565b600060208284031215610b6a57600080fd5b6000610b7884828501610a9d565b91505092915050565b600060208284031215610b9357600080fd5b6000610ba184828501610ab2565b91505092915050565b600060208284031215610bbc57600080fd5b600082015167ffffffffffffffff811115610bd657600080fd5b610be284828501610ac7565b91505092915050565b600060208284031215610bfd57600080fd5b6000610c0b84828501610af1565b91505092915050565b610c1d81610dd0565b82525050565b610c2c81610de2565b82525050565b6000610c3d82610d30565b610c478185610d3b565b9350610c57818560208601610e4e565b80840191505092915050565b610c6c81610e44565b82525050565b6000610c7e8284610c32565b915081905092915050565b6000602082019050610c9e6000830184610c14565b92915050565b6000602082019050610cb96000830184610c23565b92915050565b6000602082019050610cd46000830184610c63565b92915050565b6000610ce4610cf5565b9050610cf08282610e81565b919050565b6000604051905090565b600067ffffffffffffffff821115610d1a57610d19610ee1565b5b610d2382610f10565b9050602081019050919050565b600081519050919050565b600081905092915050565b6000610d5182610e44565b9150610d5c83610e44565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610d9157610d90610eb2565b5b828201905092915050565b6000610da782610e44565b9150610db283610e44565b925082821015610dc557610dc4610eb2565b5b828203905092915050565b6000610ddb82610e24565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610e6c578082015181840152602081019050610e51565b83811115610e7b576000848401525b50505050565b610e8a82610f10565b810181811067ffffffffffffffff82111715610ea957610ea8610ee1565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b610f2a81610dd0565b8114610f3557600080fd5b50565b610f4181610dee565b8114610f4c57600080fd5b50565b610f5881610df8565b8114610f6357600080fd5b50565b610f6f81610e44565b8114610f7a57600080fd5b5056fea2646970667358221220f7c74f94efff8b8cbf9923365cd4956305e9d142051ff9229ac8a3c0b81f477464736f6c63430008030033 \ No newline at end of file +608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611021806100c46000396000f3fe608060405234801561001057600080fd5b50600436106100bb576000357c0100000000000000000000000000000000000000000000000000000000900480637ef50298116100835780637ef502981461018c5780638da5cb5b146101bc578063bb34534c146101da578063e2095c071461020a578063f2fde38b1461023a576100bb565b806301ffc9a7146100c05780630a3b0a4f146100f05780630cbb0f83146101205780634420e4861461013e57806379ba50971461016e575b600080fd5b6100da60048036038101906100d59190610b9c565b61026a565b6040516100e79190610ccf565b60405180910390f35b61010a60048036038101906101059190610b15565b610415565b6040516101179190610ccf565b60405180910390f35b610128610427565b6040516101359190610cea565b60405180910390f35b61015860048036038101906101539190610b15565b610440565b6040516101659190610ccf565b60405180910390f35b610176610709565b6040516101839190610ccf565b60405180910390f35b6101a660048036038101906101a19190610b42565b6108ab565b6040516101b39190610cea565b60405180910390f35b6101c46108c3565b6040516101d19190610cb4565b60405180910390f35b6101f460048036038101906101ef9190610b42565b6108e7565b6040516102019190610cb4565b60405180910390f35b610224600480360381019061021f9190610c12565b610947565b6040516102319190610cb4565b60405180910390f35b610254600480360381019061024f9190610b15565b61099b565b6040516102619190610ccf565b60405180910390f35b600063cbdb05c77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156102bf5760019050610410565b63bb34534c7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156103125760019050610410565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156103655760019050610410565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156103b85760019050610410565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561040b5760019050610410565b600090505b919050565b600061042082610440565b9050919050565b6000600160038054905061043b9190610dc7565b905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461049b57600080fd5b60606000806000808673ffffffffffffffffffffffffffffffffffffffff166040516024016040516020818303038152906040527f95d89b41000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161054a9190610c9d565b6000604051808303816000865af19150503d8060008114610587576040519150601f19603f3d011682016040523d82523d6000602084013e61058c565b606091505b50915091508161059b57600080fd5b808060200190518101906105af9190610bc9565b94506002856040516105c19190610c9d565b602060405180830381855afa1580156105de573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906106019190610b6f565b9350600260008581526020019081526020016000205492506000831461062657600080fd5b60038054905060026000868152602001908152602001600020819055506003879080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016003805490506106b89190610dc7565b8773ffffffffffffffffffffffffffffffffffffffff167f9cc987676e7d63379f176ea50df0ae8d2d9d1141d1231d4ce15b5965f73c943060405160405180910390a3600195505050505050919050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461076657600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b60026020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260008481526020019081526020016000205490506003818154811061091457610913610f0c565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b600060036001836109589190610d71565b8154811061096957610968610f0c565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109f657600080fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000610a4f610a4a84610d2a565b610d05565b905082815260208101848484011115610a6b57610a6a610f6f565b5b610a76848285610e79565b509392505050565b600081359050610a8d81610f8f565b92915050565b600081359050610aa281610fa6565b92915050565b600081519050610ab781610fa6565b92915050565b600081359050610acc81610fbd565b92915050565b600082601f830112610ae757610ae6610f6a565b5b8151610af7848260208601610a3c565b91505092915050565b600081359050610b0f81610fd4565b92915050565b600060208284031215610b2b57610b2a610f79565b5b6000610b3984828501610a7e565b91505092915050565b600060208284031215610b5857610b57610f79565b5b6000610b6684828501610a93565b91505092915050565b600060208284031215610b8557610b84610f79565b5b6000610b9384828501610aa8565b91505092915050565b600060208284031215610bb257610bb1610f79565b5b6000610bc084828501610abd565b91505092915050565b600060208284031215610bdf57610bde610f79565b5b600082015167ffffffffffffffff811115610bfd57610bfc610f74565b5b610c0984828501610ad2565b91505092915050565b600060208284031215610c2857610c27610f79565b5b6000610c3684828501610b00565b91505092915050565b610c4881610dfb565b82525050565b610c5781610e0d565b82525050565b6000610c6882610d5b565b610c728185610d66565b9350610c82818560208601610e79565b80840191505092915050565b610c9781610e6f565b82525050565b6000610ca98284610c5d565b915081905092915050565b6000602082019050610cc96000830184610c3f565b92915050565b6000602082019050610ce46000830184610c4e565b92915050565b6000602082019050610cff6000830184610c8e565b92915050565b6000610d0f610d20565b9050610d1b8282610eac565b919050565b6000604051905090565b600067ffffffffffffffff821115610d4557610d44610f3b565b5b610d4e82610f7e565b9050602081019050919050565b600081519050919050565b600081905092915050565b6000610d7c82610e6f565b9150610d8783610e6f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610dbc57610dbb610edd565b5b828201905092915050565b6000610dd282610e6f565b9150610ddd83610e6f565b925082821015610df057610def610edd565b5b828203905092915050565b6000610e0682610e4f565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610e97578082015181840152602081019050610e7c565b83811115610ea6576000848401525b50505050565b610eb582610f7e565b810181811067ffffffffffffffff82111715610ed457610ed3610f3b565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b610f9881610dfb565b8114610fa357600080fd5b50565b610faf81610e19565b8114610fba57600080fd5b50565b610fc681610e23565b8114610fd157600080fd5b50565b610fdd81610e6f565b8114610fe857600080fd5b5056fea26469706673582212201cbc4bf05e3ed0bb6e627801ab4486f9b8d966bf2e342645a13008d6bfddb33b64736f6c63430008070033 \ No newline at end of file diff --git a/python/setup.cfg b/python/setup.cfg index 1d7917d..d02b52d 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = eth-address-index -version = 0.2.3a5 +version = 0.2.4a1 description = Signed metadata declarations for ethereum addresses author = Louis Holbrook author_email = dev@holbrook.no diff --git a/python/test_requirements.txt b/python/test_requirements.txt index 71d6d67..ec0c958 100644 --- a/python/test_requirements.txt +++ b/python/test_requirements.txt @@ -1,2 +1,3 @@ eth-tester==0.5.0b3 py-evm==0.3.0a20 +eth-accounts-index>=0.1.2a3,<0.2.0 diff --git a/python/tests/test_accounts_index.py b/python/tests/test_accounts_index.py new file mode 100644 index 0000000..975ef95 --- /dev/null +++ b/python/tests/test_accounts_index.py @@ -0,0 +1,70 @@ +# standard imports +import unittest +import logging +import hashlib + +# external imports +from tests.test_addressdeclarator_base import TestBase +from eth_accounts_index import AccountsIndex +from chainlib.eth.nonce import RPCNonceOracle +from giftable_erc20_token import GiftableToken +from chainlib.eth.tx import receipt +from chainlib.eth.contract import ABIContractEncoder + +# local imports +from eth_address_declarator.accounts_index import AccountsIndexAddressDeclarator +from eth_address_declarator import Declarator + +logging.basicConfig(level=logging.DEBUG) +logg = logging.getLogger() + + +class TestAccountsIndex(TestBase): + + def setUp(self): + super(TestAccountsIndex, self).setUp() + nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) + + c = AccountsIndexAddressDeclarator(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + (tx_hash_hex, o) = c.constructor(self.accounts[0], self.foo_token_address, self.address) + r = self.rpc.do(o) + + o = receipt(tx_hash_hex) + r = self.rpc.do(o) + self.assertEqual(r['status'], 1) + + self.accounts_index_address = r['contract_address'] + logg.debug('accounts index deployed with address {}'.format(self.accounts_index_address)) + + + def test_accounts_index_address_declarator(self): + nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) + c = AccountsIndex(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + (tx_hash, o) = c.add(self.accounts_index_address, self.accounts[0], self.accounts[1]) + r = self.rpc.do(o) + self.assertEqual(tx_hash, r) + + o = receipt(tx_hash) + rcpt = self.rpc.do(o) + + self.helper.mine_block() + o = c.have(self.accounts_index_address, self.accounts[1], sender_address=self.accounts[0]) + r = self.rpc.do(o) + + c = Declarator(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + o = c.declaration(self.address, self.accounts[0], self.accounts[1], sender_address=self.accounts[0]) + r = self.rpc.do(o) + proofs = c.parse_declaration(r) + + enc = ABIContractEncoder() + enc.address(self.foo_token_address) + token_address_padded = enc.get() + logg.debug('proof {} {}'.format(proofs, token_address_padded)) + h = hashlib.sha256() + h.update(bytes.fromhex(token_address_padded)) + r = h.digest() + self.assertEqual(r.hex(), proofs[0]) + + +if __name__ == '__main__': + unittest.main() diff --git a/python/tests/test_addressdeclarator.py b/python/tests/test_addressdeclarator.py index 1385627..a180ff9 100644 --- a/python/tests/test_addressdeclarator.py +++ b/python/tests/test_addressdeclarator.py @@ -14,51 +14,31 @@ from chainlib.eth.contract import ( from chainlib.eth.nonce import RPCNonceOracle from chainlib.eth.tx import receipt from giftable_erc20_token import GiftableToken -from hexathon import add_0x +from hexathon import ( + add_0x, + strip_0x, + ) # local imports from eth_address_declarator.declarator import AddressDeclarator from eth_address_declarator import Declarator +from tests.test_addressdeclarator_base import TestBase logging.basicConfig(level=logging.DEBUG) logg = logging.getLogger() -logging.getLogger('web3').setLevel(logging.WARNING) -logging.getLogger('eth.vm').setLevel(logging.WARNING) - testdir = os.path.dirname(__file__) description = '0x{:<064s}'.format(b'foo'.hex()) -class Test(EthTesterCase): + +class TestAddressDeclarator(TestBase): def setUp(self): - super(Test, self).setUp() - self.description = add_0x(os.urandom(32).hex()) + super(TestAddressDeclarator, self).setUp() nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) - #c = AddressDeclarator(signer=self.signer, nonce_oracle=nonce_oracle, chain_id=self.chain_spec.chain_id()) - c = AddressDeclarator(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) - (tx_hash_hex, o) = c.constructor(self.accounts[0], self.description) - self.rpc.do(o) - o = receipt(tx_hash_hex) - r = self.rpc.do(o) - self.assertEqual(r['status'], 1) - - self.address = r['contract_address'] - - #c = GiftableToken(signer=self.signer, nonce_oracle=nonce_oracle, chain_id=self.chain_spec.chain_id()) - c = GiftableToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) - (tx_hash_hex, o) = c.constructor(self.accounts[0], 'FooToken', 'FOO', 6) - self.rpc.do(o) - - o = receipt(tx_hash_hex) - r = self.rpc.do(o) - self.assertEqual(r['status'], 1) - - self.foo_token_address = r['contract_address'] - - #c = GiftableToken(signer=self.signer, nonce_oracle=nonce_oracle, chain_id=self.chain_spec.chain_id()) + #c = GiftableToken(signer=self.signer, nonce_oracle=nonce_oracle, chain_id=self.chain_spec.chain_id()) c = GiftableToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) (tx_hash_hex, o) = c.constructor(self.accounts[0], 'BarToken', 'BAR', 6) self.rpc.do(o) @@ -98,6 +78,23 @@ class Test(EthTesterCase): self.assertEqual(c.parse_declarator_count(r), 1) + def test_get_single_declaration(self): + d = add_0x(os.urandom(32).hex()) + + nonce_oracle = RPCNonceOracle(self.accounts[1], self.rpc) + c = Declarator(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + (tx_hash_hex, o) = c.add_declaration(self.address, self.accounts[1], self.foo_token_address, d) + self.rpc.do(o) + o = receipt(tx_hash_hex) + r = self.rpc.do(o) + self.assertEqual(r['status'], 1) + + o = c.declaration(self.address, self.accounts[1], self.foo_token_address, sender_address=self.accounts[0]) + r = self.rpc.do(o) + proofs = c.parse_declaration(r) + self.assertEqual(proofs[0], strip_0x(d)) + + def test_declaration(self): d = add_0x(os.urandom(32).hex()) @@ -124,11 +121,10 @@ class Test(EthTesterCase): o = c.declaration(self.address, self.accounts[1], self.foo_token_address, sender_address=self.accounts[0]) r = self.rpc.do(o) proofs = c.parse_declaration(r) - self.assertEqual(proofs[0], d[2:]) - self.assertEqual(proofs[1], d_two[2:]) + self.assertEqual(proofs[0], strip_0x(d)) + self.assertEqual(proofs[1], strip_0x(d_two)) - def test_declarator_to_subject(self): d = add_0x(os.urandom(32).hex()) diff --git a/python/tests/test_addressdeclarator_base.py b/python/tests/test_addressdeclarator_base.py new file mode 100644 index 0000000..61a0a30 --- /dev/null +++ b/python/tests/test_addressdeclarator_base.py @@ -0,0 +1,46 @@ +# standard imports +import unittest +import logging +import os + +# external imports +from hexathon import add_0x +from chainlib.eth.unittest.ethtester import EthTesterCase +from chainlib.eth.nonce import RPCNonceOracle +from chainlib.eth.tx import receipt +from giftable_erc20_token import GiftableToken + +# local imports +from eth_address_declarator.declarator import AddressDeclarator + +logging.basicConfig(level=logging.DEBUG) +logg = logging.getLogger() + + +class TestBase(EthTesterCase): + + def setUp(self): + super(TestBase, self).setUp() + self.description = add_0x(os.urandom(32).hex()) + nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) + c = AddressDeclarator(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + (tx_hash_hex, o) = c.constructor(self.accounts[0], self.description) + self.rpc.do(o) + + o = receipt(tx_hash_hex) + r = self.rpc.do(o) + self.assertEqual(r['status'], 1) + + self.address = r['contract_address'] + logg.debug('address declarator deployed with address {}'.format(self.address)) + + c = GiftableToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + (tx_hash_hex, o) = c.constructor(self.accounts[0], 'FooToken', 'FOO', 6) + self.rpc.do(o) + + o = receipt(tx_hash_hex) + r = self.rpc.do(o) + self.assertEqual(r['status'], 1) + + self.foo_token_address = r['contract_address'] + logg.debug('foo token deployed with address {}'.format(self.foo_token_address)) diff --git a/solidity/AccountsIndexAddressDeclarator.sol b/solidity/AccountsIndexAddressDeclarator.sol new file mode 100644 index 0000000..5faa21e --- /dev/null +++ b/solidity/AccountsIndexAddressDeclarator.sol @@ -0,0 +1,50 @@ +pragma solidity >0.6.11; + +// SPDX-License-Identifier: GPL-3.0-or-later + + +contract AdccountsIndexAddressDeclarator { + + address public tokenAddress; + bytes32 tokenAddressHash; + address public addressDeclaratorAddress; + mapping(address => uint256) entryIndex; + uint256 count; + + address public owner; + address newOwner; + + event AddressAdded(address indexed addedAccount, uint256 indexed accountIndex); // AccountsIndex + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); // EIP173 + + constructor(address _tokenAddress, address _addressDeclaratorAddress) public { + bytes memory _tokenAddressPadded; + owner = msg.sender; + addressDeclaratorAddress = _addressDeclaratorAddress; + tokenAddress = _tokenAddress; + _tokenAddressPadded = abi.encode(tokenAddress); + tokenAddressHash = sha256(_tokenAddressPadded); + count = 1; + } + + function add(address _account) external returns (bool) { + bool ok; + bytes memory r; + uint256 oldEntryIndex; + + (ok, r) = addressDeclaratorAddress.call(abi.encodeWithSignature("addDeclaration(address,bytes32)", _account, tokenAddressHash)); + require(ok); + require(r[31] == 0x01); + + oldEntryIndex = count; + entryIndex[_account] = oldEntryIndex; + count++; + + emit AddressAdded(_account, oldEntryIndex); + return true; + } + + function have(address _account) external view returns (bool) { + return entryIndex[_account] > 0; + } +} diff --git a/solidity/AddressDeclarator.bin b/solidity/AddressDeclarator.bin index 8d7cd25..4834db1 100644 --- a/solidity/AddressDeclarator.bin +++ b/solidity/AddressDeclarator.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b5060405162001c6038038062001c60833981810160405281019062000037919062000766565b606060048190806001815401808255809150506001900390600052602060002001600090919091909150908051906020019062000076929190620006de565b50600460016004805490506200008d91906200088d565b81548110620000c5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001434090806001815401808255809150506001900390600052602060002001600090919091909150556200011233836200011b640100000000026401000000009004565b50505062000a1e565b600080606060006200013d338762000384640100000000026401000000009004565b9250600160008481526020019081526020016000205490506000811415620002dd57600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506004829080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906200023c929190620006de565b506000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020869080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6001600480549050620002f191906200088d565b90508060016000858152602001908152602001600020819055506004818154811062000346577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020018590806001815401808255809150506001900390600052602060002001600090919091909150556001935050505092915050565b6000806000602867ffffffffffffffff811115620003cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015620003fe5781602001600182028036833780820191505090505b509050600085604051602001620004169190620007e4565b604051602081830303815290604052905060005b601481101562000537578181815181106200046e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002838281518110620004f2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806200052e9062000946565b9150506200042a565b50846040516020016200054b9190620007e4565b604051602081830303815290604052905060005b60148110156200067a57818181518110620005a3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283601483620005fd919062000830565b8151811062000635577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080620006719062000946565b9150506200055f565b506002826040516200068d919062000801565b602060405180830381855afa158015620006ab573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190620006d0919062000766565b925082935050505092915050565b8280548282559060005260206000209081019282156200071d579160200282015b828111156200071c578251825591602001919060010190620006ff565b5b5090506200072c919062000730565b5090565b5b808211156200074b57600081600090555060010162000731565b5090565b600081519050620007608162000a04565b92915050565b6000602082840312156200077957600080fd5b600062000789848285016200074f565b91505092915050565b620007a7620007a182620008c8565b62000994565b82525050565b6000620007ba826200081a565b620007c6818562000825565b9350620007d881856020860162000910565b80840191505092915050565b6000620007f2828462000792565b60148201915081905092915050565b60006200080f8284620007ad565b915081905092915050565b600081519050919050565b600081905092915050565b60006200083d8262000906565b91506200084a8362000906565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115620008825762000881620009bc565b5b828201905092915050565b60006200089a8262000906565b9150620008a78362000906565b925082821015620008bd57620008bc620009bc565b5b828203905092915050565b6000620008d582620008e6565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b838110156200093057808201518184015260208101905062000913565b8381111562000940576000848401525b50505050565b6000620009538262000906565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415620009895762000988620009bc565b5b600182019050919050565b6000620009a182620009a8565b9050919050565b6000620009b582620009eb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006c0100000000000000000000000082029050919050565b62000a0f81620008dc565b811462000a1b57600080fd5b50565b6112328062000a2e6000396000f3fe608060405234801561001057600080fd5b50600436106100a5576000357c0100000000000000000000000000000000000000000000000000000000900480638c661b36116100785780638c661b361461016a578063ae47ece01461019a578063d0e95db1146101ca578063ff7496b4146101fa576100a5565b806301ffc9a7146100aa57806322168e4f146100da57806350e0c6d31461010a5780637d64bf1d1461013a575b600080fd5b6100c460048036038101906100bf9190610d33565b61022a565b6040516100d19190610f10565b60405180910390f35b6100f460048036038101906100ef9190610cce565b6102d8565b6040516101019190610ed3565b60405180910390f35b610124600480360381019061011f9190610c2d565b610383565b6040516101319190610f46565b60405180910390f35b610154600480360381019061014f9190610cce565b6103ce565b6040516101619190610ed3565b60405180910390f35b610184600480360381019061017f9190610c56565b61047a565b6040516101919190610eee565b60405180910390f35b6101b460048036038101906101af9190610c92565b61053e565b6040516101c19190610f10565b60405180910390f35b6101e460048036038101906101df9190610c2d565b610790565b6040516101f19190610f46565b60405180910390f35b610214600480360381019061020f9190610d5c565b6107dc565b6040516102219190610f2b565b60405180910390f35b60006327beb9107c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561027f57600190506102d3565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156102d257600190506102d3565b5b919050565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110610350577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110610447577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905092915050565b60606000806104898585610819565b915060016000838152602001908152602001600020549050600481815481106104db577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561052f57602002820191906000526020600020905b81548152602001906001019080831161051b575b50505050509250505092915050565b6000806060600061054f3387610819565b92506001600084815260200190815260200160002054905060008114156106ec57600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060048290806001815401808255809150506001900390600052602060002001600090919091909150908051906020019061064b929190610b5a565b506000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020869080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60016004805490506106fe9190611006565b905080600160008581526020019081526020016000208190555060048181548110610752577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020018590806001815401808255809150506001900390600052602060002001600090919091909150556001935050505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b600482815481106107ec57600080fd5b90600052602060002001818154811061080457600080fd5b90600052602060002001600091509150505481565b6000806000602867ffffffffffffffff81111561085f577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156108915781602001600182028036833780820191505090505b5090506000856040516020016108a79190610ea1565b604051602081830303815290604052905060005b60148110156109c2578181815181106108fd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002838281518110610980577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806109ba906110eb565b9150506108bb565b50846040516020016109d49190610ea1565b604051602081830303815290604052905060005b6014811015610afb57818181518110610a2a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283601483610a829190610fb0565b81518110610ab9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080610af3906110eb565b9150506109e8565b50600282604051610b0c9190610ebc565b602060405180830381855afa158015610b29573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610b4c9190610d0a565b925082935050505092915050565b828054828255906000526020600020908101928215610b96579160200282015b82811115610b95578251825591602001919060010190610b7a565b5b509050610ba39190610ba7565b5090565b5b80821115610bc0576000816000905550600101610ba8565b5090565b600081359050610bd3816111a0565b92915050565b600081359050610be8816111b7565b92915050565b600081519050610bfd816111b7565b92915050565b600081359050610c12816111ce565b92915050565b600081359050610c27816111e5565b92915050565b600060208284031215610c3f57600080fd5b6000610c4d84828501610bc4565b91505092915050565b60008060408385031215610c6957600080fd5b6000610c7785828601610bc4565b9250506020610c8885828601610bc4565b9150509250929050565b60008060408385031215610ca557600080fd5b6000610cb385828601610bc4565b9250506020610cc485828601610bd9565b9150509250929050565b60008060408385031215610ce157600080fd5b6000610cef85828601610bc4565b9250506020610d0085828601610c18565b9150509250929050565b600060208284031215610d1c57600080fd5b6000610d2a84828501610bee565b91505092915050565b600060208284031215610d4557600080fd5b6000610d5384828501610c03565b91505092915050565b60008060408385031215610d6f57600080fd5b6000610d7d85828601610c18565b9250506020610d8e85828601610c18565b9150509250929050565b6000610da48383610e43565b60208301905092915050565b610db98161103a565b82525050565b610dd0610dcb8261103a565b611134565b82525050565b6000610de182610f71565b610deb8185610f94565b9350610df683610f61565b8060005b83811015610e27578151610e0e8882610d98565b9750610e1983610f87565b925050600181019050610dfa565b5085935050505092915050565b610e3d8161104c565b82525050565b610e4c81611058565b82525050565b610e5b81611058565b82525050565b6000610e6c82610f7c565b610e768185610fa5565b9350610e868185602086016110b8565b80840191505092915050565b610e9b816110ae565b82525050565b6000610ead8284610dbf565b60148201915081905092915050565b6000610ec88284610e61565b915081905092915050565b6000602082019050610ee86000830184610db0565b92915050565b60006020820190508181036000830152610f088184610dd6565b905092915050565b6000602082019050610f256000830184610e34565b92915050565b6000602082019050610f406000830184610e52565b92915050565b6000602082019050610f5b6000830184610e92565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b6000610fbb826110ae565b9150610fc6836110ae565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610ffb57610ffa611158565b5b828201905092915050565b6000611011826110ae565b915061101c836110ae565b92508282101561102f5761102e611158565b5b828203905092915050565b60006110458261108e565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b838110156110d65780820151818401526020810190506110bb565b838111156110e5576000848401525b50505050565b60006110f6826110ae565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561112957611128611158565b5b600182019050919050565b600061113f82611146565b9050919050565b600061115182611187565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006c0100000000000000000000000082029050919050565b6111a98161103a565b81146111b457600080fd5b50565b6111c081611058565b81146111cb57600080fd5b50565b6111d781611062565b81146111e257600080fd5b50565b6111ee816110ae565b81146111f957600080fd5b5056fea2646970667358221220b040785beb108ff46e86fa77d187a043667c637a67c22111c4bb08e002e764e464736f6c63430008030033 \ No newline at end of file +60806040523480156200001157600080fd5b50604051620021eb380380620021eb833981810160405281019062000037919062000991565b606060058190806001815401808255809150506001900390600052602060002001600090919091909150908051906020019062000076929190620008e7565b50600560016005805490506200008d919062000abe565b81548110620000a157620000a062000c1c565b5b9060005260206000200143409080600181540180825580915050600190039060005260206000200160009091909190915055620000ee3383620000f7640100000000026401000000009004565b50505062000cb2565b60006200010362000939565b6060600062000123328787620003c3640100000000026401000000009004565b9250600160008460006002811062000140576200013f62000c1c565b5b602002015181526020019081526020016000205490506000811415620002de57600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020329080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506005829080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906200023d929190620008e7565b506000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020869080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6001600580549050620002f2919062000abe565b905080600160008560006002811062000310576200030f62000c1c565b5b6020020151815260200190815260200160002081905550600581815481106200033e576200033d62000c1c565b5b90600052602060002001859080600181540180825580915050600190039060005260206000200160009091909190915055600160046000856001600281106200038c576200038b62000c1c565b5b6020020151815260200190815260200160002060006101000a81548160ff0219169083151502179055506001935050505092915050565b620003cd62000939565b6000620003d962000939565b6000604067ffffffffffffffff811115620003f957620003f862000c4b565b5b6040519080825280601f01601f1916602001820160405280156200042c5781602001600182028036833780820191505090505b5090506200044a878762000641640100000000026401000000009004565b925060005b6020811015620004ed578381602081106200046f576200046e62000c1c565b5b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110620004a857620004a762000c1c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080620004e49062000b77565b9150506200044f565b5060005b60208110156200059d5785816020811062000511576200051062000c1c565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000028260208362000544919062000a61565b8151811062000558576200055762000c1c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080620005949062000b77565b915050620004f1565b508282600060028110620005b657620005b562000c1c565b5b602002018181525050600281604051620005d1919062000a32565b602060405180830381855afa158015620005ef573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019062000614919062000991565b826001600281106200062b576200062a62000c1c565b5b6020020181815250508193505050509392505050565b6000806000602867ffffffffffffffff81111562000664576200066362000c4b565b5b6040519080825280601f01601f191660200182016040528015620006975781602001600182028036833780820191505090505b509050600085604051602001620006af919062000a15565b604051602081830303815290604052905060005b60148110156200078857818181518110620006e357620006e262000c1c565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283828151811062000743576200074262000c1c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806200077f9062000b77565b915050620006c3565b50846040516020016200079c919062000a15565b604051602081830303815290604052905060005b60148110156200088357818181518110620007d057620007cf62000c1c565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002836014836200082a919062000a61565b815181106200083e576200083d62000c1c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806200087a9062000b77565b915050620007b0565b5060028260405162000896919062000a32565b602060405180830381855afa158015620008b4573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190620008d9919062000991565b925082935050505092915050565b82805482825590600052602060002090810192821562000926579160200282015b828111156200092557825182559160200191906001019062000908565b5b5090506200093591906200095b565b5090565b6040518060400160405280600290602082028036833780820191505090505090565b5b80821115620009765760008160009055506001016200095c565b5090565b6000815190506200098b8162000c98565b92915050565b600060208284031215620009aa57620009a962000c7a565b5b6000620009ba848285016200097a565b91505092915050565b620009d8620009d28262000af9565b62000bc5565b82525050565b6000620009eb8262000a4b565b620009f7818562000a56565b935062000a0981856020860162000b41565b80840191505092915050565b600062000a238284620009c3565b60148201915081905092915050565b600062000a408284620009de565b915081905092915050565b600081519050919050565b600081905092915050565b600062000a6e8262000b37565b915062000a7b8362000b37565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111562000ab35762000ab262000bed565b5b828201905092915050565b600062000acb8262000b37565b915062000ad88362000b37565b92508282101562000aee5762000aed62000bed565b5b828203905092915050565b600062000b068262000b17565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101562000b6157808201518184015260208101905062000b44565b8381111562000b71576000848401525b50505050565b600062000b848262000b37565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141562000bba5762000bb962000bed565b5b600182019050919050565b600062000bd28262000bd9565b9050919050565b600062000be68262000c7f565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b60006c0100000000000000000000000082029050919050565b62000ca38162000b0d565b811462000caf57600080fd5b50565b6115298062000cc26000396000f3fe608060405234801561001057600080fd5b50600436106100b0576000357c0100000000000000000000000000000000000000000000000000000000900480638c661b36116100835780638c661b3614610175578063ae47ece0146101a5578063b68e6f31146101d5578063d0e95db114610205578063ff7496b414610235576100b0565b806301ffc9a7146100b557806322168e4f146100e557806350e0c6d3146101155780637d64bf1d14610145575b600080fd5b6100cf60048036038101906100ca9190610fbf565b610265565b6040516100dc91906111a4565b60405180910390f35b6100ff60048036038101906100fa9190610f52565b610317565b60405161010c9190611167565b60405180910390f35b61012f600480360381019061012a9190610e52565b61039c565b60405161013c91906111da565b60405180910390f35b61015f600480360381019061015a9190610f52565b6103e7565b60405161016c9190611167565b60405180910390f35b61018f600480360381019061018a9190610e7f565b61046d565b60405161019c9190611182565b60405180910390f35b6101bf60048036038101906101ba9190610f12565b61050b565b6040516101cc91906111a4565b60405180910390f35b6101ef60048036038101906101ea9190610ebf565b6107b3565b6040516101fc91906111a4565b60405180910390f35b61021f600480360381019061021a9190610e52565b61080d565b60405161022c91906111da565b60405180910390f35b61024f600480360381019061024a9190610fec565b610859565b60405161025c91906111bf565b60405180910390f35b60006327beb9107c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156102ba5760019050610312565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561030d5760019050610312565b600090505b919050565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481106103695761036861141b565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020828154811061043a5761043961141b565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905092915050565b606060008061047c8585610896565b915060016000838152602001908152602001600020549050600581815481106104a8576104a761141b565b5b906000526020600020018054806020026020016040519081016040528092919081815260200182805480156104fc57602002820191906000526020600020905b8154815260200190600101908083116104e8575b50505050509250505092915050565b6000610515610d5d565b60606000610524328787610b19565b9250600160008460006002811061053e5761053d61141b565b5b6020020151815260200190815260200160002054905060008114156106d957600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020329080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600582908060018154018082558091505060019003906000526020600020016000909190919091509080519060200190610638929190610d7f565b506000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020869080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60016005805490506106eb919061129a565b90508060016000856000600281106107065761070561141b565b5b6020020151815260200190815260200160002081905550600581815481106107315761073061141b565b5b906000526020600020018590806001815401808255809150506001900390600052602060002001600090919091909150556001600460008560016002811061077c5761077b61141b565b5b6020020151815260200190815260200160002060006101000a81548160ff0219169083151502179055506001935050505092915050565b60006107bd610d5d565b6107c8858585610b19565b905060046000826001600281106107e2576107e161141b565b5b6020020151815260200190815260200160002060009054906101000a900460ff169150509392505050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6005828154811061086957600080fd5b90600052602060002001818154811061088157600080fd5b90600052602060002001600091509150505481565b6000806000602867ffffffffffffffff8111156108b6576108b561144a565b5b6040519080825280601f01601f1916602001820160405280156108e85781602001600182028036833780820191505090505b5090506000856040516020016108fe9190611135565b604051602081830303815290604052905060005b60148110156109cd5781818151811061092e5761092d61141b565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283828151811061098b5761098a61141b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806109c59061137f565b915050610912565b50846040516020016109df9190611135565b604051602081830303815290604052905060005b6014811015610aba57818181518110610a0f57610a0e61141b565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283601483610a679190611244565b81518110610a7857610a7761141b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080610ab29061137f565b9150506109f3565b50600282604051610acb9190611150565b602060405180830381855afa158015610ae8573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610b0b9190610f92565b925082935050505092915050565b610b21610d5d565b6000610b2b610d5d565b6000604067ffffffffffffffff811115610b4857610b4761144a565b5b6040519080825280601f01601f191660200182016040528015610b7a5781602001600182028036833780820191505090505b509050610b878787610896565b925060005b6020811015610c2057838160208110610ba857610ba761141b565b5b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110610bde57610bdd61141b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080610c189061137f565b915050610b8c565b5060005b6020811015610cc457858160208110610c4057610c3f61141b565b5b1a7f01000000000000000000000000000000000000000000000000000000000000000282602083610c719190611244565b81518110610c8257610c8161141b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080610cbc9061137f565b915050610c24565b508282600060028110610cda57610cd961141b565b5b602002018181525050600281604051610cf39190611150565b602060405180830381855afa158015610d10573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610d339190610f92565b82600160028110610d4757610d4661141b565b5b6020020181815250508193505050509392505050565b6040518060400160405280600290602082028036833780820191505090505090565b828054828255906000526020600020908101928215610dbb579160200282015b82811115610dba578251825591602001919060010190610d9f565b5b509050610dc89190610dcc565b5090565b5b80821115610de5576000816000905550600101610dcd565b5090565b600081359050610df881611497565b92915050565b600081359050610e0d816114ae565b92915050565b600081519050610e22816114ae565b92915050565b600081359050610e37816114c5565b92915050565b600081359050610e4c816114dc565b92915050565b600060208284031215610e6857610e67611479565b5b6000610e7684828501610de9565b91505092915050565b60008060408385031215610e9657610e95611479565b5b6000610ea485828601610de9565b9250506020610eb585828601610de9565b9150509250929050565b600080600060608486031215610ed857610ed7611479565b5b6000610ee686828701610de9565b9350506020610ef786828701610de9565b9250506040610f0886828701610dfe565b9150509250925092565b60008060408385031215610f2957610f28611479565b5b6000610f3785828601610de9565b9250506020610f4885828601610dfe565b9150509250929050565b60008060408385031215610f6957610f68611479565b5b6000610f7785828601610de9565b9250506020610f8885828601610e3d565b9150509250929050565b600060208284031215610fa857610fa7611479565b5b6000610fb684828501610e13565b91505092915050565b600060208284031215610fd557610fd4611479565b5b6000610fe384828501610e28565b91505092915050565b6000806040838503121561100357611002611479565b5b600061101185828601610e3d565b925050602061102285828601610e3d565b9150509250929050565b600061103883836110d7565b60208301905092915050565b61104d816112ce565b82525050565b61106461105f826112ce565b6113c8565b82525050565b600061107582611205565b61107f8185611228565b935061108a836111f5565b8060005b838110156110bb5781516110a2888261102c565b97506110ad8361121b565b92505060018101905061108e565b5085935050505092915050565b6110d1816112e0565b82525050565b6110e0816112ec565b82525050565b6110ef816112ec565b82525050565b600061110082611210565b61110a8185611239565b935061111a81856020860161134c565b80840191505092915050565b61112f81611342565b82525050565b60006111418284611053565b60148201915081905092915050565b600061115c82846110f5565b915081905092915050565b600060208201905061117c6000830184611044565b92915050565b6000602082019050818103600083015261119c818461106a565b905092915050565b60006020820190506111b960008301846110c8565b92915050565b60006020820190506111d460008301846110e6565b92915050565b60006020820190506111ef6000830184611126565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600061124f82611342565b915061125a83611342565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561128f5761128e6113ec565b5b828201905092915050565b60006112a582611342565b91506112b083611342565b9250828210156112c3576112c26113ec565b5b828203905092915050565b60006112d982611322565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101561136a57808201518184015260208101905061134f565b83811115611379576000848401525b50505050565b600061138a82611342565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156113bd576113bc6113ec565b5b600182019050919050565b60006113d3826113da565b9050919050565b60006113e58261147e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b60006c0100000000000000000000000082029050919050565b6114a0816112ce565b81146114ab57600080fd5b50565b6114b7816112ec565b81146114c257600080fd5b50565b6114ce816112f6565b81146114d957600080fd5b50565b6114e581611342565b81146114f057600080fd5b5056fea2646970667358221220ae28d67ed718aa9371a0b367df98b507fbb1d1a653a6c7e8a30a2e4ad143240664736f6c63430008070033 \ No newline at end of file diff --git a/solidity/AddressDeclarator.json b/solidity/AddressDeclarator.json index 5f07419..d81499d 100644 --- a/solidity/AddressDeclarator.json +++ b/solidity/AddressDeclarator.json @@ -1 +1 @@ -[{"inputs":[{"internalType":"bytes32","name":"_initialDescription","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_declarator","type":"address"},{"indexed":false,"internalType":"address","name":"_subject","type":"address"},{"indexed":false,"internalType":"bytes32","name":"_proof","type":"bytes32"}],"name":"DeclarationAdded","type":"event"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"},{"internalType":"bytes32","name":"_proof","type":"bytes32"}],"name":"addDeclaration","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"contents","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"},{"internalType":"address","name":"_subject","type":"address"}],"name":"declaration","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"},{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"declarationAddressAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"}],"name":"declarationCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"},{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"declaratorAddressAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"}],"name":"declaratorCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}] +[{"inputs":[{"internalType":"bytes32","name":"_initialDescription","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_declarator","type":"address"},{"indexed":false,"internalType":"address","name":"_subject","type":"address"},{"indexed":false,"internalType":"bytes32","name":"_proof","type":"bytes32"}],"name":"DeclarationAdded","type":"event"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"},{"internalType":"bytes32","name":"_proof","type":"bytes32"}],"name":"addDeclaration","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"contents","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"},{"internalType":"address","name":"_subject","type":"address"}],"name":"declaration","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"},{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"declarationAddressAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"}],"name":"declarationCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"},{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"declaratorAddressAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"}],"name":"declaratorCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"},{"internalType":"address","name":"_subject","type":"address"},{"internalType":"bytes32","name":"_proof","type":"bytes32"}],"name":"haveDeclaration","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}] diff --git a/solidity/AddressDeclarator.sol b/solidity/AddressDeclarator.sol index e967ed1..9d821d7 100644 --- a/solidity/AddressDeclarator.sol +++ b/solidity/AddressDeclarator.sol @@ -5,9 +5,10 @@ pragma solidity >0.6.11; contract AddressDeclarator { mapping( address => address[] ) declarationIndex; - mapping( bytes32 => uint256 ) declarationContentIndex; + mapping( bytes32 => uint256 ) declarationContentIndex; // the _latest_ content pointer for the declarator to subject mapping mapping( address => address[] ) declarator; mapping( address => address[] ) declaratorReverse; + mapping( bytes32 => bool ) declarationExistIndex; bytes32[][] public contents; event DeclarationAdded(address _declarator, address _subject, bytes32 _proof); @@ -36,6 +37,25 @@ contract AddressDeclarator { return k; } + function toReference(address _declarator, address _subject, bytes32 _proof) private pure returns ( bytes32[2] memory ) { + bytes32 k; + bytes32[2] memory ks; + bytes memory signMaterial = new bytes(64); + + k = toReference(_declarator, _subject); + for (uint256 i = 0; i < 32; i++) { + signMaterial[i] = k[i]; + } + for (uint256 i = 0; i < 32; i++) { + signMaterial[i+32] = _proof[i]; + } + + ks[0] = k; + ks[1] = sha256(signMaterial); + + return ks; + } + // Implements Declarator function declaratorCount(address _subject) public view returns ( uint256 ) { return declarator[_subject].length; @@ -48,20 +68,23 @@ contract AddressDeclarator { // Implements Declarator function addDeclaration(address _subject, bytes32 _proof) public returns ( bool ) { - bytes32 k; + bytes32[2] memory ks; bytes32[] memory declarationContents; uint256 idx; - k = toReference(msg.sender, _subject); - idx = declarationContentIndex[k]; + ks = toReference(tx.origin, _subject, _proof); + idx = declarationContentIndex[ks[0]]; if (idx == 0) { // This also works for the constructor :) - declarator[_subject].push(msg.sender); - contents.push(declarationContents); //= contents[idx], - declarationIndex[msg.sender].push(_subject); + declarator[_subject].push(tx.origin); + contents.push(declarationContents); + declarationIndex[tx.origin].push(_subject); } + idx = contents.length-1; - declarationContentIndex[k] = idx; + declarationContentIndex[ks[0]] = idx; contents[idx].push(_proof); + declarationExistIndex[ks[1]] = true; + return true; } @@ -74,6 +97,15 @@ contract AddressDeclarator { return contents[idx]; } + // Implements Declarator + function haveDeclaration(address _declarator, address _subject, bytes32 _proof) public view returns (bool) { + bytes32[2] memory ks; + + ks = toReference(_declarator, _subject, _proof); + + return declarationExistIndex[ks[1]]; + } + // Implements Declarator function declarationCount(address _declarator) public view returns ( uint256 ) { return declarationIndex[_declarator].length; @@ -92,5 +124,6 @@ contract AddressDeclarator { if (_sum == 0x01ffc9a7) { // EIP165 return true; } + return false; } } diff --git a/solidity/Makefile b/solidity/Makefile index 3d40ec9..8500e56 100644 --- a/solidity/Makefile +++ b/solidity/Makefile @@ -1,19 +1,30 @@ SOLC = /usr/bin/solc -all: +all: address_declarator token_index accounts_index + +address_declarator: $(SOLC) AddressDeclarator.sol --abi --evm-version byzantium | awk 'NR>3' > AddressDeclarator.json $(SOLC) AddressDeclarator.sol --bin --evm-version byzantium | awk 'NR>3' > AddressDeclarator.bin truncate -s -1 AddressDeclarator.bin + +token_index: $(SOLC) TokenUniqueSymbolIndex.sol --abi --evm-version byzantium | awk 'NR>3' > TokenUniqueSymbolIndex.json $(SOLC) TokenUniqueSymbolIndex.sol --bin --evm-version byzantium | awk 'NR>3' > TokenUniqueSymbolIndex.bin truncate -s -1 TokenUniqueSymbolIndex.bin -test: all + +accounts_index: + $(SOLC) AccountsIndexAddressDeclarator.sol --abi --evm-version byzantium | awk 'NR>3' > AccountsIndexAddressDeclarator.json + $(SOLC) AccountsIndexAddressDeclarator.sol --bin --evm-version byzantium | awk 'NR>3' > AccountsIndexAddressDeclarator.bin + truncate -s -1 AccountsIndexAddressDeclarator.bin + +#test: all #python test.py - python test_tokenindex.py + #python test_tokenindex.py install: all cp -v AddressDeclarator.{json,bin} ../python/eth_address_declarator/data/ cp -v TokenUniqueSymbolIndex.{json,bin} ../python/eth_token_index/data/ + cp -v AccountsIndexAddressDeclarator.{json,bin} ../python/eth_address_declarator/data/ .PHONY: test install diff --git a/solidity/TokenUniqueSymbolIndex.bin b/solidity/TokenUniqueSymbolIndex.bin index fcbee38..2bc51d8 100644 --- a/solidity/TokenUniqueSymbolIndex.bin +++ b/solidity/TokenUniqueSymbolIndex.bin @@ -1 +1 @@ -608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610fb3806100c46000396000f3fe608060405234801561001057600080fd5b50600436106100bb576000357c0100000000000000000000000000000000000000000000000000000000900480637ef50298116100835780637ef502981461018c5780638da5cb5b146101bc578063bb34534c146101da578063e2095c071461020a578063f2fde38b1461023a576100bb565b806301ffc9a7146100c05780630a3b0a4f146100f05780630cbb0f83146101205780634420e4861461013e57806379ba50971461016e575b600080fd5b6100da60048036038101906100d59190610b81565b61026a565b6040516100e79190610ca4565b60405180910390f35b61010a60048036038101906101059190610b06565b6103c2565b6040516101179190610ca4565b60405180910390f35b6101286103d4565b6040516101359190610cbf565b60405180910390f35b61015860048036038101906101539190610b06565b6103ed565b6040516101659190610ca4565b60405180910390f35b6101766106b6565b6040516101839190610ca4565b60405180910390f35b6101a660048036038101906101a19190610b2f565b610858565b6040516101b39190610cbf565b60405180910390f35b6101c4610870565b6040516101d19190610c89565b60405180910390f35b6101f460048036038101906101ef9190610b2f565b610894565b6040516102019190610c89565b60405180910390f35b610224600480360381019061021f9190610beb565b61091a565b6040516102319190610c89565b60405180910390f35b610254600480360381019061024f9190610b06565b610994565b6040516102619190610ca4565b60405180910390f35b600063cbdb05c77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156102bf57600190506103bd565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561031257600190506103bd565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561036557600190506103bd565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156103b857600190506103bd565b600090505b919050565b60006103cd826103ed565b9050919050565b600060016003805490506103e89190610d9c565b905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461044857600080fd5b60606000806000808673ffffffffffffffffffffffffffffffffffffffff166040516024016040516020818303038152906040527f95d89b41000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516104f79190610c72565b6000604051808303816000865af19150503d8060008114610534576040519150601f19603f3d011682016040523d82523d6000602084013e610539565b606091505b50915091508161054857600080fd5b8080602001905181019061055c9190610baa565b945060028560405161056e9190610c72565b602060405180830381855afa15801561058b573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906105ae9190610b58565b935060026000858152602001908152602001600020549250600083146105d357600080fd5b60038054905060026000868152602001908152602001600020819055506003879080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016003805490506106659190610d9c565b8773ffffffffffffffffffffffffffffffffffffffff167f9cc987676e7d63379f176ea50df0ae8d2d9d1141d1231d4ce15b5965f73c943060405160405180910390a3600195505050505050919050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461071357600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b60026020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060026000848152602001908152602001600020549050600381815481106108e7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000600360018361092b9190610d46565b81548110610962577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109ef57600080fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000610a48610a4384610cff565b610cda565b905082815260208101848484011115610a6057600080fd5b610a6b848285610e4e565b509392505050565b600081359050610a8281610f21565b92915050565b600081359050610a9781610f38565b92915050565b600081519050610aac81610f38565b92915050565b600081359050610ac181610f4f565b92915050565b600082601f830112610ad857600080fd5b8151610ae8848260208601610a35565b91505092915050565b600081359050610b0081610f66565b92915050565b600060208284031215610b1857600080fd5b6000610b2684828501610a73565b91505092915050565b600060208284031215610b4157600080fd5b6000610b4f84828501610a88565b91505092915050565b600060208284031215610b6a57600080fd5b6000610b7884828501610a9d565b91505092915050565b600060208284031215610b9357600080fd5b6000610ba184828501610ab2565b91505092915050565b600060208284031215610bbc57600080fd5b600082015167ffffffffffffffff811115610bd657600080fd5b610be284828501610ac7565b91505092915050565b600060208284031215610bfd57600080fd5b6000610c0b84828501610af1565b91505092915050565b610c1d81610dd0565b82525050565b610c2c81610de2565b82525050565b6000610c3d82610d30565b610c478185610d3b565b9350610c57818560208601610e4e565b80840191505092915050565b610c6c81610e44565b82525050565b6000610c7e8284610c32565b915081905092915050565b6000602082019050610c9e6000830184610c14565b92915050565b6000602082019050610cb96000830184610c23565b92915050565b6000602082019050610cd46000830184610c63565b92915050565b6000610ce4610cf5565b9050610cf08282610e81565b919050565b6000604051905090565b600067ffffffffffffffff821115610d1a57610d19610ee1565b5b610d2382610f10565b9050602081019050919050565b600081519050919050565b600081905092915050565b6000610d5182610e44565b9150610d5c83610e44565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610d9157610d90610eb2565b5b828201905092915050565b6000610da782610e44565b9150610db283610e44565b925082821015610dc557610dc4610eb2565b5b828203905092915050565b6000610ddb82610e24565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610e6c578082015181840152602081019050610e51565b83811115610e7b576000848401525b50505050565b610e8a82610f10565b810181811067ffffffffffffffff82111715610ea957610ea8610ee1565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b610f2a81610dd0565b8114610f3557600080fd5b50565b610f4181610dee565b8114610f4c57600080fd5b50565b610f5881610df8565b8114610f6357600080fd5b50565b610f6f81610e44565b8114610f7a57600080fd5b5056fea2646970667358221220f7c74f94efff8b8cbf9923365cd4956305e9d142051ff9229ac8a3c0b81f477464736f6c63430008030033 \ No newline at end of file +608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611021806100c46000396000f3fe608060405234801561001057600080fd5b50600436106100bb576000357c0100000000000000000000000000000000000000000000000000000000900480637ef50298116100835780637ef502981461018c5780638da5cb5b146101bc578063bb34534c146101da578063e2095c071461020a578063f2fde38b1461023a576100bb565b806301ffc9a7146100c05780630a3b0a4f146100f05780630cbb0f83146101205780634420e4861461013e57806379ba50971461016e575b600080fd5b6100da60048036038101906100d59190610b9c565b61026a565b6040516100e79190610ccf565b60405180910390f35b61010a60048036038101906101059190610b15565b610415565b6040516101179190610ccf565b60405180910390f35b610128610427565b6040516101359190610cea565b60405180910390f35b61015860048036038101906101539190610b15565b610440565b6040516101659190610ccf565b60405180910390f35b610176610709565b6040516101839190610ccf565b60405180910390f35b6101a660048036038101906101a19190610b42565b6108ab565b6040516101b39190610cea565b60405180910390f35b6101c46108c3565b6040516101d19190610cb4565b60405180910390f35b6101f460048036038101906101ef9190610b42565b6108e7565b6040516102019190610cb4565b60405180910390f35b610224600480360381019061021f9190610c12565b610947565b6040516102319190610cb4565b60405180910390f35b610254600480360381019061024f9190610b15565b61099b565b6040516102619190610ccf565b60405180910390f35b600063cbdb05c77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156102bf5760019050610410565b63bb34534c7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156103125760019050610410565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156103655760019050610410565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156103b85760019050610410565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561040b5760019050610410565b600090505b919050565b600061042082610440565b9050919050565b6000600160038054905061043b9190610dc7565b905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461049b57600080fd5b60606000806000808673ffffffffffffffffffffffffffffffffffffffff166040516024016040516020818303038152906040527f95d89b41000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161054a9190610c9d565b6000604051808303816000865af19150503d8060008114610587576040519150601f19603f3d011682016040523d82523d6000602084013e61058c565b606091505b50915091508161059b57600080fd5b808060200190518101906105af9190610bc9565b94506002856040516105c19190610c9d565b602060405180830381855afa1580156105de573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906106019190610b6f565b9350600260008581526020019081526020016000205492506000831461062657600080fd5b60038054905060026000868152602001908152602001600020819055506003879080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016003805490506106b89190610dc7565b8773ffffffffffffffffffffffffffffffffffffffff167f9cc987676e7d63379f176ea50df0ae8d2d9d1141d1231d4ce15b5965f73c943060405160405180910390a3600195505050505050919050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461076657600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b60026020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260008481526020019081526020016000205490506003818154811061091457610913610f0c565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b600060036001836109589190610d71565b8154811061096957610968610f0c565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109f657600080fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000610a4f610a4a84610d2a565b610d05565b905082815260208101848484011115610a6b57610a6a610f6f565b5b610a76848285610e79565b509392505050565b600081359050610a8d81610f8f565b92915050565b600081359050610aa281610fa6565b92915050565b600081519050610ab781610fa6565b92915050565b600081359050610acc81610fbd565b92915050565b600082601f830112610ae757610ae6610f6a565b5b8151610af7848260208601610a3c565b91505092915050565b600081359050610b0f81610fd4565b92915050565b600060208284031215610b2b57610b2a610f79565b5b6000610b3984828501610a7e565b91505092915050565b600060208284031215610b5857610b57610f79565b5b6000610b6684828501610a93565b91505092915050565b600060208284031215610b8557610b84610f79565b5b6000610b9384828501610aa8565b91505092915050565b600060208284031215610bb257610bb1610f79565b5b6000610bc084828501610abd565b91505092915050565b600060208284031215610bdf57610bde610f79565b5b600082015167ffffffffffffffff811115610bfd57610bfc610f74565b5b610c0984828501610ad2565b91505092915050565b600060208284031215610c2857610c27610f79565b5b6000610c3684828501610b00565b91505092915050565b610c4881610dfb565b82525050565b610c5781610e0d565b82525050565b6000610c6882610d5b565b610c728185610d66565b9350610c82818560208601610e79565b80840191505092915050565b610c9781610e6f565b82525050565b6000610ca98284610c5d565b915081905092915050565b6000602082019050610cc96000830184610c3f565b92915050565b6000602082019050610ce46000830184610c4e565b92915050565b6000602082019050610cff6000830184610c8e565b92915050565b6000610d0f610d20565b9050610d1b8282610eac565b919050565b6000604051905090565b600067ffffffffffffffff821115610d4557610d44610f3b565b5b610d4e82610f7e565b9050602081019050919050565b600081519050919050565b600081905092915050565b6000610d7c82610e6f565b9150610d8783610e6f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610dbc57610dbb610edd565b5b828201905092915050565b6000610dd282610e6f565b9150610ddd83610e6f565b925082821015610df057610def610edd565b5b828203905092915050565b6000610e0682610e4f565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610e97578082015181840152602081019050610e7c565b83811115610ea6576000848401525b50505050565b610eb582610f7e565b810181811067ffffffffffffffff82111715610ed457610ed3610f3b565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b610f9881610dfb565b8114610fa357600080fd5b50565b610faf81610e19565b8114610fba57600080fd5b50565b610fc681610e23565b8114610fd157600080fd5b50565b610fdd81610e6f565b8114610fe857600080fd5b5056fea26469706673582212201cbc4bf05e3ed0bb6e627801ab4486f9b8d966bf2e342645a13008d6bfddb33b64736f6c63430008070033 \ No newline at end of file