Address Contract Partially Verified
Address
0x9F29F9BDA2052884D39F0f032b68aAa14FC363d8
Balance
0 ETH
Nonce
1
Code Size
16894 bytes
Creator
0x9C95B0EF...1585 at tx 0x79c42e24...dae917
Indexed Transactions
0
Contract Bytecode
16894 bytes
0x6080604052600436106103025760003560e01c806382dc1ec411610190578063b86f60d2116100dc578063e6ede14d11610095578063eb16136f1161006f578063eb16136f146108a5578063f2fde38b146108c5578063f74032f0146108e5578063fa0caa16146109055761034c565b8063e6ede14d1461085b578063e6fc77441461087b578063ea217091146108905761034c565b8063b86f60d2146107b1578063c4d66de8146107c6578063ca07140c146107e6578063cc3c0f0614610806578063d12e825d14610826578063da6770371461083b5761034c565b8063adc5fb6411610149578063b0e1268e11610123578063b0e1268e14610754578063b50277bb14610769578063b760faf914610789578063b79472621461079c5761034c565b8063adc5fb64146106f4578063ae06c1b714610714578063afad80ac146107345761034c565b806382dc1ec4146106605780638456cb59146106805780638da5cb5b146106955780638f32d59b146106aa578063916dc59d146106bf578063a53d6e6e146106df5761034c565b806346fbf68e1161024f5780636a86319111610208578063715018a6116101e2578063715018a6146105f65780637813bea21461060b5780637ecebe001461062b5780638129fc1c1461064b5761034c565b80636a863191146105ac5780636b0509b1146105cc5780636ef8d66d146105e15761034c565b806346fbf68e146105005780634beea5061461052057806354fd4d501461054057806359a8a867146105625780635c975abb146105775780635d4471291461058c5761034c565b80632fb3b361116102bc57806337e761091161029657806337e76109146104715780633cf3058b1461049e5780633f4ba83a146104cb57806342cdb2c6146104e05761034c565b80632fb3b3611461041c5780633500c1dc1461043c5780633644e5151461045c5761034c565b806223de2914610351578063026976191461037157806307c8f7b0146103a757806311efbf61146103c757806320e3bb00146103dc5780632f3cca4e146103fc5761034c565b3661034c576041546001600160a01b031661031b610925565b6001600160a01b03161461034a5760405162461bcd60e51b815260040161034190613e67565b60405180910390fd5b005b600080fd5b34801561035d57600080fd5b5061034a61036c3660046130ee565b610929565b34801561037d57600080fd5b5061039161038c366004613265565b610b20565b60405161039e91906136c1565b60405180910390f35b3480156103b357600080fd5b5061034a6103c236600461322d565b610b32565b3480156103d357600080fd5b50610391610bb0565b3480156103e857600080fd5b5061034a6103f7366004613396565b610bb6565b34801561040857600080fd5b5061034a610417366004612f6c565b610df1565b34801561042857600080fd5b5061034a61043736600461301a565b610e7a565b34801561044857600080fd5b5061034a610457366004612f6c565b610fea565b34801561046857600080fd5b5061039161107f565b34801561047d57600080fd5b5061049161048c366004613265565b611085565b60405161039e91906136b6565b3480156104aa57600080fd5b506104be6104b9366004613265565b6110aa565b60405161039e919061354d565b3480156104d757600080fd5b5061034a6110c5565b3480156104ec57600080fd5b5061034a6104fb366004612f6c565b611158565b34801561050c57600080fd5b5061049161051b366004612f6c565b6111eb565b34801561052c57600080fd5b5061039161053b366004613298565b6111fe565b34801561054c57600080fd5b50610555611318565b60405161039e919061377d565b34801561056e57600080fd5b50610555611334565b34801561058357600080fd5b506104916113c2565b34801561059857600080fd5b506104916105a7366004612f6c565b6113cb565b3480156105b857600080fd5b5061034a6105c7366004612fa4565b6113e0565b3480156105d857600080fd5b50610391611644565b3480156105ed57600080fd5b5061034a611668565b34801561060257600080fd5b5061034a61167a565b34801561061757600080fd5b5061034a61062636600461319c565b6116ee565b34801561063757600080fd5b50610391610646366004612f6c565b611731565b34801561065757600080fd5b5061034a611743565b34801561066c57600080fd5b5061034a61067b366004612f6c565b6117bd565b34801561068c57600080fd5b5061034a6117ed565b3480156106a157600080fd5b506104be61186d565b3480156106b657600080fd5b50610491611881565b3480156106cb57600080fd5b5061034a6106da366004612f6c565b6118ac565b3480156106eb57600080fd5b506104be611941565b34801561070057600080fd5b5061039161070f36600461327d565b611950565b34801561072057600080fd5b5061034a61072f366004613265565b6119af565b34801561074057600080fd5b5061039161074f3660046131dc565b611a29565b34801561076057600080fd5b506104be611a65565b34801561077557600080fd5b5061039161078436600461327d565b611a74565b61034a610797366004612f6c565b611a87565b3480156107a857600080fd5b50610491611b56565b3480156107bd57600080fd5b506104be611b66565b3480156107d257600080fd5b5061034a6107e1366004612f6c565b611b75565b3480156107f257600080fd5b506104be610801366004613265565b611c40565b34801561081257600080fd5b50610491610821366004613265565b611c5b565b34801561083257600080fd5b5061034a611c70565b34801561084757600080fd5b50610491610856366004613265565b611cc8565b34801561086757600080fd5b506104be610876366004612f6c565b611cdc565b34801561088757600080fd5b50610391611cf7565b34801561089c57600080fd5b506104be611cfd565b3480156108b157600080fd5b5061034a6108c0366004612f6c565b611d0c565b3480156108d157600080fd5b5061034a6108e0366004612f6c565b611d97565b3480156108f157600080fd5b506104be610900366004612f6c565b611dc4565b34801561091157600080fd5b5061034a610920366004612f6c565b611ddf565b3390565b6001600160a01b03881630141561093f57610b16565b6001600160a01b03861630146109675760405162461bcd60e51b815260040161034190613b3b565b6000610971610925565b60405163555ddc6560e11b8152909150600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca906109d09085907fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce217705490600401613655565b60206040518083038186803b1580156109e857600080fd5b505afa1580156109fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a209190612f88565b6001600160a01b03161415610a475760405162461bcd60e51b815260040161034190613f3c565b83151580610a645750610a62886001600160a01b0316611e7a565b155b610a805760405162461bcd60e51b815260040161034190613ba2565b60008415610acc57610ac786868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611eb692505050565b610ace565b885b9050610b13828a838a8a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ebd92505050565b50505b5050505050505050565b60426020526000908152604090205481565b610b3a611881565b610b565760405162461bcd60e51b815260040161034190613db9565b6040805460ff60a01b1916600160a01b83151581029190911780835591517f983e436223c000a441c2443b394ca5fb4669a513fe86dc1dd44494047b514ad992610ba59260ff910416906136b6565b60405180910390a150565b60375490565b610bbe611881565b610bda5760405162461bcd60e51b815260040161034190613db9565b6001600160a01b038616610c005760405162461bcd60e51b815260040161034190613d8d565b6001600160a01b038087166000908152603b6020526040902054168015610c395760405162461bcd60e51b81526004016103419061405d565b6000610c4487612170565b9050600060388787604051602001610c5e939291906134d4565b60408051601f1981840301815282825290546326d9e96360e01b83529092506001600160a01b0316906326d9e96390610ca190889088908690889060040161372e565b602060405180830381600087803b158015610cbb57600080fd5b505af1158015610ccf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf39190612f88565b6001600160a01b03808b166000818152603b6020908152604080832080548688166001600160a01b03199182168117909255908452603c909252918290208054909116909217909155603f5490516378bf2b5360e01b815292955016906378bf2b5390610d669086908e90600401613655565b600060405180830381600087803b158015610d8057600080fd5b505af1158015610d94573d6000803e3d6000fd5b50505050886001600160a01b0316836001600160a01b03167f2ef93c4e96a4ef0b19497ff60c9e7360a8734f3d2cd27ae5318e43851734d17f8385604051610ddd929190613790565b60405180910390a350505050505050505050565b600054610100900460ff1680610e0a575060005460ff16155b610e265760405162461bcd60e51b8152600401610341906139eb565b600054610100900460ff16158015610e51576000805460ff1961ff0019909116610100171660011790555b610e5a82611d0c565b6034805460ff191690558015610e76576000805461ff00191690555b5050565b600054610100900460ff1680610e93575060005460ff16155b610eaf5760405162461bcd60e51b8152600401610341906139eb565b600054610100900460ff16158015610eda576000805460ff1961ff0019909116610100171660011790555b610ee386611b75565b610eec86610df1565b8151610eff906038906020850190612e48565b50603f80546001600160a01b038087166001600160a01b031992831617909255604080548684169083161781556036805493891693909216929092179055516329965a1d60e01b8152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90610f969030907fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b908290600401613561565b600060405180830381600087803b158015610fb057600080fd5b505af1158015610fc4573d6000803e3d6000fd5b50505050610fd0611c70565b8015610fe2576000805461ff00191690555b505050505050565b610ff2611881565b61100e5760405162461bcd60e51b815260040161034190613db9565b6001600160a01b0381166110345760405162461bcd60e51b815260040161034190613adc565b604180546001600160a01b0319166001600160a01b0383161790556040517f0966c958966f6fac9ff807af074f8117eb2e9ce2b76390db7a158e9bdeb2485c90610ba590839061354d565b60395481565b6000818152604260209081526040808320548352603e90915290205460ff165b919050565b6044602052600090815260409020546001600160a01b031681565b6110d061051b610925565b6110ec5760405162461bcd60e51b815260040161034190613a33565b60345460ff1661110e5760405162461bcd60e51b8152600401610341906137f7565b6034805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611141610925565b60405161114e919061354d565b60405180910390a1565b611160611881565b61117c5760405162461bcd60e51b815260040161034190613db9565b6001600160a01b0381166111a25760405162461bcd60e51b815260040161034190613cd4565b604080546001600160a01b0319166001600160a01b038316178155517f619936bc6e3618d0b8dc69bcc70134fe9d88f9967f3a8b8304e318369252162590610ba590839061354d565b60006111f86033836121a3565b92915050565b6000428510156112205760405162461bcd60e51b815260040161034190613cab565b600061123c611234368b90038b018b613308565b8989896121eb565b90506000600182878787604051600081526020016040526040516112639493929190613710565b6020604051602081039080840390855afa158015611285573d6000803e3d6000fd5b5050604051601f1901519150600090506112a260208c018c612f6c565b6001600160a01b0316141580156112d657506112c160208b018b612f6c565b6001600160a01b0316816001600160a01b0316145b6112f25760405162461bcd60e51b815260040161034190613a7b565b61130a8a6113036020820182612f6c565b8b8b612280565b9a9950505050505050505050565b604080518082019091526002815261763360f01b602082015290565b6038805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156113ba5780601f1061138f576101008083540402835291602001916113ba565b820191906000526020600020905b81548152906001019060200180831161139d57829003601f168201915b505050505081565b60345460ff1690565b603d6020526000908152604090205460ff1681565b60345460ff16156114035760405162461bcd60e51b815260040161034190613c4a565b60358054600101908190556036546001600160a01b0316611422610925565b6001600160a01b0316146114485760405162461bcd60e51b815260040161034190613b72565b6001600160a01b0388166000908152603d602052604090205460ff168061148857506001600160a01b038881166000908152603b60205260409020541615155b6114a45760405162461bcd60e51b815260040161034190613b0c565b6001600160a01b0386166114ca5760405162461bcd60e51b815260040161034190613c21565b600085116114ea5760405162461bcd60e51b815260040161034190613ab2565b836115075760405162461bcd60e51b815260040161034190613ed5565b826115245760405162461bcd60e51b815260040161034190613954565b600083815260426020526040902054156115505760405162461bcd60e51b815260040161034190613e9e565b600061155f8787878787611a29565b6000818152603e602052604090205490915060ff16156115915760405162461bcd60e51b815260040161034190613e30565b60008481526042602090815260408083208490556043825280832080546001600160a01b03199081166001600160a01b038f811691821790935560449094529382902080549094168c821617909355519189169186907f2858b8803acb87882fd2de49ce7572ae3e741fb8073cbe772fa50ce00bdfba229061161a908d908c908c908b90613584565b60405180910390a4506035548114610b165760405162461bcd60e51b8152600401610341906137b2565b7ff18ceda3f6355f78c234feba066041a50f6557bfb600201e2a71a89e2dd8043381565b611678611673610925565b612499565b565b611682611881565b61169e5760405162461bcd60e51b815260040161034190613db9565b60345460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360348054610100600160a81b0319169055565b60006116f8610925565b905061170f6001600160a01b0385168230856124db565b61172b8482858560405180602001604052806000815250611ebd565b50505050565b60456020526000908152604090205481565b600054610100900460ff168061175c575060005460ff16155b6117785760405162461bcd60e51b8152600401610341906139eb565b600054610100900460ff161580156117a3576000805460ff1961ff0019909116610100171660011790555b600160355580156117ba576000805461ff00191690555b50565b6117c861051b610925565b6117e45760405162461bcd60e51b815260040161034190613a33565b6117ba81612533565b6117f861051b610925565b6118145760405162461bcd60e51b815260040161034190613a33565b60345460ff16156118375760405162461bcd60e51b815260040161034190613c4a565b6034805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611141610925565b60345461010090046001600160a01b031690565b60345460009061010090046001600160a01b031661189d610925565b6001600160a01b031614905090565b6118b4611881565b6118d05760405162461bcd60e51b815260040161034190613db9565b6001600160a01b0381166118f65760405162461bcd60e51b815260040161034190613f05565b603f80546001600160a01b0319166001600160a01b0383161790556040517f5f2c1fe803fd576d8af05ea156011cc9cc8c025bda24c1e85772fc05a0b3f1e390610ba590839061354d565b603f546001600160a01b031681565b60608101356000908152604460205260408120546001600160a01b0316611975610925565b6001600160a01b03161461199b5760405162461bcd60e51b815260040161034190613924565b6111f8826119a7610925565b600080612280565b6119b7611881565b6119d35760405162461bcd60e51b815260040161034190613db9565b6103e881106119f45760405162461bcd60e51b81526004016103419061408d565b60378190556040517f97e97c577f03bda90e2c9739011ec065ed5fbfb36ae217d20bb0d9be95e160cd90610ba59083906136c1565b60008383878785604051602001611a44959493929190613476565b60405160208183030381529060405280519060200120905095945050505050565b6041546001600160a01b031681565b60006111f8826119a76020820182612f6c565b6000611a91610925565b6041549091506001600160a01b0316611abc5760405162461bcd60e51b815260040161034190613c74565b604160009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015611b0c57600080fd5b505af1158015611b20573d6000803e3d6000fd5b5050505050610e76604160009054906101000a90046001600160a01b031682843460405180602001604052806000815250611ebd565b604054600160a01b900460ff1681565b6040546001600160a01b031681565b600054610100900460ff1680611b8e575060005460ff16155b611baa5760405162461bcd60e51b8152600401610341906139eb565b600054610100900460ff16158015611bd5576000805460ff1961ff0019909116610100171660011790555b60348054610100600160a81b0319166101006001600160a01b0385811682029290921792839055604051920416906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a38015610e76576000805461ff00191690555050565b6043602052600090815260409020546001600160a01b031681565b603e6020526000908152604090205460ff1681565b6000469050611cc26040518060400160405280601081526020016f52534b20546f6b656e2042726964676560801b815250604051806040016040528060018152602001603160f81b8152508330612575565b60395550565b600090815260426020526040902054151590565b603b602052600090815260409020546001600160a01b031681565b61271081565b6036546001600160a01b031690565b600054610100900460ff1680611d25575060005460ff16155b611d415760405162461bcd60e51b8152600401610341906139eb565b600054610100900460ff16158015611d6c576000805460ff1961ff0019909116610100171660011790555b611d75826111eb565b611d8257611d8282612533565b8015610e76576000805461ff00191690555050565b611d9f611881565b611dbb5760405162461bcd60e51b815260040161034190613db9565b6117ba816125cc565b603c602052600090815260409020546001600160a01b031681565b611de7611881565b611e035760405162461bcd60e51b815260040161034190613db9565b6001600160a01b038116611e295760405162461bcd60e51b81526004016103419061388b565b603680546001600160a01b0319166001600160a01b0383811691909117918290556040517f4a41a4d11aaf0c0c9e4311ac1d68b2b0134556da594779a2a35b0ddf7cd1eafb92610ba592169061354d565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611eae57508115155b949350505050565b6014015190565b604054600160a01b900460ff1615611ee75760405162461bcd60e51b8152600401610341906138f9565b60345460ff1615611f0a5760405162461bcd60e51b815260040161034190613c4a565b603580546001908101918290556001600160a01b0387166000908152603d60205260408120805460ff1916909217909155603754611f579061271090611f51908790612659565b9061269a565b90506000611f6585836126dc565b90506000611f728961271e565b905085601260ff831614611f9757611f948760ff601285900316600a0a612659565b90505b603f54604051638c34bc5560e01b81526001600160a01b0390911690638c34bc5590611fc9908d908590600401613655565b600060405180830381600087803b158015611fe357600080fd5b505af1158015611ff7573d6000803e3d6000fd5b5050506001600160a01b03808c166000908152603c60205260409020548c925016156120d157506001600160a01b03808b166000908152603c6020526040812054909116906120458c6127da565b905060006120538683612882565b905061205f87826128c4565b965061206b86826126dc565b60405163fe9d930360e01b81529096506001600160a01b038e169063fe9d93039061209c9089908d9060040161413c565b600060405180830381600087803b1580156120b657600080fd5b505af11580156120ca573d6000803e3d6000fd5b5050505050505b886001600160a01b03168a6001600160a01b0316826001600160a01b03167f1e90de9ae4d02420648a650f45f089a1be18fbca324092544ea626f9833212b0878b60405161212092919061413c565b60405180910390a4841561214a5761214a61213961186d565b6001600160a01b038d1690876128e9565b50505050506035548114610fe25760405162461bcd60e51b8152600401610341906137b2565b600060128260ff1611156121965760405162461bcd60e51b815260040161034190613d15565b5060120360ff16600a0a90565b60006001600160a01b0382166121cb5760405162461bcd60e51b815260040161034190613dee565b506001600160a01b03166000908152602091909152604090205460ff1690565b603954845160208087015160608801516001600160a01b03841660009081526045845260408082208054600181019091559051919661227796909561225c957ff18ceda3f6355f78c234feba066041a50f6557bfb600201e2a71a89e2dd8043395929490938d928d928d91016136ca565b6040516020818303038152906040528051906020012061290d565b95945050505050565b603580546001019081905560608501356000908152604360205260408120549091906001600160a01b0316806122c85760405162461bcd60e51b815260040161034190613f73565b60006122f96122da60208a018a612f6c565b60208a013560408b013560608c013561074f60a08e0160808f01613430565b6060890135600090815260426020526040902054909150811461232e5760405162461bcd60e51b8152600401610341906140fb565b6000818152603e602052604090205460ff161561235d5760405162461bcd60e51b815260040161034190613e30565b6000818152603e60209081526040808320805460ff191660011790556001600160a01b0385168352603d90915290205460ff16156123ad576123a682888a60200135898961292c565b93506123c1565b6123be82888a602001358989612aa2565b93505b6123ce6020890189612f6c565b6001600160a01b0316826001600160a01b031689606001357f42b1cb6263e8da47edf0583516eda1de16f729d26282f5791dc5b7af1010e925604460008d60600135815260200190815260200160002060009054906101000a90046001600160a01b03168c602001358d604001358e608001602081019061244f9190613430565b8e8e8e604051612465979695949392919061366e565b60405180910390a4505060355481146124905760405162461bcd60e51b8152600401610341906137b2565b50949350505050565b6124a4603382612c39565b6040516001600160a01b038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61172b846323b872dd60e01b8585856040516024016124fc93929190613631565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612c81565b61253e603382612d65565b6040516001600160a01b038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b8351602094850120835193850193909320604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815295860194909452928401929092526060830152608082015260a0902090565b6001600160a01b0381166125f25760405162461bcd60e51b815260040161034190613fd1565b6034546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603480546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600082612668575060006111f8565b8282028284828161267557fe5b04146126935760405162461bcd60e51b815260040161034190613d4c565b9392505050565b600061269383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612db1565b600061269383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612de8565b60408051600481526024810182526020810180516001600160e01b031663313ce56760e01b1790529051600091829182916001600160a01b0386169161276491906134b8565b600060405180830381855afa9150503d806000811461279f576040519150601f19603f3d011682016040523d82523d6000602084013e6127a4565b606091505b5091509150816127c65760405162461bcd60e51b81526004016103419061385c565b80806020019051810190611eae919061337e565b60408051600481526024810182526020810180516001600160e01b031663556f0dc760e01b1790529051600091829182916001600160a01b0386169161282091906134b8565b600060405180830381855afa9150503d806000811461285b576040519150601f19603f3d011682016040523d82523d6000602084013e612860565b606091505b5091509150816127c65760405162461bcd60e51b815260040161034190613bea565b600061269383836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250612e14565b6000828201838110156126935760405162461bcd60e51b8152600401610341906138c2565b6129088363a9059cbb60e01b84846040516024016124fc929190613655565b505050565b60405161190160f01b8152600281019290925260228201526042902090565b6000806129388761271e565b60ff1690506000612950866012849003600a0a61269a565b9050808411156129725760405162461bcd60e51b815260040161034190613fa3565b60415484820393506001600160a01b0389811691161415612a6957604154604051632e1a7d4d60e01b81526001600160a01b0390911690632e1a7d4d906129bd9084906004016136c1565b600060405180830381600087803b1580156129d757600080fd5b505af11580156129eb573d6000803e3d6000fd5b50506040516001600160a01b038a16925085156108fc02915085906000818181858888f19350505050158015612a25573d6000803e3d6000fd5b508315612a64576040516001600160a01b0386169085156108fc029086906000818181858888f19350505050158015612a62573d6000803e3d6000fd5b505b612a97565b612a7d6001600160a01b03891688856128e9565b8315612a9757612a976001600160a01b03891686866128e9565b505095945050505050565b6001600160a01b038086166000908152603b6020908152604080832054815163556f0dc760e01b81529151939416928492849263556f0dc79260048083019392829003018186803b158015612af657600080fd5b505afa158015612b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2e919061337e565b90506000612b3c8783612659565b905080851115612b5e5760405162461bcd60e51b815260040161034190613fa3565b604051630dcdc7dd60e41b815285820394506001600160a01b0384169063dcdc7dd090612b91908b9088906004016135fb565b600060405180830381600087803b158015612bab57600080fd5b505af1158015612bbf573d6000803e3d6000fd5b505050506000851115612c2d57604051630dcdc7dd60e41b81526001600160a01b0384169063dcdc7dd090612bfa90899089906004016135b0565b600060405180830381600087803b158015612c1457600080fd5b505af1158015612c28573d6000803e3d6000fd5b505050505b50505095945050505050565b612c4382826121a3565b612c5f5760405162461bcd60e51b815260040161034190613981565b6001600160a01b0316600090815260209190915260409020805460ff19169055565b612c93826001600160a01b0316611e7a565b612caf5760405162461bcd60e51b8152600401610341906140c4565b600080836001600160a01b031683604051612cca91906134b8565b6000604051808303816000865af19150503d8060008114612d07576040519150601f19603f3d011682016040523d82523d6000602084013e612d0c565b606091505b509150915081612d2e5760405162461bcd60e51b8152600401610341906139b6565b80511561172b5780806020019051810190612d499190613249565b61172b5760405162461bcd60e51b815260040161034190614013565b612d6f82826121a3565b15612d8c5760405162461bcd60e51b815260040161034190613825565b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b60008183612dd25760405162461bcd60e51b8152600401610341919061377d565b506000838581612dde57fe5b0495945050505050565b60008184841115612e0c5760405162461bcd60e51b8152600401610341919061377d565b505050900390565b60008183612e355760405162461bcd60e51b8152600401610341919061377d565b50828481612e3f57fe5b06949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282612e7e5760008555612ec4565b82601f10612e9757805160ff1916838001178555612ec4565b82800160010185558215612ec4579182015b82811115612ec4578251825591602001919060010190612ea9565b50612ed0929150612ed4565b5090565b5b80821115612ed05760008155600101612ed5565b60008083601f840112612efa578182fd5b50813567ffffffffffffffff811115612f11578182fd5b602083019150836020828501011115612f2957600080fd5b9250929050565b600060a08284031215612f41578081fd5b50919050565b803563ffffffff811681146110a557600080fd5b803560ff811681146110a557600080fd5b600060208284031215612f7d578081fd5b8135612693816141a5565b600060208284031215612f99578081fd5b8151612693816141a5565b600080600080600080600060e0888a031215612fbe578283fd5b8735612fc9816141a5565b96506020880135612fd9816141a5565b95506040880135612fe9816141a5565b9450606088013593506080880135925060a0880135915061300c60c08901612f47565b905092959891949750929550565b600080600080600060a08688031215613031578081fd5b853561303c816141a5565b945060208681013561304d816141a5565b9450604087013561305d816141a5565b9350606087013561306d816141a5565b9250608087013567ffffffffffffffff80821115613089578384fd5b818901915089601f83011261309c578384fd5b8135818111156130a857fe5b6130ba601f8201601f19168501614155565b91508082528a848285010111156130cf578485fd5b8084840185840137810190920192909252949793965091945092919050565b60008060008060008060008060c0898b031215613109578081fd5b8835613114816141a5565b97506020890135613124816141a5565b96506040890135613134816141a5565b955060608901359450608089013567ffffffffffffffff80821115613157578283fd5b6131638c838d01612ee9565b909650945060a08b013591508082111561317b578283fd5b506131888b828c01612ee9565b999c989b5096995094979396929594505050565b6000806000606084860312156131b0578081fd5b83356131bb816141a5565b925060208401356131cb816141a5565b929592945050506040919091013590565b600080600080600060a086880312156131f3578283fd5b85356131fe816141a5565b945060208601359350604086013592506060860135915061322160808701612f47565b90509295509295909350565b60006020828403121561323e578081fd5b8135612693816141ba565b60006020828403121561325a578081fd5b8151612693816141ba565b600060208284031215613276578081fd5b5035919050565b600060a0828403121561328e578081fd5b6126938383612f30565b6000806000806000806000610160888a0312156132b3578081fd5b6132bd8989612f30565b965060a08801356132cd816141a5565b955060c0880135945060e088013593506132ea6101008901612f5b565b92506101208801359150610140880135905092959891949750929550565b600060a08284031215613319578081fd5b60405160a0810181811067ffffffffffffffff8211171561333657fe5b6040528235613344816141a5565b8082525060208301356020820152604083013560408201526060830135606082015261337260808401612f47565b60808201529392505050565b60006020828403121561338f578081fd5b5051919050565b600080600080600080600060a0888a0312156133b0578081fd5b8735965060208801356133c2816141a5565b95506133d060408901612f5b565b9450606088013567ffffffffffffffff808211156133ec578283fd5b6133f88b838c01612ee9565b909650945060808a0135915080821115613410578283fd5b5061341d8a828b01612ee9565b989b979a50959850939692959293505050565b600060208284031215613441578081fd5b61269382612f47565b60008151808452613462816020860160208601614179565b601f01601f19169290920160200192915050565b948552602085019390935260609190911b6bffffffffffffffffffffffff19166040840152605483015260e01b6001600160e01b031916607482015260780190565b600082516134ca818460208701614179565b9190910192915050565b60008085546001808216600081146134f3576001811461350a57613539565b60ff198316865260028304607f1686019350613539565b600283048986526020808720875b838110156135315781548a820152908501908201613518565b505050860193505b505050838582379092019182525092915050565b6001600160a01b0391909116815260200190565b6001600160a01b0393841681526020810192909252909116604082015260600190565b6001600160a01b039490941684526020840192909252604083015263ffffffff16606082015260800190565b6001600160a01b03929092168252602082015260806040820181905260009082015260a060608201819052600b908201526a72656c617965722066656560a81b60c082015260e00190565b6001600160a01b039290921682526020820152608060408201819052600090820181905260a06060830181905282015260c00190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0397881681526020810196909652604086019490945263ffffffff9290921660608501528416608084015290921660a082015260c081019190915260e00190565b901515815260200190565b90815260200190565b9788526001600160a01b039687166020890152604088019590955260608701939093529316608085015260a084019290925260c083019190915260e08201526101000190565b93845260ff9290921660208401526040830152606082015260800190565b600060608252846060830152848660808401378060808684010152601f19601f8601168201608083820301602084015261376b608082018661344a565b91505082604083015295945050505050565b600060208252612693602083018461344a565b6000604082526137a3604083018561344a565b90508260208301529392505050565b60208082526025908201527f5265656e7472616e637947756172643a206e6f207265656e7472616e7420616c6040820152641b1bddd95960da1b606082015260800190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b6020808252601f908201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604082015260600190565b6020808252601590820152744c69625574696c733a204e6f20646563696d616c7360581b604082015260600190565b6020808252601b908201527f4272696467653a2046656465726174696f6e20697320656d7074790000000000604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601190820152704272696467653a20557067726164696e6760781b604082015260600190565b602080825260169082015275213934b233b29d1034b73b30b634b21039b2b73232b960511b604082015260600190565b602080825260139082015272084e4d2c8ceca74409cead8d840a8f090c2e6d606b1b604082015260600190565b6020808252818101527f526f6c65733a206163636f756e7420646f65736e2774206861766520726f6c65604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b60208082526028908201527f436f6e747261637420696e7374616e636520697320616c726561647920696e696040820152671d1a585b1a5e995960c21b606082015260800190565b60208082526028908201527f506175736572526f6c653a2063616c6c657220646f65736e277420686176652060408201526774686520726f6c6560c01b606082015260800190565b60208082526019908201527f4272696467653a20494e56414c49445f5349474e415455524500000000000000604082015260600190565b60208082526010908201526f04272696467653a20416d6f756e7420360841b604082015260600190565b6020808252601690820152754272696467653a20777261707020697320656d70747960501b604082015260600190565b602080825260159082015274213934b233b29d102ab735b737bbb7103a37b5b2b760591b604082015260600190565b6020808252601b908201527f4272696467653a204e6f7420746f207468697320616464726573730000000000604082015260600190565b602080825260169082015275213934b233b29d102737ba102332b232b930ba34b7b760511b604082015260600190565b60208082526028908201527f4272696467653a2053706563696679207265636569766572206164647265737360408201526720696e206461746160c01b606082015260800190565b60208082526018908201527f4c69625574696c733a204e6f206772616e756c61726974790000000000000000604082015260600190565b6020808252600f908201526e4272696467653a204e756c6c20546f60881b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601d908201527f4272696467653a207772617070656443757272656e637920656d707479000000604082015260600190565b6020808252600f908201526e109c9a5919d94e8811561412549151608a1b604082015260600190565b60208082526021908201527f4272696467653a2053696465546f6b656e466163746f727920697320656d70746040820152607960f81b606082015260800190565b6020808252601c908201527f4c69625574696c733a20446563696d616c73206e6f74203c3d20313800000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b602080825260129082015271213934b233b29d10273ab636103a37b5b2b760711b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526022908201527f526f6c65733a206163636f756e7420697320746865207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526017908201527f4272696467653a20416c726561647920636c61696d6564000000000000000000604082015260600190565b6020808252601b908201527f4272696467653a206e6f74207772617070656443757272656e63790000000000604082015260600190565b60208082526018908201527f4272696467653a20416c72656164792061636365707465640000000000000000604082015260600190565b602080825260169082015275084e4d2c8ceca74409cead8d84084d8dec6d690c2e6d60531b604082015260600190565b6020808252601c908201527f4272696467653a20416c6c6f77546f6b656e7320697320656d70747900000000604082015260600190565b60208082526018908201527f4272696467653a204e6f742045524337373720746f6b656e0000000000000000604082015260600190565b602080825260169082015275109c9a5919d94e88151e081b9bdd0818dc9bdcdcd95960521b604082015260600190565b602080825260149082015273084e4d2c8ceca7440cccaca40e8dede40d0d2ced60631b604082015260600190565b60208082526022908201527f4f776e61626c653a206e6577206f776e6572206973207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601690820152754272696467653a20416c72656164792065786973747360501b604082015260600190565b60208082526017908201527f4272696467653a20626967676572207468616e20313025000000000000000000604082015260600190565b6020808252601f908201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604082015260600190565b60208082526021908201527f4272696467653a2057726f6e67207472616e73616374696f6e446174614861736040820152600d60fb1b606082015260800190565b600083825260406020830152611eae604083018461344a565b60405181810167ffffffffffffffff8111828210171561417157fe5b604052919050565b60005b8381101561419457818101518382015260200161417c565b8381111561172b5750506000910152565b6001600160a01b03811681146117ba57600080fd5b80151581146117ba57600080fdfea2646970667358221220e143d2279b60c05f738592181a70ec82915a0a581781d565db6d7865329e772a64736f6c63430007060033
Verified Source Code Partial Match
Compiler: v0.7.6+commit.7338295f
EVM: istanbul
Optimization: Yes (200 runs)
Bridge.sol 2005 lines
// Dependency file: contracts/zeppelin/upgradable/Initializable.sol
// SPDX-License-Identifier: MIT
// pragma solidity ^0.7.0;
// pragma abicoder v2;
/**
* @title Initializable
*
* @dev Helper contract to support initializer functions. To use it, replace
* the constructor with a function that has the `initializer` modifier.
* WARNING: Unlike constructors, initializer functions must be manually
* invoked. This applies both to deploying an Initializable contract, as well
* as extending an Initializable contract via inheritance.
* WARNING: When used with inheritance, manual care must be taken to not invoke
* a parent initializer twice, or ensure that all initializers are idempotent,
* because this is not dealt with automatically as with constructors.
*/
contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
*/
bool private initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private initializing;
/**
* @dev Modifier to use in the initializer function of a contract.
*/
modifier initializer() {
require(initializing || !initialized, "Contract instance is already initialized");
bool isTopLevelCall = !initializing;
if (isTopLevelCall) {
initializing = true;
initialized = true;
}
_;
if (isTopLevelCall) {
initializing = false;
}
}
// Reserved storage space to allow for layout changes in the future.
uint256[50] private ______gap;
}
// Dependency file: contracts/zeppelin/upgradable/utils/ReentrancyGuard.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
// import "contracts/zeppelin/upgradable/Initializable.sol";
/**
* @title Helps contracts guard against reentrancy attacks.
* @author Remco Bloemen <remco@2π.com>, Eenae <[email protected]>
* @dev If you mark a function `nonReentrant`, you should also
* mark it `external`.
*/
contract ReentrancyGuard is Initializable {
/// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter;
function initialize() public initializer {
// The counter starts at one to prevent changing it from zero to a non-zero
// value, which is a more expensive operation.
_guardCounter = 1;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_guardCounter += 1;
uint256 localCounter = _guardCounter;
_;
require(localCounter == _guardCounter, "ReentrancyGuard: no reentrant allowed");
}
}
// Dependency file: contracts/zeppelin/GSN/Context.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view returns (address payable) {
return msg.sender;
}
function _msgData() internal view returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
// Dependency file: contracts/zeppelin/access/Roles.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
/**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[account] = true;
}
/**
* @dev Remove an account's access to this role.
*/
function remove(Role storage role, address account) internal {
require(has(role, account), "Roles: account doesn't have role");
role.bearer[account] = false;
}
/**
* @dev Check if an account has this role.
* @return bool
*/
function has(Role storage role, address account) internal view returns (bool) {
require(account != address(0), "Roles: account is the zero address");
return role.bearer[account];
}
}
// Dependency file: contracts/zeppelin/upgradable/access/roles/UpgradablePauserRole.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
// import "contracts/zeppelin/upgradable/Initializable.sol";
// import "contracts/zeppelin/GSN/Context.sol";
// import "contracts/zeppelin/access/Roles.sol";
contract UpgradablePauserRole is Initializable, Context {
using Roles for Roles.Role;
event PauserAdded(address indexed account);
event PauserRemoved(address indexed account);
Roles.Role private _pausers;
function __PauserRol_init(address sender) public initializer {
if (!isPauser(sender)) {
_addPauser(sender);
}
}
modifier onlyPauser() {
require(isPauser(_msgSender()), "PauserRole: caller doesn't have the role");
_;
}
function isPauser(address account) public view returns (bool) {
return _pausers.has(account);
}
function addPauser(address account) public onlyPauser {
_addPauser(account);
}
function renouncePauser() public {
_removePauser(_msgSender());
}
function _addPauser(address account) internal {
_pausers.add(account);
emit PauserAdded(account);
}
function _removePauser(address account) internal {
_pausers.remove(account);
emit PauserRemoved(account);
}
}
// Dependency file: contracts/zeppelin/upgradable/lifecycle/UpgradablePausable.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
// import "contracts/zeppelin/upgradable/Initializable.sol";
// import "contracts/zeppelin/GSN/Context.sol";
// import "contracts/zeppelin/upgradable/access/roles/UpgradablePauserRole.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
contract UpgradablePausable is Initializable, Context, UpgradablePauserRole {
/**
* @dev Emitted when the pause is triggered by a pauser (`account`).
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by a pauser (`account`).
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state. Assigns the Pauser role
* to the deployer.
*/
function __Pausable_init(address sender) public initializer {
UpgradablePauserRole.__PauserRol_init(sender);
_paused = false;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!_paused, "Pausable: paused");
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
require(_paused, "Pausable: not paused");
_;
}
/**
* @dev Called by a pauser to pause, triggers stopped state.
*/
function pause() public onlyPauser whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Called by a pauser to unpause, returns to normal state.
*/
function unpause() public onlyPauser whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
// Dependency file: contracts/zeppelin/upgradable/ownership/UpgradableOwnable.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
// import "contracts/zeppelin/upgradable/Initializable.sol";
// import "contracts/zeppelin/GSN/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be aplied to your functions to restrict their use to
* the owner.
*/
contract UpgradableOwnable is Initializable, Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function initialize(address sender) public initializer {
_owner = sender;
emit OwnershipTransferred(address(0), _owner);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(isOwner(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
return _msgSender() == _owner;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* > Note: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
require(newOwner != address(0), "Ownable: new owner is zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
// Dependency file: contracts/zeppelin/introspection/IERC1820Registry.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
/**
* @dev Interface of the global ERC1820 Registry, as defined in the
* https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register
* implementers for interfaces in this registry, as well as query support.
*
* Implementers may be shared by multiple accounts, and can also implement more
* than a single interface for each account. Contracts can implement interfaces
* for themselves, but externally-owned accounts (EOA) must delegate this to a
* contract.
*
* {IERC165} interfaces can also be queried via the registry.
*
* For an in-depth explanation and source code analysis, see the EIP text.
*/
interface IERC1820Registry {
/**
* @dev Sets `newManager` as the manager for `account`. A manager of an
* account is able to set interface implementers for it.
*
* By default, each account is its own manager. Passing a value of `0x0` in
* `newManager` will reset the manager to this initial state.
*
* Emits a {ManagerChanged} event.
*
* Requirements:
*
* - the caller must be the current manager for `account`.
*/
function setManager(address account, address newManager) external;
/**
* @dev Returns the manager for `account`.
*
* See {setManager}.
*/
function getManager(address account) external view returns (address);
/**
* @dev Sets the `implementer` contract as `account`'s implementer for
* `interfaceHash`.
*
* `account` being the zero address is an alias for the caller's address.
* The zero address can also be used in `implementer` to remove an old one.
*
* See {interfaceHash} to learn how these are created.
*
* Emits an {InterfaceImplementerSet} event.
*
* Requirements:
*
* - the caller must be the current manager for `_account`.
* - `_interfaceHash` must not be an {IERC165} interface id (i.e. it must not
* end in 28 zeroes).
* - `_implementer` must implement {IERC1820Implementer} and return true when
* queried for support, unless `implementer` is the caller. See
* {IERC1820Implementer-canImplementInterfaceForAddress}.
*/
function setInterfaceImplementer(address _account, bytes32 _interfaceHash, address _implementer) external;
/**
* @dev Returns the implementer of `_interfaceHash` for `_account`. If no such
* implementer is registered, returns the zero address.
*
* If `_interfaceHash` is an {IERC165} interface id (i.e. it ends with 28
* zeroes), `_account` will be queried for support of it.
*
* `account` being the zero address is an alias for the caller's address.
*/
function getInterfaceImplementer(address _account, bytes32 _interfaceHash) external view returns (address);
/**
* @dev Returns the interface hash for an `interfaceName`, as defined in the
* corresponding
* https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP].
*/
function interfaceHash(string calldata interfaceName) external pure returns (bytes32);
/**
* @notice Updates the cache with whether the contract implements an ERC165 interface or not.
* @param account Address of the contract for which to update the cache.
* @param interfaceId ERC165 interface for which to update the cache.
*/
function updateERC165Cache(address account, bytes4 interfaceId) external;
/**
* @notice Checks whether a contract implements an ERC165 interface or not.
* If the result is not cached a direct lookup on the contract address is performed.
* If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling
* {updateERC165Cache} with the contract address.
* @param account Address of the contract to check.
* @param interfaceId ERC165 interface to check.
* @return True if `account` implements `interfaceId`, false otherwise.
*/
function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool);
/**
* @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache.
* @param account Address of the contract to check.
* @param interfaceId ERC165 interface to check.
* @return True if `account` implements `interfaceId`, false otherwise.
*/
function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool);
event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer);
event ManagerChanged(address indexed account, address indexed newManager);
}
// Dependency file: contracts/zeppelin/token/ERC777/IERC777Recipient.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
/**
* @dev Interface of the ERC777TokensRecipient standard as defined in the EIP.
*
* Accounts can be notified of `IERC777` tokens being sent to them by having a
* contract implement this interface (contract holders can be their own
* implementer) and registering it on the
* [ERC1820 global registry](https://eips.ethereum.org/EIPS/eip-1820).
*
* See `IERC1820Registry` and `ERC1820Implementer`.
*/
interface IERC777Recipient {
/**
* @dev Called by an `IERC777` token contract whenever tokens are being
* moved or created into a registered account (`to`). The type of operation
* is conveyed by `from` being the zero address or not.
*
* This call occurs _after_ the token contract's state is updated, so
* `IERC777.balanceOf`, etc., can be used to query the post-operation state.
*
* This function may revert to prevent the operation from being executed.
*/
function tokensReceived(
address operator,
address from,
address to,
uint amount,
bytes calldata userData,
bytes calldata operatorData
) external;
}
// Dependency file: contracts/zeppelin/token/ERC20/IERC20.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// Dependency file: contracts/zeppelin/math/SafeMath.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*
* _Available since v2.4.0._
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
// Dependency file: contracts/zeppelin/utils/Address.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
/**
* @dev Collection of functions related to the address type,
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly { codehash := extcodehash(account) }
return (codehash != accountHash && codehash != 0x0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// Dependency file: contracts/zeppelin/token/ERC20/SafeERC20.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
// import "contracts/zeppelin/token/ERC20/IERC20.sol";
// import "contracts/zeppelin/math/SafeMath.sol";
// import "contracts/zeppelin/utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line max-line-length
require((value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve non-zero to non-zero allowance"
);
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(value);
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves.
// A Solidity high level call has three parts:
// 1. The target address is checked to verify it contains contract code
// 2. The call itself is made, and success asserted
// 3. The return value is decoded, which in turn checks the size of the returned data.
// solhint-disable-next-line max-line-length
require(address(token).isContract(), "SafeERC20: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = address(token).call(data);
require(success, "SafeERC20: low-level call failed");
if (returndata.length > 0) { // Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
// Dependency file: contracts/zeppelin/token/ERC777/IERC777.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
/**
* @dev Interface of the ERC777Token standard as defined in the EIP.
*
* This contract uses the
* [ERC1820 registry standard](https://eips.ethereum.org/EIPS/eip-1820) to let
* token holders and recipients react to token movements by using setting implementers
* for the associated interfaces in said registry. See `IERC1820Registry` and
* `ERC1820Implementer`.
*/
interface IERC777 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the smallest part of the token that is not divisible. This
* means all token operations (creation, movement and destruction) must have
* amounts that are a multiple of this number.
*
* For most token contracts, this value will equal 1.
*/
function granularity() external view returns (uint256);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by an account (`owner`).
*/
function balanceOf(address owner) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* If send or receive hooks are registered for the caller and `recipient`,
* the corresponding functions will be called with `data` and empty
* `operatorData`. See `IERC777Sender` and `IERC777Recipient`.
*
* Emits a `Sent` event.
*
* Requirements
*
* - the caller must have at least `amount` tokens.
* - `recipient` cannot be the zero address.
* - if `recipient` is a contract, it must implement the `tokensReceived`
* interface.
*/
function send(address recipient, uint256 amount, bytes calldata data) external;
/**
* @dev Destroys `amount` tokens from the caller's account, reducing the
* total supply.
*
* If a send hook is registered for the caller, the corresponding function
* will be called with `data` and empty `operatorData`. See `IERC777Sender`.
*
* Emits a `Burned` event.
*
* Requirements
*
* - the caller must have at least `amount` tokens.
*/
function burn(uint256 amount, bytes calldata data) external;
/**
* @dev Returns true if an account is an operator of `tokenHolder`.
* Operators can send and burn tokens on behalf of their owners. All
* accounts are their own operator.
*
* See `operatorSend` and `operatorBurn`.
*/
function isOperatorFor(address operator, address tokenHolder) external view returns (bool);
/**
* @dev Make an account an operator of the caller.
*
* See `isOperatorFor`.
*
* Emits an `AuthorizedOperator` event.
*
* Requirements
*
* - `operator` cannot be calling address.
*/
function authorizeOperator(address operator) external;
/**
* @dev Make an account an operator of the caller.
*
* See `isOperatorFor` and `defaultOperators`.
*
* Emits a `RevokedOperator` event.
*
* Requirements
*
* - `operator` cannot be calling address.
*/
function revokeOperator(address operator) external;
/**
* @dev Returns the list of default operators. These accounts are operators
* for all token holders, even if `authorizeOperator` was never called on
* them.
*
* This list is immutable, but individual holders may revoke these via
* `revokeOperator`, in which case `isOperatorFor` will return false.
*/
function defaultOperators() external view returns (address[] memory);
/**
* @dev Moves `amount` tokens from `sender` to `recipient`. The caller must
* be an operator of `sender`.
*
* If send or receive hooks are registered for `sender` and `recipient`,
* the corresponding functions will be called with `data` and
* `operatorData`. See `IERC777Sender` and `IERC777Recipient`.
*
* Emits a `Sent` event.
*
* Requirements
*
* - `sender` cannot be the zero address.
* - `sender` must have at least `amount` tokens.
* - the caller must be an operator for `sender`.
* - `recipient` cannot be the zero address.
* - if `recipient` is a contract, it must implement the `tokensReceived`
* interface.
*/
function operatorSend(
address sender,
address recipient,
uint256 amount,
bytes calldata data,
bytes calldata operatorData
) external;
/**
* @dev Destoys `amount` tokens from `account`, reducing the total supply.
* The caller must be an operator of `account`.
*
* If a send hook is registered for `account`, the corresponding function
* will be called with `data` and `operatorData`. See `IERC777Sender`.
*
* Emits a `Burned` event.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
* - the caller must be an operator for `account`.
*/
function operatorBurn(
address account,
uint256 amount,
bytes calldata data,
bytes calldata operatorData
) external;
event Sent(
address indexed operator,
address indexed from,
address indexed to,
uint256 amount,
bytes data,
bytes operatorData
);
function decimals() external returns (uint8);
event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData);
event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData);
event AuthorizedOperator(address indexed operator, address indexed tokenHolder);
event RevokedOperator(address indexed operator, address indexed tokenHolder);
}
// Dependency file: contracts/LibEIP712.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
// https://github.com/0xProject/0x-monorepo/blob/development/contracts/utils/contracts/src/LibEIP712.sol
library LibEIP712 {
// Hash of the EIP712 Domain Separator Schema
// keccak256(abi.encodePacked(
// "EIP712Domain(",
// "string name,",
// "string version,",
// "uint256 chainId,",
// "address verifyingContract",
// ")"
// ))
bytes32 constant internal _EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH = 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;
/// @dev Calculates a EIP712 domain separator.
/// @param name The EIP712 domain name.
/// @param version The EIP712 domain version.
/// @param verifyingContract The EIP712 verifying contract.
/// @return result EIP712 domain separator.
function hashEIP712Domain(
string memory name,
string memory version,
uint256 chainId,
address verifyingContract
)
internal
pure
returns (bytes32 result)
{
bytes32 schemaHash = _EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH;
// Assembly for more efficient computing:
// keccak256(abi.encodePacked(
// _EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH,
// keccak256(bytes(name)),
// keccak256(bytes(version)),
// chainId,
// uint256(verifyingContract)
// ))
// solium-disable-next-line security/no-inline-assembly
assembly {
// Calculate hashes of dynamic data
let nameHash := keccak256(add(name, 32), mload(name))
let versionHash := keccak256(add(version, 32), mload(version))
// Load free memory pointer
let memPtr := mload(64)
// Store params in memory
mstore(memPtr, schemaHash)
mstore(add(memPtr, 32), nameHash)
mstore(add(memPtr, 64), versionHash)
mstore(add(memPtr, 96), chainId)
mstore(add(memPtr, 128), verifyingContract)
// Compute hash
result := keccak256(memPtr, 160)
}
return result;
}
/// @dev Calculates EIP712 encoding for a hash struct with a given domain hash.
/// @param eip712DomainHash Hash of the domain domain separator data, computed
/// with getDomainHash().
/// @param hashStruct The EIP712 hash struct.
/// @return result EIP712 hash applied to the given EIP712 Domain.
function hashEIP712Message(bytes32 eip712DomainHash, bytes32 hashStruct)
internal
pure
returns (bytes32 result)
{
// Assembly for more efficient computing:
// keccak256(abi.encodePacked(
// EIP191_HEADER,
// EIP712_DOMAIN_HASH,
// hashStruct
// ));
// solium-disable-next-line security/no-inline-assembly
assembly {
// Load free memory pointer
let memPtr := mload(64)
mstore(memPtr, 0x1901000000000000000000000000000000000000000000000000000000000000) // EIP191 header
mstore(add(memPtr, 2), eip712DomainHash) // EIP712 domain hash
mstore(add(memPtr, 34), hashStruct) // Hash of struct
// Compute hash
result := keccak256(memPtr, 66)
}
return result;
}
}
// Dependency file: contracts/LibUtils.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
library LibUtils {
function decimalsToGranularity(uint8 decimals) internal pure returns (uint256) {
require(decimals <= 18, "LibUtils: Decimals not <= 18");
return uint256(10)**(18-decimals);
}
function getDecimals(address tokenToUse) internal view returns (uint8) {
//support decimals as uint256 or uint8
(bool success, bytes memory data) = tokenToUse.staticcall(abi.encodeWithSignature("decimals()"));
require(success, "LibUtils: No decimals");
// uint<M>: enc(X) is the big-endian encoding of X,
//padded on the higher-order (left) side with zero-bytes such that the length is 32 bytes.
return uint8(abi.decode(data, (uint256)));
}
function getGranularity(address tokenToUse) internal view returns (uint256) {
//support granularity if ERC777
(bool success, bytes memory data) = tokenToUse.staticcall(abi.encodeWithSignature("granularity()"));
require(success, "LibUtils: No granularity");
return abi.decode(data, (uint256));
}
function bytesToAddress(bytes memory bys) internal pure returns (address addr) {
// solium-disable-next-line security/no-inline-assembly
assembly {
addr := mload(add(bys,20))
}
}
}
// Dependency file: contracts/IBridge.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
interface IBridge {
struct ClaimData {
address payable to;
uint256 amount;
bytes32 blockHash;
bytes32 transactionHash;
uint32 logIndex;
}
function version() external pure returns (string memory);
function getFeePercentage() external view returns(uint);
/**
* ERC-20 tokens approve and transferFrom pattern
* See https://eips.ethereum.org/EIPS/eip-20#transferfrom
*/
function receiveTokensTo(address tokenToUse, address to, uint256 amount) external;
/**
* Use network currency and cross it.
*/
function depositTo(address to) external payable;
/**
* ERC-777 tokensReceived hook allows to send tokens to a contract and notify it in a single transaction
* See https://eips.ethereum.org/EIPS/eip-777#motivation for details
*/
function tokensReceived (
address operator,
address from,
address to,
uint amount,
bytes calldata userData,
bytes calldata operatorData
) external;
/**
* Accepts the transaction from the other chain that was voted and sent by the Federation contract
*/
function acceptTransfer(
address _originalTokenAddress,
address payable _from,
address payable _to,
uint256 _amount,
bytes32 _blockHash,
bytes32 _transactionHash,
uint32 _logIndex
) external;
/**
* Claims the crossed transaction using the hash, this sends the funds to the address indicated in
*/
function claim(ClaimData calldata _claimData) external returns (uint256 receivedAmount);
function claimFallback(ClaimData calldata _claimData) external returns (uint256 receivedAmount);
function claimGasless(
ClaimData calldata _claimData,
address payable _relayer,
uint256 _fee,
uint256 _deadline,
uint8 _v,
bytes32 _r,
bytes32 _s
) external returns (uint256 receivedAmount);
function getTransactionDataHash(
address _to,
uint256 _amount,
bytes32 _blockHash,
bytes32 _transactionHash,
uint32 _logIndex
) external returns(bytes32);
event Cross(
address indexed _tokenAddress,
address indexed _from,
address indexed _to,
uint256 _amount,
bytes _userData
);
event NewSideToken(
address indexed _newSideTokenAddress,
address indexed _originalTokenAddress,
string _newSymbol,
uint256 _granularity
);
event AcceptedCrossTransfer(
bytes32 indexed _transactionHash,
address indexed _originalTokenAddress,
address indexed _to,
address _from,
uint256 _amount,
bytes32 _blockHash,
uint256 _logIndex
);
event FeePercentageChanged(uint256 _amount);
event Claimed(
bytes32 indexed _transactionHash,
address indexed _originalTokenAddress,
address indexed _to,
address _sender,
uint256 _amount,
bytes32 _blockHash,
uint256 _logIndex,
address _reciever,
address _relayer,
uint256 _fee
);
}
// Dependency file: contracts/ISideToken.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
interface ISideToken {
function mint(address account, uint256 amount, bytes calldata userData, bytes calldata operatorData) external;
}
// Dependency file: contracts/ISideTokenFactory.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
interface ISideTokenFactory {
function createSideToken(string calldata name, string calldata symbol, uint256 granularity) external returns(address);
event SideTokenCreated(address indexed sideToken, string symbol, uint256 granularity);
}
// Dependency file: contracts/IAllowTokens.sol
// pragma solidity ^0.7.0;
// pragma abicoder v2;
interface IAllowTokens {
struct Limits {
uint256 min;
uint256 max;
uint256 daily;
uint256 mediumAmount;
uint256 largeAmount;
}
struct TokenInfo {
bool allowed;
uint256 typeId;
uint256 spentToday;
uint256 lastDay;
}
struct TypeInfo {
string description;
Limits limits;
}
struct TokensAndType {
address token;
uint256 typeId;
}
function version() external pure returns (string memory);
function getInfoAndLimits(address token) external view returns (TokenInfo memory info, Limits memory limit);
function calcMaxWithdraw(address token) external view returns (uint256 maxWithdraw);
function getTypesLimits() external view returns(Limits[] memory limits);
function getTypeDescriptionsLength() external view retu...
// [truncated — 70872 bytes total]
Read Contract
CLAIM_TYPEHASH 0x6b0509b1 → bytes32
DOMAIN_SEPARATOR 0x3644e515 → bytes32
allowTokens 0xa53d6e6e → address
claimed 0xcc3c0f06 → bool
feePercentageDivider 0xe6fc7744 → uint256
getFederation 0xea217091 → address
getFeePercentage 0x11efbf61 → uint256
getTransactionDataHash 0xafad80ac → bytes32
hasBeenClaimed 0x37e76109 → bool
hasCrossed 0xda677037 → bool
isOwner 0x8f32d59b → bool
isPauser 0x46fbf68e → bool
isUpgrading 0xb7947262 → bool
knownTokens 0x5d447129 → bool
mappedTokens 0xe6ede14d → address
nonces 0x7ecebe00 → uint256
originalTokenAddresses 0xca07140c → address
originalTokens 0xf74032f0 → address
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
senderAddresses 0x3cf3058b → address
sideTokenFactory 0xb86f60d2 → address
symbolPrefix 0x59a8a867 → string
transactionsDataHashes 0x02697619 → bytes32
version 0x54fd4d50 → string
wrappedCurrency 0xb0e1268e → address
Write Contract 26 functions
These functions modify contract state and require a wallet transaction to execute.
__Pausable_init 0x2f3cca4e
address sender
__PauserRol_init 0xeb16136f
address sender
acceptTransfer 0x6a863191
address _originalTokenAddress
address _from
address _to
uint256 _amount
bytes32 _blockHash
bytes32 _transactionHash
uint32 _logIndex
addPauser 0x82dc1ec4
address account
changeAllowTokens 0x916dc59d
address newAllowTokens
changeFederation 0xfa0caa16
address newFederation
changeSideTokenFactory 0x42cdb2c6
address newSideTokenFactory
claim 0x567ead0f
tuple _claimData
returns: uint256
claimFallback 0x0d904265
tuple _claimData
returns: uint256
claimGasless 0xdf2f9b2d
tuple _claimData
address _relayer
uint256 _fee
uint256 _deadline
uint8 _v
bytes32 _r
bytes32 _s
returns: uint256
createSideToken 0x20e3bb00
uint256 _typeId
address _originalTokenAddress
uint8 _originalTokenDecimals
string _originalTokenSymbol
string _originalTokenName
depositTo 0xb760faf9
address to
initDomainSeparator 0xd12e825d
No parameters
initialize 0x2fb3b361
address _manager
address _federation
address _allowTokens
address _sideTokenFactory
string _symbolPrefix
initialize 0x8129fc1c
No parameters
initialize 0xc4d66de8
address sender
pause 0x8456cb59
No parameters
receiveTokensTo 0x7813bea2
address tokenToUse
address to
uint256 amount
renounceOwnership 0x715018a6
No parameters
renouncePauser 0x6ef8d66d
No parameters
setFeePercentage 0xae06c1b7
uint256 amount
setUpgrading 0x07c8f7b0
bool _isUpgrading
setWrappedCurrency 0x3500c1dc
address _wrappedCurrency
tokensReceived 0x0023de29
address operator
address from
address to
uint256 amount
bytes userData
bytes
transferOwnership 0xf2fde38b
address newOwner
unpause 0x3f4ba83a
No parameters
Recent Transactions
No transactions found for this address