Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x937a47D84F088f6C4917b5981efc1b13D042e96B
Balance 0.145810 ETH
Nonce 1
Code Size 23021 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

23021 bytes
0x608060405260043610620001a65760003560e01c8063907d1a5411620000e5578063be3576161162000097578063d02ce3ae116200006d578063d02ce3ae1462000dd3578063e09e73a61462000f64578063f2d3169c146200105b578063f2fde38b14620010e857620001a6565b8063be3576161462000c30578063c42cf5351462000c87578063c58d0b5b1462000cdc57620001a6565b8063907d1a54146200097057806395d71e94146200099e5780639641cae514620009dd5780639740a9e31462000a0b578063998cdf831462000ae2578063a66417721462000b2157620001a6565b806333c55240116200015d578063715018a61162000133578063715018a6146200088f57806382b12dd714620008a95780638c785d5614620008d75780638da5cb5b146200091657620001a6565b806333c55240146200066a57806348d125f114620007215780635329afb9146200083057620001a6565b8063026a771014620001ab57806304df017d14620002545780630c340a2414620002a95780631c6e459314620003035780631c837032146200044e5780632c050408146200051f575b600080fd5b6200025260048036036060811015620001c357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156200020157600080fd5b8201836020820111156200021457600080fd5b803590602001918460018302840111640100000000831117156200023757600080fd5b9091929391929390803590602001909291905050506200113d565b005b3480156200026157600080fd5b50620002a7600480360360208110156200027a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506200147e565b005b348015620002b657600080fd5b50620002c162001a41565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156200031057600080fd5b50620003d0600480360360208110156200032957600080fd5b81019080803590602001906401000000008111156200034757600080fd5b8201836020820111156200035a57600080fd5b803590602001918460018302840111640100000000831117156200037d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505062001a67565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101562000412578082015181840152602081019050620003f5565b50505050905090810190601f168015620004405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156200045b57600080fd5b50620004a1600480360360208110156200047457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062001b31565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015620004e3578082015181840152602081019050620004c6565b50505050905090810190601f168015620005115780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156200052c57600080fd5b50620005ec600480360360208110156200054557600080fd5b81019080803590602001906401000000008111156200056357600080fd5b8201836020820111156200057657600080fd5b803590602001918460018302840111640100000000831117156200059957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505062001be5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156200062e57808201518184015260208101905062000611565b50505050905090810190601f1680156200065c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156200067757600080fd5b506200071f600480360360608110156200069057600080fd5b8101908080359060200190640100000000811115620006ae57600080fd5b820183602082011115620006c157600080fd5b80359060200191846001830284011164010000000083111715620006e457600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505062001caf565b005b3480156200072e57600080fd5b50620007ee600480360360208110156200074757600080fd5b81019080803590602001906401000000008111156200076557600080fd5b8201836020820111156200077857600080fd5b803590602001918460018302840111640100000000831117156200079b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505062002029565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156200083d57600080fd5b506200088d600480360360408110156200085657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505062002072565b005b3480156200089c57600080fd5b50620008a762002212565b005b348015620008b657600080fd5b50620008c16200239d565b6040518082815260200191505060405180910390f35b348015620008e457600080fd5b506200091460048036036020811015620008fd57600080fd5b8101908080359060200190929190505050620023a3565b005b3480156200092357600080fd5b506200092e62002479565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156200097d57600080fd5b5062000988620024a2565b6040518082815260200191505060405180910390f35b348015620009ab57600080fd5b50620009db60048036036020811015620009c457600080fd5b8101908080359060200190929190505050620024a8565b005b348015620009ea57600080fd5b50620009f56200257e565b6040518082815260200191505060405180910390f35b34801562000a1857600080fd5b5062000ae06004803603608081101562000a3157600080fd5b810190808035906020019064010000000081111562000a4f57600080fd5b82018360208201111562000a6257600080fd5b8035906020019184600183028401116401000000008311171562000a8557600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505062002584565b005b34801562000aef57600080fd5b5062000b1f6004803603602081101562000b0857600080fd5b81019080803590602001909291905050506200278f565b005b34801562000b2e57600080fd5b5062000bee6004803603602081101562000b4757600080fd5b810190808035906020019064010000000081111562000b6557600080fd5b82018360208201111562000b7857600080fd5b8035906020019184600183028401116401000000008311171562000b9b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505062002865565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801562000c3d57600080fd5b5062000c6d6004803603602081101562000c5657600080fd5b8101908080359060200190929190505050620028ae565b604051808215151515815260200191505060405180910390f35b34801562000c9457600080fd5b5062000cda6004803603602081101562000cad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050620029d6565b005b62000dd16004803603606081101562000cf457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111562000d3257600080fd5b82018360208201111562000d4557600080fd5b8035906020019184600183028401116401000000008311171562000d6857600080fd5b90919293919293908035906020019064010000000081111562000d8a57600080fd5b82018360208201111562000d9d57600080fd5b8035906020019184600183028401116401000000008311171562000dc057600080fd5b909192939192939050505062002ae6565b005b62000f62600480360360a081101562000deb57600080fd5b810190808035906020019064010000000081111562000e0957600080fd5b82018360208201111562000e1c57600080fd5b8035906020019184600183028401116401000000008311171562000e3f57600080fd5b90919293919293908035906020019064010000000081111562000e6157600080fd5b82018360208201111562000e7457600080fd5b8035906020019184600183028401116401000000008311171562000e9757600080fd5b90919293919293908035906020019064010000000081111562000eb957600080fd5b82018360208201111562000ecc57600080fd5b8035906020019184600183028401116401000000008311171562000eef57600080fd5b90919293919293908035906020019064010000000081111562000f1157600080fd5b82018360208201111562000f2457600080fd5b8035906020019184600183028401116401000000008311171562000f4757600080fd5b90919293919293908035906020019092919050505062002ead565b005b620010596004803603606081101562000f7c57600080fd5b810190808035906020019064010000000081111562000f9a57600080fd5b82018360208201111562000fad57600080fd5b8035906020019184600183028401116401000000008311171562000fd057600080fd5b90919293919293908035906020019064010000000081111562000ff257600080fd5b8201836020820111156200100557600080fd5b803590602001918460018302840111640100000000831117156200102857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050620031f3565b005b3480156200106857600080fd5b50620010e6600480360360208110156200108157600080fd5b81019080803590602001906401000000008111156200109f57600080fd5b820183602082011115620010b257600080fd5b80359060200191846001830284011164010000000083111715620010d557600080fd5b909192939192939050505062003545565b005b348015620010f557600080fd5b506200113b600480360360208110156200110e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506200377f565b005b600854341015620011b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f496e73756666696369656e74206665652069732070616964000000000000000081525060200191505060405180910390fd5b6000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805460018160011615610100020316600290049050141562001281576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f546f6b656e206973206e6f74206272696467656400000000000000000000000081525060200191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd620012a762003991565b30846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156200134657600080fd5b505af11580156200135b573d6000803e3d6000fd5b505050506040513d60208110156200137257600080fd5b8101908080519060200190929190505050620013f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f5472616e73666572206661696c6564000000000000000000000000000000000081525060200191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff167f0735266524c86c9dce5f6cba7aa27a20a8a1bda27bb9253902e1a295d09699a884848460405180806020018381526020018281038252858582818152602001925080828437600081840152601f19601f82011690508083019250505094505050505060405180910390a250505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16620014c162003991565b73ffffffffffffffffffffffffffffffffffffffff16146200154b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f43616c6c6572206973206e6f742074686520676f7665726e6f7200000000000081525060200191505060405180910390fd5b6060600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015620016245780601f10620015f85761010080835404028352916020019162001624565b820191906000526020600020905b8154815290600101906020018083116200160657829003601f168201915b505050505090506000815114156200163b57600080fd5b8173ffffffffffffffffffffffffffffffffffffffff166001826040518082805190602001908083835b602083106200168a578051825260208201915060208101905060208303925062001665565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620016ff57600080fd5b60006003826040518082805190602001908083835b6020831062001739578051825260208201915060208101905060208303925062001714565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902080546001816001161561010002031660029004905014156200178d57600080fd5b60008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156200180d57600080fd5b505afa15801562001822573d6000803e3d6000fd5b505050506040513d60208110156200183957600080fd5b810190808051906020019092919050505090506000811480620018de57508273ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200189e57600080fd5b505afa158015620018b3573d6000803e3d6000fd5b505050506040513d6020811015620018ca57600080fd5b810190808051906020019092919050505081145b620018e857600080fd5b6001826040518082805190602001908083835b60208310620019205780518252602082019150602081019050602083039250620018fb565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000620019c3919062003999565b6003826040518082805190602001908083835b60208310620019fb5780518252602082019150602081019050602083039250620019d6565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020600062001a3c919062003999565b505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6005818051602081018201805184825260208301602085012081835280955050505050506000915090508054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801562001b295780601f1062001afd5761010080835404028352916020019162001b29565b820191906000526020600020905b81548152906001019060200180831162001b0b57829003601f168201915b505050505081565b60026020528060005260406000206000915090508054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801562001bdd5780601f1062001bb15761010080835404028352916020019162001bdd565b820191906000526020600020905b81548152906001019060200180831162001bbf57829003601f168201915b505050505081565b6003818051602081018201805184825260208301602085012081835280955050505050506000915090508054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801562001ca75780601f1062001c7b5761010080835404028352916020019162001ca7565b820191906000526020600020905b81548152906001019060200180831162001c8957829003601f168201915b505050505081565b62001cb962003991565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462001d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600060048585604051808383808284378083019250505092505050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562001e6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f526563697069656e7420646f6573206e6f74206578697374000000000000000081525060200191505060405180910390fd5b60048585604051808383808284378083019250505092505050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600585856040518083838082843780830192505050925050509081526020016040518091039020600062001eea919062003999565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801562001f7257600080fd5b505af115801562001f87573d6000803e3d6000fd5b505050506040513d602081101562001f9e57600080fd5b810190808051906020019092919050505062002022576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f5472616e73666572206661696c6564000000000000000000000000000000000081525060200191505060405180910390fd5b5050505050565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16620020b562003991565b73ffffffffffffffffffffffffffffffffffffffff16146200213f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f43616c6c6572206973206e6f742074686520676f7665726e6f7200000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015620021c757600080fd5b505af1158015620021dc573d6000803e3d6000fd5b505050506040513d6020811015620021f357600080fd5b81019080805190602001909291905050506200220e57600080fd5b5050565b6200221c62003991565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620022de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60095481565b620023ad62003991565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200246f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060088190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60075481565b620024b262003991565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462002574576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060078190555050565b60085481565b6200258e62003991565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462002650576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015620026d857600080fd5b505af1158015620026ed573d6000803e3d6000fd5b505050506040513d60208110156200270457600080fd5b810190808051906020019092919050505062002788576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f5472616e73666572206661696c6564000000000000000000000000000000000081525060200191505060405180910390fd5b5050505050565b6200279962003991565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200285b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060098190555050565b6004818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000620028ba62003991565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200297c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6200298662002479565b73ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015620029cc573d6000803e3d6000fd5b5060019050919050565b620029e062003991565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462002aa2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662002b2962003991565b73ffffffffffffffffffffffffffffffffffffffff161462002bb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f43616c6c6572206973206e6f742074686520676f7665726e6f7200000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660018585604051808383808284378083019250505092505050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462002c3457600080fd5b6000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054600181600116156101000203166002900490501462002c9557600080fd5b60006003858560405180838380828437808301925050509250505090815260200160405180910390208054600181600116156101000203166002900490501462002cde57600080fd5b60008573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801562002d5e57600080fd5b505afa15801562002d73573d6000803e3d6000fd5b505050506040513d602081101562002d8a57600080fd5b81019080805190602001909291905050501462002da657600080fd5b60095434101562002db657600080fd5b8460018585604051808383808284378083019250505092505050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508383600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020919062002e6c929190620039e5565b508181600386866040518083838082843780830192505050925050509081526020016040518091039020919062002ea5929190620039e5565b505050505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662002ef062003991565b73ffffffffffffffffffffffffffffffffffffffff161462002f7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f43616c6c6572206973206e6f742074686520676f7665726e6f7200000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660018a8a604051808383808284378083019250505092505050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462002ffb57600080fd5b600060038a8a6040518083838082843780830192505050925050509081526020016040518091039020805460018160011615610100020316600290049050146200304457600080fd5b6009543410156200305457600080fd5b60008585858585604051620030699062003a6c565b8080602001806020018481526020018381038352888882818152602001925080828437600081840152601f19601f8201169050808301925050508381038252868682818152602001925080828437600081840152601f19601f820116905080830192505050975050505050505050604051809103906000f080158015620030f4573d6000803e3d6000fd5b5090508060018b8b604051808383808284378083019250505092505050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508989600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209190620031ad929190620039e5565b50878760038c8c60405180838380828437808301925050509250505090815260200160405180910390209190620031e6929190620039e5565b5050505050505050505050565b6007543410156200326c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f496e73756666696369656e74206665652069732070616964000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660048686604051808383808284378083019250505092505050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462003356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f526563697069656e7420697320616c72656164792064657465726d696e65640081525060200191505060405180910390fd5b60006005868660405180838380828437808301925050509250505090815260200160405180910390208054600181600116156101000203166002900490501462003408576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5369676e617475726520697320616c72656164792064657465726d696e65640081525060200191505060405180910390fd5b8060048686604051808383808284378083019250505092505050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082826005878760405180838380828437808301925050509250505090815260200160405180910390209190620034a6929190620039e5565b507f5aded5f5ee5fb4eaf40251f842d09ea3bedc879618c6d74b5af5078ad765953685858360405180806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281038252858582818152602001925080828437600081840152601f19601f82011690508083019250505094505050505060405180910390a15050505050565b6200354f62003991565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462003611576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660048383604051808383808284378083019250505092505050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415620036fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f547820646f6573206e6f7420657869737400000000000000000000000000000081525060200191505060405180910390fd5b60048282604051808383808284378083019250505092505050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560058282604051808383808284378083019250505092505050908152602001604051809103902060006200377b919062003999565b5050565b6200378962003991565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200384b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620038d3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180620059926026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b50805460018160011615610100020316600290046000825580601f10620039c15750620039e2565b601f016020900490600052602060002090810190620039e1919062003a7a565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062003a2857803560ff191683800117855562003a59565b8280016001018555821562003a59579182015b8281111562003a5857823582559160200191906001019062003a3b565b5b50905062003a68919062003a7a565b5090565b611eef8062003aa383390190565b62003a9f91905b8082111562003a9b57600081600090555060010162003a81565b5090565b9056fe60806040523480156200001157600080fd5b5060405162001eef38038062001eef833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660018202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019080838360005b83811015620000c3578082015181840152602081019050620000a6565b50505050905090810190601f168015620000f15780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011557600080fd5b838201915060208201858111156200012c57600080fd5b82518660018202830111640100000000821117156200014a57600080fd5b8083526020830192505050908051906020019080838360005b838110156200018057808201518184015260208101905062000163565b50505050905090810190601f168015620001ae5780820380516001836020036101000a031916815260200191505b506040526020018051906020019092919050505082828160039080519060200190620001dc92919062000563565b508060049080519060200190620001f592919062000563565b506012600560006101000a81548160ff021916908360ff1602179055505050600062000226620002ef60201b60201c565b905080600560016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350620002e6620002d9620002ef60201b60201c565b82620002f760201b60201c565b50505062000612565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156200039b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b620003af60008383620004d560201b60201c565b620003cb81600254620004da60201b6200151c1790919060201c565b60028190555062000429816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054620004da60201b6200151c1790919060201c565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60008082840190508381101562000559576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620005a657805160ff1916838001178555620005d7565b82800160010185558215620005d7579182015b82811115620005d6578251825591602001919060010190620005b9565b5b509050620005e69190620005ea565b5090565b6200060f91905b808211156200060b576000816000905550600101620005f1565b5090565b90565b6118cd80620006226000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a457c2d711610066578063a457c2d7146104a6578063a9059cbb1461050c578063dd62ed3e14610572578063f2fde38b146105ea576100f5565b806370a0823114610377578063715018a6146103cf5780638da5cb5b146103d957806395d89b4114610423576100f5565b806323b872dd116100d357806323b872dd14610201578063313ce5671461028757806339509351146102ab57806340c10f1914610311576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e3575b600080fd5b61010261062e565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106d0565b604051808215151515815260200191505060405180910390f35b6101eb6106ee565b6040518082815260200191505060405180910390f35b61026d6004803603606081101561021757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106f8565b604051808215151515815260200191505060405180910390f35b61028f6107d1565b604051808260ff1660ff16815260200191505060405180910390f35b6102f7600480360360408110156102c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107e8565b604051808215151515815260200191505060405180910390f35b61035d6004803603604081101561032757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061089b565b604051808215151515815260200191505060405180910390f35b6103b96004803603602081101561038d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061097b565b6040518082815260200191505060405180910390f35b6103d76109c3565b005b6103e1610b4e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61042b610b78565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561046b578082015181840152602081019050610450565b50505050905090810190601f1680156104985780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104f2600480360360408110156104bc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c1a565b604051808215151515815260200191505060405180910390f35b6105586004803603604081101561052257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ce7565b604051808215151515815260200191505060405180910390f35b6105d46004803603604081101561058857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d05565b6040518082815260200191505060405180910390f35b61062c6004803603602081101561060057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d8c565b005b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106c65780601f1061069b576101008083540402835291602001916106c6565b820191906000526020600020905b8154815290600101906020018083116106a957829003601f168201915b5050505050905090565b60006106e46106dd610f9c565b8484610fa4565b6001905092915050565b6000600254905090565b600061070584848461119b565b6107c684610711610f9c565b6107c18560405180606001604052806028815260200161180260289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610777610f9c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145c9092919063ffffffff16565b610fa4565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006108916107f5610f9c565b8461088c8560016000610806610f9c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461151c90919063ffffffff16565b610fa4565b6001905092915050565b60006108a5610f9c565b73ffffffffffffffffffffffffffffffffffffffff16600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610967576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61097183836115a4565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6109cb610f9c565b73ffffffffffffffffffffffffffffffffffffffff16600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a8d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600560016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c105780601f10610be557610100808354040283529160200191610c10565b820191906000526020600020905b815481529060010190602001808311610bf357829003601f168201915b5050505050905090565b6000610cdd610c27610f9c565b84610cd8856040518060600160405280602581526020016118736025913960016000610c51610f9c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145c9092919063ffffffff16565b610fa4565b6001905092915050565b6000610cfb610cf4610f9c565b848461119b565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610d94610f9c565b73ffffffffffffffffffffffffffffffffffffffff16600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e56576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610edc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806117946026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600560016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561102a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061184f6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806117ba6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611221576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061182a6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156112a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806117716023913960400191505060405180910390fd5b6112b283838361176b565b61131d816040518060600160405280602681526020016117dc602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145c9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113b0816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461151c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611509576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114ce5780820151818401526020810190506114b3565b50505050905090810190601f1680156114fb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008082840190508381101561159a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611647576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6116536000838361176b565b6116688160025461151c90919063ffffffff16565b6002819055506116bf816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461151c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220e7ce40a71978c6d28afd59fa1cba4de704427a04612b8c8c6872bafd03907c8064736f6c634300060000334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212203cf5e371b2bc08e1c6a5bdcd285d1547727f9ef1cf581b4bf4e6520e1256cf2564736f6c63430006000033

Verified Source Code Partial Match

Compiler: v0.6.0+commit.26b70077 EVM: istanbul Optimization: No
OwnAssetBridge.sol 893 lines
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/*
 * @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 virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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);
}

pragma solidity >=0.6.0 <0.8.0;

/**
 * @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.
     */
    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.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        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.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) public {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @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(_owner == _msgSender(), "Ownable: caller is not the 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 virtual 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 virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

contract ERC20Mintable is ERC20, Ownable {
    using SafeMath for uint;

    constructor (string memory name_, string memory symbol_, uint totalSupply_) 
        ERC20(name_, symbol_)
        public 
    {
        _mint(_msgSender(), totalSupply_);
    }

    function mint(address to, uint256 amount) 
        public
        onlyOwner
        returns(bool)
    {
        _mint(to, amount);
        return true;
    }
}

/**
 * @notice This contract is used to bridge WeOwn blockchain and any other blockchain running on EVM, primarily Ethereum. 
 * After establishing bridge between asset on WeOwn blockchain and ERC20 token, cross-chain transfers are enabled and
 * users can move their holding between the blockchains. 
 */
contract OwnAssetBridge is Ownable {
    using SafeMath for uint;
    enum RevertDirection{ FromNative, ToNative }

    event CrossChainTransfer(address indexed token, string recipientAccountHash, uint amount);
    event CrossChainTransfer(string txHash, address recipient);

    mapping (string => address) public erc20Tokens;
    mapping (address => string) public assetHashes;
    mapping (string => string) public accountsForAssets;
    mapping (string => address) public pendingCrossChainTransfers;
    mapping (string => string) public pendingSignedTxs;

    address public governor;
    uint public targetTransferFee;
    uint public nativeTransferFee;
    uint public bridgeFee;

    constructor(uint _bridgeFee, uint _targetTransferFee, uint _nativeTransferFee)
        public
    {
        bridgeFee = _bridgeFee;
        targetTransferFee = _targetTransferFee;
        nativeTransferFee = _nativeTransferFee;
        governor = _msgSender();
    }

    modifier onlyGovernor() {
        require(_msgSender() == governor, "Caller is not the governor");
        _;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////
    // Bridge management
    ////////////////////////////////////////////////////////////////////////////////////////////////////

    /**
     * @notice Function that establishes bridge between existing ERC20 token and newly created asset on WeOwn blockchain.
     * This function can only be called by the governor and all tokens should be circulating on target blockchain, while
     * total supply is locked on WeOwn blockchain.
     */
    /// @param _token Address of ERC20 token
    /// @param _assetHash Hash of WeOwn asset
    /// @param _accountHash Hash of WeOwn account that will hold all locked tokens on WeOwn blockchain
    function bridgeErc20Token(address _token, string calldata _assetHash, string calldata _accountHash)
        external
        onlyGovernor
        payable
    {
        require(erc20Tokens[_assetHash] == address(0));
        require(bytes(assetHashes[_token]).length == 0);
        require(bytes(accountsForAssets[_assetHash]).length == 0);
        require(IERC20(_token).balanceOf(address(this)) == 0);
        require(msg.value >= bridgeFee);

        erc20Tokens[_assetHash] = _token;
        assetHashes[_token] = _assetHash;
        accountsForAssets[_assetHash] = _accountHash;
    }

    /**
     * @notice Function that deploys new ERC20 token and establishes bridge between existing asset on WeOwn blockchain
     * and newly created ERC20 token. This function can only be called by the governor and all tokens should be 
     * circulating on WeOwn blockchain, while total supply is locked on target blockchain.
     */
    /// @param _assetHash Hash of WeOwn asset
    /// @param _accountHash Hash of WeOwn account that will hold all locked tokens on WeOwn blockchain
    /// @param _assetName Name of ERC20 token that will be deployed. Needs to correspond to the name of WeOwn asset
    /// @param _assetSymbol Symbol of ERC20 token that will be deployed. Needs to correspond to the symbol of WeOwn asset
    /// @param _totalSupply Total supply of ERC20 token that will be deployed. Needs to correspond to the total supply of WeOwn asset
    function bridgeAsset(
        string calldata _assetHash, 
        string calldata _accountHash, 
        string calldata _assetName, 
        string calldata _assetSymbol, 
        uint _totalSupply)
        external
        onlyGovernor
        payable
    {
        require(erc20Tokens[_assetHash] == address(0));
        require(bytes(accountsForAssets[_assetHash]).length == 0);
        require(msg.value >= bridgeFee);

        address token = address(new ERC20Mintable(_assetName, _assetSymbol, _totalSupply));

        erc20Tokens[_assetHash] = token;
        assetHashes[token] = _assetHash;
        accountsForAssets[_assetHash] = _accountHash;
    }

    /**
     * @notice Function that removes bridge between ERC20 token and asset on WeOwn blockchain. This function can only 
     * be called by the governor and all tokens should be circulating on target blockchain or on WeOwn blockchain.
     */
    /// @param _token Address of ERC20 token
    function removeBridge(address _token)
        external
        onlyGovernor
    {
        string memory assetHash = assetHashes[_token];

        require(bytes(assetHash).length != 0);
        require(erc20Tokens[assetHash] == _token);
        require(bytes(accountsForAssets[assetHash]).length != 0);

        uint bridgeBalance = IERC20(_token).balanceOf(address(this));
        require(bridgeBalance == 0 || bridgeBalance == IERC20(_token).totalSupply());

        delete erc20Tokens[assetHash];
        delete assetHashes[_token];
        delete accountsForAssets[assetHash];
    }

    /**
     * @notice Function that mints ERC20 token created by the bridge. This function can only 
     * be called by the governor in order to ensure consistency between WeOwn and target blockchains.
     */
    /// @param _token Address of ERC20 token
    /// @param _amount Amount of tokens that will be minted
    function mintErc20Token(address _token, uint _amount)
        external
        onlyGovernor
    {
        require(ERC20Mintable(_token).mint(address(this), _amount));
    }


    ////////////////////////////////////////////////////////////////////////////////////////////////////
    // Cross-chain transfers
    ////////////////////////////////////////////////////////////////////////////////////////////////////

    /**
     * @notice Function by which token holder on target blockchain can transfer tokens to WeOwn blockchain.
     * ERC20 token needs to be bridged to WeOwn asset and user should previously approve this contract as
     * spender of desired amount of tokens that should be cross-chain transferred.
     */
    /// @param _token Address of ERC20 token
    /// @param _recipientAccountHash Hash of WeOwn account that should receive tokens
    /// @param _amount Number of tokens that will be transferred
    function transferToNativeChain(address _token, string calldata _recipientAccountHash, uint _amount)
        external
        payable
    {
        require(msg.value >= nativeTransferFee, "Insufficient fee is paid");
        require(bytes(assetHashes[_token]).length != 0, "Token is not bridged");
        require(IERC20(_token).transferFrom(_msgSender(), address(this), _amount), "Transfer failed");

        emit CrossChainTransfer(_token, _recipientAccountHash, _amount);
    }

    /**
     * @notice Function by which asset holder on WeOwn blockchain can transfer tokens to target blockchain.
     * Asset needs to be bridged to ERC20 token and asset transfer should be done on WeOwn blockchain.
     */
    /// @param _txHash Hash of tx on WeOwn blockchain which contains asset transfer
    /// @param _signature Signature of tx hash, signed by WeOwn sender address
    /// @param _recipient Address on target blockchain that should receive tokens
    function transferFromNativeChain(string calldata _txHash, string calldata _signature, address _recipient)
        external
        payable
    {
        require(msg.value >= targetTransferFee, "Insufficient fee is paid");
        require(pendingCrossChainTransfers[_txHash] == address(0), "Recipient is already determined");
        require(bytes(pendingSignedTxs[_txHash]).length == 0, "Signature is already determined");

        pendingCrossChainTransfers[_txHash] = _recipient;
        pendingSignedTxs[_txHash] = _signature;

        emit CrossChainTransfer(_txHash, _recipient);
    }

    /**
     * @notice Function by which contract owner confirms cross-chain transfer from WeOwn blockchain. If the tx with
     * asset transfer on WeOwn blockchain is valid and correctly signed, tokens will be released to address on target blockchain.
     */
    /// @param _txHash Hash of tx on WeOwn blockchain which contains asset transfer
    /// @param _token Address of ERC20 token
    /// @param _amount Amount of tokens that will be released
    function confirmTransfer(string calldata _txHash, IERC20 _token, uint _amount)
        external
        onlyOwner
    {
        address recipient = pendingCrossChainTransfers[_txHash];
        require(recipient != address(0), "Recipient does not exist");

        delete pendingCrossChainTransfers[_txHash];
        delete pendingSignedTxs[_txHash];

        require(_token.transfer(recipient, _amount), "Transfer failed");
    }

    /**
     * @notice Function by which contract owner reverts cross-chain transfer from WeOwn blockchain. 
     */
    /// @param _txHash Hash of tx on WeOwn blockchain which contains asset transfer
    function revertTransferFromNativeChain(string calldata _txHash)
        external
        onlyOwner
    {
        require(pendingCrossChainTransfers[_txHash] != address(0), "Tx does not exist");

        delete pendingCrossChainTransfers[_txHash];
        delete pendingSignedTxs[_txHash];
    }

    /**
     * @notice Function by which contract owner reverts cross-chain transfer from target blockchain. 
     */
    /// @param _txHash Hash of tx on target blockchain that is reverted
    /// @param _token Address of ERC20 token
    /// @param _recipient Sender address to which tokens will be transferred back
    /// @param _amount Amount of tokens that will be transferred back to sender address
    function revertTransferToNativeChain(string calldata _txHash, IERC20 _token, address _recipient, uint _amount)
        external
        onlyOwner
    {
        require(_token.transfer(_recipient, _amount), "Transfer failed");
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////
    // Owner administration
    ////////////////////////////////////////////////////////////////////////////////////////////////////

    /**
     * @notice Function by which contract owner sets governor address - address that can perform bridging and unbridging
     * of ERC20 token and WeOwn asset. 
     */
    /// @param _governor New governor address
    function setGovernor(address _governor)
        external
        onlyOwner
    {
        governor = _governor;
    }

    /**
     * @notice Function by which contract owner sets fee that is paid for cross-chain transfer from WeOwn to target blockchain
     */
    /// @param _amount New fee amount
    function setTargetTransferFee(uint _amount)
        external
        onlyOwner
    {
        targetTransferFee = _amount;
    }

    /**
     * @notice Function by which contract owner sets fee that is paid for cross-chain transfer from target to WeOwn blockchain
     */
    /// @param _amount New fee amount
    function setNativeTransferFee(uint _amount)
        external
        onlyOwner
    {
        nativeTransferFee = _amount;
    }

    /**
     * @notice Function by which contract owner sets fee that is paid by governor when establishing bridge
     */
    /// @param _amount New fee amount
    function setBridgeFee(uint _amount)
        external
        onlyOwner
    {
        bridgeFee = _amount;
    }

    /**
     * @notice Function by which contract owner withdraws fee collected through bridging and cross-chain transfers
     */
    /// @param _amount Amount to be withdrawn
    function withdrawFee(uint _amount)
        external
        onlyOwner
        returns (bool)
    {
        payable(owner()).transfer(_amount);
        return true;
    }
}

Read Contract

accountsForAssets 0x2c050408 → string
assetHashes 0x1c837032 → string
bridgeFee 0x82b12dd7 → uint256
erc20Tokens 0x48d125f1 → address
governor 0x0c340a24 → address
nativeTransferFee 0x9641cae5 → uint256
owner 0x8da5cb5b → address
pendingCrossChainTransfers 0xa6641772 → address
pendingSignedTxs 0x1c6e4593 → string
targetTransferFee 0x907d1a54 → uint256

Write Contract 16 functions

These functions modify contract state and require a wallet transaction to execute.

bridgeAsset 0xd02ce3ae
string _assetHash
string _accountHash
string _assetName
string _assetSymbol
uint256 _totalSupply
bridgeErc20Token 0xc58d0b5b
address _token
string _assetHash
string _accountHash
confirmTransfer 0x33c55240
string _txHash
address _token
uint256 _amount
mintErc20Token 0x5329afb9
address _token
uint256 _amount
removeBridge 0x04df017d
address _token
renounceOwnership 0x715018a6
No parameters
revertTransferFromNativeChain 0xf2d3169c
string _txHash
revertTransferToNativeChain 0x9740a9e3
string _txHash
address _token
address _recipient
uint256 _amount
setBridgeFee 0x998cdf83
uint256 _amount
setGovernor 0xc42cf535
address _governor
setNativeTransferFee 0x8c785d56
uint256 _amount
setTargetTransferFee 0x95d71e94
uint256 _amount
transferFromNativeChain 0xe09e73a6
string _txHash
string _signature
address _recipient
transferOwnership 0xf2fde38b
address newOwner
transferToNativeChain 0x026a7710
address _token
string _recipientAccountHash
uint256 _amount
withdrawFee 0xbe357616
uint256 _amount
returns: bool

Recent Transactions

No transactions found for this address