diff --git a/deployments/bsctestnet/XVSBridgeAdmin.json b/deployments/bsctestnet/XVSBridgeAdmin.json index 6c876b2..c793110 100644 --- a/deployments/bsctestnet/XVSBridgeAdmin.json +++ b/deployments/bsctestnet/XVSBridgeAdmin.json @@ -1,5 +1,5 @@ { - "address": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", + "address": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", "abi": [ { "anonymous": false, @@ -162,7 +162,7 @@ { "indexed": false, "internalType": "bool", - "name": "isRemoved", + "name": "active", "type": "bool" } ], @@ -427,7 +427,7 @@ }, { "internalType": "bool[]", - "name": "remove_", + "name": "active_", "type": "bool[]" } ], @@ -458,83 +458,83 @@ "type": "constructor" } ], - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", "receipt": { "to": null, "from": "0x03862dFa5D0be8F64509C001cb8C6188194469DF", - "contractAddress": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", - "transactionIndex": 3, + "contractAddress": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", + "transactionIndex": 2, "gasUsed": "796607", - "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000800080000000000000000000400000000000000000000000000000000000000000000080000000000000800000000000001000000000000000000400000000000400800000000040000000000000000020000000000000000200040000000000000400000400400000010020000000000000000000000000000001000000000800000000000000000000000000", - "blockHash": "0x66f816dae7676767e70d3682759941133d29352b0b06b74f9a52830dd1ccea47", - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000002000000000000000000000000000000000000000000000000000008000000000000000000000000000000002000001000000000000000000000000000001000000020000000000000000000800000000800000000000000000000000400000000000000000000100000000000000000000000080000000000000800000000000001000000000000000000400000000000000880000000000000000000000000020000000000000000200040000000000000400000000c00000000020000000000000000000000000000000000000000800200000000000000000000000", + "blockHash": "0x157207a05a6692d53e40eaba4b7cd6a69ad3b51e21eccda71f2fcec636349ca4", + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", "logs": [ { - "transactionIndex": 3, - "blockNumber": 34907914, - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", - "address": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", + "transactionIndex": 2, + "blockNumber": 35486114, + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", + "address": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000825bc313102cb102f5f0d8ebca19913dd17592db" + "0x0000000000000000000000008a4c5090d972c83c44e8132a1fc2ff3e948e9a71" ], "data": "0x", - "logIndex": 2, - "blockHash": "0x66f816dae7676767e70d3682759941133d29352b0b06b74f9a52830dd1ccea47" + "logIndex": 0, + "blockHash": "0x157207a05a6692d53e40eaba4b7cd6a69ad3b51e21eccda71f2fcec636349ca4" }, { - "transactionIndex": 3, - "blockNumber": 34907914, - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", - "address": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", + "transactionIndex": 2, + "blockNumber": 35486114, + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", + "address": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x00000000000000000000000003862dfa5d0be8f64509c001cb8c6188194469df" ], "data": "0x", - "logIndex": 3, - "blockHash": "0x66f816dae7676767e70d3682759941133d29352b0b06b74f9a52830dd1ccea47" + "logIndex": 1, + "blockHash": "0x157207a05a6692d53e40eaba4b7cd6a69ad3b51e21eccda71f2fcec636349ca4" }, { - "transactionIndex": 3, - "blockNumber": 34907914, - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", - "address": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", + "transactionIndex": 2, + "blockNumber": 35486114, + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", + "address": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045f8a08f534f34a97187626e05d4b6648eeaa9aa", - "logIndex": 4, - "blockHash": "0x66f816dae7676767e70d3682759941133d29352b0b06b74f9a52830dd1ccea47" + "logIndex": 2, + "blockHash": "0x157207a05a6692d53e40eaba4b7cd6a69ad3b51e21eccda71f2fcec636349ca4" }, { - "transactionIndex": 3, - "blockNumber": 34907914, - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", - "address": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", + "transactionIndex": 2, + "blockNumber": 35486114, + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", + "address": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0x66f816dae7676767e70d3682759941133d29352b0b06b74f9a52830dd1ccea47" + "logIndex": 3, + "blockHash": "0x157207a05a6692d53e40eaba4b7cd6a69ad3b51e21eccda71f2fcec636349ca4" }, { - "transactionIndex": 3, - "blockNumber": 34907914, - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", - "address": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", + "transactionIndex": 2, + "blockNumber": 35486114, + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", + "address": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043fd9f2dacb36853dbfba269a7539706e787cfce", - "logIndex": 6, - "blockHash": "0x66f816dae7676767e70d3682759941133d29352b0b06b74f9a52830dd1ccea47" + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ef480a5654b231ff7d80a0681f938f3db71a6ca6", + "logIndex": 4, + "blockHash": "0x157207a05a6692d53e40eaba4b7cd6a69ad3b51e21eccda71f2fcec636349ca4" } ], - "blockNumber": 34907914, - "cumulativeGasUsed": "955201", + "blockNumber": 35486114, + "cumulativeGasUsed": "848848", "status": 1, "byzantium": true }, "args": [ - "0x825bc313102Cb102F5F0D8eBca19913DD17592DB", - "0x43fd9F2DAcB36853dBfBa269A7539706e787cFce", + "0x8a4C5090d972C83C44E8132a1Fc2Ff3E948E9A71", + "0xef480a5654b231ff7d80A0681F938f3Db71a6Ca6", "0xc4d66de800000000000000000000000045f8a08f534f34a97187626e05d4b6648eeaa9aa" ], "numDeployments": 1, @@ -546,7 +546,7 @@ "methodName": "initialize", "args": ["0x45f8a08F534f34A97187626E05d4b6648Eeaa9AA"] }, - "implementation": "0x825bc313102Cb102F5F0D8eBca19913DD17592DB", + "implementation": "0x8a4C5090d972C83C44E8132a1Fc2Ff3E948E9A71", "devdoc": { "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", "kind": "dev", diff --git a/deployments/bsctestnet/XVSBridgeAdmin_Implementation.json b/deployments/bsctestnet/XVSBridgeAdmin_Implementation.json index fe9ca36..9cb25f9 100644 --- a/deployments/bsctestnet/XVSBridgeAdmin_Implementation.json +++ b/deployments/bsctestnet/XVSBridgeAdmin_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x825bc313102Cb102F5F0D8eBca19913DD17592DB", + "address": "0x8a4C5090d972C83C44E8132a1Fc2Ff3E948E9A71", "abi": [ { "inputs": [ @@ -50,7 +50,7 @@ { "indexed": false, "internalType": "bool", - "name": "isRemoved", + "name": "active", "type": "bool" } ], @@ -319,7 +319,7 @@ }, { "internalType": "bool[]", - "name": "remove_", + "name": "active_", "type": "bool[]" } ], @@ -329,39 +329,39 @@ "type": "function" } ], - "transactionHash": "0x72f77f74b56bd7ba10dba6a42e0fdd1455e2456fc428546de67350b2dcb5205f", + "transactionHash": "0x6f073019bb33c8b8c24ec691dbbc2f66132041088a62b5f86bc0d871c5340cfe", "receipt": { "to": null, "from": "0x03862dFa5D0be8F64509C001cb8C6188194469DF", - "contractAddress": "0x825bc313102Cb102F5F0D8eBca19913DD17592DB", - "transactionIndex": 2, - "gasUsed": "1205160", - "logsBloom": "0x00000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x70fb39c38421009e746f22e97496dd6891cddaa0f1d7c80ceaece535de8ebdcd", - "transactionHash": "0x72f77f74b56bd7ba10dba6a42e0fdd1455e2456fc428546de67350b2dcb5205f", + "contractAddress": "0x8a4C5090d972C83C44E8132a1Fc2Ff3E948E9A71", + "transactionIndex": 1, + "gasUsed": "1255691", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000002000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x81b6e1dba3f72f197c980efe253571799dff698a6624ecc8c1399e95c56f012e", + "transactionHash": "0x6f073019bb33c8b8c24ec691dbbc2f66132041088a62b5f86bc0d871c5340cfe", "logs": [ { - "transactionIndex": 2, - "blockNumber": 34907912, - "transactionHash": "0x72f77f74b56bd7ba10dba6a42e0fdd1455e2456fc428546de67350b2dcb5205f", - "address": "0x825bc313102Cb102F5F0D8eBca19913DD17592DB", + "transactionIndex": 1, + "blockNumber": 35486111, + "transactionHash": "0x6f073019bb33c8b8c24ec691dbbc2f66132041088a62b5f86bc0d871c5340cfe", + "address": "0x8a4C5090d972C83C44E8132a1Fc2Ff3E948E9A71", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 0, - "blockHash": "0x70fb39c38421009e746f22e97496dd6891cddaa0f1d7c80ceaece535de8ebdcd" + "logIndex": 1, + "blockHash": "0x81b6e1dba3f72f197c980efe253571799dff698a6624ecc8c1399e95c56f012e" } ], - "blockNumber": 34907912, - "cumulativeGasUsed": "1600094", + "blockNumber": 35486111, + "cumulativeGasUsed": "1301986", "status": 1, "byzantium": true }, - "args": ["0x19861D039284e2Cf09403Ab8124B064a791a79f2"], + "args": ["0x963cAbDC5bb51C1479ec94Df44DE2EC1a49439E3"], "numDeployments": 1, - "solcInputHash": "f72aa0ed4b9c23ba2646d0ce7bdf9a7a", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"XVSBridge_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isRemoved\",\"type\":\"bool\"}],\"name\":\"FunctionRegistryChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlManager\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"XVSBridge\",\"outputs\":[{\"internalType\":\"contract IXVSProxyOFT\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"name\":\"functionRegistry\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner_\",\"type\":\"address\"}],\"name\":\"transferBridgeOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"signatures_\",\"type\":\"string[]\"},{\"internalType\":\"bool[]\",\"name\":\"remove_\",\"type\":\"bool[]\"}],\"name\":\"upsertSignature\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"custom:error\":\"ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\",\"params\":{\"accessControlManager_\":\"Address of access control manager contract.\"}},\"isTrustedRemote(uint16,bytes)\":{\"custom:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"setAccessControlManager(address)\":{\"custom:access\":\"Only Governance\",\"custom:event\":\"Emits NewAccessControlManager event\",\"details\":\"Admin function to set address of AccessControlManager\",\"params\":{\"accessControlManager_\":\"The new address of the AccessControlManager\"}},\"setTrustedRemoteAddress(uint16,bytes)\":{\"custom:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"}},\"transferBridgeOwnership(address)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"params\":{\"newOwner_\":\"New owner of the XVS Bridge.\"}},\"transferOwnership(address)\":{\"details\":\"Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.\"},\"upsertSignature(string[],bool[])\":{\"custom:access\":\"Only owner.\",\"params\":{\"remove_\":\"Boolean to specify whether to remove the function from registry mapping.\",\"signatures_\":\"Array of function names string.\"}}},\"stateVariables\":{\"XVSBridge\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"XVSBridgeAdmin\",\"version\":1},\"userdoc\":{\"errors\":{\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"}},\"kind\":\"user\",\"methods\":{\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"functionRegistry(bytes4)\":{\"notice\":\"A mapping keeps track of function signature associated with function name string.\"},\"isTrustedRemote(uint16,bytes)\":{\"notice\":\"Returns bool = true if srcAddress_ is trustedRemote corresponds to chainId_.\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening.\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"transferBridgeOwnership(address)\":{\"notice\":\"This function transfer the ownership of the bridge from this contract to new owner.\"},\"upsertSignature(string[],bool[])\":{\"notice\":\"Function to update the function registry.\"}},\"notice\":\"The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT. It maintains a registry of function signatures and names, allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/XVSBridgeAdmin.sol\":\"XVSBridgeAdmin\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OwnableUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\\n function __Ownable2Step_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable2Step_init_unchained() internal onlyInitializing {\\n }\\n address private _pendingOwner;\\n\\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Returns the address of the pending owner.\\n */\\n function pendingOwner() public view virtual returns (address) {\\n return _pendingOwner;\\n }\\n\\n /**\\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual override onlyOwner {\\n _pendingOwner = newOwner;\\n emit OwnershipTransferStarted(owner(), newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual override {\\n delete _pendingOwner;\\n super._transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev The new owner accepts the ownership transfer.\\n */\\n function acceptOwnership() public virtual {\\n address sender = _msgSender();\\n require(pendingOwner() == sender, \\\"Ownable2Step: caller is not the new owner\\\");\\n _transferOwnership(sender);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x84efb8889801b0ac817324aff6acc691d07bbee816b671817132911d287a8c63\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\\\";\\n\\nimport \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title AccessControlledV8\\n * @author Venus\\n * @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)\\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\\n */\\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\\n /// @notice Access control manager contract\\n IAccessControlManagerV8 private _accessControlManager;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n\\n /// @notice Emitted when access control manager contract address is changed\\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\\n\\n /// @notice Thrown when the action is prohibited by AccessControlManager\\n error Unauthorized(address sender, address calledContract, string methodSignature);\\n\\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\\n __Ownable2Step_init();\\n __AccessControlled_init_unchained(accessControlManager_);\\n }\\n\\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Sets the address of AccessControlManager\\n * @dev Admin function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n * @custom:event Emits NewAccessControlManager event\\n * @custom:access Only Governance\\n */\\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Returns the address of the access control manager contract\\n */\\n function accessControlManager() external view returns (IAccessControlManagerV8) {\\n return _accessControlManager;\\n }\\n\\n /**\\n * @dev Internal function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n */\\n function _setAccessControlManager(address accessControlManager_) internal {\\n require(address(accessControlManager_) != address(0), \\\"invalid acess control manager address\\\");\\n address oldAccessControlManager = address(_accessControlManager);\\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\\n }\\n\\n /**\\n * @notice Reverts if the call is not allowed by AccessControlManager\\n * @param signature Method signature\\n */\\n function _checkAccessAllowed(string memory signature) internal view {\\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\\n\\n if (!isAllowedToCall) {\\n revert Unauthorized(msg.sender, address(this), signature);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1b805a5d09990e2c4f7839afe7726a02f8452261eb3d0d488e24129ec0a7736d\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x8adbe291d659987faf4de606736227ad9d8e1a0e284a33a6ca12b30ab2a504b2\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0x909eb76841ebd57d8f53686b76b1a09da7bbbbcddb29510c41674d5aa84c713e\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/XVSBridgeAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.13;\\n\\nimport { AccessControlledV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { IXVSProxyOFT } from \\\"./interfaces/IXVSProxyOFT.sol\\\";\\n\\n/**\\n * @title XVSBridgeAdmin\\n * @author Venus\\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\\n * It maintains a registry of function signatures and names,\\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\\n */\\ncontract XVSBridgeAdmin is AccessControlledV8 {\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n IXVSProxyOFT public immutable XVSBridge;\\n /**\\n * @notice A mapping keeps track of function signature associated with function name string.\\n */\\n mapping(bytes4 => string) public functionRegistry;\\n\\n // Event emitted when function registry updated\\n event FunctionRegistryChanged(string signature, bool isRemoved);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(address XVSBridge_) {\\n ensureNonzeroAddress(XVSBridge_);\\n XVSBridge = IXVSProxyOFT(XVSBridge_);\\n _disableInitializers();\\n }\\n\\n /**\\n * @param accessControlManager_ Address of access control manager contract.\\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\\n */\\n function initialize(address accessControlManager_) external initializer {\\n ensureNonzeroAddress(accessControlManager_);\\n __AccessControlled_init(accessControlManager_);\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract\\n * @custom:access Controlled by AccessControlManager.\\n */\\n fallback(bytes calldata data) external returns (bytes memory) {\\n string memory fun = _getFunctionName(msg.sig);\\n require(bytes(fun).length != 0, \\\"Function not found\\\");\\n _checkAccessAllowed(fun);\\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n\\n /**\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n */\\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\\n _checkAccessAllowed(\\\"setTrustedRemoteAddress(uint16,bytes)\\\");\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice Function to update the function registry.\\n * @param signatures_ Array of function names string.\\n * @param remove_ Boolean to specify whether to remove the function from registry mapping.\\n * @custom:access Only owner.\\n */\\n function upsertSignature(string[] calldata signatures_, bool[] calldata remove_) external onlyOwner {\\n uint256 signatureLength = signatures_.length;\\n require(signatureLength == remove_.length, \\\"Input arrays must have the same length\\\");\\n for (uint256 i; i < signatureLength; i++) {\\n bytes4 sigHash = bytes4(keccak256(bytes(signatures_[i])));\\n if (remove_[i]) {\\n delete functionRegistry[sigHash];\\n emit FunctionRegistryChanged(signatures_[i], true);\\n } else {\\n functionRegistry[sigHash] = signatures_[i];\\n emit FunctionRegistryChanged(signatures_[i], false);\\n }\\n }\\n }\\n\\n /**\\n * @notice This function transfer the ownership of the bridge from this contract to new owner.\\n * @param newOwner_ New owner of the XVS Bridge.\\n * @custom:access Controlled by AccessControlManager.\\n */\\n function transferBridgeOwnership(address newOwner_) external {\\n _checkAccessAllowed(\\\"transferBridgeOwnership(address)\\\");\\n ensureNonzeroAddress(newOwner_);\\n XVSBridge.transferOwnership(newOwner_);\\n }\\n\\n /**\\n * @notice Returns bool = true if srcAddress_ is trustedRemote corresponds to chainId_.\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n */\\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @dev Returns function name string associated with function signature.\\n */\\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\\n return functionRegistry[signature_];\\n }\\n\\n function bytesToAddress(bytes calldata b) private pure returns (address) {\\n return address(uint160(bytes20(b)));\\n }\\n}\\n\",\"keccak256\":\"0x7cf5d0d46b9cd56e66887f664aea66af786eea1213d20b4c2fcf6d742d4c65bc\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/interfaces/IXVSProxyOFT.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/**\\n * @title IXVSProxyOFT\\n * @author Venus\\n * @notice Interface implemented by `XVSProxyOFT`.\\n */\\ninterface IXVSProxyOFT {\\n function transferOwnership(address addr) external;\\n\\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\\n\\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\\n}\\n\",\"keccak256\":\"0x854518f3e4c2270ca52184e63dc1f9d27f2893388216ee6153e6ab8cf2d7c960\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", - "bytecode": "0x60a06040523480156200001157600080fd5b506040516200160638038062001606833981016040819052620000349162000149565b6200003f816200005d565b6001600160a01b0381166080526200005662000088565b506200017b565b6001600160a01b03811662000085576040516342bcdf7f60e11b815260040160405180910390fd5b50565b600054610100900460ff1615620000f55760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000147576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200015c57600080fd5b81516001600160a01b03811681146200017457600080fd5b9392505050565b608051611453620001b3600039600081816101610152818161026c015281816105d6015281816106c00152610a5001526114536000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf31461031b578063c4d66de81461032c578063e30c39781461033f578063f2fde38b14610350576100ea565b806379ba5097146102ef5780638da5cb5b146102f7578063a6c3d16514610308576100ea565b80633d8b38f6116100c85780633d8b38f6146102a65780633f90b540146102c95780634bb7453e146102dc578063715018a61461023c576100ea565b80630e32cb8614610229578063180d295c1461023e57806327a020ef14610267575b600036606060006101066000356001600160e01b031916610363565b905080516000036101535760405162461bcd60e51b8152602060048201526012602482015271119d5b98dd1a5bdb881b9bdd08199bdd5b9960721b60448201526064015b60405180910390fd5b61015c81610410565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168686604051610199929190610f9e565b6000604051808303816000865af19150503d80600081146101d6576040519150601f19603f3d011682016040523d82523d6000602084013e6101db565b606091505b50915091508161021b5760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014a565b805195506020019350505050f35b61023c610237366004610fae565b6104ae565b005b61025161024c366004610fde565b6104c2565b60405161025e9190611055565b60405180910390f35b61028e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161025e565b6102b96102b4366004611068565b61055c565b604051901515815260200161025e565b61023c6102d7366004610fae565b61065a565b61023c6102ea366004611140565b61071f565b61023c610945565b6033546001600160a01b031661028e565b61023c610316366004611068565b6109bc565b6097546001600160a01b031661028e565b61023c61033a366004610fae565b610ac0565b6065546001600160a01b031661028e565b61023c61035e366004610fae565b610bdc565b6001600160e01b03198116600090815260c96020526040902080546060919061038b906111ac565b80601f01602080910402602001604051908101604052809291908181526020018280546103b7906111ac565b80156104045780601f106103d957610100808354040283529160200191610404565b820191906000526020600020905b8154815290600101906020018083116103e757829003601f168201915b50505050509050919050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab9061044390339086906004016111e6565b602060405180830381865afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104849190611218565b9050806104aa57333083604051634a3fa29360e01b815260040161014a93929190611235565b5050565b6104b6610c4d565b6104bf81610ca7565b50565b60c960205260009081526040902080546104db906111ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610507906111ac565b80156105545780601f1061052957610100808354040283529160200191610554565b820191906000526020600020905b81548152906001019060200180831161053757829003601f168201915b505050505081565b60008361ffff166000036105ad5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b6105bf6105ba8484610d65565b610d7b565b604051631ec59c7b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633d8b38f69061060f90879087908790600401611293565b6020604051808303816000875af115801561062e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106529190611218565b949350505050565b6106986040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610410565b6106a181610d7b565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b15801561070457600080fd5b505af1158015610718573d6000803e3d6000fd5b5050505050565b610727610c4d565b828181146107865760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d65206044820152650d8cadccee8d60d31b606482015260840161014a565b60005b8181101561093b5760008686838181106107a5576107a56112b1565b90506020028101906107b791906112c7565b6040516107c5929190610f9e565b604051809103902090508484838181106107e1576107e16112b1565b90506020020160208101906107f6919061130e565b15610880576001600160e01b03198116600090815260c96020526040812061081d91610ecb565b7f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa878784818110610850576108506112b1565b905060200281019061086291906112c7565b60016040516108739392919061132b565b60405180910390a1610928565b868683818110610892576108926112b1565b90506020028101906108a491906112c7565b6001600160e01b03198316600090815260c9602052604090206108c8929091610f05565b507f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8787848181106108fc576108fc6112b1565b905060200281019061090e91906112c7565b600060405161091f9392919061132b565b60405180910390a15b508061093381611351565b915050610789565b505050505050565b565b60655433906001600160a01b031681146109b35760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014a565b6104bf81610da2565b6109dd6040518060600160405280602581526020016113f960259139610410565b8261ffff16600003610a2c5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b610a396105ba8383610d65565b60405163a6c3d16560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610a8990869086908690600401611293565b600060405180830381600087803b158015610aa357600080fd5b505af1158015610ab7573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610ae05750600054600160ff909116105b80610afa5750303b158015610afa575060005460ff166001145b610b5d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014a565b6000805460ff191660011790558015610b80576000805461ff0019166101001790555b610b8982610d7b565b610b9282610dbb565b80156104aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610be4610c4d565b606580546001600160a01b0383166001600160a01b03199091168117909155610c156033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6033546001600160a01b031633146109435760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014a565b6001600160a01b038116610d0b5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014a565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610bd0565b6000610d718284611378565b60601c9392505050565b6001600160a01b0381166104bf576040516342bcdf7f60e11b815260040160405180910390fd5b606580546001600160a01b03191690556104bf81610df3565b600054610100900460ff16610de25760405162461bcd60e51b815260040161014a906113ad565b610dea610e45565b6104bf81610e74565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610e6c5760405162461bcd60e51b815260040161014a906113ad565b610943610e9b565b600054610100900460ff166104b65760405162461bcd60e51b815260040161014a906113ad565b600054610100900460ff16610ec25760405162461bcd60e51b815260040161014a906113ad565b61094333610da2565b508054610ed7906111ac565b6000825580601f10610ee7575050565b601f0160209004906000526020600020908101906104bf9190610f89565b828054610f11906111ac565b90600052602060002090601f016020900481019282610f335760008555610f79565b82601f10610f4c5782800160ff19823516178555610f79565b82800160010185558215610f79579182015b82811115610f79578235825591602001919060010190610f5e565b50610f85929150610f89565b5090565b5b80821115610f855760008155600101610f8a565b8183823760009101908152919050565b600060208284031215610fc057600080fd5b81356001600160a01b0381168114610fd757600080fd5b9392505050565b600060208284031215610ff057600080fd5b81356001600160e01b031981168114610fd757600080fd5b6000815180845260005b8181101561102e57602081850181015186830182015201611012565b81811115611040576000602083870101525b50601f01601f19169290920160200192915050565b602081526000610fd76020830184611008565b60008060006040848603121561107d57600080fd5b833561ffff8116811461108f57600080fd5b9250602084013567ffffffffffffffff808211156110ac57600080fd5b818601915086601f8301126110c057600080fd5b8135818111156110cf57600080fd5b8760208285010111156110e157600080fd5b6020830194508093505050509250925092565b60008083601f84011261110657600080fd5b50813567ffffffffffffffff81111561111e57600080fd5b6020830191508360208260051b850101111561113957600080fd5b9250929050565b6000806000806040858703121561115657600080fd5b843567ffffffffffffffff8082111561116e57600080fd5b61117a888389016110f4565b9096509450602087013591508082111561119357600080fd5b506111a0878288016110f4565b95989497509550505050565b600181811c908216806111c057607f821691505b6020821081036111e057634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038316815260406020820181905260009061065290830184611008565b80151581146104bf57600080fd5b60006020828403121561122a57600080fd5b8151610fd78161120a565b6001600160a01b0384811682528316602082015260606040820181905260009061126190830184611008565b95945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061126160408301848661126a565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126112de57600080fd5b83018035915067ffffffffffffffff8211156112f957600080fd5b60200191503681900382131561113957600080fd5b60006020828403121561132057600080fd5b8135610fd78161120a565b60408152600061133f60408301858761126a565b90508215156020830152949350505050565b60006001820161137157634e487b7160e01b600052601160045260246000fd5b5060010190565b6bffffffffffffffffffffffff1981358181169160148510156113a55780818660140360031b1b83161692505b505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a26469706673582212204c98b0d36a16a33d436264b40f280e241b93c1636c27cb487555d62650b1d4d264736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf31461031b578063c4d66de81461032c578063e30c39781461033f578063f2fde38b14610350576100ea565b806379ba5097146102ef5780638da5cb5b146102f7578063a6c3d16514610308576100ea565b80633d8b38f6116100c85780633d8b38f6146102a65780633f90b540146102c95780634bb7453e146102dc578063715018a61461023c576100ea565b80630e32cb8614610229578063180d295c1461023e57806327a020ef14610267575b600036606060006101066000356001600160e01b031916610363565b905080516000036101535760405162461bcd60e51b8152602060048201526012602482015271119d5b98dd1a5bdb881b9bdd08199bdd5b9960721b60448201526064015b60405180910390fd5b61015c81610410565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168686604051610199929190610f9e565b6000604051808303816000865af19150503d80600081146101d6576040519150601f19603f3d011682016040523d82523d6000602084013e6101db565b606091505b50915091508161021b5760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014a565b805195506020019350505050f35b61023c610237366004610fae565b6104ae565b005b61025161024c366004610fde565b6104c2565b60405161025e9190611055565b60405180910390f35b61028e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161025e565b6102b96102b4366004611068565b61055c565b604051901515815260200161025e565b61023c6102d7366004610fae565b61065a565b61023c6102ea366004611140565b61071f565b61023c610945565b6033546001600160a01b031661028e565b61023c610316366004611068565b6109bc565b6097546001600160a01b031661028e565b61023c61033a366004610fae565b610ac0565b6065546001600160a01b031661028e565b61023c61035e366004610fae565b610bdc565b6001600160e01b03198116600090815260c96020526040902080546060919061038b906111ac565b80601f01602080910402602001604051908101604052809291908181526020018280546103b7906111ac565b80156104045780601f106103d957610100808354040283529160200191610404565b820191906000526020600020905b8154815290600101906020018083116103e757829003601f168201915b50505050509050919050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab9061044390339086906004016111e6565b602060405180830381865afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104849190611218565b9050806104aa57333083604051634a3fa29360e01b815260040161014a93929190611235565b5050565b6104b6610c4d565b6104bf81610ca7565b50565b60c960205260009081526040902080546104db906111ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610507906111ac565b80156105545780601f1061052957610100808354040283529160200191610554565b820191906000526020600020905b81548152906001019060200180831161053757829003601f168201915b505050505081565b60008361ffff166000036105ad5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b6105bf6105ba8484610d65565b610d7b565b604051631ec59c7b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633d8b38f69061060f90879087908790600401611293565b6020604051808303816000875af115801561062e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106529190611218565b949350505050565b6106986040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610410565b6106a181610d7b565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b15801561070457600080fd5b505af1158015610718573d6000803e3d6000fd5b5050505050565b610727610c4d565b828181146107865760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d65206044820152650d8cadccee8d60d31b606482015260840161014a565b60005b8181101561093b5760008686838181106107a5576107a56112b1565b90506020028101906107b791906112c7565b6040516107c5929190610f9e565b604051809103902090508484838181106107e1576107e16112b1565b90506020020160208101906107f6919061130e565b15610880576001600160e01b03198116600090815260c96020526040812061081d91610ecb565b7f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa878784818110610850576108506112b1565b905060200281019061086291906112c7565b60016040516108739392919061132b565b60405180910390a1610928565b868683818110610892576108926112b1565b90506020028101906108a491906112c7565b6001600160e01b03198316600090815260c9602052604090206108c8929091610f05565b507f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8787848181106108fc576108fc6112b1565b905060200281019061090e91906112c7565b600060405161091f9392919061132b565b60405180910390a15b508061093381611351565b915050610789565b505050505050565b565b60655433906001600160a01b031681146109b35760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014a565b6104bf81610da2565b6109dd6040518060600160405280602581526020016113f960259139610410565b8261ffff16600003610a2c5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b610a396105ba8383610d65565b60405163a6c3d16560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610a8990869086908690600401611293565b600060405180830381600087803b158015610aa357600080fd5b505af1158015610ab7573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610ae05750600054600160ff909116105b80610afa5750303b158015610afa575060005460ff166001145b610b5d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014a565b6000805460ff191660011790558015610b80576000805461ff0019166101001790555b610b8982610d7b565b610b9282610dbb565b80156104aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610be4610c4d565b606580546001600160a01b0383166001600160a01b03199091168117909155610c156033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6033546001600160a01b031633146109435760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014a565b6001600160a01b038116610d0b5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014a565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610bd0565b6000610d718284611378565b60601c9392505050565b6001600160a01b0381166104bf576040516342bcdf7f60e11b815260040160405180910390fd5b606580546001600160a01b03191690556104bf81610df3565b600054610100900460ff16610de25760405162461bcd60e51b815260040161014a906113ad565b610dea610e45565b6104bf81610e74565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610e6c5760405162461bcd60e51b815260040161014a906113ad565b610943610e9b565b600054610100900460ff166104b65760405162461bcd60e51b815260040161014a906113ad565b600054610100900460ff16610ec25760405162461bcd60e51b815260040161014a906113ad565b61094333610da2565b508054610ed7906111ac565b6000825580601f10610ee7575050565b601f0160209004906000526020600020908101906104bf9190610f89565b828054610f11906111ac565b90600052602060002090601f016020900481019282610f335760008555610f79565b82601f10610f4c5782800160ff19823516178555610f79565b82800160010185558215610f79579182015b82811115610f79578235825591602001919060010190610f5e565b50610f85929150610f89565b5090565b5b80821115610f855760008155600101610f8a565b8183823760009101908152919050565b600060208284031215610fc057600080fd5b81356001600160a01b0381168114610fd757600080fd5b9392505050565b600060208284031215610ff057600080fd5b81356001600160e01b031981168114610fd757600080fd5b6000815180845260005b8181101561102e57602081850181015186830182015201611012565b81811115611040576000602083870101525b50601f01601f19169290920160200192915050565b602081526000610fd76020830184611008565b60008060006040848603121561107d57600080fd5b833561ffff8116811461108f57600080fd5b9250602084013567ffffffffffffffff808211156110ac57600080fd5b818601915086601f8301126110c057600080fd5b8135818111156110cf57600080fd5b8760208285010111156110e157600080fd5b6020830194508093505050509250925092565b60008083601f84011261110657600080fd5b50813567ffffffffffffffff81111561111e57600080fd5b6020830191508360208260051b850101111561113957600080fd5b9250929050565b6000806000806040858703121561115657600080fd5b843567ffffffffffffffff8082111561116e57600080fd5b61117a888389016110f4565b9096509450602087013591508082111561119357600080fd5b506111a0878288016110f4565b95989497509550505050565b600181811c908216806111c057607f821691505b6020821081036111e057634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038316815260406020820181905260009061065290830184611008565b80151581146104bf57600080fd5b60006020828403121561122a57600080fd5b8151610fd78161120a565b6001600160a01b0384811682528316602082015260606040820181905260009061126190830184611008565b95945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061126160408301848661126a565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126112de57600080fd5b83018035915067ffffffffffffffff8211156112f957600080fd5b60200191503681900382131561113957600080fd5b60006020828403121561132057600080fd5b8135610fd78161120a565b60408152600061133f60408301858761126a565b90508215156020830152949350505050565b60006001820161137157634e487b7160e01b600052601160045260246000fd5b5060010190565b6bffffffffffffffffffffffff1981358181169160148510156113a55780818660140360031b1b83161692505b505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a26469706673582212204c98b0d36a16a33d436264b40f280e241b93c1636c27cb487555d62650b1d4d264736f6c634300080d0033", + "solcInputHash": "62c3d453c4f2f09a9c75b9665a09cf0a", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"XVSBridge_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"}],\"name\":\"FunctionRegistryChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlManager\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"XVSBridge\",\"outputs\":[{\"internalType\":\"contract IXVSProxyOFT\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"name\":\"functionRegistry\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner_\",\"type\":\"address\"}],\"name\":\"transferBridgeOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"signatures_\",\"type\":\"string[]\"},{\"internalType\":\"bool[]\",\"name\":\"active_\",\"type\":\"bool[]\"}],\"name\":\"upsertSignature\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"custom:error\":\"ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\",\"params\":{\"accessControlManager_\":\"Address of access control manager contract.\"}},\"isTrustedRemote(uint16,bytes)\":{\"custom:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"setAccessControlManager(address)\":{\"custom:access\":\"Only Governance\",\"custom:event\":\"Emits NewAccessControlManager event\",\"details\":\"Admin function to set address of AccessControlManager\",\"params\":{\"accessControlManager_\":\"The new address of the AccessControlManager\"}},\"setTrustedRemoteAddress(uint16,bytes)\":{\"custom:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"}},\"transferBridgeOwnership(address)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"params\":{\"newOwner_\":\"New owner of the XVS Bridge.\"}},\"transferOwnership(address)\":{\"details\":\"Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.\"},\"upsertSignature(string[],bool[])\":{\"params\":{\"active_\":\"bool value, should be true to add function.\",\"signatures_\":\"Function signature to be added or removed.\"}}},\"stateVariables\":{\"XVSBridge\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"XVSBridgeAdmin\",\"version\":1},\"userdoc\":{\"errors\":{\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"}},\"kind\":\"user\",\"methods\":{\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"functionRegistry(bytes4)\":{\"notice\":\"A mapping keeps track of function signature associated with function name string.\"},\"isTrustedRemote(uint16,bytes)\":{\"notice\":\"Returns bool = true if srcAddress_ is trustedRemote corresponds to chainId_.\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening.\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"transferBridgeOwnership(address)\":{\"notice\":\"This function transfer the ownership of the bridge from this contract to new owner.\"},\"upsertSignature(string[],bool[])\":{\"notice\":\"A registry of functions that are allowed to be executed from proposals\"}},\"notice\":\"The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT. It maintains a registry of function signatures and names, allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/XVSBridgeAdmin.sol\":\"XVSBridgeAdmin\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OwnableUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\\n function __Ownable2Step_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable2Step_init_unchained() internal onlyInitializing {\\n }\\n address private _pendingOwner;\\n\\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Returns the address of the pending owner.\\n */\\n function pendingOwner() public view virtual returns (address) {\\n return _pendingOwner;\\n }\\n\\n /**\\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual override onlyOwner {\\n _pendingOwner = newOwner;\\n emit OwnershipTransferStarted(owner(), newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual override {\\n delete _pendingOwner;\\n super._transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev The new owner accepts the ownership transfer.\\n */\\n function acceptOwnership() public virtual {\\n address sender = _msgSender();\\n require(pendingOwner() == sender, \\\"Ownable2Step: caller is not the new owner\\\");\\n _transferOwnership(sender);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x84efb8889801b0ac817324aff6acc691d07bbee816b671817132911d287a8c63\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\\\";\\n\\nimport \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title AccessControlledV8\\n * @author Venus\\n * @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)\\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\\n */\\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\\n /// @notice Access control manager contract\\n IAccessControlManagerV8 private _accessControlManager;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n\\n /// @notice Emitted when access control manager contract address is changed\\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\\n\\n /// @notice Thrown when the action is prohibited by AccessControlManager\\n error Unauthorized(address sender, address calledContract, string methodSignature);\\n\\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\\n __Ownable2Step_init();\\n __AccessControlled_init_unchained(accessControlManager_);\\n }\\n\\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Sets the address of AccessControlManager\\n * @dev Admin function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n * @custom:event Emits NewAccessControlManager event\\n * @custom:access Only Governance\\n */\\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Returns the address of the access control manager contract\\n */\\n function accessControlManager() external view returns (IAccessControlManagerV8) {\\n return _accessControlManager;\\n }\\n\\n /**\\n * @dev Internal function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n */\\n function _setAccessControlManager(address accessControlManager_) internal {\\n require(address(accessControlManager_) != address(0), \\\"invalid acess control manager address\\\");\\n address oldAccessControlManager = address(_accessControlManager);\\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\\n }\\n\\n /**\\n * @notice Reverts if the call is not allowed by AccessControlManager\\n * @param signature Method signature\\n */\\n function _checkAccessAllowed(string memory signature) internal view {\\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\\n\\n if (!isAllowedToCall) {\\n revert Unauthorized(msg.sender, address(this), signature);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1b805a5d09990e2c4f7839afe7726a02f8452261eb3d0d488e24129ec0a7736d\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x8adbe291d659987faf4de606736227ad9d8e1a0e284a33a6ca12b30ab2a504b2\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0x909eb76841ebd57d8f53686b76b1a09da7bbbbcddb29510c41674d5aa84c713e\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/XVSBridgeAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.13;\\n\\nimport { AccessControlledV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { IXVSProxyOFT } from \\\"./interfaces/IXVSProxyOFT.sol\\\";\\n\\n/**\\n * @title XVSBridgeAdmin\\n * @author Venus\\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\\n * It maintains a registry of function signatures and names,\\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\\n */\\ncontract XVSBridgeAdmin is AccessControlledV8 {\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n IXVSProxyOFT public immutable XVSBridge;\\n /**\\n * @notice A mapping keeps track of function signature associated with function name string.\\n */\\n mapping(bytes4 => string) public functionRegistry;\\n\\n // Event emitted when function registry updated\\n event FunctionRegistryChanged(string signature, bool active);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(address XVSBridge_) {\\n ensureNonzeroAddress(XVSBridge_);\\n XVSBridge = IXVSProxyOFT(XVSBridge_);\\n _disableInitializers();\\n }\\n\\n /**\\n * @param accessControlManager_ Address of access control manager contract.\\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\\n */\\n function initialize(address accessControlManager_) external initializer {\\n ensureNonzeroAddress(accessControlManager_);\\n __AccessControlled_init(accessControlManager_);\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract\\n * @custom:access Controlled by AccessControlManager.\\n */\\n fallback(bytes calldata data) external returns (bytes memory) {\\n string memory fun = _getFunctionName(msg.sig);\\n require(bytes(fun).length != 0, \\\"Function not found\\\");\\n _checkAccessAllowed(fun);\\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n\\n /**\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n */\\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\\n _checkAccessAllowed(\\\"setTrustedRemoteAddress(uint16,bytes)\\\");\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice A registry of functions that are allowed to be executed from proposals\\n * @param signatures_ Function signature to be added or removed.\\n * @param active_ bool value, should be true to add function.\\n */\\n function upsertSignature(string[] calldata signatures_, bool[] calldata active_) external onlyOwner {\\n uint256 signatureLength = signatures_.length;\\n require(signatureLength == active_.length, \\\"Input arrays must have the same length\\\");\\n for (uint256 i; i < signatureLength; i++) {\\n bytes4 sigHash = bytes4(keccak256(bytes(signatures_[i])));\\n bytes memory signature = bytes(functionRegistry[sigHash]);\\n if (active_[i] && signature.length == 0) {\\n functionRegistry[sigHash] = signatures_[i];\\n emit FunctionRegistryChanged(signatures_[i], true);\\n } else if (!active_[i] && signature.length != 0) {\\n delete functionRegistry[sigHash];\\n emit FunctionRegistryChanged(signatures_[i], false);\\n }\\n }\\n }\\n\\n /**\\n * @notice This function transfer the ownership of the bridge from this contract to new owner.\\n * @param newOwner_ New owner of the XVS Bridge.\\n * @custom:access Controlled by AccessControlManager.\\n */\\n function transferBridgeOwnership(address newOwner_) external {\\n _checkAccessAllowed(\\\"transferBridgeOwnership(address)\\\");\\n ensureNonzeroAddress(newOwner_);\\n XVSBridge.transferOwnership(newOwner_);\\n }\\n\\n /**\\n * @notice Returns bool = true if srcAddress_ is trustedRemote corresponds to chainId_.\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n */\\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @dev Returns function name string associated with function signature.\\n */\\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\\n return functionRegistry[signature_];\\n }\\n\\n function bytesToAddress(bytes calldata b) private pure returns (address) {\\n return address(uint160(bytes20(b)));\\n }\\n}\\n\",\"keccak256\":\"0xa3f5c4bd52601bad0e8123b5e3c2abce8de730fe3b5cdc8d36ccef8d8de76c31\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/interfaces/IXVSProxyOFT.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/**\\n * @title IXVSProxyOFT\\n * @author Venus\\n * @notice Interface implemented by `XVSProxyOFT`.\\n */\\ninterface IXVSProxyOFT {\\n function transferOwnership(address addr) external;\\n\\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\\n\\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\\n}\\n\",\"keccak256\":\"0x854518f3e4c2270ca52184e63dc1f9d27f2893388216ee6153e6ab8cf2d7c960\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b50604051620016f0380380620016f0833981016040819052620000349162000149565b6200003f816200005d565b6001600160a01b0381166080526200005662000088565b506200017b565b6001600160a01b03811662000085576040516342bcdf7f60e11b815260040160405180910390fd5b50565b600054610100900460ff1615620000f55760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000147576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200015c57600080fd5b81516001600160a01b03811681146200017457600080fd5b9392505050565b60805161153d620001b3600039600081816101610152818161026c015281816105d6015281816106c00152610b3e015261153d6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf31461031b578063c4d66de81461032c578063e30c39781461033f578063f2fde38b14610350576100ea565b806379ba5097146102ef5780638da5cb5b146102f7578063a6c3d16514610308576100ea565b80633d8b38f6116100c85780633d8b38f6146102a65780633f90b540146102c95780634bb7453e146102dc578063715018a61461023c576100ea565b80630e32cb8614610229578063180d295c1461023e57806327a020ef14610267575b600036606060006101066000356001600160e01b031916610363565b905080516000036101535760405162461bcd60e51b8152602060048201526012602482015271119d5b98dd1a5bdb881b9bdd08199bdd5b9960721b60448201526064015b60405180910390fd5b61015c81610410565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168686604051610199929190611088565b6000604051808303816000865af19150503d80600081146101d6576040519150601f19603f3d011682016040523d82523d6000602084013e6101db565b606091505b50915091508161021b5760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014a565b805195506020019350505050f35b61023c610237366004611098565b6104ae565b005b61025161024c3660046110c8565b6104c2565b60405161025e919061113f565b60405180910390f35b61028e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161025e565b6102b96102b4366004611152565b61055c565b604051901515815260200161025e565b61023c6102d7366004611098565b61065a565b61023c6102ea36600461122a565b61071f565b61023c610a33565b6033546001600160a01b031661028e565b61023c610316366004611152565b610aaa565b6097546001600160a01b031661028e565b61023c61033a366004611098565b610bae565b6065546001600160a01b031661028e565b61023c61035e366004611098565b610cca565b6001600160e01b03198116600090815260c96020526040902080546060919061038b90611296565b80601f01602080910402602001604051908101604052809291908181526020018280546103b790611296565b80156104045780601f106103d957610100808354040283529160200191610404565b820191906000526020600020905b8154815290600101906020018083116103e757829003601f168201915b50505050509050919050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab9061044390339086906004016112d0565b602060405180830381865afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104849190611302565b9050806104aa57333083604051634a3fa29360e01b815260040161014a9392919061131f565b5050565b6104b6610d3b565b6104bf81610d95565b50565b60c960205260009081526040902080546104db90611296565b80601f016020809104026020016040519081016040528092919081815260200182805461050790611296565b80156105545780601f1061052957610100808354040283529160200191610554565b820191906000526020600020905b81548152906001019060200180831161053757829003601f168201915b505050505081565b60008361ffff166000036105ad5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b6105bf6105ba8484610e53565b610e69565b604051631ec59c7b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633d8b38f69061060f9087908790879060040161137d565b6020604051808303816000875af115801561062e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106529190611302565b949350505050565b6106986040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610410565b6106a181610e69565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b15801561070457600080fd5b505af1158015610718573d6000803e3d6000fd5b5050505050565b610727610d3b565b828181146107865760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d65206044820152650d8cadccee8d60d31b606482015260840161014a565b60005b81811015610a295760008686838181106107a5576107a561139b565b90506020028101906107b791906113b1565b6040516107c5929190611088565b60408051918290039091206001600160e01b03198116600090815260c96020529182208054919350906107f790611296565b80601f016020809104026020016040519081016040528092919081815260200182805461082390611296565b80156108705780601f1061084557610100808354040283529160200191610870565b820191906000526020600020905b81548152906001019060200180831161085357829003601f168201915b505050505090508585848181106108895761088961139b565b905060200201602081019061089e91906113f8565b80156108a957508051155b1561095a578787848181106108c0576108c061139b565b90506020028101906108d291906113b1565b6001600160e01b03198416600090815260c9602052604090206108f6929091610fb9565b507f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa88888581811061092a5761092a61139b565b905060200281019061093c91906113b1565b600160405161094d93929190611415565b60405180910390a1610a14565b85858481811061096c5761096c61139b565b905060200201602081019061098191906113f8565b15801561098e5750805115155b15610a14576001600160e01b03198216600090815260c9602052604081206109b59161103d565b7f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109e8576109e861139b565b90506020028101906109fa91906113b1565b6000604051610a0b93929190611415565b60405180910390a15b50508080610a219061143b565b915050610789565b505050505050565b565b60655433906001600160a01b03168114610aa15760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014a565b6104bf81610e90565b610acb6040518060600160405280602581526020016114e360259139610410565b8261ffff16600003610b1a5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b610b276105ba8383610e53565b60405163a6c3d16560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610b779086908690869060040161137d565b600060405180830381600087803b158015610b9157600080fd5b505af1158015610ba5573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610bce5750600054600160ff909116105b80610be85750303b158015610be8575060005460ff166001145b610c4b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014a565b6000805460ff191660011790558015610c6e576000805461ff0019166101001790555b610c7782610e69565b610c8082610ea9565b80156104aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610cd2610d3b565b606580546001600160a01b0383166001600160a01b03199091168117909155610d036033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6033546001600160a01b03163314610a315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014a565b6001600160a01b038116610df95760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014a565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610cbe565b6000610e5f8284611462565b60601c9392505050565b6001600160a01b0381166104bf576040516342bcdf7f60e11b815260040160405180910390fd5b606580546001600160a01b03191690556104bf81610ee1565b600054610100900460ff16610ed05760405162461bcd60e51b815260040161014a90611497565b610ed8610f33565b6104bf81610f62565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610f5a5760405162461bcd60e51b815260040161014a90611497565b610a31610f89565b600054610100900460ff166104b65760405162461bcd60e51b815260040161014a90611497565b600054610100900460ff16610fb05760405162461bcd60e51b815260040161014a90611497565b610a3133610e90565b828054610fc590611296565b90600052602060002090601f016020900481019282610fe7576000855561102d565b82601f106110005782800160ff1982351617855561102d565b8280016001018555821561102d579182015b8281111561102d578235825591602001919060010190611012565b50611039929150611073565b5090565b50805461104990611296565b6000825580601f10611059575050565b601f0160209004906000526020600020908101906104bf91905b5b808211156110395760008155600101611074565b8183823760009101908152919050565b6000602082840312156110aa57600080fd5b81356001600160a01b03811681146110c157600080fd5b9392505050565b6000602082840312156110da57600080fd5b81356001600160e01b0319811681146110c157600080fd5b6000815180845260005b81811015611118576020818501810151868301820152016110fc565b8181111561112a576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006110c160208301846110f2565b60008060006040848603121561116757600080fd5b833561ffff8116811461117957600080fd5b9250602084013567ffffffffffffffff8082111561119657600080fd5b818601915086601f8301126111aa57600080fd5b8135818111156111b957600080fd5b8760208285010111156111cb57600080fd5b6020830194508093505050509250925092565b60008083601f8401126111f057600080fd5b50813567ffffffffffffffff81111561120857600080fd5b6020830191508360208260051b850101111561122357600080fd5b9250929050565b6000806000806040858703121561124057600080fd5b843567ffffffffffffffff8082111561125857600080fd5b611264888389016111de565b9096509450602087013591508082111561127d57600080fd5b5061128a878288016111de565b95989497509550505050565b600181811c908216806112aa57607f821691505b6020821081036112ca57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0383168152604060208201819052600090610652908301846110f2565b80151581146104bf57600080fd5b60006020828403121561131457600080fd5b81516110c1816112f4565b6001600160a01b0384811682528316602082015260606040820181905260009061134b908301846110f2565b95945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061134b604083018486611354565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126113c857600080fd5b83018035915067ffffffffffffffff8211156113e357600080fd5b60200191503681900382131561122357600080fd5b60006020828403121561140a57600080fd5b81356110c1816112f4565b604081526000611429604083018587611354565b90508215156020830152949350505050565b60006001820161145b57634e487b7160e01b600052601160045260246000fd5b5060010190565b6bffffffffffffffffffffffff19813581811691601485101561148f5780818660140360031b1b83161692505b505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a264697066735822122014d6939b50c25980eb5fa59f72f30eb784faf785cd7219c963048ad91aa4c1ad64736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf31461031b578063c4d66de81461032c578063e30c39781461033f578063f2fde38b14610350576100ea565b806379ba5097146102ef5780638da5cb5b146102f7578063a6c3d16514610308576100ea565b80633d8b38f6116100c85780633d8b38f6146102a65780633f90b540146102c95780634bb7453e146102dc578063715018a61461023c576100ea565b80630e32cb8614610229578063180d295c1461023e57806327a020ef14610267575b600036606060006101066000356001600160e01b031916610363565b905080516000036101535760405162461bcd60e51b8152602060048201526012602482015271119d5b98dd1a5bdb881b9bdd08199bdd5b9960721b60448201526064015b60405180910390fd5b61015c81610410565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168686604051610199929190611088565b6000604051808303816000865af19150503d80600081146101d6576040519150601f19603f3d011682016040523d82523d6000602084013e6101db565b606091505b50915091508161021b5760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014a565b805195506020019350505050f35b61023c610237366004611098565b6104ae565b005b61025161024c3660046110c8565b6104c2565b60405161025e919061113f565b60405180910390f35b61028e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161025e565b6102b96102b4366004611152565b61055c565b604051901515815260200161025e565b61023c6102d7366004611098565b61065a565b61023c6102ea36600461122a565b61071f565b61023c610a33565b6033546001600160a01b031661028e565b61023c610316366004611152565b610aaa565b6097546001600160a01b031661028e565b61023c61033a366004611098565b610bae565b6065546001600160a01b031661028e565b61023c61035e366004611098565b610cca565b6001600160e01b03198116600090815260c96020526040902080546060919061038b90611296565b80601f01602080910402602001604051908101604052809291908181526020018280546103b790611296565b80156104045780601f106103d957610100808354040283529160200191610404565b820191906000526020600020905b8154815290600101906020018083116103e757829003601f168201915b50505050509050919050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab9061044390339086906004016112d0565b602060405180830381865afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104849190611302565b9050806104aa57333083604051634a3fa29360e01b815260040161014a9392919061131f565b5050565b6104b6610d3b565b6104bf81610d95565b50565b60c960205260009081526040902080546104db90611296565b80601f016020809104026020016040519081016040528092919081815260200182805461050790611296565b80156105545780601f1061052957610100808354040283529160200191610554565b820191906000526020600020905b81548152906001019060200180831161053757829003601f168201915b505050505081565b60008361ffff166000036105ad5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b6105bf6105ba8484610e53565b610e69565b604051631ec59c7b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633d8b38f69061060f9087908790879060040161137d565b6020604051808303816000875af115801561062e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106529190611302565b949350505050565b6106986040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610410565b6106a181610e69565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b15801561070457600080fd5b505af1158015610718573d6000803e3d6000fd5b5050505050565b610727610d3b565b828181146107865760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d65206044820152650d8cadccee8d60d31b606482015260840161014a565b60005b81811015610a295760008686838181106107a5576107a561139b565b90506020028101906107b791906113b1565b6040516107c5929190611088565b60408051918290039091206001600160e01b03198116600090815260c96020529182208054919350906107f790611296565b80601f016020809104026020016040519081016040528092919081815260200182805461082390611296565b80156108705780601f1061084557610100808354040283529160200191610870565b820191906000526020600020905b81548152906001019060200180831161085357829003601f168201915b505050505090508585848181106108895761088961139b565b905060200201602081019061089e91906113f8565b80156108a957508051155b1561095a578787848181106108c0576108c061139b565b90506020028101906108d291906113b1565b6001600160e01b03198416600090815260c9602052604090206108f6929091610fb9565b507f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa88888581811061092a5761092a61139b565b905060200281019061093c91906113b1565b600160405161094d93929190611415565b60405180910390a1610a14565b85858481811061096c5761096c61139b565b905060200201602081019061098191906113f8565b15801561098e5750805115155b15610a14576001600160e01b03198216600090815260c9602052604081206109b59161103d565b7f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109e8576109e861139b565b90506020028101906109fa91906113b1565b6000604051610a0b93929190611415565b60405180910390a15b50508080610a219061143b565b915050610789565b505050505050565b565b60655433906001600160a01b03168114610aa15760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014a565b6104bf81610e90565b610acb6040518060600160405280602581526020016114e360259139610410565b8261ffff16600003610b1a5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b610b276105ba8383610e53565b60405163a6c3d16560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610b779086908690869060040161137d565b600060405180830381600087803b158015610b9157600080fd5b505af1158015610ba5573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610bce5750600054600160ff909116105b80610be85750303b158015610be8575060005460ff166001145b610c4b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014a565b6000805460ff191660011790558015610c6e576000805461ff0019166101001790555b610c7782610e69565b610c8082610ea9565b80156104aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610cd2610d3b565b606580546001600160a01b0383166001600160a01b03199091168117909155610d036033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6033546001600160a01b03163314610a315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014a565b6001600160a01b038116610df95760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014a565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610cbe565b6000610e5f8284611462565b60601c9392505050565b6001600160a01b0381166104bf576040516342bcdf7f60e11b815260040160405180910390fd5b606580546001600160a01b03191690556104bf81610ee1565b600054610100900460ff16610ed05760405162461bcd60e51b815260040161014a90611497565b610ed8610f33565b6104bf81610f62565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610f5a5760405162461bcd60e51b815260040161014a90611497565b610a31610f89565b600054610100900460ff166104b65760405162461bcd60e51b815260040161014a90611497565b600054610100900460ff16610fb05760405162461bcd60e51b815260040161014a90611497565b610a3133610e90565b828054610fc590611296565b90600052602060002090601f016020900481019282610fe7576000855561102d565b82601f106110005782800160ff1982351617855561102d565b8280016001018555821561102d579182015b8281111561102d578235825591602001919060010190611012565b50611039929150611073565b5090565b50805461104990611296565b6000825580601f10611059575050565b601f0160209004906000526020600020908101906104bf91905b5b808211156110395760008155600101611074565b8183823760009101908152919050565b6000602082840312156110aa57600080fd5b81356001600160a01b03811681146110c157600080fd5b9392505050565b6000602082840312156110da57600080fd5b81356001600160e01b0319811681146110c157600080fd5b6000815180845260005b81811015611118576020818501810151868301820152016110fc565b8181111561112a576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006110c160208301846110f2565b60008060006040848603121561116757600080fd5b833561ffff8116811461117957600080fd5b9250602084013567ffffffffffffffff8082111561119657600080fd5b818601915086601f8301126111aa57600080fd5b8135818111156111b957600080fd5b8760208285010111156111cb57600080fd5b6020830194508093505050509250925092565b60008083601f8401126111f057600080fd5b50813567ffffffffffffffff81111561120857600080fd5b6020830191508360208260051b850101111561122357600080fd5b9250929050565b6000806000806040858703121561124057600080fd5b843567ffffffffffffffff8082111561125857600080fd5b611264888389016111de565b9096509450602087013591508082111561127d57600080fd5b5061128a878288016111de565b95989497509550505050565b600181811c908216806112aa57607f821691505b6020821081036112ca57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0383168152604060208201819052600090610652908301846110f2565b80151581146104bf57600080fd5b60006020828403121561131457600080fd5b81516110c1816112f4565b6001600160a01b0384811682528316602082015260606040820181905260009061134b908301846110f2565b95945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061134b604083018486611354565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126113c857600080fd5b83018035915067ffffffffffffffff8211156113e357600080fd5b60200191503681900382131561122357600080fd5b60006020828403121561140a57600080fd5b81356110c1816112f4565b604081526000611429604083018587611354565b90508215156020830152949350505050565b60006001820161145b57634e487b7160e01b600052601160045260246000fd5b5060010190565b6bffffffffffffffffffffffff19813581811691601485101561148f5780818660140360031b1b83161692505b505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a264697066735822122014d6939b50c25980eb5fa59f72f30eb784faf785cd7219c963048ad91aa4c1ad64736f6c634300080d0033", "devdoc": { "author": "Venus", "kind": "dev", @@ -416,10 +416,9 @@ "details": "Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner." }, "upsertSignature(string[],bool[])": { - "custom:access": "Only owner.", "params": { - "remove_": "Boolean to specify whether to remove the function from registry mapping.", - "signatures_": "Array of function names string." + "active_": "bool value, should be true to add function.", + "signatures_": "Function signature to be added or removed." } } }, @@ -470,7 +469,7 @@ "notice": "This function transfer the ownership of the bridge from this contract to new owner." }, "upsertSignature(string[],bool[])": { - "notice": "Function to update the function registry." + "notice": "A registry of functions that are allowed to be executed from proposals" } }, "notice": "The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT. It maintains a registry of function signatures and names, allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.", @@ -479,7 +478,7 @@ "storageLayout": { "storage": [ { - "astId": 4452, + "astId": 244, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_initialized", "offset": 0, @@ -487,7 +486,7 @@ "type": "t_uint8" }, { - "astId": 4455, + "astId": 247, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_initializing", "offset": 1, @@ -495,7 +494,7 @@ "type": "t_bool" }, { - "astId": 4985, + "astId": 777, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "__gap", "offset": 0, @@ -503,7 +502,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 4324, + "astId": 116, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_owner", "offset": 0, @@ -511,7 +510,7 @@ "type": "t_address" }, { - "astId": 4444, + "astId": 236, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "__gap", "offset": 0, @@ -519,7 +518,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 4233, + "astId": 25, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_pendingOwner", "offset": 0, @@ -527,7 +526,7 @@ "type": "t_address" }, { - "astId": 4312, + "astId": 104, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "__gap", "offset": 0, @@ -535,15 +534,15 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 8479, + "astId": 1798, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_accessControlManager", "offset": 0, "slot": "151", - "type": "t_contract(IAccessControlManagerV8)8664" + "type": "t_contract(IAccessControlManagerV8)1983" }, { - "astId": 8484, + "astId": 1803, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "__gap", "offset": 0, @@ -551,7 +550,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 10157, + "astId": 2026, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "functionRegistry", "offset": 0, @@ -587,7 +586,7 @@ "label": "bytes4", "numberOfBytes": "4" }, - "t_contract(IAccessControlManagerV8)8664": { + "t_contract(IAccessControlManagerV8)1983": { "encoding": "inplace", "label": "contract IAccessControlManagerV8", "numberOfBytes": "20" diff --git a/deployments/bsctestnet/XVSBridgeAdmin_Proxy.json b/deployments/bsctestnet/XVSBridgeAdmin_Proxy.json index 1123f98..51e9713 100644 --- a/deployments/bsctestnet/XVSBridgeAdmin_Proxy.json +++ b/deployments/bsctestnet/XVSBridgeAdmin_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", + "address": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", "abi": [ { "inputs": [ @@ -146,83 +146,83 @@ "type": "receive" } ], - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", "receipt": { "to": null, "from": "0x03862dFa5D0be8F64509C001cb8C6188194469DF", - "contractAddress": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", - "transactionIndex": 3, + "contractAddress": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", + "transactionIndex": 2, "gasUsed": "796607", - "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000800080000000000000000000400000000000000000000000000000000000000000000080000000000000800000000000001000000000000000000400000000000400800000000040000000000000000020000000000000000200040000000000000400000400400000010020000000000000000000000000000001000000000800000000000000000000000000", - "blockHash": "0x66f816dae7676767e70d3682759941133d29352b0b06b74f9a52830dd1ccea47", - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000002000000000000000000000000000000000000000000000000000008000000000000000000000000000000002000001000000000000000000000000000001000000020000000000000000000800000000800000000000000000000000400000000000000000000100000000000000000000000080000000000000800000000000001000000000000000000400000000000000880000000000000000000000000020000000000000000200040000000000000400000000c00000000020000000000000000000000000000000000000000800200000000000000000000000", + "blockHash": "0x157207a05a6692d53e40eaba4b7cd6a69ad3b51e21eccda71f2fcec636349ca4", + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", "logs": [ { - "transactionIndex": 3, - "blockNumber": 34907914, - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", - "address": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", + "transactionIndex": 2, + "blockNumber": 35486114, + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", + "address": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000825bc313102cb102f5f0d8ebca19913dd17592db" + "0x0000000000000000000000008a4c5090d972c83c44e8132a1fc2ff3e948e9a71" ], "data": "0x", - "logIndex": 2, - "blockHash": "0x66f816dae7676767e70d3682759941133d29352b0b06b74f9a52830dd1ccea47" + "logIndex": 0, + "blockHash": "0x157207a05a6692d53e40eaba4b7cd6a69ad3b51e21eccda71f2fcec636349ca4" }, { - "transactionIndex": 3, - "blockNumber": 34907914, - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", - "address": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", + "transactionIndex": 2, + "blockNumber": 35486114, + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", + "address": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x00000000000000000000000003862dfa5d0be8f64509c001cb8c6188194469df" ], "data": "0x", - "logIndex": 3, - "blockHash": "0x66f816dae7676767e70d3682759941133d29352b0b06b74f9a52830dd1ccea47" + "logIndex": 1, + "blockHash": "0x157207a05a6692d53e40eaba4b7cd6a69ad3b51e21eccda71f2fcec636349ca4" }, { - "transactionIndex": 3, - "blockNumber": 34907914, - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", - "address": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", + "transactionIndex": 2, + "blockNumber": 35486114, + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", + "address": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045f8a08f534f34a97187626e05d4b6648eeaa9aa", - "logIndex": 4, - "blockHash": "0x66f816dae7676767e70d3682759941133d29352b0b06b74f9a52830dd1ccea47" + "logIndex": 2, + "blockHash": "0x157207a05a6692d53e40eaba4b7cd6a69ad3b51e21eccda71f2fcec636349ca4" }, { - "transactionIndex": 3, - "blockNumber": 34907914, - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", - "address": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", + "transactionIndex": 2, + "blockNumber": 35486114, + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", + "address": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0x66f816dae7676767e70d3682759941133d29352b0b06b74f9a52830dd1ccea47" + "logIndex": 3, + "blockHash": "0x157207a05a6692d53e40eaba4b7cd6a69ad3b51e21eccda71f2fcec636349ca4" }, { - "transactionIndex": 3, - "blockNumber": 34907914, - "transactionHash": "0x2e37cd855f42a995de813f913caaf9e01cef69ede3b3137f4d434d9d2335d069", - "address": "0x021e15D34b1d0DFFf94f3F77f63e82F3523F47da", + "transactionIndex": 2, + "blockNumber": 35486114, + "transactionHash": "0x8ad916f861582381e1e03672b2cadb4001c97205bfbd605671134c610ea1cf0d", + "address": "0x5D08D49A2e43aC4c72C60754d1550BA12e846d66", "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043fd9f2dacb36853dbfba269a7539706e787cfce", - "logIndex": 6, - "blockHash": "0x66f816dae7676767e70d3682759941133d29352b0b06b74f9a52830dd1ccea47" + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ef480a5654b231ff7d80a0681f938f3db71a6ca6", + "logIndex": 4, + "blockHash": "0x157207a05a6692d53e40eaba4b7cd6a69ad3b51e21eccda71f2fcec636349ca4" } ], - "blockNumber": 34907914, - "cumulativeGasUsed": "955201", + "blockNumber": 35486114, + "cumulativeGasUsed": "848848", "status": 1, "byzantium": true }, "args": [ - "0x825bc313102Cb102F5F0D8eBca19913DD17592DB", - "0x43fd9F2DAcB36853dBfBa269A7539706e787cFce", + "0x8a4C5090d972C83C44E8132a1Fc2Ff3E948E9A71", + "0xef480a5654b231ff7d80A0681F938f3Db71a6Ca6", "0xc4d66de800000000000000000000000045f8a08f534f34a97187626e05d4b6648eeaa9aa" ], "numDeployments": 1, diff --git a/deployments/bsctestnet/XVSProxyOFTSrc.json b/deployments/bsctestnet/XVSProxyOFTSrc.json index aee4f16..b2566dd 100644 --- a/deployments/bsctestnet/XVSProxyOFTSrc.json +++ b/deployments/bsctestnet/XVSProxyOFTSrc.json @@ -1,5 +1,5 @@ { - "address": "0x19861D039284e2Cf09403Ab8124B064a791a79f2", + "address": "0x963cAbDC5bb51C1479ec94Df44DE2EC1a49439E3", "abi": [ { "inputs": [ @@ -107,6 +107,19 @@ "name": "FallbackWithdraw", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "innerToken", + "type": "address" + } + ], + "name": "InnerTokenAdded", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -1766,34 +1779,61 @@ "type": "function" } ], - "transactionHash": "0x435243e9b1b821164b683803ef2cd3a1ddf9ca751cfc282b1593852d21fd6948", + "transactionHash": "0x120d02e7553dee446e3e0526244692a8dde0f64dab084ae5a32a3108a0f3f883", "receipt": { "to": null, "from": "0x03862dFa5D0be8F64509C001cb8C6188194469DF", - "contractAddress": "0x19861D039284e2Cf09403Ab8124B064a791a79f2", - "transactionIndex": 0, - "gasUsed": "4547072", - "logsBloom": "0x00000000000000010000000000000000000000000000000000800000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000002000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000400000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0628f2879a24cf6af4d6f4940618b610a08d233110277d25862c0ff56c0c5f8b", - "transactionHash": "0x435243e9b1b821164b683803ef2cd3a1ddf9ca751cfc282b1593852d21fd6948", + "contractAddress": "0x963cAbDC5bb51C1479ec94Df44DE2EC1a49439E3", + "transactionIndex": 1, + "gasUsed": "4551459", + "logsBloom": "0x00000000000000001000008000000002000000000000000000800010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000008000000001000020000000000000000000000000000000020000000000000000000800000000000000000010000000000000400000000000000000000000000000000000000000000004000000000000000080000000081000000000000000100000000000000010000000040000000000020000000000000000000000000200000000000000000000000000400000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x8f292a86e48e6946327a4806f543fd5e6737ae868e6e1e682d3de3817453353b", + "transactionHash": "0x120d02e7553dee446e3e0526244692a8dde0f64dab084ae5a32a3108a0f3f883", "logs": [ { - "transactionIndex": 0, - "blockNumber": 34907908, - "transactionHash": "0x435243e9b1b821164b683803ef2cd3a1ddf9ca751cfc282b1593852d21fd6948", - "address": "0x19861D039284e2Cf09403Ab8124B064a791a79f2", + "transactionIndex": 1, + "blockNumber": 35486107, + "transactionHash": "0x120d02e7553dee446e3e0526244692a8dde0f64dab084ae5a32a3108a0f3f883", + "address": "0x963cAbDC5bb51C1479ec94Df44DE2EC1a49439E3", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x00000000000000000000000003862dfa5d0be8f64509c001cb8c6188194469df" ], "data": "0x", - "logIndex": 0, - "blockHash": "0x0628f2879a24cf6af4d6f4940618b610a08d233110277d25862c0ff56c0c5f8b" + "logIndex": 1, + "blockHash": "0x8f292a86e48e6946327a4806f543fd5e6737ae868e6e1e682d3de3817453353b" + }, + { + "transactionIndex": 1, + "blockNumber": 35486107, + "transactionHash": "0x120d02e7553dee446e3e0526244692a8dde0f64dab084ae5a32a3108a0f3f883", + "address": "0x963cAbDC5bb51C1479ec94Df44DE2EC1a49439E3", + "topics": [ + "0x0b673f021ff9a27bbe58f282908695869e130b3103029190387b83650806c2c3", + "0x000000000000000000000000b9e0e753630434d7863528cc73cb7ac638a7c8ff" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x8f292a86e48e6946327a4806f543fd5e6737ae868e6e1e682d3de3817453353b" + }, + { + "transactionIndex": 1, + "blockNumber": 35486107, + "transactionHash": "0x120d02e7553dee446e3e0526244692a8dde0f64dab084ae5a32a3108a0f3f883", + "address": "0x963cAbDC5bb51C1479ec94Df44DE2EC1a49439E3", + "topics": [ + "0x05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000003cd69251d04a28d887ac14cbe2e14c52f3d57823" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x8f292a86e48e6946327a4806f543fd5e6737ae868e6e1e682d3de3817453353b" } ], - "blockNumber": 34907908, - "cumulativeGasUsed": "4547072", + "blockNumber": 35486107, + "cumulativeGasUsed": "4587754", "status": 1, "byzantium": true }, @@ -1804,10 +1844,10 @@ "0x3cD69251D04A28d887Ac14cbe2E14c52F3D57823" ], "numDeployments": 1, - "solcInputHash": "f72aa0ed4b9c23ba2646d0ce7bdf9a7a", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress_\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"sharedDecimals_\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"lzEndpoint_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracle_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"CallOFTReceivedSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"name\":\"DropFailedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FallbackWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"NonContractAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOracle\",\"type\":\"address\"}],\"name\":\"OracleChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ReceiveFromChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_payloadHash\",\"type\":\"bytes32\"}],\"name\":\"RetryMessageSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"SendToChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxDailyLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxDailyReceiveLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxSingleReceiveTransactionLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxSingleTransactionLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minDstGas\",\"type\":\"uint256\"}],\"name\":\"SetMinDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"precrime\",\"type\":\"address\"}],\"name\":\"SetPrecrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemoteAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isWhitelist\",\"type\":\"bool\"}],\"name\":\"SetWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"}],\"name\":\"TrustedRemoteRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_PAYLOAD_SIZE_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NO_EXTRA_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND_AND_CALL\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"_from\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasForCall\",\"type\":\"uint256\"}],\"name\":\"callOnOFTReceived\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourReceiveWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourReceived\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourTransferred\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxDailyLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxDailyReceiveLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxSingleReceiveTransactionLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxSingleTransactionLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"circulatingSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"creditedPackets\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"srcChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"srcAddress_\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"nonce_\",\"type\":\"uint64\"}],\"name\":\"dropFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_dstGasForCall\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendAndCallFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"failedMessages\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"fallbackWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"forceResumeReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getTrustedRemoteAddress\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lzEndpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"lzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"minDstGasLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"nonblockingLzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"internalType\":\"contract ResilientOracleInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"outboundAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"payloadSizeLimitLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"precrime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"}],\"name\":\"removeTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_dstGasForCall\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"_callParams\",\"type\":\"tuple\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"_callParams\",\"type\":\"tuple\"}],\"name\":\"sendFrom\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_config\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyReceiveLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxSingleReceiveTransactionLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxSingleTransactionLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_packetType\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_minGas\",\"type\":\"uint256\"}],\"name\":\"setMinDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oracleAddress_\",\"type\":\"address\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"}],\"name\":\"setPayloadSizeLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_precrime\",\"type\":\"address\"}],\"name\":\"setPrecrime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setReceiveVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setSendVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"val_\",\"type\":\"bool\"}],\"name\":\"setWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sharedDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"trustedRemoteLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"dropFailedMessage(uint16,bytes,uint64)\":{\"params\":{\"nonce_\":\"Nonce_ of the transaction\",\"srcAddress_\":\"Address of source followed by current bridge address\",\"srcChainId_\":\"Chain id of source\"}},\"estimateSendFee(uint16,bytes32,uint256,bool,bytes)\":{\"details\":\"estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _amount - amount of the tokens to transfer _useZro - indicates to use zro to pay L0 fees _adapterParam - flexible bytes array to indicate messaging adapter services in L0\"},\"fallbackWithdraw(address,uint256)\":{\"params\":{\"amount_\":\"The amount of withdrawal\",\"to_\":\"The address to withdraw to\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"custom:access\":\"Only owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"removeTrustedRemote(uint16)\":{\"params\":{\"remoteChainId_\":\"The chain's id corresponds to setting the trusted remote to empty.\"}},\"sendFrom(address,uint16,bytes32,uint256,(address,address,bytes))\":{\"details\":\"send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from` `_from` the owner of token `_dstChainId` the destination chain identifier `_toAddress` can be any size depending on the `dstChainId`. `_amount` the quantity of tokens in wei `_refundAddress` the address LayerZero refunds if too much message fee is sent `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services\"},\"setMaxDailyLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxDailyLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"Destination chain id.\",\"limit_\":\"Amount in USD(scaled with 18 decimals).\"}},\"setMaxDailyReceiveLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"The destination chain ID.\",\"limit_\":\"The new maximum daily limit in USD(scaled with 18 decimals).\"}},\"setMaxSingleReceiveTransactionLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"The destination chain ID.\",\"limit_\":\"The new maximum limit in USD(scaled with 18 decimals).\"}},\"setMaxSingleTransactionLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"Destination chain id.\",\"limit_\":\"Amount in USD(scaled with 18 decimals).\"}},\"setOracle(address)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits OracleChanged with old and new oracle address.\",\"details\":\"Reverts if the new address is zero.\",\"params\":{\"oracleAddress_\":\"The new address of the ResilientOracle contract.\"}},\"setWhitelist(address,bool)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setWhitelist.\",\"params\":{\"user_\":\"Adress to be add in whitelist.\",\"val_\":\"Boolean to be set (true for user_ address is whitelisted).\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"custom:access\":\"Only owner.\"}},\"title\":\"XVSProxyOFTSrc\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"DropFailedMessage(uint16,bytes,uint64)\":{\"notice\":\"Emits when stored message dropped without successfull retrying.\"},\"FallbackWithdraw(address,uint256)\":{\"notice\":\"Emits when locked token released manually by owner.\"},\"OracleChanged(address,address)\":{\"notice\":\"Event emitted when oracle is modified.\"},\"SetMaxDailyLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit of transactions from local chain is modified.\"},\"SetMaxDailyReceiveLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\"},\"SetMaxSingleReceiveTransactionLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum limit for a single receive transaction from remote chain is modified.\"},\"SetMaxSingleTransactionLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum limit for a single transaction from local chain is modified.\"},\"SetWhitelist(address,bool)\":{\"notice\":\"Emmited when address is added to whitelist.\"},\"TrustedRemoteRemoved(uint16)\":{\"notice\":\"Event emitted when trusted remote sets to empty.\"}},\"kind\":\"user\",\"methods\":{\"chainIdToLast24HourReceiveWindowStart(uint16)\":{\"notice\":\"Timestamp when the last 24-hour window started from remote chain.\"},\"chainIdToLast24HourReceived(uint16)\":{\"notice\":\"Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\"},\"chainIdToLast24HourTransferred(uint16)\":{\"notice\":\"Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\"},\"chainIdToLast24HourWindowStart(uint16)\":{\"notice\":\"Timestamp when the last 24-hour window started from local chain.\"},\"chainIdToMaxDailyLimit(uint16)\":{\"notice\":\"Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\"},\"chainIdToMaxDailyReceiveLimit(uint16)\":{\"notice\":\"Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\"},\"chainIdToMaxSingleReceiveTransactionLimit(uint16)\":{\"notice\":\"Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\"},\"chainIdToMaxSingleTransactionLimit(uint16)\":{\"notice\":\"Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\"},\"circulatingSupply()\":{\"notice\":\"Returns the total circulating supply of the token on the source chain i.e (total supply - locked in this contract).\"},\"dropFailedMessage(uint16,bytes,uint64)\":{\"notice\":\"Clear failed messages from the storage.\"},\"fallbackWithdraw(address,uint256)\":{\"notice\":\"Only call it when there is no way to recover the failed message. `dropFailedMessage` must be called first if transaction is from remote->local chain to avoid double spending.\"},\"oracle()\":{\"notice\":\"The address of ResilientOracle contract wrapped in its interface.\"},\"outboundAmount()\":{\"notice\":\"total amount is transferred from this chain to other chains.\"},\"pause()\":{\"notice\":\"Triggers stopped state of the bridge.\"},\"removeTrustedRemote(uint16)\":{\"notice\":\"Remove trusted remote from storage.\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening.\"},\"setMaxDailyLimit(uint16,uint256)\":{\"notice\":\"Sets the limit of daily (24 Hour) transactions amount.\"},\"setMaxDailyReceiveLimit(uint16,uint256)\":{\"notice\":\"Sets the maximum daily limit for receiving transactions.\"},\"setMaxSingleReceiveTransactionLimit(uint16,uint256)\":{\"notice\":\"Sets the maximum limit for a single receive transaction.\"},\"setMaxSingleTransactionLimit(uint16,uint256)\":{\"notice\":\"Sets the limit of single transaction amount.\"},\"setOracle(address)\":{\"notice\":\"Set the address of the ResilientOracle contract.\"},\"setWhitelist(address,bool)\":{\"notice\":\"Sets the whitelist address to skip checks on transaction limit.\"},\"token()\":{\"notice\":\"Return's the address of the inner token of this bridge.\"},\"unpause()\":{\"notice\":\"Triggers resume state of the bridge.\"},\"whitelist(address)\":{\"notice\":\"Address on which cap check and bound limit is not appicable.\"}},\"notice\":\"XVSProxyOFTSrc contract serves as a crucial component for cross-chain token transactions, focusing on the source side of these transactions. It monitors the total amount transferred to other chains, ensuring it complies with defined limits, and provides functions for transferring tokens while maintaining control over the circulating supply on the source chain.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/XVSProxyOFTSrc.sol\":\"XVSProxyOFTSrc\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@layerzerolabs/solidity-examples/contracts/libraries/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\n/*\\n * @title Solidity Bytes Arrays Utils\\n * @author Gon\\u00e7alo S\\u00e1 \\n *\\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\\n */\\npragma solidity >=0.8.0 <0.9.0;\\n\\nlibrary BytesLib {\\n function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(\\n 0x40,\\n and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n )\\n )\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(and(fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00), and(mload(mc), mask)))\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint _start,\\n uint _length\\n ) internal pure returns (bytes memory) {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) {\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint _start) internal pure returns (uint8) {\\n require(_bytes.length >= _start + 1, \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint16(bytes memory _bytes, uint _start) internal pure returns (uint16) {\\n require(_bytes.length >= _start + 2, \\\"toUint16_outOfBounds\\\");\\n uint16 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x2), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint32(bytes memory _bytes, uint _start) internal pure returns (uint32) {\\n require(_bytes.length >= _start + 4, \\\"toUint32_outOfBounds\\\");\\n uint32 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x4), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint64(bytes memory _bytes, uint _start) internal pure returns (uint64) {\\n require(_bytes.length >= _start + 8, \\\"toUint64_outOfBounds\\\");\\n uint64 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x8), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint96(bytes memory _bytes, uint _start) internal pure returns (uint96) {\\n require(_bytes.length >= _start + 12, \\\"toUint96_outOfBounds\\\");\\n uint96 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0xc), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint128(bytes memory _bytes, uint _start) internal pure returns (uint128) {\\n require(_bytes.length >= _start + 16, \\\"toUint128_outOfBounds\\\");\\n uint128 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x10), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint256(bytes memory _bytes, uint _start) internal pure returns (uint) {\\n require(_bytes.length >= _start + 32, \\\"toUint256_outOfBounds\\\");\\n uint tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toBytes32(bytes memory _bytes, uint _start) internal pure returns (bytes32) {\\n require(_bytes.length >= _start + 32, \\\"toBytes32_outOfBounds\\\");\\n bytes32 tempBytes32;\\n\\n assembly {\\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempBytes32;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n for {\\n\\n } eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n}\\n\",\"keccak256\":\"0x7e64cccdf22a03f513d94960f2145dd801fb5ec88d971de079b5186a9f5e93c4\",\"license\":\"Unlicense\"},\"@layerzerolabs/solidity-examples/contracts/libraries/ExcessivelySafeCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT OR Apache-2.0\\npragma solidity >=0.7.6;\\n\\nlibrary ExcessivelySafeCall {\\n uint constant LOW_28_MASK = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeCall(\\n address _target,\\n uint _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal returns (bool, bytes memory) {\\n // set up for assembly call\\n uint _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := call(\\n _gas, // gas\\n _target, // recipient\\n 0, // ether value\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeStaticCall(\\n address _target,\\n uint _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal view returns (bool, bytes memory) {\\n // set up for assembly call\\n uint _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := staticcall(\\n _gas, // gas\\n _target, // recipient\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /**\\n * @notice Swaps function selectors in encoded contract calls\\n * @dev Allows reuse of encoded calldata for functions with identical\\n * argument types but different names. It simply swaps out the first 4 bytes\\n * for the new selector. This function modifies memory in place, and should\\n * only be used with caution.\\n * @param _newSelector The new 4-byte selector\\n * @param _buf The encoded contract args\\n */\\n function swapSelector(bytes4 _newSelector, bytes memory _buf) internal pure {\\n require(_buf.length >= 4);\\n uint _mask = LOW_28_MASK;\\n assembly {\\n // load the first word of\\n let _word := mload(add(_buf, 0x20))\\n // mask out the top 4 bytes\\n // /x\\n _word := and(_word, _mask)\\n _word := or(_newSelector, _word)\\n mstore(add(_buf, 0x20), _word)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd4e52af409b5ec80432292d86fb01906785eb78ac31da3bab4565aabcd6e3e56\",\"license\":\"MIT OR Apache-2.0\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/LzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"./interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"./interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\nimport \\\"./interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"../libraries/BytesLib.sol\\\";\\n\\n/*\\n * a generic LzReceiver implementation\\n */\\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using BytesLib for bytes;\\n\\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\\n uint public constant DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\\n\\n ILayerZeroEndpoint public immutable lzEndpoint;\\n mapping(uint16 => bytes) public trustedRemoteLookup;\\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\\n mapping(uint16 => uint) public payloadSizeLimitLookup;\\n address public precrime;\\n\\n event SetPrecrime(address precrime);\\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\\n\\n constructor(address _endpoint) {\\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public virtual override {\\n // lzReceive must be called by the endpoint for security\\n require(_msgSender() == address(lzEndpoint), \\\"LzApp: invalid endpoint caller\\\");\\n\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(\\n _srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote),\\n \\\"LzApp: invalid source sending contract\\\"\\n );\\n\\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\\n function _blockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual;\\n\\n function _lzSend(\\n uint16 _dstChainId,\\n bytes memory _payload,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams,\\n uint _nativeFee\\n ) internal virtual {\\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\\n require(trustedRemote.length != 0, \\\"LzApp: destination chain is not a trusted source\\\");\\n _checkPayloadSize(_dstChainId, _payload.length);\\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _checkGasLimit(\\n uint16 _dstChainId,\\n uint16 _type,\\n bytes memory _adapterParams,\\n uint _extraGas\\n ) internal view virtual {\\n uint providedGasLimit = _getGasLimit(_adapterParams);\\n uint minGasLimit = minDstGasLookup[_dstChainId][_type];\\n require(minGasLimit > 0, \\\"LzApp: minGasLimit not set\\\");\\n require(providedGasLimit >= minGasLimit + _extraGas, \\\"LzApp: gas limit is too low\\\");\\n }\\n\\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\\n require(_adapterParams.length >= 34, \\\"LzApp: invalid adapterParams\\\");\\n assembly {\\n gasLimit := mload(add(_adapterParams, 34))\\n }\\n }\\n\\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\\n if (payloadSizeLimit == 0) {\\n // use default if not set\\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\\n }\\n require(_payloadSize <= payloadSizeLimit, \\\"LzApp: payload size is too large\\\");\\n }\\n\\n //---------------------------UserApplication config----------------------------------------\\n function getConfig(\\n uint16 _version,\\n uint16 _chainId,\\n address,\\n uint _configType\\n ) external view returns (bytes memory) {\\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\\n }\\n\\n // generic config for LayerZero user Application\\n function setConfig(\\n uint16 _version,\\n uint16 _chainId,\\n uint _configType,\\n bytes calldata _config\\n ) external override onlyOwner {\\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\\n }\\n\\n function setSendVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setSendVersion(_version);\\n }\\n\\n function setReceiveVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setReceiveVersion(_version);\\n }\\n\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\\n }\\n\\n // _path = abi.encodePacked(remoteAddress, localAddress)\\n // this function set the trusted path for the cross-chain communication\\n function setTrustedRemote(uint16 _remoteChainId, bytes calldata _path) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = _path;\\n emit SetTrustedRemote(_remoteChainId, _path);\\n }\\n\\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\\n }\\n\\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\\n bytes memory path = trustedRemoteLookup[_remoteChainId];\\n require(path.length != 0, \\\"LzApp: no trusted path record\\\");\\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\\n }\\n\\n function setPrecrime(address _precrime) external onlyOwner {\\n precrime = _precrime;\\n emit SetPrecrime(_precrime);\\n }\\n\\n function setMinDstGas(\\n uint16 _dstChainId,\\n uint16 _packetType,\\n uint _minGas\\n ) external onlyOwner {\\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\\n }\\n\\n // if the size is 0, it means default size limit\\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\\n payloadSizeLimitLookup[_dstChainId] = _size;\\n }\\n\\n //--------------------------- VIEW FUNCTION ----------------------------------------\\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\\n return keccak256(trustedSource) == keccak256(_srcAddress);\\n }\\n}\\n\",\"keccak256\":\"0x309c994bdcf69ad63c6789694a28eb72a773e2d9db58fe572ab2b34a475972ce\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/NonblockingLzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LzApp.sol\\\";\\nimport \\\"../libraries/ExcessivelySafeCall.sol\\\";\\n\\n/*\\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\\n */\\nabstract contract NonblockingLzApp is LzApp {\\n using ExcessivelySafeCall for address;\\n\\n constructor(address _endpoint) LzApp(_endpoint) {}\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\\n\\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\\n\\n // overriding the virtual function in LzReceiver\\n function _blockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual override {\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\\n gasleft(),\\n 150,\\n abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload)\\n );\\n // try-catch all errors/exceptions\\n if (!success) {\\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\\n }\\n }\\n\\n function _storeFailedMessage(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload,\\n bytes memory _reason\\n ) internal virtual {\\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\\n }\\n\\n function nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public virtual {\\n // only internal transaction\\n require(_msgSender() == address(this), \\\"NonblockingLzApp: caller must be LzApp\\\");\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n //@notice override this function\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual;\\n\\n function retryMessage(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public payable virtual {\\n // assert there is message to retry\\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\\n require(payloadHash != bytes32(0), \\\"NonblockingLzApp: no stored message\\\");\\n require(keccak256(_payload) == payloadHash, \\\"NonblockingLzApp: invalid payload\\\");\\n // clear the stored message\\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\\n // execute the message. revert if it fails again\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\\n }\\n}\\n\",\"keccak256\":\"0x612ff1f2a158b7e64e873885b5ff08afa348998fd9005f384d555d643ba7968d\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(\\n uint16 _dstChainId,\\n bytes calldata _destination,\\n bytes calldata _payload,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes calldata _adapterParams\\n ) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n address _dstAddress,\\n uint64 _nonce,\\n uint _gasLimit,\\n bytes calldata _payload\\n ) external;\\n\\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(\\n uint16 _dstChainId,\\n address _userApplication,\\n bytes calldata _payload,\\n bool _payInZRO,\\n bytes calldata _adapterParam\\n ) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n bytes calldata _payload\\n ) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(\\n uint16 _version,\\n uint16 _chainId,\\n address _userApplication,\\n uint _configType\\n ) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xab7fcacc672251c850f00c0abd4100df9afcc4ad70b8d331a2fd4cb07acab9f4\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroReceiver {\\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\\n // @param _srcChainId - the source endpoint identifier\\n // @param _srcAddress - the source sending contract address from the source chain\\n // @param _nonce - the ordered message nonce\\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) external;\\n}\\n\",\"keccak256\":\"0xac1966c1229bd4dc36b6c69eeb94a537bd9aa2198d7623b9ba7f8f7dbe79bb4c\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(\\n uint16 _version,\\n uint16 _chainId,\\n uint _configType,\\n bytes calldata _config\\n ) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xb4df93aeb0fb46373a4fb728ad2603edc8b9a1577eee8d801768dc115bf96498\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OFTCoreV2.sol\\\";\\nimport \\\"./interfaces/IOFTV2.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nabstract contract BaseOFTV2 is OFTCoreV2, ERC165, IOFTV2 {\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) OFTCoreV2(_sharedDecimals, _lzEndpoint) {}\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function sendFrom(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n LzCallParams calldata _callParams\\n ) public payable virtual override {\\n _send(_from, _dstChainId, _toAddress, _amount, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);\\n }\\n\\n function sendAndCall(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes calldata _payload,\\n uint64 _dstGasForCall,\\n LzCallParams calldata _callParams\\n ) public payable virtual override {\\n _sendAndCall(\\n _from,\\n _dstChainId,\\n _toAddress,\\n _amount,\\n _payload,\\n _dstGasForCall,\\n _callParams.refundAddress,\\n _callParams.zroPaymentAddress,\\n _callParams.adapterParams\\n );\\n }\\n\\n /************************************************************************\\n * public view functions\\n ************************************************************************/\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IOFTV2).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n function estimateSendFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bool _useZro,\\n bytes calldata _adapterParams\\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendFee(_dstChainId, _toAddress, _amount, _useZro, _adapterParams);\\n }\\n\\n function estimateSendAndCallFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes calldata _payload,\\n uint64 _dstGasForCall,\\n bool _useZro,\\n bytes calldata _adapterParams\\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendAndCallFee(_dstChainId, _toAddress, _amount, _payload, _dstGasForCall, _useZro, _adapterParams);\\n }\\n\\n function circulatingSupply() public view virtual override returns (uint);\\n\\n function token() public view virtual override returns (address);\\n}\\n\",\"keccak256\":\"0x59d2d32dd14a4f58232b126a7d69608a85f82137bd56d8ce0fc28ff646cba943\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTCoreV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../../lzApp/NonblockingLzApp.sol\\\";\\nimport \\\"../../../libraries/ExcessivelySafeCall.sol\\\";\\nimport \\\"./interfaces/ICommonOFT.sol\\\";\\nimport \\\"./interfaces/IOFTReceiverV2.sol\\\";\\n\\nabstract contract OFTCoreV2 is NonblockingLzApp {\\n using BytesLib for bytes;\\n using ExcessivelySafeCall for address;\\n\\n uint public constant NO_EXTRA_GAS = 0;\\n\\n // packet type\\n uint8 public constant PT_SEND = 0;\\n uint8 public constant PT_SEND_AND_CALL = 1;\\n\\n uint8 public immutable sharedDecimals;\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bool))) public creditedPackets;\\n\\n /**\\n * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\\n * `_nonce` is the outbound nonce\\n */\\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes32 indexed _toAddress, uint _amount);\\n\\n /**\\n * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\\n * `_nonce` is the inbound nonce.\\n */\\n event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\\n\\n event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\\n\\n event NonContractAddress(address _address);\\n\\n // _sharedDecimals should be the minimum decimals on all chains\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\\n sharedDecimals = _sharedDecimals;\\n }\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function callOnOFTReceived(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes32 _from,\\n address _to,\\n uint _amount,\\n bytes calldata _payload,\\n uint _gasForCall\\n ) public virtual {\\n require(_msgSender() == address(this), \\\"OFTCore: caller must be OFTCore\\\");\\n\\n // send\\n _amount = _transferFrom(address(this), _to, _amount);\\n emit ReceiveFromChain(_srcChainId, _to, _amount);\\n\\n // call\\n IOFTReceiverV2(_to).onOFTReceived{gas: _gasForCall}(_srcChainId, _srcAddress, _nonce, _from, _amount, _payload);\\n }\\n\\n /************************************************************************\\n * internal functions\\n ************************************************************************/\\n function _estimateSendFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bool _useZro,\\n bytes memory _adapterParams\\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendFrom()\\n bytes memory payload = _encodeSendPayload(_toAddress, _ld2sd(_amount));\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _estimateSendAndCallFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes memory _payload,\\n uint64 _dstGasForCall,\\n bool _useZro,\\n bytes memory _adapterParams\\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendAndCall()\\n bytes memory payload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(_amount), _payload, _dstGasForCall);\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual override {\\n uint8 packetType = _payload.toUint8(0);\\n\\n if (packetType == PT_SEND) {\\n _sendAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else if (packetType == PT_SEND_AND_CALL) {\\n _sendAndCallAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else {\\n revert(\\\"OFTCore: unknown packet type\\\");\\n }\\n }\\n\\n function _send(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams\\n ) internal virtual returns (uint amount) {\\n _checkGasLimit(_dstChainId, PT_SEND, _adapterParams, NO_EXTRA_GAS);\\n\\n (amount, ) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount); // amount returned should not have dust\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n bytes memory lzPayload = _encodeSendPayload(_toAddress, _ld2sd(amount));\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAck(\\n uint16 _srcChainId,\\n bytes memory,\\n uint64,\\n bytes memory _payload\\n ) internal virtual {\\n (address to, uint64 amountSD) = _decodeSendPayload(_payload);\\n if (to == address(0)) {\\n to = address(0xdead);\\n }\\n\\n uint amount = _sd2ld(amountSD);\\n amount = _creditTo(_srcChainId, to, amount);\\n\\n emit ReceiveFromChain(_srcChainId, to, amount);\\n }\\n\\n function _sendAndCall(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes memory _payload,\\n uint64 _dstGasForCall,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams\\n ) internal virtual returns (uint amount) {\\n _checkGasLimit(_dstChainId, PT_SEND_AND_CALL, _adapterParams, _dstGasForCall);\\n\\n (amount, ) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount);\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n // encode the msg.sender into the payload instead of _from\\n bytes memory lzPayload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(amount), _payload, _dstGasForCall);\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAndCallAck(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual {\\n (bytes32 from, address to, uint64 amountSD, bytes memory payloadForCall, uint64 gasForCall) = _decodeSendAndCallPayload(_payload);\\n\\n bool credited = creditedPackets[_srcChainId][_srcAddress][_nonce];\\n uint amount = _sd2ld(amountSD);\\n\\n // credit to this contract first, and then transfer to receiver only if callOnOFTReceived() succeeds\\n if (!credited) {\\n amount = _creditTo(_srcChainId, address(this), amount);\\n creditedPackets[_srcChainId][_srcAddress][_nonce] = true;\\n }\\n\\n if (!_isContract(to)) {\\n emit NonContractAddress(to);\\n return;\\n }\\n\\n // workaround for stack too deep\\n uint16 srcChainId = _srcChainId;\\n bytes memory srcAddress = _srcAddress;\\n uint64 nonce = _nonce;\\n bytes memory payload = _payload;\\n bytes32 from_ = from;\\n address to_ = to;\\n uint amount_ = amount;\\n bytes memory payloadForCall_ = payloadForCall;\\n\\n // no gas limit for the call if retry\\n uint gas = credited ? gasleft() : gasForCall;\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\\n gasleft(),\\n 150,\\n abi.encodeWithSelector(this.callOnOFTReceived.selector, srcChainId, srcAddress, nonce, from_, to_, amount_, payloadForCall_, gas)\\n );\\n\\n if (success) {\\n bytes32 hash = keccak256(payload);\\n emit CallOFTReceivedSuccess(srcChainId, srcAddress, nonce, hash);\\n } else {\\n // store the failed message into the nonblockingLzApp\\n _storeFailedMessage(srcChainId, srcAddress, nonce, payload, reason);\\n }\\n }\\n\\n function _isContract(address _account) internal view returns (bool) {\\n return _account.code.length > 0;\\n }\\n\\n function _ld2sd(uint _amount) internal view virtual returns (uint64) {\\n uint amountSD = _amount / _ld2sdRate();\\n require(amountSD <= type(uint64).max, \\\"OFTCore: amountSD overflow\\\");\\n return uint64(amountSD);\\n }\\n\\n function _sd2ld(uint64 _amountSD) internal view virtual returns (uint) {\\n return _amountSD * _ld2sdRate();\\n }\\n\\n function _removeDust(uint _amount) internal view virtual returns (uint amountAfter, uint dust) {\\n dust = _amount % _ld2sdRate();\\n amountAfter = _amount - dust;\\n }\\n\\n function _encodeSendPayload(bytes32 _toAddress, uint64 _amountSD) internal view virtual returns (bytes memory) {\\n return abi.encodePacked(PT_SEND, _toAddress, _amountSD);\\n }\\n\\n function _decodeSendPayload(bytes memory _payload) internal view virtual returns (address to, uint64 amountSD) {\\n require(_payload.toUint8(0) == PT_SEND && _payload.length == 41, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n }\\n\\n function _encodeSendAndCallPayload(\\n address _from,\\n bytes32 _toAddress,\\n uint64 _amountSD,\\n bytes memory _payload,\\n uint64 _dstGasForCall\\n ) internal view virtual returns (bytes memory) {\\n return abi.encodePacked(PT_SEND_AND_CALL, _toAddress, _amountSD, _addressToBytes32(_from), _dstGasForCall, _payload);\\n }\\n\\n function _decodeSendAndCallPayload(bytes memory _payload)\\n internal\\n view\\n virtual\\n returns (\\n bytes32 from,\\n address to,\\n uint64 amountSD,\\n bytes memory payload,\\n uint64 dstGasForCall\\n )\\n {\\n require(_payload.toUint8(0) == PT_SEND_AND_CALL, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n from = _payload.toBytes32(41);\\n dstGasForCall = _payload.toUint64(73);\\n payload = _payload.slice(81, _payload.length - 81);\\n }\\n\\n function _addressToBytes32(address _address) internal pure virtual returns (bytes32) {\\n return bytes32(uint(uint160(_address)));\\n }\\n\\n function _debitFrom(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _creditTo(\\n uint16 _srcChainId,\\n address _toAddress,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _transferFrom(\\n address _from,\\n address _to,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _ld2sdRate() internal view virtual returns (uint);\\n}\\n\",\"keccak256\":\"0x96cf7a10c5af4243822d25e77985a4a46d12264f839593ded5378cd6519a8df0\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/ICommonOFT.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface ICommonOFT is IERC165 {\\n\\n struct LzCallParams {\\n address payable refundAddress;\\n address zroPaymentAddress;\\n bytes adapterParams;\\n }\\n\\n /**\\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\\n * _dstChainId - L0 defined chain id to send tokens too\\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n * _amount - amount of the tokens to transfer\\n * _useZro - indicates to use zro to pay L0 fees\\n * _adapterParam - flexible bytes array to indicate messaging adapter services in L0\\n */\\n function estimateSendFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n function estimateSendAndCallFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n /**\\n * @dev returns the circulating amount of tokens on current chain\\n */\\n function circulatingSupply() external view returns (uint);\\n\\n /**\\n * @dev returns the address of the ERC20 token\\n */\\n function token() external view returns (address);\\n}\\n\",\"keccak256\":\"0x1d034ba786436c1fce8057352c87373098bd1d8026b24c8fbc7be28636d0c15d\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTReceiverV2.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.5.0;\\n\\ninterface IOFTReceiverV2 {\\n /**\\n * @dev Called by the OFT contract when tokens are received from source chain.\\n * @param _srcChainId The chain id of the source chain.\\n * @param _srcAddress The address of the OFT token contract on the source chain.\\n * @param _nonce The nonce of the transaction on the source chain.\\n * @param _from The address of the account who calls the sendAndCall() on the source chain.\\n * @param _amount The amount of tokens to transfer.\\n * @param _payload Additional data with no specified format.\\n */\\n function onOFTReceived(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes32 _from, uint _amount, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0xf57e437ced3bc10bb333123bb49475dab47c7615b86401c4d872c29ad4928fd5\",\"license\":\"BUSL-1.1\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ICommonOFT.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface IOFTV2 is ICommonOFT {\\n\\n /**\\n * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`\\n * `_from` the owner of token\\n * `_dstChainId` the destination chain identifier\\n * `_toAddress` can be any size depending on the `dstChainId`.\\n * `_amount` the quantity of tokens in wei\\n * `_refundAddress` the address LayerZero refunds if too much message fee is sent\\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\\n */\\n function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, LzCallParams calldata _callParams) external payable;\\n\\n function sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, LzCallParams calldata _callParams) external payable;\\n}\\n\",\"keccak256\":\"0xb1d31f341715347d49db4e2c0de27c49bbd70b5b3d9b0adb1050b2b3a305ab87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\ninterface OracleInterface {\\n function getPrice(address asset) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n\\n function updateAssetPrice(address asset) external;\\n\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address asset) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address asset,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x40031b19684ca0c912e794d08c2c0b0d8be77d3c1bdc937830a0658eff899650\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { EXP_SCALE as EXP_SCALE_, MANTISSA_ONE as MANTISSA_ONE_ } from \\\"./constants.sol\\\";\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Compound\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract ExponentialNoError {\\n struct Exp {\\n uint256 mantissa;\\n }\\n\\n struct Double {\\n uint256 mantissa;\\n }\\n\\n uint256 internal constant EXP_SCALE = EXP_SCALE_;\\n uint256 internal constant DOUBLE_SCALE = 1e36;\\n uint256 internal constant HALF_EXP_SCALE = EXP_SCALE / 2;\\n uint256 internal constant MANTISSA_ONE = MANTISSA_ONE_;\\n\\n /**\\n * @dev Truncates the given exp to a whole number value.\\n * For example, truncate(Exp{mantissa: 15 * EXP_SCALE}) = 15\\n */\\n function truncate(Exp memory exp) internal pure returns (uint256) {\\n // Note: We are not using careful math here as we're performing a division that cannot fail\\n return exp.mantissa / EXP_SCALE;\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function mul_ScalarTruncate(Exp memory a, uint256 scalar) internal pure returns (uint256) {\\n Exp memory product = mul_(a, scalar);\\n return truncate(product);\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function mul_ScalarTruncateAddUInt(Exp memory a, uint256 scalar, uint256 addend) internal pure returns (uint256) {\\n Exp memory product = mul_(a, scalar);\\n return add_(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Checks if first Exp is less than second Exp.\\n */\\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa < right.mantissa;\\n }\\n\\n function safe224(uint256 n, string memory errorMessage) internal pure returns (uint224) {\\n require(n <= type(uint224).max, errorMessage);\\n return uint224(n);\\n }\\n\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n <= type(uint32).max, errorMessage);\\n return uint32(n);\\n }\\n\\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / EXP_SCALE });\\n }\\n\\n function mul_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint256 a, Exp memory b) internal pure returns (uint256) {\\n return mul_(a, b.mantissa) / EXP_SCALE;\\n }\\n\\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / DOUBLE_SCALE });\\n }\\n\\n function mul_(Double memory a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint256 a, Double memory b) internal pure returns (uint256) {\\n return mul_(a, b.mantissa) / DOUBLE_SCALE;\\n }\\n\\n function mul_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(mul_(a.mantissa, EXP_SCALE), b.mantissa) });\\n }\\n\\n function div_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint256 a, Exp memory b) internal pure returns (uint256) {\\n return div_(mul_(a, EXP_SCALE), b.mantissa);\\n }\\n\\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a.mantissa, DOUBLE_SCALE), b.mantissa) });\\n }\\n\\n function div_(Double memory a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint256 a, Double memory b) internal pure returns (uint256) {\\n return div_(mul_(a, DOUBLE_SCALE), b.mantissa);\\n }\\n\\n function div_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n function fraction(uint256 a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a, DOUBLE_SCALE), b) });\\n }\\n}\\n\",\"keccak256\":\"0x6cf5430c2db151ab24ef0f567ed443c0b75b8b6051a62cacbe83f28b16834605\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/constants.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\\nuint256 constant EXP_SCALE = 1e18;\\n\\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\\nuint256 constant MANTISSA_ONE = EXP_SCALE;\\n\",\"keccak256\":\"0x44de02d7837ee1d4dcf6e9f5e783e9d9e0bec0154f23f5661fb54810cff9f892\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0x909eb76841ebd57d8f53686b76b1a09da7bbbbcddb29510c41674d5aa84c713e\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/BaseXVSProxyOFT.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { ResilientOracleInterface } from \\\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\\\";\\nimport { Pausable } from \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport { BaseOFTV2 } from \\\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { ExponentialNoError } from \\\"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\\\";\\n\\n/**\\n * @title BaseXVSProxyOFT\\n * @author Venus\\n * @notice The BaseXVSProxyOFT contract is tailored for facilitating cross-chain transactions with an ERC20 token.\\n * It manages transaction limits of a single and daily transactions.\\n * This contract inherits key functionalities from other contracts, including pausing capabilities and error handling.\\n * It holds state variables for the inner token and maps for tracking transaction limits and statistics across various chains and addresses.\\n * The contract allows the owner to configure limits, set whitelists, and control pausing.\\n * Internal functions conduct eligibility check of transactions, making the contract a fundamental component for cross-chain token management.\\n */\\n\\nabstract contract BaseXVSProxyOFT is Pausable, ExponentialNoError, BaseOFTV2 {\\n using SafeERC20 for IERC20;\\n IERC20 internal immutable innerToken;\\n uint256 internal immutable ld2sdRate;\\n\\n /**\\n * @notice The address of ResilientOracle contract wrapped in its interface.\\n */\\n ResilientOracleInterface public oracle;\\n /**\\n * @notice Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxSingleTransactionLimit;\\n /**\\n * @notice Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxDailyLimit;\\n /**\\n * @notice Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourTransferred;\\n /**\\n * @notice Timestamp when the last 24-hour window started from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourWindowStart;\\n /**\\n * @notice Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxSingleReceiveTransactionLimit;\\n /**\\n * @notice Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxDailyReceiveLimit;\\n /**\\n * @notice Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourReceived;\\n /**\\n * @notice Timestamp when the last 24-hour window started from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourReceiveWindowStart;\\n /**\\n * @notice Address on which cap check and bound limit is not appicable.\\n */\\n mapping(address => bool) public whitelist;\\n\\n /**\\n * @notice Emmited when address is added to whitelist.\\n */\\n event SetWhitelist(address indexed addr, bool isWhitelist);\\n /**\\n * @notice Emitted when the maximum limit for a single transaction from local chain is modified.\\n */\\n event SetMaxSingleTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum daily limit of transactions from local chain is modified.\\n */\\n event SetMaxDailyLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum limit for a single receive transaction from remote chain is modified.\\n */\\n event SetMaxSingleReceiveTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\\n */\\n event SetMaxDailyReceiveLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Event emitted when oracle is modified.\\n */\\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\\n /**\\n * @notice Event emitted when trusted remote sets to empty.\\n */\\n event TrustedRemoteRemoved(uint16 chainId);\\n\\n /**\\n * @param tokenAddress_ Address of the inner token.\\n * @param sharedDecimals_ No of shared decimals.\\n * @param lzEndpoint_ Address of the layer zero endpoint contract.\\n * @param oracle_ Address of the price oracle.\\n * @custom:error ZeroAddressNotAllowed is thrown when token contract address is zero.\\n * @custom:error ZeroAddressNotAllowed is thrown when lzEndpoint contract address is zero.\\n * @custom:error ZeroAddressNotAllowed is thrown when oracle contract address is zero.\\n */\\n constructor(\\n address tokenAddress_,\\n uint8 sharedDecimals_,\\n address lzEndpoint_,\\n address oracle_\\n ) BaseOFTV2(sharedDecimals_, lzEndpoint_) {\\n ensureNonzeroAddress(tokenAddress_);\\n ensureNonzeroAddress(lzEndpoint_);\\n\\n innerToken = IERC20(tokenAddress_);\\n\\n (bool success, bytes memory data) = tokenAddress_.staticcall(abi.encodeWithSignature(\\\"decimals()\\\"));\\n require(success, \\\"ProxyOFT: failed to get token decimals\\\");\\n uint8 decimals = abi.decode(data, (uint8));\\n\\n require(sharedDecimals_ <= decimals, \\\"ProxyOFT: sharedDecimals must be <= decimals\\\");\\n ld2sdRate = 10 ** (decimals - sharedDecimals_);\\n\\n ensureNonzeroAddress(oracle_);\\n oracle = ResilientOracleInterface(oracle_);\\n }\\n\\n /**\\n * @notice Set the address of the ResilientOracle contract.\\n * @dev Reverts if the new address is zero.\\n * @param oracleAddress_ The new address of the ResilientOracle contract.\\n * @custom:access Only owner.\\n * @custom:event Emits OracleChanged with old and new oracle address.\\n */\\n function setOracle(address oracleAddress_) external onlyOwner {\\n ensureNonzeroAddress(oracleAddress_);\\n emit OracleChanged(address(oracle), oracleAddress_);\\n oracle = ResilientOracleInterface(oracleAddress_);\\n }\\n\\n /**\\n * @notice Sets the limit of single transaction amount.\\n * @param chainId_ Destination chain id.\\n * @param limit_ Amount in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\\n */\\n function setMaxSingleTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ <= chainIdToMaxDailyLimit[chainId_], \\\"Single transaction limit > Daily limit\\\");\\n emit SetMaxSingleTransactionLimit(chainId_, chainIdToMaxSingleTransactionLimit[chainId_], limit_);\\n chainIdToMaxSingleTransactionLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the limit of daily (24 Hour) transactions amount.\\n * @param chainId_ Destination chain id.\\n * @param limit_ Amount in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxDailyLimit with old and new limit associated with chain id.\\n */\\n function setMaxDailyLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ >= chainIdToMaxSingleTransactionLimit[chainId_], \\\"Daily limit < single transaction limit\\\");\\n emit SetMaxDailyLimit(chainId_, chainIdToMaxDailyLimit[chainId_], limit_);\\n chainIdToMaxDailyLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the maximum limit for a single receive transaction.\\n * @param chainId_ The destination chain ID.\\n * @param limit_ The new maximum limit in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\\n */\\n function setMaxSingleReceiveTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ <= chainIdToMaxDailyReceiveLimit[chainId_], \\\"single receive transaction limit > Daily limit\\\");\\n emit SetMaxSingleReceiveTransactionLimit(chainId_, chainIdToMaxSingleReceiveTransactionLimit[chainId_], limit_);\\n chainIdToMaxSingleReceiveTransactionLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the maximum daily limit for receiving transactions.\\n * @param chainId_ The destination chain ID.\\n * @param limit_ The new maximum daily limit in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\\n */\\n function setMaxDailyReceiveLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(\\n limit_ >= chainIdToMaxSingleReceiveTransactionLimit[chainId_],\\n \\\"Daily limit < single receive transaction limit\\\"\\n );\\n emit SetMaxDailyReceiveLimit(chainId_, chainIdToMaxDailyReceiveLimit[chainId_], limit_);\\n chainIdToMaxDailyReceiveLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the whitelist address to skip checks on transaction limit.\\n * @param user_ Adress to be add in whitelist.\\n * @param val_ Boolean to be set (true for user_ address is whitelisted).\\n * @custom:access Only owner.\\n * @custom:event Emits setWhitelist.\\n */\\n function setWhitelist(address user_, bool val_) external onlyOwner {\\n emit SetWhitelist(user_, val_);\\n whitelist[user_] = val_;\\n }\\n\\n /**\\n * @notice Triggers stopped state of the bridge.\\n * @custom:access Only owner.\\n */\\n function pause() external onlyOwner {\\n _pause();\\n }\\n\\n /**\\n * @notice Triggers resume state of the bridge.\\n * @custom:access Only owner.\\n */\\n function unpause() external onlyOwner {\\n _unpause();\\n }\\n\\n /**\\n * @notice Remove trusted remote from storage.\\n * @param remoteChainId_ The chain's id corresponds to setting the trusted remote to empty.\\n */\\n function removeTrustedRemote(uint16 remoteChainId_) external onlyOwner {\\n delete trustedRemoteLookup[remoteChainId_];\\n emit TrustedRemoteRemoved(remoteChainId_);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @notice Return's the address of the inner token of this bridge.\\n */\\n function token() public view override returns (address) {\\n return address(innerToken);\\n }\\n\\n function _isEligibleToSend(address from_, uint16 dstChainId_, uint256 amount_) internal {\\n // Check if the sender's address is whitelisted\\n bool isWhiteListedUser = whitelist[from_];\\n // Check if the user is whitelisted and return if true\\n if (isWhiteListedUser) {\\n return;\\n }\\n\\n // Calculate the amount in USD using the oracle price\\n uint256 amountInUsd;\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\\n\\n // Load values for the 24-hour window checks\\n uint256 currentBlockTimestamp = block.timestamp;\\n uint256 lastDayWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\\n uint256 transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\\n uint256 maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\\n uint256 maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\\n\\n // Revert if the amount exceeds the single transaction limit\\n require(amountInUsd <= maxSingleTransactionLimit, \\\"Single Transaction Limit Exceed\\\");\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - lastDayWindowStart > 1 days) {\\n transferredInWindow = amountInUsd;\\n chainIdToLast24HourWindowStart[dstChainId_] = currentBlockTimestamp;\\n } else {\\n transferredInWindow += amountInUsd;\\n }\\n\\n // Revert if the amount exceeds the daily limit\\n require(transferredInWindow <= maxDailyLimit, \\\"Daily Transaction Limit Exceed\\\");\\n\\n // Update the amount for the 24-hour window\\n chainIdToLast24HourTransferred[dstChainId_] = transferredInWindow;\\n }\\n\\n function _isEligibleToReceive(address toAddress_, uint16 srcChainId_, uint256 receivedAmount_) internal {\\n // Check if the recipient's address is whitelisted\\n bool isWhiteListedUser = whitelist[toAddress_];\\n // Check if the user is whitelisted and return if true\\n if (isWhiteListedUser) {\\n return;\\n }\\n\\n // Calculate the received amount in USD using the oracle price\\n uint256 receivedAmountInUsd;\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(address(token())) });\\n receivedAmountInUsd = mul_ScalarTruncate(oraclePrice, receivedAmount_);\\n\\n uint256 currentBlockTimestamp = block.timestamp;\\n\\n // Load values for the 24-hour window checks for receiving\\n uint256 lastDayReceiveWindowStart = chainIdToLast24HourReceiveWindowStart[srcChainId_];\\n uint256 receivedInWindow = chainIdToLast24HourReceived[srcChainId_];\\n uint256 maxSingleReceiveTransactionLimit = chainIdToMaxSingleReceiveTransactionLimit[srcChainId_];\\n uint256 maxDailyReceiveLimit = chainIdToMaxDailyReceiveLimit[srcChainId_];\\n\\n // Check if the received amount exceeds the single transaction limit\\n require(receivedAmountInUsd <= maxSingleReceiveTransactionLimit, \\\"Single Transaction Limit Exceed\\\");\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - lastDayReceiveWindowStart > 1 days) {\\n receivedInWindow = receivedAmountInUsd;\\n chainIdToLast24HourReceiveWindowStart[srcChainId_] = currentBlockTimestamp;\\n } else {\\n receivedInWindow += receivedAmountInUsd;\\n }\\n\\n // Revert if the received amount exceeds the daily limit\\n require(receivedInWindow <= maxDailyReceiveLimit, \\\"Daily Transaction Limit Exceed\\\");\\n\\n // Update the received amount for the 24-hour window\\n chainIdToLast24HourReceived[srcChainId_] = receivedInWindow;\\n }\\n\\n function _transferFrom(\\n address from_,\\n address to_,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n uint256 before = innerToken.balanceOf(to_);\\n if (from_ == address(this)) {\\n innerToken.safeTransfer(to_, amount_);\\n } else {\\n innerToken.safeTransferFrom(from_, to_, amount_);\\n }\\n return innerToken.balanceOf(to_) - before;\\n }\\n\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal override {\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(\\n _srcAddress.length == trustedRemote.length &&\\n trustedRemote.length > 0 &&\\n keccak256(_srcAddress) == keccak256(trustedRemote),\\n \\\"LzApp: invalid source sending contract\\\"\\n );\\n super._nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n function _ld2sdRate() internal view override returns (uint256) {\\n return ld2sdRate;\\n }\\n}\\n\",\"keccak256\":\"0xc4f5a164f0f534a7e5311bb1263ecc1380eb1513b25ee2c71bd577ac12565b9f\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/XVSProxyOFTSrc.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { BaseXVSProxyOFT } from \\\"./BaseXVSProxyOFT.sol\\\";\\n\\n/**\\n * @title XVSProxyOFTSrc\\n * @author Venus\\n * @notice XVSProxyOFTSrc contract serves as a crucial component for cross-chain token transactions,\\n * focusing on the source side of these transactions.\\n * It monitors the total amount transferred to other chains, ensuring it complies with defined limits,\\n * and provides functions for transferring tokens while maintaining control over the circulating supply on the source chain.\\n */\\n\\ncontract XVSProxyOFTSrc is BaseXVSProxyOFT {\\n using SafeERC20 for IERC20;\\n /**\\n * @notice total amount is transferred from this chain to other chains.\\n */\\n uint256 public outboundAmount;\\n\\n /**\\n * @notice Emits when locked token released manually by owner.\\n */\\n event FallbackWithdraw(address indexed to, uint256 amount);\\n /**\\n * @notice Emits when stored message dropped without successfull retrying.\\n */\\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\\n\\n constructor(\\n address tokenAddress_,\\n uint8 sharedDecimals_,\\n address lzEndpoint_,\\n address oracle_\\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\\n\\n /** @notice Only call it when there is no way to recover the failed message.\\n * `dropFailedMessage` must be called first if transaction is from remote->local chain to avoid double spending.\\n * @param to_ The address to withdraw to\\n * @param amount_ The amount of withdrawal\\n */\\n function fallbackWithdraw(address to_, uint256 amount_) external onlyOwner {\\n outboundAmount -= amount_;\\n _transferFrom(address(this), to_, amount_);\\n emit FallbackWithdraw(to_, amount_);\\n }\\n\\n /** @notice Clear failed messages from the storage.\\n * @param srcChainId_ Chain id of source\\n * @param srcAddress_ Address of source followed by current bridge address\\n * @param nonce_ Nonce_ of the transaction\\n */\\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\\n }\\n\\n /**\\n * @notice Returns the total circulating supply of the token on the source chain i.e (total supply - locked in this contract).\\n */\\n function circulatingSupply() public view override returns (uint256) {\\n return innerToken.totalSupply() - outboundAmount;\\n }\\n\\n function _debitFrom(\\n address from_,\\n uint16 dstChainId_,\\n bytes32,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n require(from_ == _msgSender(), \\\"ProxyOFT: owner is not send caller\\\");\\n _isEligibleToSend(from_, dstChainId_, amount_);\\n\\n uint256 amount = _transferFrom(from_, address(this), amount_);\\n outboundAmount += amount;\\n return amount;\\n }\\n\\n function _creditTo(\\n uint16 srcChainId_,\\n address toAddress_,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\\n outboundAmount -= amount_;\\n // tokens are already in this contract, so no need to transfer\\n if (toAddress_ == address(this)) {\\n return amount_;\\n }\\n\\n return _transferFrom(address(this), toAddress_, amount_);\\n }\\n}\\n\",\"keccak256\":\"0x580ef5f62dd7e0457dd59ca80bb6a91be2cba3fa5366605f27d86f2982dcdbb0\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b50604051620055e5380380620055e5833981016040819052620000359162000309565b6000805460ff1916905583838383828281818080620000543362000256565b6001600160a01b0316608052505060ff1660a0525062000076905084620002af565b6200008182620002af565b6001600160a01b03841660c081905260408051600481526024810182526020810180516001600160e01b031663313ce56760e01b179052905160009283929091620000cd919062000366565b600060405180830381855afa9150503d80600081146200010a576040519150601f19603f3d011682016040523d82523d6000602084013e6200010f565b606091505b509150915081620001765760405162461bcd60e51b815260206004820152602660248201527f50726f78794f46543a206661696c656420746f2067657420746f6b656e20646560448201526563696d616c7360d01b60648201526084015b60405180910390fd5b6000818060200190518101906200018e9190620003a4565b90508060ff168660ff161115620001fd5760405162461bcd60e51b815260206004820152602c60248201527f50726f78794f46543a20736861726564446563696d616c73206d75737420626560448201526b203c3d20646563696d616c7360a01b60648201526084016200016d565b620002098682620003df565b6200021690600a62000504565b60e0526200022484620002af565b5050600780546001600160a01b0319166001600160a01b03939093169290921790915550620005159650505050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b038116620002d7576040516342bcdf7f60e11b815260040160405180910390fd5b50565b80516001600160a01b0381168114620002f257600080fd5b919050565b805160ff81168114620002f257600080fd5b600080600080608085870312156200032057600080fd5b6200032b85620002da565b93506200033b60208601620002f7565b92506200034b60408601620002da565b91506200035b60608601620002da565b905092959194509250565b6000825160005b818110156200038957602081860181015185830152016200036d565b8181111562000399576000828501525b509190910192915050565b600060208284031215620003b757600080fd5b620003c282620002f7565b9392505050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff841680821015620003fc57620003fc620003c9565b90039392505050565b600181815b80851115620004465781600019048211156200042a576200042a620003c9565b808516156200043857918102915b93841c93908002906200040a565b509250929050565b6000826200045f57506001620004fe565b816200046e57506000620004fe565b81600181146200048757600281146200049257620004b2565b6001915050620004fe565b60ff841115620004a657620004a6620003c9565b50506001821b620004fe565b5060208310610133831016604e8410600b8410161715620004d7575081810a620004fe565b620004e3838362000405565b8060001904821115620004fa57620004fa620003c9565b0290505b92915050565b6000620003c260ff8416836200044e565b60805160a05160c05160e051615018620005cd60003960008181612d0f015281816130260152613a40015260008181610c09015281816118fc015281816124f801528181612584015281816125bd01528181612606015281816137640152613d750152600061082a015260008181610a4001528181610c5d01528181610ea401528181610f4c0152818161121901528181611c310152818161222b015281816123ee01528181612af9015261322f01526150186000f3fe6080604052600436106103a15760003560e01c80638456cb59116101e7578063b353aaa71161010d578063df2a5b3b116100a0578063f2fde38b1161006f578063f2fde38b14610bba578063f5ecbdbc14610bda578063fc0c546a14610bfa578063fdff235b14610c2d57600080fd5b8063df2a5b3b14610b45578063e6a20ae614610b65578063eaffd49a14610b7a578063eb8d72b714610b9a57600080fd5b8063cc01e9b6116100dc578063cc01e9b614610ab8578063cc7015ae14610ad8578063d1deba1f14610b05578063d708a46814610b1857600080fd5b8063b353aaa714610a2e578063baf3292d14610a62578063c446183414610a82578063cbed8b9c14610a9857600080fd5b806393a61d6c116101855780639bdb9812116101545780639bdb98121461097c5780639f38369a146109ce578063a4c51df5146109ee578063a6c3d16514610a0e57600080fd5b806393a61d6c146108e9578063950c8a74146109165780639689cb05146109365780639b19251a1461094c57600080fd5b80638cfd8f5c116101c15780638cfd8f5c1461084c5780638da5cb5b1461088457806390436567146108a75780639358928b146108d457600080fd5b80638456cb59146107e357806384e69c69146107f8578063857749b01461081857600080fd5b80634c42899a116102cc57806366ad5c8a1161026a5780637533d788116102395780637533d7881461074b57806376203b48146107785780637adbf9731461078b5780637dc0d1d0146107ab57600080fd5b806366ad5c8a146106ec578063695ef6bf1461070c57806369c1e7b81461071f578063715018a61461073f57600080fd5b806353489d6c116102a657806353489d6c1461064557806353d6fd59146106655780635b8c41e6146106855780635c975abb146106d457600080fd5b80634c42899a146105c45780634cec6256146105eb5780634f4ba0f41461061857600080fd5b8063365260b4116103445780633f4ba83a116103135780633f4ba83a1461055a57806342d65a8d1461056f578063447705151461058f57806348e4a04a146105a457600080fd5b8063365260b41461049d5780633c4ec39b146104d25780633d8b38f61461050d5780633f1f4fa41461052d57600080fd5b80630df37483116103805780630df374831461041d57806310ddb1371461043d5780632488eec81461045d5780632dbbec081461047d57600080fd5b80621d3567146103a657806301ffc9a7146103c857806307e0db17146103fd575b600080fd5b3480156103b257600080fd5b506103c66103c1366004614258565b610c5a565b005b3480156103d457600080fd5b506103e86103e33660046142eb565b610e4c565b60405190151581526020015b60405180910390f35b34801561040957600080fd5b506103c6610418366004614315565b610e83565b34801561042957600080fd5b506103c6610438366004614330565b610f0c565b34801561044957600080fd5b506103c6610458366004614315565b610f2b565b34801561046957600080fd5b506103c6610478366004614330565b610f83565b34801561048957600080fd5b506103c6610498366004614315565b611067565b3480156104a957600080fd5b506104bd6104b8366004614368565b6110c6565b604080519283526020830191909152016103f4565b3480156104de57600080fd5b506104ff6104ed366004614315565b600d6020526000908152604090205481565b6040519081526020016103f4565b34801561051957600080fd5b506103e86105283660046143cf565b61111b565b34801561053957600080fd5b506104ff610548366004614315565b60036020526000908152604090205481565b34801561056657600080fd5b506103c66111e8565b34801561057b57600080fd5b506103c661058a3660046143cf565b6111fa565b34801561059b57600080fd5b506104ff600081565b3480156105b057600080fd5b506103c66105bf366004614436565b611280565b3480156105d057600080fd5b506105d9600081565b60405160ff90911681526020016103f4565b3480156105f757600080fd5b506104ff610606366004614315565b600a6020526000908152604090205481565b34801561062457600080fd5b506104ff610633366004614315565b60096020526000908152604090205481565b34801561065157600080fd5b506103c6610660366004614330565b6112f3565b34801561067157600080fd5b506103c6610680366004614454565b6113d7565b34801561069157600080fd5b506104ff6106a03660046144fa565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156106e057600080fd5b5060005460ff166103e8565b3480156106f857600080fd5b506103c6610707366004614258565b61144f565b6103c661071a3660046145b2565b61152b565b34801561072b57600080fd5b506103c661073a366004614330565b611596565b3480156103c657600080fd5b34801561075757600080fd5b5061076b610766366004614315565b611682565b6040516103f4919061467d565b6103c6610786366004614690565b61171c565b34801561079757600080fd5b506103c66107a6366004614742565b6117cb565b3480156107b757600080fd5b506007546107cb906001600160a01b031681565b6040516001600160a01b0390911681526020016103f4565b3480156107ef57600080fd5b506103c6611838565b34801561080457600080fd5b506103c66108133660046144fa565b611848565b34801561082457600080fd5b506105d97f000000000000000000000000000000000000000000000000000000000000000081565b34801561085857600080fd5b506104ff61086736600461475f565b600260209081526000928352604080842090915290825290205481565b34801561089057600080fd5b5060005461010090046001600160a01b03166107cb565b3480156108b357600080fd5b506104ff6108c2366004614315565b600c6020526000908152604090205481565b3480156108e057600080fd5b506104ff6118f5565b3480156108f557600080fd5b506104ff610904366004614315565b600b6020526000908152604090205481565b34801561092257600080fd5b506004546107cb906001600160a01b031681565b34801561094257600080fd5b506104ff60115481565b34801561095857600080fd5b506103e8610967366004614742565b60106020526000908152604090205460ff1681565b34801561098857600080fd5b506103e86109973660046144fa565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b3480156109da57600080fd5b5061076b6109e9366004614315565b61198b565b3480156109fa57600080fd5b506104bd610a09366004614792565b611a9a565b348015610a1a57600080fd5b506103c6610a293660046143cf565b611b29565b348015610a3a57600080fd5b506107cb7f000000000000000000000000000000000000000000000000000000000000000081565b348015610a6e57600080fd5b506103c6610a7d366004614742565b611bbc565b348015610a8e57600080fd5b506104ff61271081565b348015610aa457600080fd5b506103c6610ab336600461484f565b611c12565b348015610ac457600080fd5b506103c6610ad3366004614330565b611c9c565b348015610ae457600080fd5b506104ff610af3366004614315565b60086020526000908152604090205481565b6103c6610b13366004614258565b611d88565b348015610b2457600080fd5b506104ff610b33366004614315565b600e6020526000908152604090205481565b348015610b5157600080fd5b506103c6610b603660046148bd565b611f9e565b348015610b7157600080fd5b506105d9600181565b348015610b8657600080fd5b506103c6610b953660046148f9565b612008565b348015610ba657600080fd5b506103c6610bb53660046143cf565b612127565b348015610bc657600080fd5b506103c6610bd5366004614742565b612181565b348015610be657600080fd5b5061076b610bf53660046149c1565b6121fa565b348015610c0657600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006107cb565b348015610c3957600080fd5b506104ff610c48366004614315565b600f6020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610cd75760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610cf590614a0e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2190614a0e565b8015610d6e5780601f10610d4357610100808354040283529160200191610d6e565b820191906000526020600020905b815481529060010190602001808311610d5157829003601f168201915b50505050509050805186869050148015610d89575060008151115b8015610db1575080516020820120604051610da79088908890614a42565b6040518091039020145b610dcd5760405162461bcd60e51b8152600401610cce90614a52565b610e438787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506122ad92505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610e7d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b610e8b612326565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610ef157600080fd5b505af1158015610f05573d6000803e3d6000fd5b5050505050565b610f14612326565b61ffff909116600090815260036020526040902055565b610f33612326565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610ed7565b610f8b612326565b61ffff8216600090815260086020526040902054811015610ffd5760405162461bcd60e51b815260206004820152602660248201527f4461696c79206c696d6974203c2073696e676c65207472616e73616374696f6e604482015265081b1a5b5a5d60d21b6064820152608401610cce565b61ffff82166000818152600960209081526040918290205482519384529083015281018290527f4dd31065e259d5284e44d1f9265710da72eafcf78dc925e3881189fc3b71f6939060600160405180910390a161ffff909116600090815260096020526040902055565b61106f612326565b61ffff8116600090815260016020526040812061108b9161409b565b60405161ffff821681527f6d5075c81d4d9e75bec6052f4e44f58f8a8cf1327544addbbf015fb06f83bd37906020015b60405180910390a150565b60008061110c8888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061238692505050565b91509150965096945050505050565b61ffff83166000908152600160205260408120805482919061113c90614a0e565b80601f016020809104026020016040519081016040528092919081815260200182805461116890614a0e565b80156111b55780601f1061118a576101008083540402835291602001916111b5565b820191906000526020600020905b81548152906001019060200180831161119857829003601f168201915b5050505050905083836040516111cc929190614a42565b60405180910390208180519060200120149150505b9392505050565b6111f0612326565b6111f861247a565b565b611202612326565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061125290869086908690600401614ac1565b600060405180830381600087803b15801561126c57600080fd5b505af1158015610e43573d6000803e3d6000fd5b611288612326565b806011600082825461129a9190614af5565b909155506112ab90503083836124cc565b50816001600160a01b03167f22fe8e8ead80ad0961d77107e806ba9bcf9ca3b175a9d446145646d39c36ab96826040516112e791815260200190565b60405180910390a25050565b6112fb612326565b61ffff821660009081526009602052604090205481111561136d5760405162461bcd60e51b815260206004820152602660248201527f53696e676c65207472616e73616374696f6e206c696d6974203e204461696c79604482015265081b1a5b5a5d60d21b6064820152608401610cce565b61ffff82166000818152600860209081526040918290205482519384529083015281018290527f7babeac42ccbb33537ee421fedc4db7b5f251b5d2a3fa5c0ff4b35b2d783be879060600160405180910390a161ffff909116600090815260086020526040902055565b6113df612326565b816001600160a01b03167ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb8260405161141c911515815260200190565b60405180910390a26001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b3330146114ad5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610cce565b6115238686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061268692505050565b505050505050565b6115238585858561153f6020870187614742565b61154f6040880160208901614742565b61155c6040890189614b0c565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277792505050565b61159e612326565b61ffff82166000908152600c60205260409020548110156116185760405162461bcd60e51b815260206004820152602e60248201527f4461696c79206c696d6974203c2073696e676c6520726563656976652074726160448201526d1b9cd858dd1a5bdb881b1a5b5a5d60921b6064820152608401610cce565b61ffff82166000818152600d60209081526040918290205482519384529083015281018290527f95dc51094cd27cf4ee3fd0dbb50cf96f8df1629c822f5434c4a34d7eb03c97249060600160405180910390a161ffff9091166000908152600d6020526040902055565b6001602052600090815260409020805461169b90614a0e565b80601f01602080910402602001604051908101604052809291908181526020018280546116c790614a0e565b80156117145780601f106116e957610100808354040283529160200191611714565b820191906000526020600020905b8154815290600101906020018083116116f757829003601f168201915b505050505081565b6117c08888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92506117699150506020890189614742565b61177960408a0160208b01614742565b61178660408b018b614b0c565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061285f92505050565b505050505050505050565b6117d3612326565b6117dc8161295b565b6007546040516001600160a01b038084169216907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd90600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b611840612326565b6111f8612982565b611850612326565b61ffff83166000908152600560205260408082209051611871908590614b52565b9081526040805191829003602090810183206001600160401b0386166000908152915220919091556118a4908390614b52565b6040805191829003822061ffff861683526001600160401b0384166020840152917f48a980eea4ea1c540209e2f9f32a4c2edf51fab37b1d21f453868301ecb6e2ee910160405180910390a2505050565b60006011547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611958573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197c9190614b6e565b6119869190614af5565b905090565b61ffff81166000908152600160205260408120805460609291906119ae90614a0e565b80601f01602080910402602001604051908101604052809291908181526020018280546119da90614a0e565b8015611a275780601f106119fc57610100808354040283529160200191611a27565b820191906000526020600020905b815481529060010190602001808311611a0a57829003601f168201915b505050505090508051600003611a7f5760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610cce565b6111e1600060148351611a929190614af5565b8391906129bf565b600080611b178b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c9081908401838280828437600092019190915250612acc92505050565b91509150995099975050505050505050565b611b31612326565b818130604051602001611b4693929190614b87565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251611b7b939192909101906140d5565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611baf93929190614ac1565b60405180910390a1505050565b611bc4612326565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020016110bb565b611c1a612326565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611c6e9088908890889088908890600401614bad565b600060405180830381600087803b158015611c8857600080fd5b505af11580156117c0573d6000803e3d6000fd5b611ca4612326565b61ffff82166000908152600d6020526040902054811115611d1e5760405162461bcd60e51b815260206004820152602e60248201527f73696e676c652072656365697665207472616e73616374696f6e206c696d697460448201526d080f8811185a5b1e481b1a5b5a5d60921b6064820152608401610cce565b61ffff82166000818152600c60209081526040918290205482519384529083015281018290527f2c42997a938a029910a78e7c28d762b349c28e70f3a89c1fbccbb1a46020b1599060600160405180910390a161ffff9091166000908152600c6020526040902055565b61ffff86166000908152600560205260408082209051611dab9088908890614a42565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080611e2b5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610cce565b808383604051611e3c929190614a42565b604051809103902014611e9b5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610cce565b61ffff87166000908152600560205260408082209051611ebe9089908990614a42565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252611f56918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061268692505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051611f8d959493929190614bdb565b60405180910390a150505050505050565b611fa6612326565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611baf565b3330146120575760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610cce565b6120623086866124cc565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf866040516120a491815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da9083906120e8908e908e908e908e908e908d908d908d90600401614c16565b600060405180830381600088803b15801561210257600080fd5b5087f1158015612116573d6000803e3d6000fd5b505050505050505050505050505050565b61212f612326565b61ffff8316600090815260016020526040902061214d908383614159565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611baf93929190614ac1565b612189612326565b6001600160a01b0381166121ee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610cce565b6121f781612b87565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa15801561227a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122a29190810190614c71565b90505b949350505050565b6000806123105a60966366ad5c8a60e01b898989896040516024016122d59493929190614cde565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612be0565b9150915081611523576115238686868685612c6a565b6000546001600160a01b036101009091041633146111f85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610cce565b60008060006123d48761239888612d07565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb109061242b908b90309086908b908b90600401614d1c565b6040805180830381865afa158015612447573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246b9190614d70565b92509250509550959350505050565b612482612d8d565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006124d6612dd6565b6040516370a0823160e01b81526001600160a01b0384811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125659190614b6e565b9050306001600160a01b038616036125b0576125ab6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168585612e1c565b6125e5565b6125e56001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868686612e84565b6040516370a0823160e01b81526001600160a01b03858116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561264f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126739190614b6e565b61267d9190614af5565b95945050505050565b61ffff8416600090815260016020526040812080546126a490614a0e565b80601f01602080910402602001604051908101604052809291908181526020018280546126d090614a0e565b801561271d5780601f106126f25761010080835404028352916020019161271d565b820191906000526020600020905b81548152906001019060200180831161270057829003601f168201915b5050505050905080518451148015612736575060008151115b801561274f575080805190602001208480519060200120145b61276b5760405162461bcd60e51b8152600401610cce90614a52565b610f0585858585612ec2565b600061278587828481612f49565b61278e8561301e565b50905061279d8888888461305e565b9050600081116127eb5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610cce565b60006127fa8761239884612d07565b905061280a888287878734613106565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161284b91815260200190565b60405180910390a450979650505050505050565b6000612877896001846001600160401b038916612f49565b6128808761301e565b50905061288f8a8a8a8461305e565b9050600081116128dd5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610cce565b60006128f4338a6128ed85612d07565b8a8a6132ab565b90506129048a8287878734613106565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161294591815260200190565b60405180910390a4509998505050505050505050565b6001600160a01b0381166121f7576040516342bcdf7f60e11b815260040160405180910390fd5b61298a612dd6565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124af3390565b6060816129cd81601f614d94565b1015612a0c5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610cce565b612a168284614d94565b84511015612a5a5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610cce565b606082158015612a795760405191506000825260208201604052612ac3565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612ab2578051835260209283019201612a9a565b5050858452601f01601f1916604052505b50949350505050565b6000806000612adf338a6128ed8b612d07565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612b36908d90309086908b908b90600401614d1c565b6040805180830381865afa158015612b52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b769190614d70565b925092505097509795505050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6000606060008060008661ffff166001600160401b03811115612c0557612c0561448d565b6040519080825280601f01601f191660200182016040528015612c2f576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612c51578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051612c9b9190614b52565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90612cf89087908790879087908790614dac565b60405180910390a15050505050565b600080612d347f000000000000000000000000000000000000000000000000000000000000000084614e14565b90506001600160401b03811115610e7d5760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610cce565b60005460ff166111f85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610cce565b60005460ff16156111f85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610cce565b6040516001600160a01b038316602482015260448101829052612e7f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526132ec565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052612ebc9085906323b872dd60e01b90608401612e48565b50505050565b6000612ece82826133c1565b905060ff8116612ee957612ee48585858561341d565b610f05565b60001960ff821601612f0157612ee4858585856134ad565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610cce565b6000612f54836136bb565b61ffff80871660009081526002602090815260408083209389168352929052205490915080612fc55760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610cce565b612fcf8382614d94565b8210156115235760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610cce565b60008061304b7f000000000000000000000000000000000000000000000000000000000000000084614e28565b90506130578184614af5565b9150915091565b6000613068612dd6565b6001600160a01b03851633146130cb5760405162461bcd60e51b815260206004820152602260248201527f50726f78794f46543a206f776e6572206973206e6f742073656e642063616c6c60448201526132b960f11b6064820152608401610cce565b6130d6858584613717565b60006130e38630856124cc565b905080601160008282546130f79190614d94565b90915550909695505050505050565b61ffff86166000908152600160205260408120805461312490614a0e565b80601f016020809104026020016040519081016040528092919081815260200182805461315090614a0e565b801561319d5780601f106131725761010080835404028352916020019161319d565b820191906000526020600020905b81548152906001019060200180831161318057829003601f168201915b50505050509050805160000361320e5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610cce565b613219878751613934565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490613270908b9086908c908c908c908c90600401614e3c565b6000604051808303818588803b15801561328957600080fd5b505af115801561329d573d6000803e3d6000fd5b505050505050505050505050565b6060600185856001600160a01b03891685876040516020016132d296959493929190614ea3565b604051602081830303815290604052905095945050505050565b6000613341826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139a59092919063ffffffff16565b90508051600014806133625750808060200190518101906133629190614f04565b612e7f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610cce565b60006133ce826001614d94565b835110156134145760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610cce565b50016001015190565b600080613429836139b4565b90925090506001600160a01b0382166134425761dead91505b600061344d82613a39565b905061345a878483613a6e565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8360405161349c91815260200190565b60405180910390a350505050505050565b60008060008060006134be86613abc565b945094509450945094506000600660008b61ffff1661ffff168152602001908152602001600020896040516134f39190614b52565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff16915061352685613a39565b905081613594576135388b3083613a6e565b61ffff8c16600090815260066020526040908190209051919250600191613560908d90614b52565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b6135eb576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a150505050505050612ebc565b8a8a8a8a8a8a868a60008a613609578b6001600160401b031661360b565b5a5b905060008061363d5a609663eaffd49a60e01b8e8e8e8d8d8d8d8d6040516024016122d5989796959493929190614f21565b915091508115613696578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd88490613688908e908e908690614f95565b60405180910390a2506136a3565b6136a38b8b8b8b85612c6a565b50505050505050505050505050505050505050505050565b600060228251101561370f5760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610cce565b506022015190565b6001600160a01b03831660009081526010602052604090205460ff16801561373f5750505050565b6040805160208101909152600754600091829181906001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156137c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137eb9190614b6e565b905290506137f98185613b73565b61ffff86166000908152600b6020908152604080832054600a8352818420546008845282852054600990945291909320549395504293909190818711156138825760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610cce565b620151806138908587614af5565b11156138b45761ffff8a166000908152600b602052604090208590558692506138c1565b6138be8784614d94565b92505b808311156139115760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610cce565b505061ffff9097166000908152600a602052604090209690965550505050505050565b61ffff82166000908152600360205260408120549081900361395557506127105b80821115612e7f5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610cce565b60606122a58484600085613b8b565b600080806139c284826133c1565b60ff161480156139d3575082516029145b613a1a5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610cce565b613a2583600d613c66565b9150613a32836021613ccb565b9050915091565b6000610e7d7f00000000000000000000000000000000000000000000000000000000000000006001600160401b038416614fc3565b6000613a78612dd6565b613a83838584613d28565b8160116000828254613a959190614af5565b9091555050306001600160a01b03841603613ab15750806111e1565b6122a53084846124cc565b600080806060816001613acf87836133c1565b60ff1614613b1a5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610cce565b613b2586600d613c66565b9350613b32866021613ccb565b9250613b3f866029613f45565b9450613b4c866049613ccb565b9050613b686051808851613b609190614af5565b8891906129bf565b915091939590929450565b600080613b808484613fa3565b90506122a581613fd4565b606082471015613bec5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610cce565b600080866001600160a01b03168587604051613c089190614b52565b60006040518083038185875af1925050503d8060008114613c45576040519150601f19603f3d011682016040523d82523d6000602084013e613c4a565b606091505b5091509150613c5b87838387613fec565b979650505050505050565b6000613c73826014614d94565b83511015613cbb5760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610cce565b500160200151600160601b900490565b6000613cd8826008614d94565b83511015613d1f5760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610cce565b50016008015190565b6001600160a01b03831660009081526010602052604090205460ff168015613d505750505050565b6040805160208101909152600754600091829181906001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613dd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613dfc9190614b6e565b90529050613e0a8185613b73565b61ffff86166000908152600f6020908152604080832054600e835281842054600c845282852054600d9094529190932054939550429390919081871115613e935760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610cce565b62015180613ea18587614af5565b1115613ec55761ffff8a166000908152600f60205260409020859055869250613ed2565b613ecf8784614d94565b92505b80831115613f225760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610cce565b505061ffff9097166000908152600e602052604090209690965550505050505050565b6000613f52826020614d94565b83511015613f9a5760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610cce565b50016020015190565b6040805160208101909152600081526040518060200160405280613fcb856000015185614065565b90529392505050565b8051600090610e7d90670de0b6b3a764000090614e14565b6060831561405b578251600003614054576001600160a01b0385163b6140545760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610cce565b50816122a5565b6122a58383614071565b60006111e18284614fc3565b8151156140815781518083602001fd5b8060405162461bcd60e51b8152600401610cce919061467d565b5080546140a790614a0e565b6000825580601f106140b7575050565b601f0160209004906000526020600020908101906121f791906141cd565b8280546140e190614a0e565b90600052602060002090601f0160209004810192826141035760008555614149565b82601f1061411c57805160ff1916838001178555614149565b82800160010185558215614149579182015b8281111561414957825182559160200191906001019061412e565b506141559291506141cd565b5090565b82805461416590614a0e565b90600052602060002090601f0160209004810192826141875760008555614149565b82601f106141a05782800160ff19823516178555614149565b82800160010185558215614149579182015b828111156141495782358255916020019190600101906141b2565b5b8082111561415557600081556001016141ce565b803561ffff811681146141f457600080fd5b919050565b60008083601f84011261420b57600080fd5b5081356001600160401b0381111561422257600080fd5b60208301915083602082850101111561423a57600080fd5b9250929050565b80356001600160401b03811681146141f457600080fd5b6000806000806000806080878903121561427157600080fd5b61427a876141e2565b955060208701356001600160401b038082111561429657600080fd5b6142a28a838b016141f9565b90975095508591506142b660408a01614241565b945060608901359150808211156142cc57600080fd5b506142d989828a016141f9565b979a9699509497509295939492505050565b6000602082840312156142fd57600080fd5b81356001600160e01b0319811681146111e157600080fd5b60006020828403121561432757600080fd5b6111e1826141e2565b6000806040838503121561434357600080fd5b61434c836141e2565b946020939093013593505050565b80151581146121f757600080fd5b60008060008060008060a0878903121561438157600080fd5b61438a876141e2565b9550602087013594506040870135935060608701356143a88161435a565b925060808701356001600160401b038111156143c357600080fd5b6142d989828a016141f9565b6000806000604084860312156143e457600080fd5b6143ed846141e2565b925060208401356001600160401b0381111561440857600080fd5b614414868287016141f9565b9497909650939450505050565b6001600160a01b03811681146121f757600080fd5b6000806040838503121561444957600080fd5b823561434c81614421565b6000806040838503121561446757600080fd5b823561447281614421565b915060208301356144828161435a565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156144cb576144cb61448d565b604052919050565b60006001600160401b038211156144ec576144ec61448d565b50601f01601f191660200190565b60008060006060848603121561450f57600080fd5b614518846141e2565b925060208401356001600160401b0381111561453357600080fd5b8401601f8101861361454457600080fd5b8035614557614552826144d3565b6144a3565b81815287602083850101111561456c57600080fd5b8160208401602083013760006020838301015280945050505061459160408501614241565b90509250925092565b6000606082840312156145ac57600080fd5b50919050565b600080600080600060a086880312156145ca57600080fd5b85356145d581614421565b94506145e3602087016141e2565b9350604086013592506060860135915060808601356001600160401b0381111561460c57600080fd5b6146188882890161459a565b9150509295509295909350565b60005b83811015614640578181015183820152602001614628565b83811115612ebc5750506000910152565b60008151808452614669816020860160208601614625565b601f01601f19169290920160200192915050565b6020815260006111e16020830184614651565b60008060008060008060008060e0898b0312156146ac57600080fd5b88356146b781614421565b97506146c560208a016141e2565b9650604089013595506060890135945060808901356001600160401b03808211156146ef57600080fd5b6146fb8c838d016141f9565b909650945084915061470f60a08c01614241565b935060c08b013591508082111561472557600080fd5b506147328b828c0161459a565b9150509295985092959890939650565b60006020828403121561475457600080fd5b81356111e181614421565b6000806040838503121561477257600080fd5b61477b836141e2565b9150614789602084016141e2565b90509250929050565b600080600080600080600080600060e08a8c0312156147b057600080fd5b6147b98a6141e2565b985060208a0135975060408a0135965060608a01356001600160401b03808211156147e357600080fd5b6147ef8d838e016141f9565b909850965086915061480360808d01614241565b955060a08c013591506148158261435a565b90935060c08b0135908082111561482b57600080fd5b506148388c828d016141f9565b915080935050809150509295985092959850929598565b60008060008060006080868803121561486757600080fd5b614870866141e2565b945061487e602087016141e2565b93506040860135925060608601356001600160401b038111156148a057600080fd5b6148ac888289016141f9565b969995985093965092949392505050565b6000806000606084860312156148d257600080fd5b6148db846141e2565b92506148e9602085016141e2565b9150604084013590509250925092565b6000806000806000806000806000806101008b8d03121561491957600080fd5b6149228b6141e2565b995060208b01356001600160401b038082111561493e57600080fd5b61494a8e838f016141f9565b909b50995089915061495e60408e01614241565b985060608d0135975060808d0135915061497782614421565b90955060a08c0135945060c08c0135908082111561499457600080fd5b506149a18d828e016141f9565b9150809450508092505060e08b013590509295989b9194979a5092959850565b600080600080608085870312156149d757600080fd5b6149e0856141e2565b93506149ee602086016141e2565b925060408501356149fe81614421565b9396929550929360600135925050565b600181811c90821680614a2257607f821691505b6020821081036145ac57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b60208082526026908201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6040820152651b9d1c9858dd60d21b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff841681526040602082015260006122a2604083018486614a98565b634e487b7160e01b600052601160045260246000fd5b600082821015614b0757614b07614adf565b500390565b6000808335601e19843603018112614b2357600080fd5b8301803591506001600160401b03821115614b3d57600080fd5b60200191503681900382131561423a57600080fd5b60008251614b64818460208701614625565b9190910192915050565b600060208284031215614b8057600080fd5b5051919050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152613c5b608083018486614a98565b61ffff86168152608060208201526000614bf9608083018688614a98565b6001600160401b0394909416604083015250606001529392505050565b61ffff8916815260c060208201526000614c3460c08301898b614a98565b6001600160401b038816604084015286606084015285608084015282810360a0840152614c62818587614a98565b9b9a5050505050505050505050565b600060208284031215614c8357600080fd5b81516001600160401b03811115614c9957600080fd5b8201601f81018413614caa57600080fd5b8051614cb8614552826144d3565b818152856020838501011115614ccd57600080fd5b61267d826020830160208601614625565b61ffff85168152608060208201526000614cfb6080830186614651565b6001600160401b03851660408401528281036060840152613c5b8185614651565b61ffff861681526001600160a01b038516602082015260a060408201819052600090614d4a90830186614651565b84151560608401528281036080840152614d648185614651565b98975050505050505050565b60008060408385031215614d8357600080fd5b505080516020909101519092909150565b60008219821115614da757614da7614adf565b500190565b61ffff8616815260a060208201526000614dc960a0830187614651565b6001600160401b03861660408401528281036060840152614dea8186614651565b90508281036080840152614d648185614651565b634e487b7160e01b600052601260045260246000fd5b600082614e2357614e23614dfe565b500490565b600082614e3757614e37614dfe565b500690565b61ffff8716815260c060208201526000614e5960c0830188614651565b8281036040840152614e6b8188614651565b6001600160a01b0387811660608601528616608085015283810360a08501529050614e968185614651565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b166049840152508251614ef2816051850160208701614625565b91909101605101979650505050505050565b600060208284031215614f1657600080fd5b81516111e18161435a565b600061010061ffff8b168352806020840152614f3f8184018b614651565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c08501529050614f7f8186614651565b9150508260e08301529998505050505050505050565b606081526000614fa86060830186614651565b6001600160401b039490941660208301525060400152919050565b6000816000190483118215151615614fdd57614fdd614adf565b50029056fea264697066735822122027b3556a9016d3069fd8381145fbf4b56ed51c3632549ece028ff574d0aa941664736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106103a15760003560e01c80638456cb59116101e7578063b353aaa71161010d578063df2a5b3b116100a0578063f2fde38b1161006f578063f2fde38b14610bba578063f5ecbdbc14610bda578063fc0c546a14610bfa578063fdff235b14610c2d57600080fd5b8063df2a5b3b14610b45578063e6a20ae614610b65578063eaffd49a14610b7a578063eb8d72b714610b9a57600080fd5b8063cc01e9b6116100dc578063cc01e9b614610ab8578063cc7015ae14610ad8578063d1deba1f14610b05578063d708a46814610b1857600080fd5b8063b353aaa714610a2e578063baf3292d14610a62578063c446183414610a82578063cbed8b9c14610a9857600080fd5b806393a61d6c116101855780639bdb9812116101545780639bdb98121461097c5780639f38369a146109ce578063a4c51df5146109ee578063a6c3d16514610a0e57600080fd5b806393a61d6c146108e9578063950c8a74146109165780639689cb05146109365780639b19251a1461094c57600080fd5b80638cfd8f5c116101c15780638cfd8f5c1461084c5780638da5cb5b1461088457806390436567146108a75780639358928b146108d457600080fd5b80638456cb59146107e357806384e69c69146107f8578063857749b01461081857600080fd5b80634c42899a116102cc57806366ad5c8a1161026a5780637533d788116102395780637533d7881461074b57806376203b48146107785780637adbf9731461078b5780637dc0d1d0146107ab57600080fd5b806366ad5c8a146106ec578063695ef6bf1461070c57806369c1e7b81461071f578063715018a61461073f57600080fd5b806353489d6c116102a657806353489d6c1461064557806353d6fd59146106655780635b8c41e6146106855780635c975abb146106d457600080fd5b80634c42899a146105c45780634cec6256146105eb5780634f4ba0f41461061857600080fd5b8063365260b4116103445780633f4ba83a116103135780633f4ba83a1461055a57806342d65a8d1461056f578063447705151461058f57806348e4a04a146105a457600080fd5b8063365260b41461049d5780633c4ec39b146104d25780633d8b38f61461050d5780633f1f4fa41461052d57600080fd5b80630df37483116103805780630df374831461041d57806310ddb1371461043d5780632488eec81461045d5780632dbbec081461047d57600080fd5b80621d3567146103a657806301ffc9a7146103c857806307e0db17146103fd575b600080fd5b3480156103b257600080fd5b506103c66103c1366004614258565b610c5a565b005b3480156103d457600080fd5b506103e86103e33660046142eb565b610e4c565b60405190151581526020015b60405180910390f35b34801561040957600080fd5b506103c6610418366004614315565b610e83565b34801561042957600080fd5b506103c6610438366004614330565b610f0c565b34801561044957600080fd5b506103c6610458366004614315565b610f2b565b34801561046957600080fd5b506103c6610478366004614330565b610f83565b34801561048957600080fd5b506103c6610498366004614315565b611067565b3480156104a957600080fd5b506104bd6104b8366004614368565b6110c6565b604080519283526020830191909152016103f4565b3480156104de57600080fd5b506104ff6104ed366004614315565b600d6020526000908152604090205481565b6040519081526020016103f4565b34801561051957600080fd5b506103e86105283660046143cf565b61111b565b34801561053957600080fd5b506104ff610548366004614315565b60036020526000908152604090205481565b34801561056657600080fd5b506103c66111e8565b34801561057b57600080fd5b506103c661058a3660046143cf565b6111fa565b34801561059b57600080fd5b506104ff600081565b3480156105b057600080fd5b506103c66105bf366004614436565b611280565b3480156105d057600080fd5b506105d9600081565b60405160ff90911681526020016103f4565b3480156105f757600080fd5b506104ff610606366004614315565b600a6020526000908152604090205481565b34801561062457600080fd5b506104ff610633366004614315565b60096020526000908152604090205481565b34801561065157600080fd5b506103c6610660366004614330565b6112f3565b34801561067157600080fd5b506103c6610680366004614454565b6113d7565b34801561069157600080fd5b506104ff6106a03660046144fa565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156106e057600080fd5b5060005460ff166103e8565b3480156106f857600080fd5b506103c6610707366004614258565b61144f565b6103c661071a3660046145b2565b61152b565b34801561072b57600080fd5b506103c661073a366004614330565b611596565b3480156103c657600080fd5b34801561075757600080fd5b5061076b610766366004614315565b611682565b6040516103f4919061467d565b6103c6610786366004614690565b61171c565b34801561079757600080fd5b506103c66107a6366004614742565b6117cb565b3480156107b757600080fd5b506007546107cb906001600160a01b031681565b6040516001600160a01b0390911681526020016103f4565b3480156107ef57600080fd5b506103c6611838565b34801561080457600080fd5b506103c66108133660046144fa565b611848565b34801561082457600080fd5b506105d97f000000000000000000000000000000000000000000000000000000000000000081565b34801561085857600080fd5b506104ff61086736600461475f565b600260209081526000928352604080842090915290825290205481565b34801561089057600080fd5b5060005461010090046001600160a01b03166107cb565b3480156108b357600080fd5b506104ff6108c2366004614315565b600c6020526000908152604090205481565b3480156108e057600080fd5b506104ff6118f5565b3480156108f557600080fd5b506104ff610904366004614315565b600b6020526000908152604090205481565b34801561092257600080fd5b506004546107cb906001600160a01b031681565b34801561094257600080fd5b506104ff60115481565b34801561095857600080fd5b506103e8610967366004614742565b60106020526000908152604090205460ff1681565b34801561098857600080fd5b506103e86109973660046144fa565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b3480156109da57600080fd5b5061076b6109e9366004614315565b61198b565b3480156109fa57600080fd5b506104bd610a09366004614792565b611a9a565b348015610a1a57600080fd5b506103c6610a293660046143cf565b611b29565b348015610a3a57600080fd5b506107cb7f000000000000000000000000000000000000000000000000000000000000000081565b348015610a6e57600080fd5b506103c6610a7d366004614742565b611bbc565b348015610a8e57600080fd5b506104ff61271081565b348015610aa457600080fd5b506103c6610ab336600461484f565b611c12565b348015610ac457600080fd5b506103c6610ad3366004614330565b611c9c565b348015610ae457600080fd5b506104ff610af3366004614315565b60086020526000908152604090205481565b6103c6610b13366004614258565b611d88565b348015610b2457600080fd5b506104ff610b33366004614315565b600e6020526000908152604090205481565b348015610b5157600080fd5b506103c6610b603660046148bd565b611f9e565b348015610b7157600080fd5b506105d9600181565b348015610b8657600080fd5b506103c6610b953660046148f9565b612008565b348015610ba657600080fd5b506103c6610bb53660046143cf565b612127565b348015610bc657600080fd5b506103c6610bd5366004614742565b612181565b348015610be657600080fd5b5061076b610bf53660046149c1565b6121fa565b348015610c0657600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006107cb565b348015610c3957600080fd5b506104ff610c48366004614315565b600f6020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610cd75760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610cf590614a0e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2190614a0e565b8015610d6e5780601f10610d4357610100808354040283529160200191610d6e565b820191906000526020600020905b815481529060010190602001808311610d5157829003601f168201915b50505050509050805186869050148015610d89575060008151115b8015610db1575080516020820120604051610da79088908890614a42565b6040518091039020145b610dcd5760405162461bcd60e51b8152600401610cce90614a52565b610e438787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506122ad92505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610e7d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b610e8b612326565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610ef157600080fd5b505af1158015610f05573d6000803e3d6000fd5b5050505050565b610f14612326565b61ffff909116600090815260036020526040902055565b610f33612326565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610ed7565b610f8b612326565b61ffff8216600090815260086020526040902054811015610ffd5760405162461bcd60e51b815260206004820152602660248201527f4461696c79206c696d6974203c2073696e676c65207472616e73616374696f6e604482015265081b1a5b5a5d60d21b6064820152608401610cce565b61ffff82166000818152600960209081526040918290205482519384529083015281018290527f4dd31065e259d5284e44d1f9265710da72eafcf78dc925e3881189fc3b71f6939060600160405180910390a161ffff909116600090815260096020526040902055565b61106f612326565b61ffff8116600090815260016020526040812061108b9161409b565b60405161ffff821681527f6d5075c81d4d9e75bec6052f4e44f58f8a8cf1327544addbbf015fb06f83bd37906020015b60405180910390a150565b60008061110c8888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061238692505050565b91509150965096945050505050565b61ffff83166000908152600160205260408120805482919061113c90614a0e565b80601f016020809104026020016040519081016040528092919081815260200182805461116890614a0e565b80156111b55780601f1061118a576101008083540402835291602001916111b5565b820191906000526020600020905b81548152906001019060200180831161119857829003601f168201915b5050505050905083836040516111cc929190614a42565b60405180910390208180519060200120149150505b9392505050565b6111f0612326565b6111f861247a565b565b611202612326565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061125290869086908690600401614ac1565b600060405180830381600087803b15801561126c57600080fd5b505af1158015610e43573d6000803e3d6000fd5b611288612326565b806011600082825461129a9190614af5565b909155506112ab90503083836124cc565b50816001600160a01b03167f22fe8e8ead80ad0961d77107e806ba9bcf9ca3b175a9d446145646d39c36ab96826040516112e791815260200190565b60405180910390a25050565b6112fb612326565b61ffff821660009081526009602052604090205481111561136d5760405162461bcd60e51b815260206004820152602660248201527f53696e676c65207472616e73616374696f6e206c696d6974203e204461696c79604482015265081b1a5b5a5d60d21b6064820152608401610cce565b61ffff82166000818152600860209081526040918290205482519384529083015281018290527f7babeac42ccbb33537ee421fedc4db7b5f251b5d2a3fa5c0ff4b35b2d783be879060600160405180910390a161ffff909116600090815260086020526040902055565b6113df612326565b816001600160a01b03167ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb8260405161141c911515815260200190565b60405180910390a26001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b3330146114ad5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610cce565b6115238686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061268692505050565b505050505050565b6115238585858561153f6020870187614742565b61154f6040880160208901614742565b61155c6040890189614b0c565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277792505050565b61159e612326565b61ffff82166000908152600c60205260409020548110156116185760405162461bcd60e51b815260206004820152602e60248201527f4461696c79206c696d6974203c2073696e676c6520726563656976652074726160448201526d1b9cd858dd1a5bdb881b1a5b5a5d60921b6064820152608401610cce565b61ffff82166000818152600d60209081526040918290205482519384529083015281018290527f95dc51094cd27cf4ee3fd0dbb50cf96f8df1629c822f5434c4a34d7eb03c97249060600160405180910390a161ffff9091166000908152600d6020526040902055565b6001602052600090815260409020805461169b90614a0e565b80601f01602080910402602001604051908101604052809291908181526020018280546116c790614a0e565b80156117145780601f106116e957610100808354040283529160200191611714565b820191906000526020600020905b8154815290600101906020018083116116f757829003601f168201915b505050505081565b6117c08888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92506117699150506020890189614742565b61177960408a0160208b01614742565b61178660408b018b614b0c565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061285f92505050565b505050505050505050565b6117d3612326565b6117dc8161295b565b6007546040516001600160a01b038084169216907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd90600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b611840612326565b6111f8612982565b611850612326565b61ffff83166000908152600560205260408082209051611871908590614b52565b9081526040805191829003602090810183206001600160401b0386166000908152915220919091556118a4908390614b52565b6040805191829003822061ffff861683526001600160401b0384166020840152917f48a980eea4ea1c540209e2f9f32a4c2edf51fab37b1d21f453868301ecb6e2ee910160405180910390a2505050565b60006011547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611958573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197c9190614b6e565b6119869190614af5565b905090565b61ffff81166000908152600160205260408120805460609291906119ae90614a0e565b80601f01602080910402602001604051908101604052809291908181526020018280546119da90614a0e565b8015611a275780601f106119fc57610100808354040283529160200191611a27565b820191906000526020600020905b815481529060010190602001808311611a0a57829003601f168201915b505050505090508051600003611a7f5760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610cce565b6111e1600060148351611a929190614af5565b8391906129bf565b600080611b178b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c9081908401838280828437600092019190915250612acc92505050565b91509150995099975050505050505050565b611b31612326565b818130604051602001611b4693929190614b87565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251611b7b939192909101906140d5565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611baf93929190614ac1565b60405180910390a1505050565b611bc4612326565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020016110bb565b611c1a612326565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611c6e9088908890889088908890600401614bad565b600060405180830381600087803b158015611c8857600080fd5b505af11580156117c0573d6000803e3d6000fd5b611ca4612326565b61ffff82166000908152600d6020526040902054811115611d1e5760405162461bcd60e51b815260206004820152602e60248201527f73696e676c652072656365697665207472616e73616374696f6e206c696d697460448201526d080f8811185a5b1e481b1a5b5a5d60921b6064820152608401610cce565b61ffff82166000818152600c60209081526040918290205482519384529083015281018290527f2c42997a938a029910a78e7c28d762b349c28e70f3a89c1fbccbb1a46020b1599060600160405180910390a161ffff9091166000908152600c6020526040902055565b61ffff86166000908152600560205260408082209051611dab9088908890614a42565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080611e2b5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610cce565b808383604051611e3c929190614a42565b604051809103902014611e9b5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610cce565b61ffff87166000908152600560205260408082209051611ebe9089908990614a42565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252611f56918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061268692505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051611f8d959493929190614bdb565b60405180910390a150505050505050565b611fa6612326565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611baf565b3330146120575760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610cce565b6120623086866124cc565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf866040516120a491815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da9083906120e8908e908e908e908e908e908d908d908d90600401614c16565b600060405180830381600088803b15801561210257600080fd5b5087f1158015612116573d6000803e3d6000fd5b505050505050505050505050505050565b61212f612326565b61ffff8316600090815260016020526040902061214d908383614159565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611baf93929190614ac1565b612189612326565b6001600160a01b0381166121ee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610cce565b6121f781612b87565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa15801561227a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122a29190810190614c71565b90505b949350505050565b6000806123105a60966366ad5c8a60e01b898989896040516024016122d59493929190614cde565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612be0565b9150915081611523576115238686868685612c6a565b6000546001600160a01b036101009091041633146111f85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610cce565b60008060006123d48761239888612d07565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb109061242b908b90309086908b908b90600401614d1c565b6040805180830381865afa158015612447573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246b9190614d70565b92509250509550959350505050565b612482612d8d565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006124d6612dd6565b6040516370a0823160e01b81526001600160a01b0384811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125659190614b6e565b9050306001600160a01b038616036125b0576125ab6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168585612e1c565b6125e5565b6125e56001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868686612e84565b6040516370a0823160e01b81526001600160a01b03858116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561264f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126739190614b6e565b61267d9190614af5565b95945050505050565b61ffff8416600090815260016020526040812080546126a490614a0e565b80601f01602080910402602001604051908101604052809291908181526020018280546126d090614a0e565b801561271d5780601f106126f25761010080835404028352916020019161271d565b820191906000526020600020905b81548152906001019060200180831161270057829003601f168201915b5050505050905080518451148015612736575060008151115b801561274f575080805190602001208480519060200120145b61276b5760405162461bcd60e51b8152600401610cce90614a52565b610f0585858585612ec2565b600061278587828481612f49565b61278e8561301e565b50905061279d8888888461305e565b9050600081116127eb5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610cce565b60006127fa8761239884612d07565b905061280a888287878734613106565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161284b91815260200190565b60405180910390a450979650505050505050565b6000612877896001846001600160401b038916612f49565b6128808761301e565b50905061288f8a8a8a8461305e565b9050600081116128dd5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610cce565b60006128f4338a6128ed85612d07565b8a8a6132ab565b90506129048a8287878734613106565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161294591815260200190565b60405180910390a4509998505050505050505050565b6001600160a01b0381166121f7576040516342bcdf7f60e11b815260040160405180910390fd5b61298a612dd6565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124af3390565b6060816129cd81601f614d94565b1015612a0c5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610cce565b612a168284614d94565b84511015612a5a5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610cce565b606082158015612a795760405191506000825260208201604052612ac3565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612ab2578051835260209283019201612a9a565b5050858452601f01601f1916604052505b50949350505050565b6000806000612adf338a6128ed8b612d07565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612b36908d90309086908b908b90600401614d1c565b6040805180830381865afa158015612b52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b769190614d70565b925092505097509795505050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6000606060008060008661ffff166001600160401b03811115612c0557612c0561448d565b6040519080825280601f01601f191660200182016040528015612c2f576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612c51578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051612c9b9190614b52565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90612cf89087908790879087908790614dac565b60405180910390a15050505050565b600080612d347f000000000000000000000000000000000000000000000000000000000000000084614e14565b90506001600160401b03811115610e7d5760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610cce565b60005460ff166111f85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610cce565b60005460ff16156111f85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610cce565b6040516001600160a01b038316602482015260448101829052612e7f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526132ec565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052612ebc9085906323b872dd60e01b90608401612e48565b50505050565b6000612ece82826133c1565b905060ff8116612ee957612ee48585858561341d565b610f05565b60001960ff821601612f0157612ee4858585856134ad565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610cce565b6000612f54836136bb565b61ffff80871660009081526002602090815260408083209389168352929052205490915080612fc55760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610cce565b612fcf8382614d94565b8210156115235760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610cce565b60008061304b7f000000000000000000000000000000000000000000000000000000000000000084614e28565b90506130578184614af5565b9150915091565b6000613068612dd6565b6001600160a01b03851633146130cb5760405162461bcd60e51b815260206004820152602260248201527f50726f78794f46543a206f776e6572206973206e6f742073656e642063616c6c60448201526132b960f11b6064820152608401610cce565b6130d6858584613717565b60006130e38630856124cc565b905080601160008282546130f79190614d94565b90915550909695505050505050565b61ffff86166000908152600160205260408120805461312490614a0e565b80601f016020809104026020016040519081016040528092919081815260200182805461315090614a0e565b801561319d5780601f106131725761010080835404028352916020019161319d565b820191906000526020600020905b81548152906001019060200180831161318057829003601f168201915b50505050509050805160000361320e5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610cce565b613219878751613934565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490613270908b9086908c908c908c908c90600401614e3c565b6000604051808303818588803b15801561328957600080fd5b505af115801561329d573d6000803e3d6000fd5b505050505050505050505050565b6060600185856001600160a01b03891685876040516020016132d296959493929190614ea3565b604051602081830303815290604052905095945050505050565b6000613341826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139a59092919063ffffffff16565b90508051600014806133625750808060200190518101906133629190614f04565b612e7f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610cce565b60006133ce826001614d94565b835110156134145760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610cce565b50016001015190565b600080613429836139b4565b90925090506001600160a01b0382166134425761dead91505b600061344d82613a39565b905061345a878483613a6e565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8360405161349c91815260200190565b60405180910390a350505050505050565b60008060008060006134be86613abc565b945094509450945094506000600660008b61ffff1661ffff168152602001908152602001600020896040516134f39190614b52565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff16915061352685613a39565b905081613594576135388b3083613a6e565b61ffff8c16600090815260066020526040908190209051919250600191613560908d90614b52565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b6135eb576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a150505050505050612ebc565b8a8a8a8a8a8a868a60008a613609578b6001600160401b031661360b565b5a5b905060008061363d5a609663eaffd49a60e01b8e8e8e8d8d8d8d8d6040516024016122d5989796959493929190614f21565b915091508115613696578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd88490613688908e908e908690614f95565b60405180910390a2506136a3565b6136a38b8b8b8b85612c6a565b50505050505050505050505050505050505050505050565b600060228251101561370f5760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610cce565b506022015190565b6001600160a01b03831660009081526010602052604090205460ff16801561373f5750505050565b6040805160208101909152600754600091829181906001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156137c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137eb9190614b6e565b905290506137f98185613b73565b61ffff86166000908152600b6020908152604080832054600a8352818420546008845282852054600990945291909320549395504293909190818711156138825760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610cce565b620151806138908587614af5565b11156138b45761ffff8a166000908152600b602052604090208590558692506138c1565b6138be8784614d94565b92505b808311156139115760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610cce565b505061ffff9097166000908152600a602052604090209690965550505050505050565b61ffff82166000908152600360205260408120549081900361395557506127105b80821115612e7f5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610cce565b60606122a58484600085613b8b565b600080806139c284826133c1565b60ff161480156139d3575082516029145b613a1a5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610cce565b613a2583600d613c66565b9150613a32836021613ccb565b9050915091565b6000610e7d7f00000000000000000000000000000000000000000000000000000000000000006001600160401b038416614fc3565b6000613a78612dd6565b613a83838584613d28565b8160116000828254613a959190614af5565b9091555050306001600160a01b03841603613ab15750806111e1565b6122a53084846124cc565b600080806060816001613acf87836133c1565b60ff1614613b1a5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610cce565b613b2586600d613c66565b9350613b32866021613ccb565b9250613b3f866029613f45565b9450613b4c866049613ccb565b9050613b686051808851613b609190614af5565b8891906129bf565b915091939590929450565b600080613b808484613fa3565b90506122a581613fd4565b606082471015613bec5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610cce565b600080866001600160a01b03168587604051613c089190614b52565b60006040518083038185875af1925050503d8060008114613c45576040519150601f19603f3d011682016040523d82523d6000602084013e613c4a565b606091505b5091509150613c5b87838387613fec565b979650505050505050565b6000613c73826014614d94565b83511015613cbb5760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610cce565b500160200151600160601b900490565b6000613cd8826008614d94565b83511015613d1f5760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610cce565b50016008015190565b6001600160a01b03831660009081526010602052604090205460ff168015613d505750505050565b6040805160208101909152600754600091829181906001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613dd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613dfc9190614b6e565b90529050613e0a8185613b73565b61ffff86166000908152600f6020908152604080832054600e835281842054600c845282852054600d9094529190932054939550429390919081871115613e935760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610cce565b62015180613ea18587614af5565b1115613ec55761ffff8a166000908152600f60205260409020859055869250613ed2565b613ecf8784614d94565b92505b80831115613f225760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610cce565b505061ffff9097166000908152600e602052604090209690965550505050505050565b6000613f52826020614d94565b83511015613f9a5760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610cce565b50016020015190565b6040805160208101909152600081526040518060200160405280613fcb856000015185614065565b90529392505050565b8051600090610e7d90670de0b6b3a764000090614e14565b6060831561405b578251600003614054576001600160a01b0385163b6140545760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610cce565b50816122a5565b6122a58383614071565b60006111e18284614fc3565b8151156140815781518083602001fd5b8060405162461bcd60e51b8152600401610cce919061467d565b5080546140a790614a0e565b6000825580601f106140b7575050565b601f0160209004906000526020600020908101906121f791906141cd565b8280546140e190614a0e565b90600052602060002090601f0160209004810192826141035760008555614149565b82601f1061411c57805160ff1916838001178555614149565b82800160010185558215614149579182015b8281111561414957825182559160200191906001019061412e565b506141559291506141cd565b5090565b82805461416590614a0e565b90600052602060002090601f0160209004810192826141875760008555614149565b82601f106141a05782800160ff19823516178555614149565b82800160010185558215614149579182015b828111156141495782358255916020019190600101906141b2565b5b8082111561415557600081556001016141ce565b803561ffff811681146141f457600080fd5b919050565b60008083601f84011261420b57600080fd5b5081356001600160401b0381111561422257600080fd5b60208301915083602082850101111561423a57600080fd5b9250929050565b80356001600160401b03811681146141f457600080fd5b6000806000806000806080878903121561427157600080fd5b61427a876141e2565b955060208701356001600160401b038082111561429657600080fd5b6142a28a838b016141f9565b90975095508591506142b660408a01614241565b945060608901359150808211156142cc57600080fd5b506142d989828a016141f9565b979a9699509497509295939492505050565b6000602082840312156142fd57600080fd5b81356001600160e01b0319811681146111e157600080fd5b60006020828403121561432757600080fd5b6111e1826141e2565b6000806040838503121561434357600080fd5b61434c836141e2565b946020939093013593505050565b80151581146121f757600080fd5b60008060008060008060a0878903121561438157600080fd5b61438a876141e2565b9550602087013594506040870135935060608701356143a88161435a565b925060808701356001600160401b038111156143c357600080fd5b6142d989828a016141f9565b6000806000604084860312156143e457600080fd5b6143ed846141e2565b925060208401356001600160401b0381111561440857600080fd5b614414868287016141f9565b9497909650939450505050565b6001600160a01b03811681146121f757600080fd5b6000806040838503121561444957600080fd5b823561434c81614421565b6000806040838503121561446757600080fd5b823561447281614421565b915060208301356144828161435a565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156144cb576144cb61448d565b604052919050565b60006001600160401b038211156144ec576144ec61448d565b50601f01601f191660200190565b60008060006060848603121561450f57600080fd5b614518846141e2565b925060208401356001600160401b0381111561453357600080fd5b8401601f8101861361454457600080fd5b8035614557614552826144d3565b6144a3565b81815287602083850101111561456c57600080fd5b8160208401602083013760006020838301015280945050505061459160408501614241565b90509250925092565b6000606082840312156145ac57600080fd5b50919050565b600080600080600060a086880312156145ca57600080fd5b85356145d581614421565b94506145e3602087016141e2565b9350604086013592506060860135915060808601356001600160401b0381111561460c57600080fd5b6146188882890161459a565b9150509295509295909350565b60005b83811015614640578181015183820152602001614628565b83811115612ebc5750506000910152565b60008151808452614669816020860160208601614625565b601f01601f19169290920160200192915050565b6020815260006111e16020830184614651565b60008060008060008060008060e0898b0312156146ac57600080fd5b88356146b781614421565b97506146c560208a016141e2565b9650604089013595506060890135945060808901356001600160401b03808211156146ef57600080fd5b6146fb8c838d016141f9565b909650945084915061470f60a08c01614241565b935060c08b013591508082111561472557600080fd5b506147328b828c0161459a565b9150509295985092959890939650565b60006020828403121561475457600080fd5b81356111e181614421565b6000806040838503121561477257600080fd5b61477b836141e2565b9150614789602084016141e2565b90509250929050565b600080600080600080600080600060e08a8c0312156147b057600080fd5b6147b98a6141e2565b985060208a0135975060408a0135965060608a01356001600160401b03808211156147e357600080fd5b6147ef8d838e016141f9565b909850965086915061480360808d01614241565b955060a08c013591506148158261435a565b90935060c08b0135908082111561482b57600080fd5b506148388c828d016141f9565b915080935050809150509295985092959850929598565b60008060008060006080868803121561486757600080fd5b614870866141e2565b945061487e602087016141e2565b93506040860135925060608601356001600160401b038111156148a057600080fd5b6148ac888289016141f9565b969995985093965092949392505050565b6000806000606084860312156148d257600080fd5b6148db846141e2565b92506148e9602085016141e2565b9150604084013590509250925092565b6000806000806000806000806000806101008b8d03121561491957600080fd5b6149228b6141e2565b995060208b01356001600160401b038082111561493e57600080fd5b61494a8e838f016141f9565b909b50995089915061495e60408e01614241565b985060608d0135975060808d0135915061497782614421565b90955060a08c0135945060c08c0135908082111561499457600080fd5b506149a18d828e016141f9565b9150809450508092505060e08b013590509295989b9194979a5092959850565b600080600080608085870312156149d757600080fd5b6149e0856141e2565b93506149ee602086016141e2565b925060408501356149fe81614421565b9396929550929360600135925050565b600181811c90821680614a2257607f821691505b6020821081036145ac57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b60208082526026908201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6040820152651b9d1c9858dd60d21b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff841681526040602082015260006122a2604083018486614a98565b634e487b7160e01b600052601160045260246000fd5b600082821015614b0757614b07614adf565b500390565b6000808335601e19843603018112614b2357600080fd5b8301803591506001600160401b03821115614b3d57600080fd5b60200191503681900382131561423a57600080fd5b60008251614b64818460208701614625565b9190910192915050565b600060208284031215614b8057600080fd5b5051919050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152613c5b608083018486614a98565b61ffff86168152608060208201526000614bf9608083018688614a98565b6001600160401b0394909416604083015250606001529392505050565b61ffff8916815260c060208201526000614c3460c08301898b614a98565b6001600160401b038816604084015286606084015285608084015282810360a0840152614c62818587614a98565b9b9a5050505050505050505050565b600060208284031215614c8357600080fd5b81516001600160401b03811115614c9957600080fd5b8201601f81018413614caa57600080fd5b8051614cb8614552826144d3565b818152856020838501011115614ccd57600080fd5b61267d826020830160208601614625565b61ffff85168152608060208201526000614cfb6080830186614651565b6001600160401b03851660408401528281036060840152613c5b8185614651565b61ffff861681526001600160a01b038516602082015260a060408201819052600090614d4a90830186614651565b84151560608401528281036080840152614d648185614651565b98975050505050505050565b60008060408385031215614d8357600080fd5b505080516020909101519092909150565b60008219821115614da757614da7614adf565b500190565b61ffff8616815260a060208201526000614dc960a0830187614651565b6001600160401b03861660408401528281036060840152614dea8186614651565b90508281036080840152614d648185614651565b634e487b7160e01b600052601260045260246000fd5b600082614e2357614e23614dfe565b500490565b600082614e3757614e37614dfe565b500690565b61ffff8716815260c060208201526000614e5960c0830188614651565b8281036040840152614e6b8188614651565b6001600160a01b0387811660608601528616608085015283810360a08501529050614e968185614651565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b166049840152508251614ef2816051850160208701614625565b91909101605101979650505050505050565b600060208284031215614f1657600080fd5b81516111e18161435a565b600061010061ffff8b168352806020840152614f3f8184018b614651565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c08501529050614f7f8186614651565b9150508260e08301529998505050505050505050565b606081526000614fa86060830186614651565b6001600160401b039490941660208301525060400152919050565b6000816000190483118215151615614fdd57614fdd614adf565b50029056fea264697066735822122027b3556a9016d3069fd8381145fbf4b56ed51c3632549ece028ff574d0aa941664736f6c634300080d0033", + "solcInputHash": "df53eb8de81c9fdb7d3455a6cb9a397c", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress_\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"sharedDecimals_\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"lzEndpoint_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracle_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"CallOFTReceivedSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"name\":\"DropFailedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FallbackWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"innerToken\",\"type\":\"address\"}],\"name\":\"InnerTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"NonContractAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOracle\",\"type\":\"address\"}],\"name\":\"OracleChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ReceiveFromChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_payloadHash\",\"type\":\"bytes32\"}],\"name\":\"RetryMessageSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"SendToChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxDailyLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxDailyReceiveLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxSingleReceiveTransactionLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxSingleTransactionLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minDstGas\",\"type\":\"uint256\"}],\"name\":\"SetMinDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"precrime\",\"type\":\"address\"}],\"name\":\"SetPrecrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemoteAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isWhitelist\",\"type\":\"bool\"}],\"name\":\"SetWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"}],\"name\":\"TrustedRemoteRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_PAYLOAD_SIZE_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NO_EXTRA_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND_AND_CALL\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"_from\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasForCall\",\"type\":\"uint256\"}],\"name\":\"callOnOFTReceived\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourReceiveWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourReceived\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourTransferred\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxDailyLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxDailyReceiveLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxSingleReceiveTransactionLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxSingleTransactionLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"circulatingSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"creditedPackets\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"srcChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"srcAddress_\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"nonce_\",\"type\":\"uint64\"}],\"name\":\"dropFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_dstGasForCall\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendAndCallFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"failedMessages\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"fallbackWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"forceResumeReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getTrustedRemoteAddress\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lzEndpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"lzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"minDstGasLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"nonblockingLzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"internalType\":\"contract ResilientOracleInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"outboundAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"payloadSizeLimitLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"precrime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"}],\"name\":\"removeTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_dstGasForCall\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"_callParams\",\"type\":\"tuple\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"_callParams\",\"type\":\"tuple\"}],\"name\":\"sendFrom\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_config\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyReceiveLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxSingleReceiveTransactionLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxSingleTransactionLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_packetType\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_minGas\",\"type\":\"uint256\"}],\"name\":\"setMinDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oracleAddress_\",\"type\":\"address\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"}],\"name\":\"setPayloadSizeLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_precrime\",\"type\":\"address\"}],\"name\":\"setPrecrime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setReceiveVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setSendVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"val_\",\"type\":\"bool\"}],\"name\":\"setWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sharedDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"trustedRemoteLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"dropFailedMessage(uint16,bytes,uint64)\":{\"params\":{\"nonce_\":\"Nonce_ of the transaction\",\"srcAddress_\":\"Address of source followed by current bridge address\",\"srcChainId_\":\"Chain id of source\"}},\"estimateSendFee(uint16,bytes32,uint256,bool,bytes)\":{\"details\":\"estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _amount - amount of the tokens to transfer _useZro - indicates to use zro to pay L0 fees _adapterParam - flexible bytes array to indicate messaging adapter services in L0\"},\"fallbackWithdraw(address,uint256)\":{\"params\":{\"amount_\":\"The amount of withdrawal\",\"to_\":\"The address to withdraw to\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"custom:access\":\"Only owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"removeTrustedRemote(uint16)\":{\"params\":{\"remoteChainId_\":\"The chain's id corresponds to setting the trusted remote to empty.\"}},\"sendFrom(address,uint16,bytes32,uint256,(address,address,bytes))\":{\"details\":\"send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from` `_from` the owner of token `_dstChainId` the destination chain identifier `_toAddress` can be any size depending on the `dstChainId`. `_amount` the quantity of tokens in wei `_refundAddress` the address LayerZero refunds if too much message fee is sent `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services\"},\"setMaxDailyLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxDailyLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"Destination chain id.\",\"limit_\":\"Amount in USD(scaled with 18 decimals).\"}},\"setMaxDailyReceiveLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"The destination chain ID.\",\"limit_\":\"The new maximum daily limit in USD(scaled with 18 decimals).\"}},\"setMaxSingleReceiveTransactionLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"The destination chain ID.\",\"limit_\":\"The new maximum limit in USD(scaled with 18 decimals).\"}},\"setMaxSingleTransactionLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"Destination chain id.\",\"limit_\":\"Amount in USD(scaled with 18 decimals).\"}},\"setOracle(address)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits OracleChanged with old and new oracle address.\",\"details\":\"Reverts if the new address is zero.\",\"params\":{\"oracleAddress_\":\"The new address of the ResilientOracle contract.\"}},\"setWhitelist(address,bool)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setWhitelist.\",\"params\":{\"user_\":\"Adress to be add in whitelist.\",\"val_\":\"Boolean to be set (true for user_ address is whitelisted).\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"custom:access\":\"Only owner.\"}},\"title\":\"XVSProxyOFTSrc\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"DropFailedMessage(uint16,bytes,uint64)\":{\"notice\":\"Emits when stored message dropped without successfull retrying.\"},\"FallbackWithdraw(address,uint256)\":{\"notice\":\"Emits when locked token released manually by owner.\"},\"InnerTokenAdded(address)\":{\"notice\":\"Event emitted when inner token set successfully.\"},\"OracleChanged(address,address)\":{\"notice\":\"Event emitted when oracle is modified.\"},\"SetMaxDailyLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit of transactions from local chain is modified.\"},\"SetMaxDailyReceiveLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\"},\"SetMaxSingleReceiveTransactionLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum limit for a single receive transaction from remote chain is modified.\"},\"SetMaxSingleTransactionLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum limit for a single transaction from local chain is modified.\"},\"SetWhitelist(address,bool)\":{\"notice\":\"Emmited when address is added to whitelist.\"},\"TrustedRemoteRemoved(uint16)\":{\"notice\":\"Event emitted when trusted remote sets to empty.\"}},\"kind\":\"user\",\"methods\":{\"chainIdToLast24HourReceiveWindowStart(uint16)\":{\"notice\":\"Timestamp when the last 24-hour window started from remote chain.\"},\"chainIdToLast24HourReceived(uint16)\":{\"notice\":\"Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\"},\"chainIdToLast24HourTransferred(uint16)\":{\"notice\":\"Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\"},\"chainIdToLast24HourWindowStart(uint16)\":{\"notice\":\"Timestamp when the last 24-hour window started from local chain.\"},\"chainIdToMaxDailyLimit(uint16)\":{\"notice\":\"Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\"},\"chainIdToMaxDailyReceiveLimit(uint16)\":{\"notice\":\"Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\"},\"chainIdToMaxSingleReceiveTransactionLimit(uint16)\":{\"notice\":\"Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\"},\"chainIdToMaxSingleTransactionLimit(uint16)\":{\"notice\":\"Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\"},\"circulatingSupply()\":{\"notice\":\"Returns the total circulating supply of the token on the source chain i.e (total supply - locked in this contract).\"},\"dropFailedMessage(uint16,bytes,uint64)\":{\"notice\":\"Clear failed messages from the storage.\"},\"fallbackWithdraw(address,uint256)\":{\"notice\":\"Only call it when there is no way to recover the failed message. `dropFailedMessage` must be called first if transaction is from remote->local chain to avoid double spending.\"},\"oracle()\":{\"notice\":\"The address of ResilientOracle contract wrapped in its interface.\"},\"outboundAmount()\":{\"notice\":\"total amount is transferred from this chain to other chains.\"},\"pause()\":{\"notice\":\"Triggers stopped state of the bridge.\"},\"removeTrustedRemote(uint16)\":{\"notice\":\"Remove trusted remote from storage.\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening.\"},\"setMaxDailyLimit(uint16,uint256)\":{\"notice\":\"Sets the limit of daily (24 Hour) transactions amount.\"},\"setMaxDailyReceiveLimit(uint16,uint256)\":{\"notice\":\"Sets the maximum daily limit for receiving transactions.\"},\"setMaxSingleReceiveTransactionLimit(uint16,uint256)\":{\"notice\":\"Sets the maximum limit for a single receive transaction.\"},\"setMaxSingleTransactionLimit(uint16,uint256)\":{\"notice\":\"Sets the limit of single transaction amount.\"},\"setOracle(address)\":{\"notice\":\"Set the address of the ResilientOracle contract.\"},\"setWhitelist(address,bool)\":{\"notice\":\"Sets the whitelist address to skip checks on transaction limit.\"},\"token()\":{\"notice\":\"Return's the address of the inner token of this bridge.\"},\"unpause()\":{\"notice\":\"Triggers resume state of the bridge.\"},\"whitelist(address)\":{\"notice\":\"Address on which cap check and bound limit is not appicable.\"}},\"notice\":\"XVSProxyOFTSrc contract serves as a crucial component for cross-chain token transactions, focusing on the source side of these transactions. It monitors the total amount transferred to other chains, ensuring it complies with defined limits, and provides functions for transferring tokens while maintaining control over the circulating supply on the source chain.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/XVSProxyOFTSrc.sol\":\"XVSProxyOFTSrc\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@layerzerolabs/solidity-examples/contracts/libraries/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\n/*\\n * @title Solidity Bytes Arrays Utils\\n * @author Gon\\u00e7alo S\\u00e1 \\n *\\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\\n */\\npragma solidity >=0.8.0 <0.9.0;\\n\\nlibrary BytesLib {\\n function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(\\n 0x40,\\n and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n )\\n )\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(and(fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00), and(mload(mc), mask)))\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint _start,\\n uint _length\\n ) internal pure returns (bytes memory) {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) {\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint _start) internal pure returns (uint8) {\\n require(_bytes.length >= _start + 1, \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint16(bytes memory _bytes, uint _start) internal pure returns (uint16) {\\n require(_bytes.length >= _start + 2, \\\"toUint16_outOfBounds\\\");\\n uint16 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x2), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint32(bytes memory _bytes, uint _start) internal pure returns (uint32) {\\n require(_bytes.length >= _start + 4, \\\"toUint32_outOfBounds\\\");\\n uint32 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x4), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint64(bytes memory _bytes, uint _start) internal pure returns (uint64) {\\n require(_bytes.length >= _start + 8, \\\"toUint64_outOfBounds\\\");\\n uint64 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x8), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint96(bytes memory _bytes, uint _start) internal pure returns (uint96) {\\n require(_bytes.length >= _start + 12, \\\"toUint96_outOfBounds\\\");\\n uint96 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0xc), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint128(bytes memory _bytes, uint _start) internal pure returns (uint128) {\\n require(_bytes.length >= _start + 16, \\\"toUint128_outOfBounds\\\");\\n uint128 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x10), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint256(bytes memory _bytes, uint _start) internal pure returns (uint) {\\n require(_bytes.length >= _start + 32, \\\"toUint256_outOfBounds\\\");\\n uint tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toBytes32(bytes memory _bytes, uint _start) internal pure returns (bytes32) {\\n require(_bytes.length >= _start + 32, \\\"toBytes32_outOfBounds\\\");\\n bytes32 tempBytes32;\\n\\n assembly {\\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempBytes32;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n for {\\n\\n } eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n}\\n\",\"keccak256\":\"0x7e64cccdf22a03f513d94960f2145dd801fb5ec88d971de079b5186a9f5e93c4\",\"license\":\"Unlicense\"},\"@layerzerolabs/solidity-examples/contracts/libraries/ExcessivelySafeCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT OR Apache-2.0\\npragma solidity >=0.7.6;\\n\\nlibrary ExcessivelySafeCall {\\n uint constant LOW_28_MASK = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeCall(\\n address _target,\\n uint _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal returns (bool, bytes memory) {\\n // set up for assembly call\\n uint _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := call(\\n _gas, // gas\\n _target, // recipient\\n 0, // ether value\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeStaticCall(\\n address _target,\\n uint _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal view returns (bool, bytes memory) {\\n // set up for assembly call\\n uint _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := staticcall(\\n _gas, // gas\\n _target, // recipient\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /**\\n * @notice Swaps function selectors in encoded contract calls\\n * @dev Allows reuse of encoded calldata for functions with identical\\n * argument types but different names. It simply swaps out the first 4 bytes\\n * for the new selector. This function modifies memory in place, and should\\n * only be used with caution.\\n * @param _newSelector The new 4-byte selector\\n * @param _buf The encoded contract args\\n */\\n function swapSelector(bytes4 _newSelector, bytes memory _buf) internal pure {\\n require(_buf.length >= 4);\\n uint _mask = LOW_28_MASK;\\n assembly {\\n // load the first word of\\n let _word := mload(add(_buf, 0x20))\\n // mask out the top 4 bytes\\n // /x\\n _word := and(_word, _mask)\\n _word := or(_newSelector, _word)\\n mstore(add(_buf, 0x20), _word)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd4e52af409b5ec80432292d86fb01906785eb78ac31da3bab4565aabcd6e3e56\",\"license\":\"MIT OR Apache-2.0\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/LzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"./interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"./interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\nimport \\\"./interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"../libraries/BytesLib.sol\\\";\\n\\n/*\\n * a generic LzReceiver implementation\\n */\\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using BytesLib for bytes;\\n\\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\\n uint public constant DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\\n\\n ILayerZeroEndpoint public immutable lzEndpoint;\\n mapping(uint16 => bytes) public trustedRemoteLookup;\\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\\n mapping(uint16 => uint) public payloadSizeLimitLookup;\\n address public precrime;\\n\\n event SetPrecrime(address precrime);\\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\\n\\n constructor(address _endpoint) {\\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public virtual override {\\n // lzReceive must be called by the endpoint for security\\n require(_msgSender() == address(lzEndpoint), \\\"LzApp: invalid endpoint caller\\\");\\n\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(\\n _srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote),\\n \\\"LzApp: invalid source sending contract\\\"\\n );\\n\\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\\n function _blockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual;\\n\\n function _lzSend(\\n uint16 _dstChainId,\\n bytes memory _payload,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams,\\n uint _nativeFee\\n ) internal virtual {\\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\\n require(trustedRemote.length != 0, \\\"LzApp: destination chain is not a trusted source\\\");\\n _checkPayloadSize(_dstChainId, _payload.length);\\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _checkGasLimit(\\n uint16 _dstChainId,\\n uint16 _type,\\n bytes memory _adapterParams,\\n uint _extraGas\\n ) internal view virtual {\\n uint providedGasLimit = _getGasLimit(_adapterParams);\\n uint minGasLimit = minDstGasLookup[_dstChainId][_type];\\n require(minGasLimit > 0, \\\"LzApp: minGasLimit not set\\\");\\n require(providedGasLimit >= minGasLimit + _extraGas, \\\"LzApp: gas limit is too low\\\");\\n }\\n\\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\\n require(_adapterParams.length >= 34, \\\"LzApp: invalid adapterParams\\\");\\n assembly {\\n gasLimit := mload(add(_adapterParams, 34))\\n }\\n }\\n\\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\\n if (payloadSizeLimit == 0) {\\n // use default if not set\\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\\n }\\n require(_payloadSize <= payloadSizeLimit, \\\"LzApp: payload size is too large\\\");\\n }\\n\\n //---------------------------UserApplication config----------------------------------------\\n function getConfig(\\n uint16 _version,\\n uint16 _chainId,\\n address,\\n uint _configType\\n ) external view returns (bytes memory) {\\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\\n }\\n\\n // generic config for LayerZero user Application\\n function setConfig(\\n uint16 _version,\\n uint16 _chainId,\\n uint _configType,\\n bytes calldata _config\\n ) external override onlyOwner {\\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\\n }\\n\\n function setSendVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setSendVersion(_version);\\n }\\n\\n function setReceiveVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setReceiveVersion(_version);\\n }\\n\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\\n }\\n\\n // _path = abi.encodePacked(remoteAddress, localAddress)\\n // this function set the trusted path for the cross-chain communication\\n function setTrustedRemote(uint16 _remoteChainId, bytes calldata _path) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = _path;\\n emit SetTrustedRemote(_remoteChainId, _path);\\n }\\n\\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\\n }\\n\\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\\n bytes memory path = trustedRemoteLookup[_remoteChainId];\\n require(path.length != 0, \\\"LzApp: no trusted path record\\\");\\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\\n }\\n\\n function setPrecrime(address _precrime) external onlyOwner {\\n precrime = _precrime;\\n emit SetPrecrime(_precrime);\\n }\\n\\n function setMinDstGas(\\n uint16 _dstChainId,\\n uint16 _packetType,\\n uint _minGas\\n ) external onlyOwner {\\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\\n }\\n\\n // if the size is 0, it means default size limit\\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\\n payloadSizeLimitLookup[_dstChainId] = _size;\\n }\\n\\n //--------------------------- VIEW FUNCTION ----------------------------------------\\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\\n return keccak256(trustedSource) == keccak256(_srcAddress);\\n }\\n}\\n\",\"keccak256\":\"0x309c994bdcf69ad63c6789694a28eb72a773e2d9db58fe572ab2b34a475972ce\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/NonblockingLzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LzApp.sol\\\";\\nimport \\\"../libraries/ExcessivelySafeCall.sol\\\";\\n\\n/*\\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\\n */\\nabstract contract NonblockingLzApp is LzApp {\\n using ExcessivelySafeCall for address;\\n\\n constructor(address _endpoint) LzApp(_endpoint) {}\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\\n\\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\\n\\n // overriding the virtual function in LzReceiver\\n function _blockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual override {\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\\n gasleft(),\\n 150,\\n abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload)\\n );\\n // try-catch all errors/exceptions\\n if (!success) {\\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\\n }\\n }\\n\\n function _storeFailedMessage(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload,\\n bytes memory _reason\\n ) internal virtual {\\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\\n }\\n\\n function nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public virtual {\\n // only internal transaction\\n require(_msgSender() == address(this), \\\"NonblockingLzApp: caller must be LzApp\\\");\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n //@notice override this function\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual;\\n\\n function retryMessage(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public payable virtual {\\n // assert there is message to retry\\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\\n require(payloadHash != bytes32(0), \\\"NonblockingLzApp: no stored message\\\");\\n require(keccak256(_payload) == payloadHash, \\\"NonblockingLzApp: invalid payload\\\");\\n // clear the stored message\\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\\n // execute the message. revert if it fails again\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\\n }\\n}\\n\",\"keccak256\":\"0x612ff1f2a158b7e64e873885b5ff08afa348998fd9005f384d555d643ba7968d\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(\\n uint16 _dstChainId,\\n bytes calldata _destination,\\n bytes calldata _payload,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes calldata _adapterParams\\n ) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n address _dstAddress,\\n uint64 _nonce,\\n uint _gasLimit,\\n bytes calldata _payload\\n ) external;\\n\\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(\\n uint16 _dstChainId,\\n address _userApplication,\\n bytes calldata _payload,\\n bool _payInZRO,\\n bytes calldata _adapterParam\\n ) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n bytes calldata _payload\\n ) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(\\n uint16 _version,\\n uint16 _chainId,\\n address _userApplication,\\n uint _configType\\n ) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xab7fcacc672251c850f00c0abd4100df9afcc4ad70b8d331a2fd4cb07acab9f4\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroReceiver {\\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\\n // @param _srcChainId - the source endpoint identifier\\n // @param _srcAddress - the source sending contract address from the source chain\\n // @param _nonce - the ordered message nonce\\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) external;\\n}\\n\",\"keccak256\":\"0xac1966c1229bd4dc36b6c69eeb94a537bd9aa2198d7623b9ba7f8f7dbe79bb4c\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(\\n uint16 _version,\\n uint16 _chainId,\\n uint _configType,\\n bytes calldata _config\\n ) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xb4df93aeb0fb46373a4fb728ad2603edc8b9a1577eee8d801768dc115bf96498\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OFTCoreV2.sol\\\";\\nimport \\\"./interfaces/IOFTV2.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nabstract contract BaseOFTV2 is OFTCoreV2, ERC165, IOFTV2 {\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) OFTCoreV2(_sharedDecimals, _lzEndpoint) {}\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function sendFrom(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n LzCallParams calldata _callParams\\n ) public payable virtual override {\\n _send(_from, _dstChainId, _toAddress, _amount, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);\\n }\\n\\n function sendAndCall(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes calldata _payload,\\n uint64 _dstGasForCall,\\n LzCallParams calldata _callParams\\n ) public payable virtual override {\\n _sendAndCall(\\n _from,\\n _dstChainId,\\n _toAddress,\\n _amount,\\n _payload,\\n _dstGasForCall,\\n _callParams.refundAddress,\\n _callParams.zroPaymentAddress,\\n _callParams.adapterParams\\n );\\n }\\n\\n /************************************************************************\\n * public view functions\\n ************************************************************************/\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IOFTV2).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n function estimateSendFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bool _useZro,\\n bytes calldata _adapterParams\\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendFee(_dstChainId, _toAddress, _amount, _useZro, _adapterParams);\\n }\\n\\n function estimateSendAndCallFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes calldata _payload,\\n uint64 _dstGasForCall,\\n bool _useZro,\\n bytes calldata _adapterParams\\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendAndCallFee(_dstChainId, _toAddress, _amount, _payload, _dstGasForCall, _useZro, _adapterParams);\\n }\\n\\n function circulatingSupply() public view virtual override returns (uint);\\n\\n function token() public view virtual override returns (address);\\n}\\n\",\"keccak256\":\"0x59d2d32dd14a4f58232b126a7d69608a85f82137bd56d8ce0fc28ff646cba943\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTCoreV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../../lzApp/NonblockingLzApp.sol\\\";\\nimport \\\"../../../libraries/ExcessivelySafeCall.sol\\\";\\nimport \\\"./interfaces/ICommonOFT.sol\\\";\\nimport \\\"./interfaces/IOFTReceiverV2.sol\\\";\\n\\nabstract contract OFTCoreV2 is NonblockingLzApp {\\n using BytesLib for bytes;\\n using ExcessivelySafeCall for address;\\n\\n uint public constant NO_EXTRA_GAS = 0;\\n\\n // packet type\\n uint8 public constant PT_SEND = 0;\\n uint8 public constant PT_SEND_AND_CALL = 1;\\n\\n uint8 public immutable sharedDecimals;\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bool))) public creditedPackets;\\n\\n /**\\n * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\\n * `_nonce` is the outbound nonce\\n */\\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes32 indexed _toAddress, uint _amount);\\n\\n /**\\n * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\\n * `_nonce` is the inbound nonce.\\n */\\n event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\\n\\n event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\\n\\n event NonContractAddress(address _address);\\n\\n // _sharedDecimals should be the minimum decimals on all chains\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\\n sharedDecimals = _sharedDecimals;\\n }\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function callOnOFTReceived(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes32 _from,\\n address _to,\\n uint _amount,\\n bytes calldata _payload,\\n uint _gasForCall\\n ) public virtual {\\n require(_msgSender() == address(this), \\\"OFTCore: caller must be OFTCore\\\");\\n\\n // send\\n _amount = _transferFrom(address(this), _to, _amount);\\n emit ReceiveFromChain(_srcChainId, _to, _amount);\\n\\n // call\\n IOFTReceiverV2(_to).onOFTReceived{gas: _gasForCall}(_srcChainId, _srcAddress, _nonce, _from, _amount, _payload);\\n }\\n\\n /************************************************************************\\n * internal functions\\n ************************************************************************/\\n function _estimateSendFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bool _useZro,\\n bytes memory _adapterParams\\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendFrom()\\n bytes memory payload = _encodeSendPayload(_toAddress, _ld2sd(_amount));\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _estimateSendAndCallFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes memory _payload,\\n uint64 _dstGasForCall,\\n bool _useZro,\\n bytes memory _adapterParams\\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendAndCall()\\n bytes memory payload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(_amount), _payload, _dstGasForCall);\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual override {\\n uint8 packetType = _payload.toUint8(0);\\n\\n if (packetType == PT_SEND) {\\n _sendAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else if (packetType == PT_SEND_AND_CALL) {\\n _sendAndCallAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else {\\n revert(\\\"OFTCore: unknown packet type\\\");\\n }\\n }\\n\\n function _send(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams\\n ) internal virtual returns (uint amount) {\\n _checkGasLimit(_dstChainId, PT_SEND, _adapterParams, NO_EXTRA_GAS);\\n\\n (amount, ) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount); // amount returned should not have dust\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n bytes memory lzPayload = _encodeSendPayload(_toAddress, _ld2sd(amount));\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAck(\\n uint16 _srcChainId,\\n bytes memory,\\n uint64,\\n bytes memory _payload\\n ) internal virtual {\\n (address to, uint64 amountSD) = _decodeSendPayload(_payload);\\n if (to == address(0)) {\\n to = address(0xdead);\\n }\\n\\n uint amount = _sd2ld(amountSD);\\n amount = _creditTo(_srcChainId, to, amount);\\n\\n emit ReceiveFromChain(_srcChainId, to, amount);\\n }\\n\\n function _sendAndCall(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes memory _payload,\\n uint64 _dstGasForCall,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams\\n ) internal virtual returns (uint amount) {\\n _checkGasLimit(_dstChainId, PT_SEND_AND_CALL, _adapterParams, _dstGasForCall);\\n\\n (amount, ) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount);\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n // encode the msg.sender into the payload instead of _from\\n bytes memory lzPayload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(amount), _payload, _dstGasForCall);\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAndCallAck(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual {\\n (bytes32 from, address to, uint64 amountSD, bytes memory payloadForCall, uint64 gasForCall) = _decodeSendAndCallPayload(_payload);\\n\\n bool credited = creditedPackets[_srcChainId][_srcAddress][_nonce];\\n uint amount = _sd2ld(amountSD);\\n\\n // credit to this contract first, and then transfer to receiver only if callOnOFTReceived() succeeds\\n if (!credited) {\\n amount = _creditTo(_srcChainId, address(this), amount);\\n creditedPackets[_srcChainId][_srcAddress][_nonce] = true;\\n }\\n\\n if (!_isContract(to)) {\\n emit NonContractAddress(to);\\n return;\\n }\\n\\n // workaround for stack too deep\\n uint16 srcChainId = _srcChainId;\\n bytes memory srcAddress = _srcAddress;\\n uint64 nonce = _nonce;\\n bytes memory payload = _payload;\\n bytes32 from_ = from;\\n address to_ = to;\\n uint amount_ = amount;\\n bytes memory payloadForCall_ = payloadForCall;\\n\\n // no gas limit for the call if retry\\n uint gas = credited ? gasleft() : gasForCall;\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\\n gasleft(),\\n 150,\\n abi.encodeWithSelector(this.callOnOFTReceived.selector, srcChainId, srcAddress, nonce, from_, to_, amount_, payloadForCall_, gas)\\n );\\n\\n if (success) {\\n bytes32 hash = keccak256(payload);\\n emit CallOFTReceivedSuccess(srcChainId, srcAddress, nonce, hash);\\n } else {\\n // store the failed message into the nonblockingLzApp\\n _storeFailedMessage(srcChainId, srcAddress, nonce, payload, reason);\\n }\\n }\\n\\n function _isContract(address _account) internal view returns (bool) {\\n return _account.code.length > 0;\\n }\\n\\n function _ld2sd(uint _amount) internal view virtual returns (uint64) {\\n uint amountSD = _amount / _ld2sdRate();\\n require(amountSD <= type(uint64).max, \\\"OFTCore: amountSD overflow\\\");\\n return uint64(amountSD);\\n }\\n\\n function _sd2ld(uint64 _amountSD) internal view virtual returns (uint) {\\n return _amountSD * _ld2sdRate();\\n }\\n\\n function _removeDust(uint _amount) internal view virtual returns (uint amountAfter, uint dust) {\\n dust = _amount % _ld2sdRate();\\n amountAfter = _amount - dust;\\n }\\n\\n function _encodeSendPayload(bytes32 _toAddress, uint64 _amountSD) internal view virtual returns (bytes memory) {\\n return abi.encodePacked(PT_SEND, _toAddress, _amountSD);\\n }\\n\\n function _decodeSendPayload(bytes memory _payload) internal view virtual returns (address to, uint64 amountSD) {\\n require(_payload.toUint8(0) == PT_SEND && _payload.length == 41, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n }\\n\\n function _encodeSendAndCallPayload(\\n address _from,\\n bytes32 _toAddress,\\n uint64 _amountSD,\\n bytes memory _payload,\\n uint64 _dstGasForCall\\n ) internal view virtual returns (bytes memory) {\\n return abi.encodePacked(PT_SEND_AND_CALL, _toAddress, _amountSD, _addressToBytes32(_from), _dstGasForCall, _payload);\\n }\\n\\n function _decodeSendAndCallPayload(bytes memory _payload)\\n internal\\n view\\n virtual\\n returns (\\n bytes32 from,\\n address to,\\n uint64 amountSD,\\n bytes memory payload,\\n uint64 dstGasForCall\\n )\\n {\\n require(_payload.toUint8(0) == PT_SEND_AND_CALL, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n from = _payload.toBytes32(41);\\n dstGasForCall = _payload.toUint64(73);\\n payload = _payload.slice(81, _payload.length - 81);\\n }\\n\\n function _addressToBytes32(address _address) internal pure virtual returns (bytes32) {\\n return bytes32(uint(uint160(_address)));\\n }\\n\\n function _debitFrom(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _creditTo(\\n uint16 _srcChainId,\\n address _toAddress,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _transferFrom(\\n address _from,\\n address _to,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _ld2sdRate() internal view virtual returns (uint);\\n}\\n\",\"keccak256\":\"0x96cf7a10c5af4243822d25e77985a4a46d12264f839593ded5378cd6519a8df0\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/ICommonOFT.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface ICommonOFT is IERC165 {\\n\\n struct LzCallParams {\\n address payable refundAddress;\\n address zroPaymentAddress;\\n bytes adapterParams;\\n }\\n\\n /**\\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\\n * _dstChainId - L0 defined chain id to send tokens too\\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n * _amount - amount of the tokens to transfer\\n * _useZro - indicates to use zro to pay L0 fees\\n * _adapterParam - flexible bytes array to indicate messaging adapter services in L0\\n */\\n function estimateSendFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n function estimateSendAndCallFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n /**\\n * @dev returns the circulating amount of tokens on current chain\\n */\\n function circulatingSupply() external view returns (uint);\\n\\n /**\\n * @dev returns the address of the ERC20 token\\n */\\n function token() external view returns (address);\\n}\\n\",\"keccak256\":\"0x1d034ba786436c1fce8057352c87373098bd1d8026b24c8fbc7be28636d0c15d\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTReceiverV2.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.5.0;\\n\\ninterface IOFTReceiverV2 {\\n /**\\n * @dev Called by the OFT contract when tokens are received from source chain.\\n * @param _srcChainId The chain id of the source chain.\\n * @param _srcAddress The address of the OFT token contract on the source chain.\\n * @param _nonce The nonce of the transaction on the source chain.\\n * @param _from The address of the account who calls the sendAndCall() on the source chain.\\n * @param _amount The amount of tokens to transfer.\\n * @param _payload Additional data with no specified format.\\n */\\n function onOFTReceived(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes32 _from, uint _amount, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0xf57e437ced3bc10bb333123bb49475dab47c7615b86401c4d872c29ad4928fd5\",\"license\":\"BUSL-1.1\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ICommonOFT.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface IOFTV2 is ICommonOFT {\\n\\n /**\\n * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`\\n * `_from` the owner of token\\n * `_dstChainId` the destination chain identifier\\n * `_toAddress` can be any size depending on the `dstChainId`.\\n * `_amount` the quantity of tokens in wei\\n * `_refundAddress` the address LayerZero refunds if too much message fee is sent\\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\\n */\\n function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, LzCallParams calldata _callParams) external payable;\\n\\n function sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, LzCallParams calldata _callParams) external payable;\\n}\\n\",\"keccak256\":\"0xb1d31f341715347d49db4e2c0de27c49bbd70b5b3d9b0adb1050b2b3a305ab87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\ninterface OracleInterface {\\n function getPrice(address asset) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n\\n function updateAssetPrice(address asset) external;\\n\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address asset) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address asset,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x40031b19684ca0c912e794d08c2c0b0d8be77d3c1bdc937830a0658eff899650\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { EXP_SCALE as EXP_SCALE_, MANTISSA_ONE as MANTISSA_ONE_ } from \\\"./constants.sol\\\";\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Compound\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract ExponentialNoError {\\n struct Exp {\\n uint256 mantissa;\\n }\\n\\n struct Double {\\n uint256 mantissa;\\n }\\n\\n uint256 internal constant EXP_SCALE = EXP_SCALE_;\\n uint256 internal constant DOUBLE_SCALE = 1e36;\\n uint256 internal constant HALF_EXP_SCALE = EXP_SCALE / 2;\\n uint256 internal constant MANTISSA_ONE = MANTISSA_ONE_;\\n\\n /**\\n * @dev Truncates the given exp to a whole number value.\\n * For example, truncate(Exp{mantissa: 15 * EXP_SCALE}) = 15\\n */\\n function truncate(Exp memory exp) internal pure returns (uint256) {\\n // Note: We are not using careful math here as we're performing a division that cannot fail\\n return exp.mantissa / EXP_SCALE;\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function mul_ScalarTruncate(Exp memory a, uint256 scalar) internal pure returns (uint256) {\\n Exp memory product = mul_(a, scalar);\\n return truncate(product);\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function mul_ScalarTruncateAddUInt(Exp memory a, uint256 scalar, uint256 addend) internal pure returns (uint256) {\\n Exp memory product = mul_(a, scalar);\\n return add_(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Checks if first Exp is less than second Exp.\\n */\\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa < right.mantissa;\\n }\\n\\n function safe224(uint256 n, string memory errorMessage) internal pure returns (uint224) {\\n require(n <= type(uint224).max, errorMessage);\\n return uint224(n);\\n }\\n\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n <= type(uint32).max, errorMessage);\\n return uint32(n);\\n }\\n\\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / EXP_SCALE });\\n }\\n\\n function mul_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint256 a, Exp memory b) internal pure returns (uint256) {\\n return mul_(a, b.mantissa) / EXP_SCALE;\\n }\\n\\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / DOUBLE_SCALE });\\n }\\n\\n function mul_(Double memory a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint256 a, Double memory b) internal pure returns (uint256) {\\n return mul_(a, b.mantissa) / DOUBLE_SCALE;\\n }\\n\\n function mul_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(mul_(a.mantissa, EXP_SCALE), b.mantissa) });\\n }\\n\\n function div_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint256 a, Exp memory b) internal pure returns (uint256) {\\n return div_(mul_(a, EXP_SCALE), b.mantissa);\\n }\\n\\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a.mantissa, DOUBLE_SCALE), b.mantissa) });\\n }\\n\\n function div_(Double memory a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint256 a, Double memory b) internal pure returns (uint256) {\\n return div_(mul_(a, DOUBLE_SCALE), b.mantissa);\\n }\\n\\n function div_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n function fraction(uint256 a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a, DOUBLE_SCALE), b) });\\n }\\n}\\n\",\"keccak256\":\"0x6cf5430c2db151ab24ef0f567ed443c0b75b8b6051a62cacbe83f28b16834605\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/constants.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\\nuint256 constant EXP_SCALE = 1e18;\\n\\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\\nuint256 constant MANTISSA_ONE = EXP_SCALE;\\n\",\"keccak256\":\"0x44de02d7837ee1d4dcf6e9f5e783e9d9e0bec0154f23f5661fb54810cff9f892\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0x909eb76841ebd57d8f53686b76b1a09da7bbbbcddb29510c41674d5aa84c713e\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/BaseXVSProxyOFT.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { ResilientOracleInterface } from \\\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\\\";\\nimport { Pausable } from \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport { BaseOFTV2 } from \\\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { ExponentialNoError } from \\\"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\\\";\\n\\n/**\\n * @title BaseXVSProxyOFT\\n * @author Venus\\n * @notice The BaseXVSProxyOFT contract is tailored for facilitating cross-chain transactions with an ERC20 token.\\n * It manages transaction limits of a single and daily transactions.\\n * This contract inherits key functionalities from other contracts, including pausing capabilities and error handling.\\n * It holds state variables for the inner token and maps for tracking transaction limits and statistics across various chains and addresses.\\n * The contract allows the owner to configure limits, set whitelists, and control pausing.\\n * Internal functions conduct eligibility check of transactions, making the contract a fundamental component for cross-chain token management.\\n */\\n\\nabstract contract BaseXVSProxyOFT is Pausable, ExponentialNoError, BaseOFTV2 {\\n using SafeERC20 for IERC20;\\n IERC20 internal immutable innerToken;\\n uint256 internal immutable ld2sdRate;\\n\\n /**\\n * @notice The address of ResilientOracle contract wrapped in its interface.\\n */\\n ResilientOracleInterface public oracle;\\n /**\\n * @notice Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxSingleTransactionLimit;\\n /**\\n * @notice Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxDailyLimit;\\n /**\\n * @notice Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourTransferred;\\n /**\\n * @notice Timestamp when the last 24-hour window started from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourWindowStart;\\n /**\\n * @notice Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxSingleReceiveTransactionLimit;\\n /**\\n * @notice Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxDailyReceiveLimit;\\n /**\\n * @notice Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourReceived;\\n /**\\n * @notice Timestamp when the last 24-hour window started from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourReceiveWindowStart;\\n /**\\n * @notice Address on which cap check and bound limit is not appicable.\\n */\\n mapping(address => bool) public whitelist;\\n\\n /**\\n * @notice Emmited when address is added to whitelist.\\n */\\n event SetWhitelist(address indexed addr, bool isWhitelist);\\n /**\\n * @notice Emitted when the maximum limit for a single transaction from local chain is modified.\\n */\\n event SetMaxSingleTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum daily limit of transactions from local chain is modified.\\n */\\n event SetMaxDailyLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum limit for a single receive transaction from remote chain is modified.\\n */\\n event SetMaxSingleReceiveTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\\n */\\n event SetMaxDailyReceiveLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Event emitted when oracle is modified.\\n */\\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\\n /**\\n * @notice Event emitted when trusted remote sets to empty.\\n */\\n event TrustedRemoteRemoved(uint16 chainId);\\n /**\\n * @notice Event emitted when inner token set successfully.\\n */\\n event InnerTokenAdded(address indexed innerToken);\\n\\n /**\\n * @param tokenAddress_ Address of the inner token.\\n * @param sharedDecimals_ No of shared decimals.\\n * @param lzEndpoint_ Address of the layer zero endpoint contract.\\n * @param oracle_ Address of the price oracle.\\n * @custom:error ZeroAddressNotAllowed is thrown when token contract address is zero.\\n * @custom:error ZeroAddressNotAllowed is thrown when lzEndpoint contract address is zero.\\n * @custom:error ZeroAddressNotAllowed is thrown when oracle contract address is zero.\\n */\\n constructor(\\n address tokenAddress_,\\n uint8 sharedDecimals_,\\n address lzEndpoint_,\\n address oracle_\\n ) BaseOFTV2(sharedDecimals_, lzEndpoint_) {\\n ensureNonzeroAddress(tokenAddress_);\\n ensureNonzeroAddress(lzEndpoint_);\\n\\n innerToken = IERC20(tokenAddress_);\\n\\n (bool success, bytes memory data) = tokenAddress_.staticcall(abi.encodeWithSignature(\\\"decimals()\\\"));\\n require(success, \\\"ProxyOFT: failed to get token decimals\\\");\\n uint8 decimals = abi.decode(data, (uint8));\\n\\n require(sharedDecimals_ <= decimals, \\\"ProxyOFT: sharedDecimals must be <= decimals\\\");\\n ld2sdRate = 10 ** (decimals - sharedDecimals_);\\n\\n ensureNonzeroAddress(oracle_);\\n\\n emit InnerTokenAdded(tokenAddress_);\\n emit OracleChanged(address(0), oracle_);\\n\\n oracle = ResilientOracleInterface(oracle_);\\n }\\n\\n /**\\n * @notice Set the address of the ResilientOracle contract.\\n * @dev Reverts if the new address is zero.\\n * @param oracleAddress_ The new address of the ResilientOracle contract.\\n * @custom:access Only owner.\\n * @custom:event Emits OracleChanged with old and new oracle address.\\n */\\n function setOracle(address oracleAddress_) external onlyOwner {\\n ensureNonzeroAddress(oracleAddress_);\\n emit OracleChanged(address(oracle), oracleAddress_);\\n oracle = ResilientOracleInterface(oracleAddress_);\\n }\\n\\n /**\\n * @notice Sets the limit of single transaction amount.\\n * @param chainId_ Destination chain id.\\n * @param limit_ Amount in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\\n */\\n function setMaxSingleTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ <= chainIdToMaxDailyLimit[chainId_], \\\"Single transaction limit > Daily limit\\\");\\n emit SetMaxSingleTransactionLimit(chainId_, chainIdToMaxSingleTransactionLimit[chainId_], limit_);\\n chainIdToMaxSingleTransactionLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the limit of daily (24 Hour) transactions amount.\\n * @param chainId_ Destination chain id.\\n * @param limit_ Amount in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxDailyLimit with old and new limit associated with chain id.\\n */\\n function setMaxDailyLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ >= chainIdToMaxSingleTransactionLimit[chainId_], \\\"Daily limit < single transaction limit\\\");\\n emit SetMaxDailyLimit(chainId_, chainIdToMaxDailyLimit[chainId_], limit_);\\n chainIdToMaxDailyLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the maximum limit for a single receive transaction.\\n * @param chainId_ The destination chain ID.\\n * @param limit_ The new maximum limit in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\\n */\\n function setMaxSingleReceiveTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ <= chainIdToMaxDailyReceiveLimit[chainId_], \\\"single receive transaction limit > Daily limit\\\");\\n emit SetMaxSingleReceiveTransactionLimit(chainId_, chainIdToMaxSingleReceiveTransactionLimit[chainId_], limit_);\\n chainIdToMaxSingleReceiveTransactionLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the maximum daily limit for receiving transactions.\\n * @param chainId_ The destination chain ID.\\n * @param limit_ The new maximum daily limit in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\\n */\\n function setMaxDailyReceiveLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(\\n limit_ >= chainIdToMaxSingleReceiveTransactionLimit[chainId_],\\n \\\"Daily limit < single receive transaction limit\\\"\\n );\\n emit SetMaxDailyReceiveLimit(chainId_, chainIdToMaxDailyReceiveLimit[chainId_], limit_);\\n chainIdToMaxDailyReceiveLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the whitelist address to skip checks on transaction limit.\\n * @param user_ Adress to be add in whitelist.\\n * @param val_ Boolean to be set (true for user_ address is whitelisted).\\n * @custom:access Only owner.\\n * @custom:event Emits setWhitelist.\\n */\\n function setWhitelist(address user_, bool val_) external onlyOwner {\\n emit SetWhitelist(user_, val_);\\n whitelist[user_] = val_;\\n }\\n\\n /**\\n * @notice Triggers stopped state of the bridge.\\n * @custom:access Only owner.\\n */\\n function pause() external onlyOwner {\\n _pause();\\n }\\n\\n /**\\n * @notice Triggers resume state of the bridge.\\n * @custom:access Only owner.\\n */\\n function unpause() external onlyOwner {\\n _unpause();\\n }\\n\\n /**\\n * @notice Remove trusted remote from storage.\\n * @param remoteChainId_ The chain's id corresponds to setting the trusted remote to empty.\\n */\\n function removeTrustedRemote(uint16 remoteChainId_) external onlyOwner {\\n delete trustedRemoteLookup[remoteChainId_];\\n emit TrustedRemoteRemoved(remoteChainId_);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @notice Return's the address of the inner token of this bridge.\\n */\\n function token() public view override returns (address) {\\n return address(innerToken);\\n }\\n\\n function _isEligibleToSend(address from_, uint16 dstChainId_, uint256 amount_) internal {\\n // Check if the sender's address is whitelisted\\n bool isWhiteListedUser = whitelist[from_];\\n // Check if the user is whitelisted and return if true\\n if (isWhiteListedUser) {\\n return;\\n }\\n\\n // Calculate the amount in USD using the oracle price\\n uint256 amountInUsd;\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\\n\\n // Load values for the 24-hour window checks\\n uint256 currentBlockTimestamp = block.timestamp;\\n uint256 lastDayWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\\n uint256 transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\\n uint256 maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\\n uint256 maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\\n\\n // Revert if the amount exceeds the single transaction limit\\n require(amountInUsd <= maxSingleTransactionLimit, \\\"Single Transaction Limit Exceed\\\");\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - lastDayWindowStart > 1 days) {\\n transferredInWindow = amountInUsd;\\n chainIdToLast24HourWindowStart[dstChainId_] = currentBlockTimestamp;\\n } else {\\n transferredInWindow += amountInUsd;\\n }\\n\\n // Revert if the amount exceeds the daily limit\\n require(transferredInWindow <= maxDailyLimit, \\\"Daily Transaction Limit Exceed\\\");\\n\\n // Update the amount for the 24-hour window\\n chainIdToLast24HourTransferred[dstChainId_] = transferredInWindow;\\n }\\n\\n function _isEligibleToReceive(address toAddress_, uint16 srcChainId_, uint256 receivedAmount_) internal {\\n // Check if the recipient's address is whitelisted\\n bool isWhiteListedUser = whitelist[toAddress_];\\n // Check if the user is whitelisted and return if true\\n if (isWhiteListedUser) {\\n return;\\n }\\n\\n // Calculate the received amount in USD using the oracle price\\n uint256 receivedAmountInUsd;\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(address(token())) });\\n receivedAmountInUsd = mul_ScalarTruncate(oraclePrice, receivedAmount_);\\n\\n uint256 currentBlockTimestamp = block.timestamp;\\n\\n // Load values for the 24-hour window checks for receiving\\n uint256 lastDayReceiveWindowStart = chainIdToLast24HourReceiveWindowStart[srcChainId_];\\n uint256 receivedInWindow = chainIdToLast24HourReceived[srcChainId_];\\n uint256 maxSingleReceiveTransactionLimit = chainIdToMaxSingleReceiveTransactionLimit[srcChainId_];\\n uint256 maxDailyReceiveLimit = chainIdToMaxDailyReceiveLimit[srcChainId_];\\n\\n // Check if the received amount exceeds the single transaction limit\\n require(receivedAmountInUsd <= maxSingleReceiveTransactionLimit, \\\"Single Transaction Limit Exceed\\\");\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - lastDayReceiveWindowStart > 1 days) {\\n receivedInWindow = receivedAmountInUsd;\\n chainIdToLast24HourReceiveWindowStart[srcChainId_] = currentBlockTimestamp;\\n } else {\\n receivedInWindow += receivedAmountInUsd;\\n }\\n\\n // Revert if the received amount exceeds the daily limit\\n require(receivedInWindow <= maxDailyReceiveLimit, \\\"Daily Transaction Limit Exceed\\\");\\n\\n // Update the received amount for the 24-hour window\\n chainIdToLast24HourReceived[srcChainId_] = receivedInWindow;\\n }\\n\\n function _transferFrom(\\n address from_,\\n address to_,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n uint256 before = innerToken.balanceOf(to_);\\n if (from_ == address(this)) {\\n innerToken.safeTransfer(to_, amount_);\\n } else {\\n innerToken.safeTransferFrom(from_, to_, amount_);\\n }\\n return innerToken.balanceOf(to_) - before;\\n }\\n\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal override {\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(\\n _srcAddress.length == trustedRemote.length &&\\n trustedRemote.length > 0 &&\\n keccak256(_srcAddress) == keccak256(trustedRemote),\\n \\\"LzApp: invalid source sending contract\\\"\\n );\\n super._nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n function _ld2sdRate() internal view override returns (uint256) {\\n return ld2sdRate;\\n }\\n}\\n\",\"keccak256\":\"0x7030de25abd4194b3a359d485fbb5a4001ac53da49d62c87e1847fe98226ec5c\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/XVSProxyOFTSrc.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { BaseXVSProxyOFT } from \\\"./BaseXVSProxyOFT.sol\\\";\\n\\n/**\\n * @title XVSProxyOFTSrc\\n * @author Venus\\n * @notice XVSProxyOFTSrc contract serves as a crucial component for cross-chain token transactions,\\n * focusing on the source side of these transactions.\\n * It monitors the total amount transferred to other chains, ensuring it complies with defined limits,\\n * and provides functions for transferring tokens while maintaining control over the circulating supply on the source chain.\\n */\\n\\ncontract XVSProxyOFTSrc is BaseXVSProxyOFT {\\n using SafeERC20 for IERC20;\\n /**\\n * @notice total amount is transferred from this chain to other chains.\\n */\\n uint256 public outboundAmount;\\n\\n /**\\n * @notice Emits when locked token released manually by owner.\\n */\\n event FallbackWithdraw(address indexed to, uint256 amount);\\n /**\\n * @notice Emits when stored message dropped without successfull retrying.\\n */\\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\\n\\n constructor(\\n address tokenAddress_,\\n uint8 sharedDecimals_,\\n address lzEndpoint_,\\n address oracle_\\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\\n\\n /** @notice Only call it when there is no way to recover the failed message.\\n * `dropFailedMessage` must be called first if transaction is from remote->local chain to avoid double spending.\\n * @param to_ The address to withdraw to\\n * @param amount_ The amount of withdrawal\\n */\\n function fallbackWithdraw(address to_, uint256 amount_) external onlyOwner {\\n outboundAmount -= amount_;\\n _transferFrom(address(this), to_, amount_);\\n emit FallbackWithdraw(to_, amount_);\\n }\\n\\n /** @notice Clear failed messages from the storage.\\n * @param srcChainId_ Chain id of source\\n * @param srcAddress_ Address of source followed by current bridge address\\n * @param nonce_ Nonce_ of the transaction\\n */\\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\\n }\\n\\n /**\\n * @notice Returns the total circulating supply of the token on the source chain i.e (total supply - locked in this contract).\\n */\\n function circulatingSupply() public view override returns (uint256) {\\n return innerToken.totalSupply() - outboundAmount;\\n }\\n\\n function _debitFrom(\\n address from_,\\n uint16 dstChainId_,\\n bytes32,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n require(from_ == _msgSender(), \\\"ProxyOFT: owner is not send caller\\\");\\n _isEligibleToSend(from_, dstChainId_, amount_);\\n\\n uint256 amount = _transferFrom(from_, address(this), amount_);\\n outboundAmount += amount;\\n return amount;\\n }\\n\\n function _creditTo(\\n uint16 srcChainId_,\\n address toAddress_,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\\n outboundAmount -= amount_;\\n // tokens are already in this contract, so no need to transfer\\n if (toAddress_ == address(this)) {\\n return amount_;\\n }\\n\\n return _transferFrom(address(this), toAddress_, amount_);\\n }\\n}\\n\",\"keccak256\":\"0x580ef5f62dd7e0457dd59ca80bb6a91be2cba3fa5366605f27d86f2982dcdbb0\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b506040516200564f3803806200564f833981016040819052620000359162000373565b6000805460ff19169055838383838282818180806200005433620002c0565b6001600160a01b0316608052505060ff1660a052506200007690508462000319565b620000818262000319565b6001600160a01b03841660c081905260408051600481526024810182526020810180516001600160e01b031663313ce56760e01b179052905160009283929091620000cd9190620003d0565b600060405180830381855afa9150503d80600081146200010a576040519150601f19603f3d011682016040523d82523d6000602084013e6200010f565b606091505b509150915081620001765760405162461bcd60e51b815260206004820152602660248201527f50726f78794f46543a206661696c656420746f2067657420746f6b656e20646560448201526563696d616c7360d01b60648201526084015b60405180910390fd5b6000818060200190518101906200018e91906200040e565b90508060ff168660ff161115620001fd5760405162461bcd60e51b815260206004820152602c60248201527f50726f78794f46543a20736861726564446563696d616c73206d75737420626560448201526b203c3d20646563696d616c7360a01b60648201526084016200016d565b62000209868262000449565b6200021690600a6200056e565b60e052620002248462000319565b6040516001600160a01b038816907f0b673f021ff9a27bbe58f282908695869e130b3103029190387b83650806c2c390600090a26040516001600160a01b038516906000907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd908290a35050600780546001600160a01b0319166001600160a01b039390931692909217909155506200057f9650505050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03811662000341576040516342bcdf7f60e11b815260040160405180910390fd5b50565b80516001600160a01b03811681146200035c57600080fd5b919050565b805160ff811681146200035c57600080fd5b600080600080608085870312156200038a57600080fd5b620003958562000344565b9350620003a56020860162000361565b9250620003b56040860162000344565b9150620003c56060860162000344565b905092959194509250565b6000825160005b81811015620003f35760208186018101518583015201620003d7565b8181111562000403576000828501525b509190910192915050565b6000602082840312156200042157600080fd5b6200042c8262000361565b9392505050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff84168082101562000466576200046662000433565b90039392505050565b600181815b80851115620004b057816000190482111562000494576200049462000433565b80851615620004a257918102915b93841c939080029062000474565b509250929050565b600082620004c95750600162000568565b81620004d85750600062000568565b8160018114620004f15760028114620004fc576200051c565b600191505062000568565b60ff84111562000510576200051062000433565b50506001821b62000568565b5060208310610133831016604e8410600b841016171562000541575081810a62000568565b6200054d83836200046f565b806000190482111562000564576200056462000433565b0290505b92915050565b60006200042c60ff841683620004b8565b60805160a05160c05160e0516150186200063760003960008181612d0f015281816130260152613a40015260008181610c09015281816118fc015281816124f801528181612584015281816125bd01528181612606015281816137640152613d750152600061082a015260008181610a4001528181610c5d01528181610ea401528181610f4c0152818161121901528181611c310152818161222b015281816123ee01528181612af9015261322f01526150186000f3fe6080604052600436106103a15760003560e01c80638456cb59116101e7578063b353aaa71161010d578063df2a5b3b116100a0578063f2fde38b1161006f578063f2fde38b14610bba578063f5ecbdbc14610bda578063fc0c546a14610bfa578063fdff235b14610c2d57600080fd5b8063df2a5b3b14610b45578063e6a20ae614610b65578063eaffd49a14610b7a578063eb8d72b714610b9a57600080fd5b8063cc01e9b6116100dc578063cc01e9b614610ab8578063cc7015ae14610ad8578063d1deba1f14610b05578063d708a46814610b1857600080fd5b8063b353aaa714610a2e578063baf3292d14610a62578063c446183414610a82578063cbed8b9c14610a9857600080fd5b806393a61d6c116101855780639bdb9812116101545780639bdb98121461097c5780639f38369a146109ce578063a4c51df5146109ee578063a6c3d16514610a0e57600080fd5b806393a61d6c146108e9578063950c8a74146109165780639689cb05146109365780639b19251a1461094c57600080fd5b80638cfd8f5c116101c15780638cfd8f5c1461084c5780638da5cb5b1461088457806390436567146108a75780639358928b146108d457600080fd5b80638456cb59146107e357806384e69c69146107f8578063857749b01461081857600080fd5b80634c42899a116102cc57806366ad5c8a1161026a5780637533d788116102395780637533d7881461074b57806376203b48146107785780637adbf9731461078b5780637dc0d1d0146107ab57600080fd5b806366ad5c8a146106ec578063695ef6bf1461070c57806369c1e7b81461071f578063715018a61461073f57600080fd5b806353489d6c116102a657806353489d6c1461064557806353d6fd59146106655780635b8c41e6146106855780635c975abb146106d457600080fd5b80634c42899a146105c45780634cec6256146105eb5780634f4ba0f41461061857600080fd5b8063365260b4116103445780633f4ba83a116103135780633f4ba83a1461055a57806342d65a8d1461056f578063447705151461058f57806348e4a04a146105a457600080fd5b8063365260b41461049d5780633c4ec39b146104d25780633d8b38f61461050d5780633f1f4fa41461052d57600080fd5b80630df37483116103805780630df374831461041d57806310ddb1371461043d5780632488eec81461045d5780632dbbec081461047d57600080fd5b80621d3567146103a657806301ffc9a7146103c857806307e0db17146103fd575b600080fd5b3480156103b257600080fd5b506103c66103c1366004614258565b610c5a565b005b3480156103d457600080fd5b506103e86103e33660046142eb565b610e4c565b60405190151581526020015b60405180910390f35b34801561040957600080fd5b506103c6610418366004614315565b610e83565b34801561042957600080fd5b506103c6610438366004614330565b610f0c565b34801561044957600080fd5b506103c6610458366004614315565b610f2b565b34801561046957600080fd5b506103c6610478366004614330565b610f83565b34801561048957600080fd5b506103c6610498366004614315565b611067565b3480156104a957600080fd5b506104bd6104b8366004614368565b6110c6565b604080519283526020830191909152016103f4565b3480156104de57600080fd5b506104ff6104ed366004614315565b600d6020526000908152604090205481565b6040519081526020016103f4565b34801561051957600080fd5b506103e86105283660046143cf565b61111b565b34801561053957600080fd5b506104ff610548366004614315565b60036020526000908152604090205481565b34801561056657600080fd5b506103c66111e8565b34801561057b57600080fd5b506103c661058a3660046143cf565b6111fa565b34801561059b57600080fd5b506104ff600081565b3480156105b057600080fd5b506103c66105bf366004614436565b611280565b3480156105d057600080fd5b506105d9600081565b60405160ff90911681526020016103f4565b3480156105f757600080fd5b506104ff610606366004614315565b600a6020526000908152604090205481565b34801561062457600080fd5b506104ff610633366004614315565b60096020526000908152604090205481565b34801561065157600080fd5b506103c6610660366004614330565b6112f3565b34801561067157600080fd5b506103c6610680366004614454565b6113d7565b34801561069157600080fd5b506104ff6106a03660046144fa565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156106e057600080fd5b5060005460ff166103e8565b3480156106f857600080fd5b506103c6610707366004614258565b61144f565b6103c661071a3660046145b2565b61152b565b34801561072b57600080fd5b506103c661073a366004614330565b611596565b3480156103c657600080fd5b34801561075757600080fd5b5061076b610766366004614315565b611682565b6040516103f4919061467d565b6103c6610786366004614690565b61171c565b34801561079757600080fd5b506103c66107a6366004614742565b6117cb565b3480156107b757600080fd5b506007546107cb906001600160a01b031681565b6040516001600160a01b0390911681526020016103f4565b3480156107ef57600080fd5b506103c6611838565b34801561080457600080fd5b506103c66108133660046144fa565b611848565b34801561082457600080fd5b506105d97f000000000000000000000000000000000000000000000000000000000000000081565b34801561085857600080fd5b506104ff61086736600461475f565b600260209081526000928352604080842090915290825290205481565b34801561089057600080fd5b5060005461010090046001600160a01b03166107cb565b3480156108b357600080fd5b506104ff6108c2366004614315565b600c6020526000908152604090205481565b3480156108e057600080fd5b506104ff6118f5565b3480156108f557600080fd5b506104ff610904366004614315565b600b6020526000908152604090205481565b34801561092257600080fd5b506004546107cb906001600160a01b031681565b34801561094257600080fd5b506104ff60115481565b34801561095857600080fd5b506103e8610967366004614742565b60106020526000908152604090205460ff1681565b34801561098857600080fd5b506103e86109973660046144fa565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b3480156109da57600080fd5b5061076b6109e9366004614315565b61198b565b3480156109fa57600080fd5b506104bd610a09366004614792565b611a9a565b348015610a1a57600080fd5b506103c6610a293660046143cf565b611b29565b348015610a3a57600080fd5b506107cb7f000000000000000000000000000000000000000000000000000000000000000081565b348015610a6e57600080fd5b506103c6610a7d366004614742565b611bbc565b348015610a8e57600080fd5b506104ff61271081565b348015610aa457600080fd5b506103c6610ab336600461484f565b611c12565b348015610ac457600080fd5b506103c6610ad3366004614330565b611c9c565b348015610ae457600080fd5b506104ff610af3366004614315565b60086020526000908152604090205481565b6103c6610b13366004614258565b611d88565b348015610b2457600080fd5b506104ff610b33366004614315565b600e6020526000908152604090205481565b348015610b5157600080fd5b506103c6610b603660046148bd565b611f9e565b348015610b7157600080fd5b506105d9600181565b348015610b8657600080fd5b506103c6610b953660046148f9565b612008565b348015610ba657600080fd5b506103c6610bb53660046143cf565b612127565b348015610bc657600080fd5b506103c6610bd5366004614742565b612181565b348015610be657600080fd5b5061076b610bf53660046149c1565b6121fa565b348015610c0657600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006107cb565b348015610c3957600080fd5b506104ff610c48366004614315565b600f6020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610cd75760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610cf590614a0e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2190614a0e565b8015610d6e5780601f10610d4357610100808354040283529160200191610d6e565b820191906000526020600020905b815481529060010190602001808311610d5157829003601f168201915b50505050509050805186869050148015610d89575060008151115b8015610db1575080516020820120604051610da79088908890614a42565b6040518091039020145b610dcd5760405162461bcd60e51b8152600401610cce90614a52565b610e438787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506122ad92505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610e7d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b610e8b612326565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610ef157600080fd5b505af1158015610f05573d6000803e3d6000fd5b5050505050565b610f14612326565b61ffff909116600090815260036020526040902055565b610f33612326565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610ed7565b610f8b612326565b61ffff8216600090815260086020526040902054811015610ffd5760405162461bcd60e51b815260206004820152602660248201527f4461696c79206c696d6974203c2073696e676c65207472616e73616374696f6e604482015265081b1a5b5a5d60d21b6064820152608401610cce565b61ffff82166000818152600960209081526040918290205482519384529083015281018290527f4dd31065e259d5284e44d1f9265710da72eafcf78dc925e3881189fc3b71f6939060600160405180910390a161ffff909116600090815260096020526040902055565b61106f612326565b61ffff8116600090815260016020526040812061108b9161409b565b60405161ffff821681527f6d5075c81d4d9e75bec6052f4e44f58f8a8cf1327544addbbf015fb06f83bd37906020015b60405180910390a150565b60008061110c8888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061238692505050565b91509150965096945050505050565b61ffff83166000908152600160205260408120805482919061113c90614a0e565b80601f016020809104026020016040519081016040528092919081815260200182805461116890614a0e565b80156111b55780601f1061118a576101008083540402835291602001916111b5565b820191906000526020600020905b81548152906001019060200180831161119857829003601f168201915b5050505050905083836040516111cc929190614a42565b60405180910390208180519060200120149150505b9392505050565b6111f0612326565b6111f861247a565b565b611202612326565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061125290869086908690600401614ac1565b600060405180830381600087803b15801561126c57600080fd5b505af1158015610e43573d6000803e3d6000fd5b611288612326565b806011600082825461129a9190614af5565b909155506112ab90503083836124cc565b50816001600160a01b03167f22fe8e8ead80ad0961d77107e806ba9bcf9ca3b175a9d446145646d39c36ab96826040516112e791815260200190565b60405180910390a25050565b6112fb612326565b61ffff821660009081526009602052604090205481111561136d5760405162461bcd60e51b815260206004820152602660248201527f53696e676c65207472616e73616374696f6e206c696d6974203e204461696c79604482015265081b1a5b5a5d60d21b6064820152608401610cce565b61ffff82166000818152600860209081526040918290205482519384529083015281018290527f7babeac42ccbb33537ee421fedc4db7b5f251b5d2a3fa5c0ff4b35b2d783be879060600160405180910390a161ffff909116600090815260086020526040902055565b6113df612326565b816001600160a01b03167ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb8260405161141c911515815260200190565b60405180910390a26001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b3330146114ad5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610cce565b6115238686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061268692505050565b505050505050565b6115238585858561153f6020870187614742565b61154f6040880160208901614742565b61155c6040890189614b0c565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277792505050565b61159e612326565b61ffff82166000908152600c60205260409020548110156116185760405162461bcd60e51b815260206004820152602e60248201527f4461696c79206c696d6974203c2073696e676c6520726563656976652074726160448201526d1b9cd858dd1a5bdb881b1a5b5a5d60921b6064820152608401610cce565b61ffff82166000818152600d60209081526040918290205482519384529083015281018290527f95dc51094cd27cf4ee3fd0dbb50cf96f8df1629c822f5434c4a34d7eb03c97249060600160405180910390a161ffff9091166000908152600d6020526040902055565b6001602052600090815260409020805461169b90614a0e565b80601f01602080910402602001604051908101604052809291908181526020018280546116c790614a0e565b80156117145780601f106116e957610100808354040283529160200191611714565b820191906000526020600020905b8154815290600101906020018083116116f757829003601f168201915b505050505081565b6117c08888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92506117699150506020890189614742565b61177960408a0160208b01614742565b61178660408b018b614b0c565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061285f92505050565b505050505050505050565b6117d3612326565b6117dc8161295b565b6007546040516001600160a01b038084169216907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd90600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b611840612326565b6111f8612982565b611850612326565b61ffff83166000908152600560205260408082209051611871908590614b52565b9081526040805191829003602090810183206001600160401b0386166000908152915220919091556118a4908390614b52565b6040805191829003822061ffff861683526001600160401b0384166020840152917f48a980eea4ea1c540209e2f9f32a4c2edf51fab37b1d21f453868301ecb6e2ee910160405180910390a2505050565b60006011547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611958573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197c9190614b6e565b6119869190614af5565b905090565b61ffff81166000908152600160205260408120805460609291906119ae90614a0e565b80601f01602080910402602001604051908101604052809291908181526020018280546119da90614a0e565b8015611a275780601f106119fc57610100808354040283529160200191611a27565b820191906000526020600020905b815481529060010190602001808311611a0a57829003601f168201915b505050505090508051600003611a7f5760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610cce565b6111e1600060148351611a929190614af5565b8391906129bf565b600080611b178b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c9081908401838280828437600092019190915250612acc92505050565b91509150995099975050505050505050565b611b31612326565b818130604051602001611b4693929190614b87565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251611b7b939192909101906140d5565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611baf93929190614ac1565b60405180910390a1505050565b611bc4612326565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020016110bb565b611c1a612326565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611c6e9088908890889088908890600401614bad565b600060405180830381600087803b158015611c8857600080fd5b505af11580156117c0573d6000803e3d6000fd5b611ca4612326565b61ffff82166000908152600d6020526040902054811115611d1e5760405162461bcd60e51b815260206004820152602e60248201527f73696e676c652072656365697665207472616e73616374696f6e206c696d697460448201526d080f8811185a5b1e481b1a5b5a5d60921b6064820152608401610cce565b61ffff82166000818152600c60209081526040918290205482519384529083015281018290527f2c42997a938a029910a78e7c28d762b349c28e70f3a89c1fbccbb1a46020b1599060600160405180910390a161ffff9091166000908152600c6020526040902055565b61ffff86166000908152600560205260408082209051611dab9088908890614a42565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080611e2b5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610cce565b808383604051611e3c929190614a42565b604051809103902014611e9b5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610cce565b61ffff87166000908152600560205260408082209051611ebe9089908990614a42565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252611f56918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061268692505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051611f8d959493929190614bdb565b60405180910390a150505050505050565b611fa6612326565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611baf565b3330146120575760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610cce565b6120623086866124cc565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf866040516120a491815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da9083906120e8908e908e908e908e908e908d908d908d90600401614c16565b600060405180830381600088803b15801561210257600080fd5b5087f1158015612116573d6000803e3d6000fd5b505050505050505050505050505050565b61212f612326565b61ffff8316600090815260016020526040902061214d908383614159565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611baf93929190614ac1565b612189612326565b6001600160a01b0381166121ee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610cce565b6121f781612b87565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa15801561227a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122a29190810190614c71565b90505b949350505050565b6000806123105a60966366ad5c8a60e01b898989896040516024016122d59493929190614cde565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612be0565b9150915081611523576115238686868685612c6a565b6000546001600160a01b036101009091041633146111f85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610cce565b60008060006123d48761239888612d07565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb109061242b908b90309086908b908b90600401614d1c565b6040805180830381865afa158015612447573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246b9190614d70565b92509250509550959350505050565b612482612d8d565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006124d6612dd6565b6040516370a0823160e01b81526001600160a01b0384811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125659190614b6e565b9050306001600160a01b038616036125b0576125ab6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168585612e1c565b6125e5565b6125e56001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868686612e84565b6040516370a0823160e01b81526001600160a01b03858116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561264f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126739190614b6e565b61267d9190614af5565b95945050505050565b61ffff8416600090815260016020526040812080546126a490614a0e565b80601f01602080910402602001604051908101604052809291908181526020018280546126d090614a0e565b801561271d5780601f106126f25761010080835404028352916020019161271d565b820191906000526020600020905b81548152906001019060200180831161270057829003601f168201915b5050505050905080518451148015612736575060008151115b801561274f575080805190602001208480519060200120145b61276b5760405162461bcd60e51b8152600401610cce90614a52565b610f0585858585612ec2565b600061278587828481612f49565b61278e8561301e565b50905061279d8888888461305e565b9050600081116127eb5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610cce565b60006127fa8761239884612d07565b905061280a888287878734613106565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161284b91815260200190565b60405180910390a450979650505050505050565b6000612877896001846001600160401b038916612f49565b6128808761301e565b50905061288f8a8a8a8461305e565b9050600081116128dd5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610cce565b60006128f4338a6128ed85612d07565b8a8a6132ab565b90506129048a8287878734613106565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161294591815260200190565b60405180910390a4509998505050505050505050565b6001600160a01b0381166121f7576040516342bcdf7f60e11b815260040160405180910390fd5b61298a612dd6565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124af3390565b6060816129cd81601f614d94565b1015612a0c5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610cce565b612a168284614d94565b84511015612a5a5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610cce565b606082158015612a795760405191506000825260208201604052612ac3565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612ab2578051835260209283019201612a9a565b5050858452601f01601f1916604052505b50949350505050565b6000806000612adf338a6128ed8b612d07565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612b36908d90309086908b908b90600401614d1c565b6040805180830381865afa158015612b52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b769190614d70565b925092505097509795505050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6000606060008060008661ffff166001600160401b03811115612c0557612c0561448d565b6040519080825280601f01601f191660200182016040528015612c2f576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612c51578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051612c9b9190614b52565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90612cf89087908790879087908790614dac565b60405180910390a15050505050565b600080612d347f000000000000000000000000000000000000000000000000000000000000000084614e14565b90506001600160401b03811115610e7d5760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610cce565b60005460ff166111f85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610cce565b60005460ff16156111f85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610cce565b6040516001600160a01b038316602482015260448101829052612e7f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526132ec565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052612ebc9085906323b872dd60e01b90608401612e48565b50505050565b6000612ece82826133c1565b905060ff8116612ee957612ee48585858561341d565b610f05565b60001960ff821601612f0157612ee4858585856134ad565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610cce565b6000612f54836136bb565b61ffff80871660009081526002602090815260408083209389168352929052205490915080612fc55760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610cce565b612fcf8382614d94565b8210156115235760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610cce565b60008061304b7f000000000000000000000000000000000000000000000000000000000000000084614e28565b90506130578184614af5565b9150915091565b6000613068612dd6565b6001600160a01b03851633146130cb5760405162461bcd60e51b815260206004820152602260248201527f50726f78794f46543a206f776e6572206973206e6f742073656e642063616c6c60448201526132b960f11b6064820152608401610cce565b6130d6858584613717565b60006130e38630856124cc565b905080601160008282546130f79190614d94565b90915550909695505050505050565b61ffff86166000908152600160205260408120805461312490614a0e565b80601f016020809104026020016040519081016040528092919081815260200182805461315090614a0e565b801561319d5780601f106131725761010080835404028352916020019161319d565b820191906000526020600020905b81548152906001019060200180831161318057829003601f168201915b50505050509050805160000361320e5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610cce565b613219878751613934565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490613270908b9086908c908c908c908c90600401614e3c565b6000604051808303818588803b15801561328957600080fd5b505af115801561329d573d6000803e3d6000fd5b505050505050505050505050565b6060600185856001600160a01b03891685876040516020016132d296959493929190614ea3565b604051602081830303815290604052905095945050505050565b6000613341826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139a59092919063ffffffff16565b90508051600014806133625750808060200190518101906133629190614f04565b612e7f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610cce565b60006133ce826001614d94565b835110156134145760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610cce565b50016001015190565b600080613429836139b4565b90925090506001600160a01b0382166134425761dead91505b600061344d82613a39565b905061345a878483613a6e565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8360405161349c91815260200190565b60405180910390a350505050505050565b60008060008060006134be86613abc565b945094509450945094506000600660008b61ffff1661ffff168152602001908152602001600020896040516134f39190614b52565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff16915061352685613a39565b905081613594576135388b3083613a6e565b61ffff8c16600090815260066020526040908190209051919250600191613560908d90614b52565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b6135eb576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a150505050505050612ebc565b8a8a8a8a8a8a868a60008a613609578b6001600160401b031661360b565b5a5b905060008061363d5a609663eaffd49a60e01b8e8e8e8d8d8d8d8d6040516024016122d5989796959493929190614f21565b915091508115613696578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd88490613688908e908e908690614f95565b60405180910390a2506136a3565b6136a38b8b8b8b85612c6a565b50505050505050505050505050505050505050505050565b600060228251101561370f5760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610cce565b506022015190565b6001600160a01b03831660009081526010602052604090205460ff16801561373f5750505050565b6040805160208101909152600754600091829181906001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156137c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137eb9190614b6e565b905290506137f98185613b73565b61ffff86166000908152600b6020908152604080832054600a8352818420546008845282852054600990945291909320549395504293909190818711156138825760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610cce565b620151806138908587614af5565b11156138b45761ffff8a166000908152600b602052604090208590558692506138c1565b6138be8784614d94565b92505b808311156139115760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610cce565b505061ffff9097166000908152600a602052604090209690965550505050505050565b61ffff82166000908152600360205260408120549081900361395557506127105b80821115612e7f5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610cce565b60606122a58484600085613b8b565b600080806139c284826133c1565b60ff161480156139d3575082516029145b613a1a5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610cce565b613a2583600d613c66565b9150613a32836021613ccb565b9050915091565b6000610e7d7f00000000000000000000000000000000000000000000000000000000000000006001600160401b038416614fc3565b6000613a78612dd6565b613a83838584613d28565b8160116000828254613a959190614af5565b9091555050306001600160a01b03841603613ab15750806111e1565b6122a53084846124cc565b600080806060816001613acf87836133c1565b60ff1614613b1a5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610cce565b613b2586600d613c66565b9350613b32866021613ccb565b9250613b3f866029613f45565b9450613b4c866049613ccb565b9050613b686051808851613b609190614af5565b8891906129bf565b915091939590929450565b600080613b808484613fa3565b90506122a581613fd4565b606082471015613bec5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610cce565b600080866001600160a01b03168587604051613c089190614b52565b60006040518083038185875af1925050503d8060008114613c45576040519150601f19603f3d011682016040523d82523d6000602084013e613c4a565b606091505b5091509150613c5b87838387613fec565b979650505050505050565b6000613c73826014614d94565b83511015613cbb5760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610cce565b500160200151600160601b900490565b6000613cd8826008614d94565b83511015613d1f5760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610cce565b50016008015190565b6001600160a01b03831660009081526010602052604090205460ff168015613d505750505050565b6040805160208101909152600754600091829181906001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613dd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613dfc9190614b6e565b90529050613e0a8185613b73565b61ffff86166000908152600f6020908152604080832054600e835281842054600c845282852054600d9094529190932054939550429390919081871115613e935760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610cce565b62015180613ea18587614af5565b1115613ec55761ffff8a166000908152600f60205260409020859055869250613ed2565b613ecf8784614d94565b92505b80831115613f225760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610cce565b505061ffff9097166000908152600e602052604090209690965550505050505050565b6000613f52826020614d94565b83511015613f9a5760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610cce565b50016020015190565b6040805160208101909152600081526040518060200160405280613fcb856000015185614065565b90529392505050565b8051600090610e7d90670de0b6b3a764000090614e14565b6060831561405b578251600003614054576001600160a01b0385163b6140545760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610cce565b50816122a5565b6122a58383614071565b60006111e18284614fc3565b8151156140815781518083602001fd5b8060405162461bcd60e51b8152600401610cce919061467d565b5080546140a790614a0e565b6000825580601f106140b7575050565b601f0160209004906000526020600020908101906121f791906141cd565b8280546140e190614a0e565b90600052602060002090601f0160209004810192826141035760008555614149565b82601f1061411c57805160ff1916838001178555614149565b82800160010185558215614149579182015b8281111561414957825182559160200191906001019061412e565b506141559291506141cd565b5090565b82805461416590614a0e565b90600052602060002090601f0160209004810192826141875760008555614149565b82601f106141a05782800160ff19823516178555614149565b82800160010185558215614149579182015b828111156141495782358255916020019190600101906141b2565b5b8082111561415557600081556001016141ce565b803561ffff811681146141f457600080fd5b919050565b60008083601f84011261420b57600080fd5b5081356001600160401b0381111561422257600080fd5b60208301915083602082850101111561423a57600080fd5b9250929050565b80356001600160401b03811681146141f457600080fd5b6000806000806000806080878903121561427157600080fd5b61427a876141e2565b955060208701356001600160401b038082111561429657600080fd5b6142a28a838b016141f9565b90975095508591506142b660408a01614241565b945060608901359150808211156142cc57600080fd5b506142d989828a016141f9565b979a9699509497509295939492505050565b6000602082840312156142fd57600080fd5b81356001600160e01b0319811681146111e157600080fd5b60006020828403121561432757600080fd5b6111e1826141e2565b6000806040838503121561434357600080fd5b61434c836141e2565b946020939093013593505050565b80151581146121f757600080fd5b60008060008060008060a0878903121561438157600080fd5b61438a876141e2565b9550602087013594506040870135935060608701356143a88161435a565b925060808701356001600160401b038111156143c357600080fd5b6142d989828a016141f9565b6000806000604084860312156143e457600080fd5b6143ed846141e2565b925060208401356001600160401b0381111561440857600080fd5b614414868287016141f9565b9497909650939450505050565b6001600160a01b03811681146121f757600080fd5b6000806040838503121561444957600080fd5b823561434c81614421565b6000806040838503121561446757600080fd5b823561447281614421565b915060208301356144828161435a565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156144cb576144cb61448d565b604052919050565b60006001600160401b038211156144ec576144ec61448d565b50601f01601f191660200190565b60008060006060848603121561450f57600080fd5b614518846141e2565b925060208401356001600160401b0381111561453357600080fd5b8401601f8101861361454457600080fd5b8035614557614552826144d3565b6144a3565b81815287602083850101111561456c57600080fd5b8160208401602083013760006020838301015280945050505061459160408501614241565b90509250925092565b6000606082840312156145ac57600080fd5b50919050565b600080600080600060a086880312156145ca57600080fd5b85356145d581614421565b94506145e3602087016141e2565b9350604086013592506060860135915060808601356001600160401b0381111561460c57600080fd5b6146188882890161459a565b9150509295509295909350565b60005b83811015614640578181015183820152602001614628565b83811115612ebc5750506000910152565b60008151808452614669816020860160208601614625565b601f01601f19169290920160200192915050565b6020815260006111e16020830184614651565b60008060008060008060008060e0898b0312156146ac57600080fd5b88356146b781614421565b97506146c560208a016141e2565b9650604089013595506060890135945060808901356001600160401b03808211156146ef57600080fd5b6146fb8c838d016141f9565b909650945084915061470f60a08c01614241565b935060c08b013591508082111561472557600080fd5b506147328b828c0161459a565b9150509295985092959890939650565b60006020828403121561475457600080fd5b81356111e181614421565b6000806040838503121561477257600080fd5b61477b836141e2565b9150614789602084016141e2565b90509250929050565b600080600080600080600080600060e08a8c0312156147b057600080fd5b6147b98a6141e2565b985060208a0135975060408a0135965060608a01356001600160401b03808211156147e357600080fd5b6147ef8d838e016141f9565b909850965086915061480360808d01614241565b955060a08c013591506148158261435a565b90935060c08b0135908082111561482b57600080fd5b506148388c828d016141f9565b915080935050809150509295985092959850929598565b60008060008060006080868803121561486757600080fd5b614870866141e2565b945061487e602087016141e2565b93506040860135925060608601356001600160401b038111156148a057600080fd5b6148ac888289016141f9565b969995985093965092949392505050565b6000806000606084860312156148d257600080fd5b6148db846141e2565b92506148e9602085016141e2565b9150604084013590509250925092565b6000806000806000806000806000806101008b8d03121561491957600080fd5b6149228b6141e2565b995060208b01356001600160401b038082111561493e57600080fd5b61494a8e838f016141f9565b909b50995089915061495e60408e01614241565b985060608d0135975060808d0135915061497782614421565b90955060a08c0135945060c08c0135908082111561499457600080fd5b506149a18d828e016141f9565b9150809450508092505060e08b013590509295989b9194979a5092959850565b600080600080608085870312156149d757600080fd5b6149e0856141e2565b93506149ee602086016141e2565b925060408501356149fe81614421565b9396929550929360600135925050565b600181811c90821680614a2257607f821691505b6020821081036145ac57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b60208082526026908201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6040820152651b9d1c9858dd60d21b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff841681526040602082015260006122a2604083018486614a98565b634e487b7160e01b600052601160045260246000fd5b600082821015614b0757614b07614adf565b500390565b6000808335601e19843603018112614b2357600080fd5b8301803591506001600160401b03821115614b3d57600080fd5b60200191503681900382131561423a57600080fd5b60008251614b64818460208701614625565b9190910192915050565b600060208284031215614b8057600080fd5b5051919050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152613c5b608083018486614a98565b61ffff86168152608060208201526000614bf9608083018688614a98565b6001600160401b0394909416604083015250606001529392505050565b61ffff8916815260c060208201526000614c3460c08301898b614a98565b6001600160401b038816604084015286606084015285608084015282810360a0840152614c62818587614a98565b9b9a5050505050505050505050565b600060208284031215614c8357600080fd5b81516001600160401b03811115614c9957600080fd5b8201601f81018413614caa57600080fd5b8051614cb8614552826144d3565b818152856020838501011115614ccd57600080fd5b61267d826020830160208601614625565b61ffff85168152608060208201526000614cfb6080830186614651565b6001600160401b03851660408401528281036060840152613c5b8185614651565b61ffff861681526001600160a01b038516602082015260a060408201819052600090614d4a90830186614651565b84151560608401528281036080840152614d648185614651565b98975050505050505050565b60008060408385031215614d8357600080fd5b505080516020909101519092909150565b60008219821115614da757614da7614adf565b500190565b61ffff8616815260a060208201526000614dc960a0830187614651565b6001600160401b03861660408401528281036060840152614dea8186614651565b90508281036080840152614d648185614651565b634e487b7160e01b600052601260045260246000fd5b600082614e2357614e23614dfe565b500490565b600082614e3757614e37614dfe565b500690565b61ffff8716815260c060208201526000614e5960c0830188614651565b8281036040840152614e6b8188614651565b6001600160a01b0387811660608601528616608085015283810360a08501529050614e968185614651565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b166049840152508251614ef2816051850160208701614625565b91909101605101979650505050505050565b600060208284031215614f1657600080fd5b81516111e18161435a565b600061010061ffff8b168352806020840152614f3f8184018b614651565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c08501529050614f7f8186614651565b9150508260e08301529998505050505050505050565b606081526000614fa86060830186614651565b6001600160401b039490941660208301525060400152919050565b6000816000190483118215151615614fdd57614fdd614adf565b50029056fea2646970667358221220ae01746a4560f00665eba343ce64401d2717d445f25188669c2ec4f9a67d247364736f6c634300080d0033", + "deployedBytecode": "0x6080604052600436106103a15760003560e01c80638456cb59116101e7578063b353aaa71161010d578063df2a5b3b116100a0578063f2fde38b1161006f578063f2fde38b14610bba578063f5ecbdbc14610bda578063fc0c546a14610bfa578063fdff235b14610c2d57600080fd5b8063df2a5b3b14610b45578063e6a20ae614610b65578063eaffd49a14610b7a578063eb8d72b714610b9a57600080fd5b8063cc01e9b6116100dc578063cc01e9b614610ab8578063cc7015ae14610ad8578063d1deba1f14610b05578063d708a46814610b1857600080fd5b8063b353aaa714610a2e578063baf3292d14610a62578063c446183414610a82578063cbed8b9c14610a9857600080fd5b806393a61d6c116101855780639bdb9812116101545780639bdb98121461097c5780639f38369a146109ce578063a4c51df5146109ee578063a6c3d16514610a0e57600080fd5b806393a61d6c146108e9578063950c8a74146109165780639689cb05146109365780639b19251a1461094c57600080fd5b80638cfd8f5c116101c15780638cfd8f5c1461084c5780638da5cb5b1461088457806390436567146108a75780639358928b146108d457600080fd5b80638456cb59146107e357806384e69c69146107f8578063857749b01461081857600080fd5b80634c42899a116102cc57806366ad5c8a1161026a5780637533d788116102395780637533d7881461074b57806376203b48146107785780637adbf9731461078b5780637dc0d1d0146107ab57600080fd5b806366ad5c8a146106ec578063695ef6bf1461070c57806369c1e7b81461071f578063715018a61461073f57600080fd5b806353489d6c116102a657806353489d6c1461064557806353d6fd59146106655780635b8c41e6146106855780635c975abb146106d457600080fd5b80634c42899a146105c45780634cec6256146105eb5780634f4ba0f41461061857600080fd5b8063365260b4116103445780633f4ba83a116103135780633f4ba83a1461055a57806342d65a8d1461056f578063447705151461058f57806348e4a04a146105a457600080fd5b8063365260b41461049d5780633c4ec39b146104d25780633d8b38f61461050d5780633f1f4fa41461052d57600080fd5b80630df37483116103805780630df374831461041d57806310ddb1371461043d5780632488eec81461045d5780632dbbec081461047d57600080fd5b80621d3567146103a657806301ffc9a7146103c857806307e0db17146103fd575b600080fd5b3480156103b257600080fd5b506103c66103c1366004614258565b610c5a565b005b3480156103d457600080fd5b506103e86103e33660046142eb565b610e4c565b60405190151581526020015b60405180910390f35b34801561040957600080fd5b506103c6610418366004614315565b610e83565b34801561042957600080fd5b506103c6610438366004614330565b610f0c565b34801561044957600080fd5b506103c6610458366004614315565b610f2b565b34801561046957600080fd5b506103c6610478366004614330565b610f83565b34801561048957600080fd5b506103c6610498366004614315565b611067565b3480156104a957600080fd5b506104bd6104b8366004614368565b6110c6565b604080519283526020830191909152016103f4565b3480156104de57600080fd5b506104ff6104ed366004614315565b600d6020526000908152604090205481565b6040519081526020016103f4565b34801561051957600080fd5b506103e86105283660046143cf565b61111b565b34801561053957600080fd5b506104ff610548366004614315565b60036020526000908152604090205481565b34801561056657600080fd5b506103c66111e8565b34801561057b57600080fd5b506103c661058a3660046143cf565b6111fa565b34801561059b57600080fd5b506104ff600081565b3480156105b057600080fd5b506103c66105bf366004614436565b611280565b3480156105d057600080fd5b506105d9600081565b60405160ff90911681526020016103f4565b3480156105f757600080fd5b506104ff610606366004614315565b600a6020526000908152604090205481565b34801561062457600080fd5b506104ff610633366004614315565b60096020526000908152604090205481565b34801561065157600080fd5b506103c6610660366004614330565b6112f3565b34801561067157600080fd5b506103c6610680366004614454565b6113d7565b34801561069157600080fd5b506104ff6106a03660046144fa565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156106e057600080fd5b5060005460ff166103e8565b3480156106f857600080fd5b506103c6610707366004614258565b61144f565b6103c661071a3660046145b2565b61152b565b34801561072b57600080fd5b506103c661073a366004614330565b611596565b3480156103c657600080fd5b34801561075757600080fd5b5061076b610766366004614315565b611682565b6040516103f4919061467d565b6103c6610786366004614690565b61171c565b34801561079757600080fd5b506103c66107a6366004614742565b6117cb565b3480156107b757600080fd5b506007546107cb906001600160a01b031681565b6040516001600160a01b0390911681526020016103f4565b3480156107ef57600080fd5b506103c6611838565b34801561080457600080fd5b506103c66108133660046144fa565b611848565b34801561082457600080fd5b506105d97f000000000000000000000000000000000000000000000000000000000000000081565b34801561085857600080fd5b506104ff61086736600461475f565b600260209081526000928352604080842090915290825290205481565b34801561089057600080fd5b5060005461010090046001600160a01b03166107cb565b3480156108b357600080fd5b506104ff6108c2366004614315565b600c6020526000908152604090205481565b3480156108e057600080fd5b506104ff6118f5565b3480156108f557600080fd5b506104ff610904366004614315565b600b6020526000908152604090205481565b34801561092257600080fd5b506004546107cb906001600160a01b031681565b34801561094257600080fd5b506104ff60115481565b34801561095857600080fd5b506103e8610967366004614742565b60106020526000908152604090205460ff1681565b34801561098857600080fd5b506103e86109973660046144fa565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b3480156109da57600080fd5b5061076b6109e9366004614315565b61198b565b3480156109fa57600080fd5b506104bd610a09366004614792565b611a9a565b348015610a1a57600080fd5b506103c6610a293660046143cf565b611b29565b348015610a3a57600080fd5b506107cb7f000000000000000000000000000000000000000000000000000000000000000081565b348015610a6e57600080fd5b506103c6610a7d366004614742565b611bbc565b348015610a8e57600080fd5b506104ff61271081565b348015610aa457600080fd5b506103c6610ab336600461484f565b611c12565b348015610ac457600080fd5b506103c6610ad3366004614330565b611c9c565b348015610ae457600080fd5b506104ff610af3366004614315565b60086020526000908152604090205481565b6103c6610b13366004614258565b611d88565b348015610b2457600080fd5b506104ff610b33366004614315565b600e6020526000908152604090205481565b348015610b5157600080fd5b506103c6610b603660046148bd565b611f9e565b348015610b7157600080fd5b506105d9600181565b348015610b8657600080fd5b506103c6610b953660046148f9565b612008565b348015610ba657600080fd5b506103c6610bb53660046143cf565b612127565b348015610bc657600080fd5b506103c6610bd5366004614742565b612181565b348015610be657600080fd5b5061076b610bf53660046149c1565b6121fa565b348015610c0657600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006107cb565b348015610c3957600080fd5b506104ff610c48366004614315565b600f6020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610cd75760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610cf590614a0e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2190614a0e565b8015610d6e5780601f10610d4357610100808354040283529160200191610d6e565b820191906000526020600020905b815481529060010190602001808311610d5157829003601f168201915b50505050509050805186869050148015610d89575060008151115b8015610db1575080516020820120604051610da79088908890614a42565b6040518091039020145b610dcd5760405162461bcd60e51b8152600401610cce90614a52565b610e438787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506122ad92505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610e7d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b610e8b612326565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610ef157600080fd5b505af1158015610f05573d6000803e3d6000fd5b5050505050565b610f14612326565b61ffff909116600090815260036020526040902055565b610f33612326565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610ed7565b610f8b612326565b61ffff8216600090815260086020526040902054811015610ffd5760405162461bcd60e51b815260206004820152602660248201527f4461696c79206c696d6974203c2073696e676c65207472616e73616374696f6e604482015265081b1a5b5a5d60d21b6064820152608401610cce565b61ffff82166000818152600960209081526040918290205482519384529083015281018290527f4dd31065e259d5284e44d1f9265710da72eafcf78dc925e3881189fc3b71f6939060600160405180910390a161ffff909116600090815260096020526040902055565b61106f612326565b61ffff8116600090815260016020526040812061108b9161409b565b60405161ffff821681527f6d5075c81d4d9e75bec6052f4e44f58f8a8cf1327544addbbf015fb06f83bd37906020015b60405180910390a150565b60008061110c8888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061238692505050565b91509150965096945050505050565b61ffff83166000908152600160205260408120805482919061113c90614a0e565b80601f016020809104026020016040519081016040528092919081815260200182805461116890614a0e565b80156111b55780601f1061118a576101008083540402835291602001916111b5565b820191906000526020600020905b81548152906001019060200180831161119857829003601f168201915b5050505050905083836040516111cc929190614a42565b60405180910390208180519060200120149150505b9392505050565b6111f0612326565b6111f861247a565b565b611202612326565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061125290869086908690600401614ac1565b600060405180830381600087803b15801561126c57600080fd5b505af1158015610e43573d6000803e3d6000fd5b611288612326565b806011600082825461129a9190614af5565b909155506112ab90503083836124cc565b50816001600160a01b03167f22fe8e8ead80ad0961d77107e806ba9bcf9ca3b175a9d446145646d39c36ab96826040516112e791815260200190565b60405180910390a25050565b6112fb612326565b61ffff821660009081526009602052604090205481111561136d5760405162461bcd60e51b815260206004820152602660248201527f53696e676c65207472616e73616374696f6e206c696d6974203e204461696c79604482015265081b1a5b5a5d60d21b6064820152608401610cce565b61ffff82166000818152600860209081526040918290205482519384529083015281018290527f7babeac42ccbb33537ee421fedc4db7b5f251b5d2a3fa5c0ff4b35b2d783be879060600160405180910390a161ffff909116600090815260086020526040902055565b6113df612326565b816001600160a01b03167ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb8260405161141c911515815260200190565b60405180910390a26001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b3330146114ad5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610cce565b6115238686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061268692505050565b505050505050565b6115238585858561153f6020870187614742565b61154f6040880160208901614742565b61155c6040890189614b0c565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277792505050565b61159e612326565b61ffff82166000908152600c60205260409020548110156116185760405162461bcd60e51b815260206004820152602e60248201527f4461696c79206c696d6974203c2073696e676c6520726563656976652074726160448201526d1b9cd858dd1a5bdb881b1a5b5a5d60921b6064820152608401610cce565b61ffff82166000818152600d60209081526040918290205482519384529083015281018290527f95dc51094cd27cf4ee3fd0dbb50cf96f8df1629c822f5434c4a34d7eb03c97249060600160405180910390a161ffff9091166000908152600d6020526040902055565b6001602052600090815260409020805461169b90614a0e565b80601f01602080910402602001604051908101604052809291908181526020018280546116c790614a0e565b80156117145780601f106116e957610100808354040283529160200191611714565b820191906000526020600020905b8154815290600101906020018083116116f757829003601f168201915b505050505081565b6117c08888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92506117699150506020890189614742565b61177960408a0160208b01614742565b61178660408b018b614b0c565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061285f92505050565b505050505050505050565b6117d3612326565b6117dc8161295b565b6007546040516001600160a01b038084169216907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd90600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b611840612326565b6111f8612982565b611850612326565b61ffff83166000908152600560205260408082209051611871908590614b52565b9081526040805191829003602090810183206001600160401b0386166000908152915220919091556118a4908390614b52565b6040805191829003822061ffff861683526001600160401b0384166020840152917f48a980eea4ea1c540209e2f9f32a4c2edf51fab37b1d21f453868301ecb6e2ee910160405180910390a2505050565b60006011547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611958573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197c9190614b6e565b6119869190614af5565b905090565b61ffff81166000908152600160205260408120805460609291906119ae90614a0e565b80601f01602080910402602001604051908101604052809291908181526020018280546119da90614a0e565b8015611a275780601f106119fc57610100808354040283529160200191611a27565b820191906000526020600020905b815481529060010190602001808311611a0a57829003601f168201915b505050505090508051600003611a7f5760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610cce565b6111e1600060148351611a929190614af5565b8391906129bf565b600080611b178b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c9081908401838280828437600092019190915250612acc92505050565b91509150995099975050505050505050565b611b31612326565b818130604051602001611b4693929190614b87565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251611b7b939192909101906140d5565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611baf93929190614ac1565b60405180910390a1505050565b611bc4612326565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020016110bb565b611c1a612326565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611c6e9088908890889088908890600401614bad565b600060405180830381600087803b158015611c8857600080fd5b505af11580156117c0573d6000803e3d6000fd5b611ca4612326565b61ffff82166000908152600d6020526040902054811115611d1e5760405162461bcd60e51b815260206004820152602e60248201527f73696e676c652072656365697665207472616e73616374696f6e206c696d697460448201526d080f8811185a5b1e481b1a5b5a5d60921b6064820152608401610cce565b61ffff82166000818152600c60209081526040918290205482519384529083015281018290527f2c42997a938a029910a78e7c28d762b349c28e70f3a89c1fbccbb1a46020b1599060600160405180910390a161ffff9091166000908152600c6020526040902055565b61ffff86166000908152600560205260408082209051611dab9088908890614a42565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080611e2b5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610cce565b808383604051611e3c929190614a42565b604051809103902014611e9b5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610cce565b61ffff87166000908152600560205260408082209051611ebe9089908990614a42565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252611f56918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061268692505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051611f8d959493929190614bdb565b60405180910390a150505050505050565b611fa6612326565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611baf565b3330146120575760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610cce565b6120623086866124cc565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf866040516120a491815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da9083906120e8908e908e908e908e908e908d908d908d90600401614c16565b600060405180830381600088803b15801561210257600080fd5b5087f1158015612116573d6000803e3d6000fd5b505050505050505050505050505050565b61212f612326565b61ffff8316600090815260016020526040902061214d908383614159565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611baf93929190614ac1565b612189612326565b6001600160a01b0381166121ee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610cce565b6121f781612b87565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa15801561227a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122a29190810190614c71565b90505b949350505050565b6000806123105a60966366ad5c8a60e01b898989896040516024016122d59493929190614cde565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612be0565b9150915081611523576115238686868685612c6a565b6000546001600160a01b036101009091041633146111f85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610cce565b60008060006123d48761239888612d07565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb109061242b908b90309086908b908b90600401614d1c565b6040805180830381865afa158015612447573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246b9190614d70565b92509250509550959350505050565b612482612d8d565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006124d6612dd6565b6040516370a0823160e01b81526001600160a01b0384811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125659190614b6e565b9050306001600160a01b038616036125b0576125ab6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168585612e1c565b6125e5565b6125e56001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868686612e84565b6040516370a0823160e01b81526001600160a01b03858116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561264f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126739190614b6e565b61267d9190614af5565b95945050505050565b61ffff8416600090815260016020526040812080546126a490614a0e565b80601f01602080910402602001604051908101604052809291908181526020018280546126d090614a0e565b801561271d5780601f106126f25761010080835404028352916020019161271d565b820191906000526020600020905b81548152906001019060200180831161270057829003601f168201915b5050505050905080518451148015612736575060008151115b801561274f575080805190602001208480519060200120145b61276b5760405162461bcd60e51b8152600401610cce90614a52565b610f0585858585612ec2565b600061278587828481612f49565b61278e8561301e565b50905061279d8888888461305e565b9050600081116127eb5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610cce565b60006127fa8761239884612d07565b905061280a888287878734613106565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161284b91815260200190565b60405180910390a450979650505050505050565b6000612877896001846001600160401b038916612f49565b6128808761301e565b50905061288f8a8a8a8461305e565b9050600081116128dd5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610cce565b60006128f4338a6128ed85612d07565b8a8a6132ab565b90506129048a8287878734613106565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161294591815260200190565b60405180910390a4509998505050505050505050565b6001600160a01b0381166121f7576040516342bcdf7f60e11b815260040160405180910390fd5b61298a612dd6565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124af3390565b6060816129cd81601f614d94565b1015612a0c5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610cce565b612a168284614d94565b84511015612a5a5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610cce565b606082158015612a795760405191506000825260208201604052612ac3565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612ab2578051835260209283019201612a9a565b5050858452601f01601f1916604052505b50949350505050565b6000806000612adf338a6128ed8b612d07565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612b36908d90309086908b908b90600401614d1c565b6040805180830381865afa158015612b52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b769190614d70565b925092505097509795505050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6000606060008060008661ffff166001600160401b03811115612c0557612c0561448d565b6040519080825280601f01601f191660200182016040528015612c2f576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612c51578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051612c9b9190614b52565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90612cf89087908790879087908790614dac565b60405180910390a15050505050565b600080612d347f000000000000000000000000000000000000000000000000000000000000000084614e14565b90506001600160401b03811115610e7d5760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610cce565b60005460ff166111f85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610cce565b60005460ff16156111f85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610cce565b6040516001600160a01b038316602482015260448101829052612e7f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526132ec565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052612ebc9085906323b872dd60e01b90608401612e48565b50505050565b6000612ece82826133c1565b905060ff8116612ee957612ee48585858561341d565b610f05565b60001960ff821601612f0157612ee4858585856134ad565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610cce565b6000612f54836136bb565b61ffff80871660009081526002602090815260408083209389168352929052205490915080612fc55760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610cce565b612fcf8382614d94565b8210156115235760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610cce565b60008061304b7f000000000000000000000000000000000000000000000000000000000000000084614e28565b90506130578184614af5565b9150915091565b6000613068612dd6565b6001600160a01b03851633146130cb5760405162461bcd60e51b815260206004820152602260248201527f50726f78794f46543a206f776e6572206973206e6f742073656e642063616c6c60448201526132b960f11b6064820152608401610cce565b6130d6858584613717565b60006130e38630856124cc565b905080601160008282546130f79190614d94565b90915550909695505050505050565b61ffff86166000908152600160205260408120805461312490614a0e565b80601f016020809104026020016040519081016040528092919081815260200182805461315090614a0e565b801561319d5780601f106131725761010080835404028352916020019161319d565b820191906000526020600020905b81548152906001019060200180831161318057829003601f168201915b50505050509050805160000361320e5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610cce565b613219878751613934565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490613270908b9086908c908c908c908c90600401614e3c565b6000604051808303818588803b15801561328957600080fd5b505af115801561329d573d6000803e3d6000fd5b505050505050505050505050565b6060600185856001600160a01b03891685876040516020016132d296959493929190614ea3565b604051602081830303815290604052905095945050505050565b6000613341826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139a59092919063ffffffff16565b90508051600014806133625750808060200190518101906133629190614f04565b612e7f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610cce565b60006133ce826001614d94565b835110156134145760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610cce565b50016001015190565b600080613429836139b4565b90925090506001600160a01b0382166134425761dead91505b600061344d82613a39565b905061345a878483613a6e565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8360405161349c91815260200190565b60405180910390a350505050505050565b60008060008060006134be86613abc565b945094509450945094506000600660008b61ffff1661ffff168152602001908152602001600020896040516134f39190614b52565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff16915061352685613a39565b905081613594576135388b3083613a6e565b61ffff8c16600090815260066020526040908190209051919250600191613560908d90614b52565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b6135eb576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a150505050505050612ebc565b8a8a8a8a8a8a868a60008a613609578b6001600160401b031661360b565b5a5b905060008061363d5a609663eaffd49a60e01b8e8e8e8d8d8d8d8d6040516024016122d5989796959493929190614f21565b915091508115613696578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd88490613688908e908e908690614f95565b60405180910390a2506136a3565b6136a38b8b8b8b85612c6a565b50505050505050505050505050505050505050505050565b600060228251101561370f5760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610cce565b506022015190565b6001600160a01b03831660009081526010602052604090205460ff16801561373f5750505050565b6040805160208101909152600754600091829181906001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156137c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137eb9190614b6e565b905290506137f98185613b73565b61ffff86166000908152600b6020908152604080832054600a8352818420546008845282852054600990945291909320549395504293909190818711156138825760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610cce565b620151806138908587614af5565b11156138b45761ffff8a166000908152600b602052604090208590558692506138c1565b6138be8784614d94565b92505b808311156139115760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610cce565b505061ffff9097166000908152600a602052604090209690965550505050505050565b61ffff82166000908152600360205260408120549081900361395557506127105b80821115612e7f5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610cce565b60606122a58484600085613b8b565b600080806139c284826133c1565b60ff161480156139d3575082516029145b613a1a5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610cce565b613a2583600d613c66565b9150613a32836021613ccb565b9050915091565b6000610e7d7f00000000000000000000000000000000000000000000000000000000000000006001600160401b038416614fc3565b6000613a78612dd6565b613a83838584613d28565b8160116000828254613a959190614af5565b9091555050306001600160a01b03841603613ab15750806111e1565b6122a53084846124cc565b600080806060816001613acf87836133c1565b60ff1614613b1a5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610cce565b613b2586600d613c66565b9350613b32866021613ccb565b9250613b3f866029613f45565b9450613b4c866049613ccb565b9050613b686051808851613b609190614af5565b8891906129bf565b915091939590929450565b600080613b808484613fa3565b90506122a581613fd4565b606082471015613bec5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610cce565b600080866001600160a01b03168587604051613c089190614b52565b60006040518083038185875af1925050503d8060008114613c45576040519150601f19603f3d011682016040523d82523d6000602084013e613c4a565b606091505b5091509150613c5b87838387613fec565b979650505050505050565b6000613c73826014614d94565b83511015613cbb5760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610cce565b500160200151600160601b900490565b6000613cd8826008614d94565b83511015613d1f5760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610cce565b50016008015190565b6001600160a01b03831660009081526010602052604090205460ff168015613d505750505050565b6040805160208101909152600754600091829181906001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613dd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613dfc9190614b6e565b90529050613e0a8185613b73565b61ffff86166000908152600f6020908152604080832054600e835281842054600c845282852054600d9094529190932054939550429390919081871115613e935760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610cce565b62015180613ea18587614af5565b1115613ec55761ffff8a166000908152600f60205260409020859055869250613ed2565b613ecf8784614d94565b92505b80831115613f225760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610cce565b505061ffff9097166000908152600e602052604090209690965550505050505050565b6000613f52826020614d94565b83511015613f9a5760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610cce565b50016020015190565b6040805160208101909152600081526040518060200160405280613fcb856000015185614065565b90529392505050565b8051600090610e7d90670de0b6b3a764000090614e14565b6060831561405b578251600003614054576001600160a01b0385163b6140545760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610cce565b50816122a5565b6122a58383614071565b60006111e18284614fc3565b8151156140815781518083602001fd5b8060405162461bcd60e51b8152600401610cce919061467d565b5080546140a790614a0e565b6000825580601f106140b7575050565b601f0160209004906000526020600020908101906121f791906141cd565b8280546140e190614a0e565b90600052602060002090601f0160209004810192826141035760008555614149565b82601f1061411c57805160ff1916838001178555614149565b82800160010185558215614149579182015b8281111561414957825182559160200191906001019061412e565b506141559291506141cd565b5090565b82805461416590614a0e565b90600052602060002090601f0160209004810192826141875760008555614149565b82601f106141a05782800160ff19823516178555614149565b82800160010185558215614149579182015b828111156141495782358255916020019190600101906141b2565b5b8082111561415557600081556001016141ce565b803561ffff811681146141f457600080fd5b919050565b60008083601f84011261420b57600080fd5b5081356001600160401b0381111561422257600080fd5b60208301915083602082850101111561423a57600080fd5b9250929050565b80356001600160401b03811681146141f457600080fd5b6000806000806000806080878903121561427157600080fd5b61427a876141e2565b955060208701356001600160401b038082111561429657600080fd5b6142a28a838b016141f9565b90975095508591506142b660408a01614241565b945060608901359150808211156142cc57600080fd5b506142d989828a016141f9565b979a9699509497509295939492505050565b6000602082840312156142fd57600080fd5b81356001600160e01b0319811681146111e157600080fd5b60006020828403121561432757600080fd5b6111e1826141e2565b6000806040838503121561434357600080fd5b61434c836141e2565b946020939093013593505050565b80151581146121f757600080fd5b60008060008060008060a0878903121561438157600080fd5b61438a876141e2565b9550602087013594506040870135935060608701356143a88161435a565b925060808701356001600160401b038111156143c357600080fd5b6142d989828a016141f9565b6000806000604084860312156143e457600080fd5b6143ed846141e2565b925060208401356001600160401b0381111561440857600080fd5b614414868287016141f9565b9497909650939450505050565b6001600160a01b03811681146121f757600080fd5b6000806040838503121561444957600080fd5b823561434c81614421565b6000806040838503121561446757600080fd5b823561447281614421565b915060208301356144828161435a565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156144cb576144cb61448d565b604052919050565b60006001600160401b038211156144ec576144ec61448d565b50601f01601f191660200190565b60008060006060848603121561450f57600080fd5b614518846141e2565b925060208401356001600160401b0381111561453357600080fd5b8401601f8101861361454457600080fd5b8035614557614552826144d3565b6144a3565b81815287602083850101111561456c57600080fd5b8160208401602083013760006020838301015280945050505061459160408501614241565b90509250925092565b6000606082840312156145ac57600080fd5b50919050565b600080600080600060a086880312156145ca57600080fd5b85356145d581614421565b94506145e3602087016141e2565b9350604086013592506060860135915060808601356001600160401b0381111561460c57600080fd5b6146188882890161459a565b9150509295509295909350565b60005b83811015614640578181015183820152602001614628565b83811115612ebc5750506000910152565b60008151808452614669816020860160208601614625565b601f01601f19169290920160200192915050565b6020815260006111e16020830184614651565b60008060008060008060008060e0898b0312156146ac57600080fd5b88356146b781614421565b97506146c560208a016141e2565b9650604089013595506060890135945060808901356001600160401b03808211156146ef57600080fd5b6146fb8c838d016141f9565b909650945084915061470f60a08c01614241565b935060c08b013591508082111561472557600080fd5b506147328b828c0161459a565b9150509295985092959890939650565b60006020828403121561475457600080fd5b81356111e181614421565b6000806040838503121561477257600080fd5b61477b836141e2565b9150614789602084016141e2565b90509250929050565b600080600080600080600080600060e08a8c0312156147b057600080fd5b6147b98a6141e2565b985060208a0135975060408a0135965060608a01356001600160401b03808211156147e357600080fd5b6147ef8d838e016141f9565b909850965086915061480360808d01614241565b955060a08c013591506148158261435a565b90935060c08b0135908082111561482b57600080fd5b506148388c828d016141f9565b915080935050809150509295985092959850929598565b60008060008060006080868803121561486757600080fd5b614870866141e2565b945061487e602087016141e2565b93506040860135925060608601356001600160401b038111156148a057600080fd5b6148ac888289016141f9565b969995985093965092949392505050565b6000806000606084860312156148d257600080fd5b6148db846141e2565b92506148e9602085016141e2565b9150604084013590509250925092565b6000806000806000806000806000806101008b8d03121561491957600080fd5b6149228b6141e2565b995060208b01356001600160401b038082111561493e57600080fd5b61494a8e838f016141f9565b909b50995089915061495e60408e01614241565b985060608d0135975060808d0135915061497782614421565b90955060a08c0135945060c08c0135908082111561499457600080fd5b506149a18d828e016141f9565b9150809450508092505060e08b013590509295989b9194979a5092959850565b600080600080608085870312156149d757600080fd5b6149e0856141e2565b93506149ee602086016141e2565b925060408501356149fe81614421565b9396929550929360600135925050565b600181811c90821680614a2257607f821691505b6020821081036145ac57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b60208082526026908201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6040820152651b9d1c9858dd60d21b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff841681526040602082015260006122a2604083018486614a98565b634e487b7160e01b600052601160045260246000fd5b600082821015614b0757614b07614adf565b500390565b6000808335601e19843603018112614b2357600080fd5b8301803591506001600160401b03821115614b3d57600080fd5b60200191503681900382131561423a57600080fd5b60008251614b64818460208701614625565b9190910192915050565b600060208284031215614b8057600080fd5b5051919050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152613c5b608083018486614a98565b61ffff86168152608060208201526000614bf9608083018688614a98565b6001600160401b0394909416604083015250606001529392505050565b61ffff8916815260c060208201526000614c3460c08301898b614a98565b6001600160401b038816604084015286606084015285608084015282810360a0840152614c62818587614a98565b9b9a5050505050505050505050565b600060208284031215614c8357600080fd5b81516001600160401b03811115614c9957600080fd5b8201601f81018413614caa57600080fd5b8051614cb8614552826144d3565b818152856020838501011115614ccd57600080fd5b61267d826020830160208601614625565b61ffff85168152608060208201526000614cfb6080830186614651565b6001600160401b03851660408401528281036060840152613c5b8185614651565b61ffff861681526001600160a01b038516602082015260a060408201819052600090614d4a90830186614651565b84151560608401528281036080840152614d648185614651565b98975050505050505050565b60008060408385031215614d8357600080fd5b505080516020909101519092909150565b60008219821115614da757614da7614adf565b500190565b61ffff8616815260a060208201526000614dc960a0830187614651565b6001600160401b03861660408401528281036060840152614dea8186614651565b90508281036080840152614d648185614651565b634e487b7160e01b600052601260045260246000fd5b600082614e2357614e23614dfe565b500490565b600082614e3757614e37614dfe565b500690565b61ffff8716815260c060208201526000614e5960c0830188614651565b8281036040840152614e6b8188614651565b6001600160a01b0387811660608601528616608085015283810360a08501529050614e968185614651565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b166049840152508251614ef2816051850160208701614625565b91909101605101979650505050505050565b600060208284031215614f1657600080fd5b81516111e18161435a565b600061010061ffff8b168352806020840152614f3f8184018b614651565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c08501529050614f7f8186614651565b9150508260e08301529998505050505050505050565b606081526000614fa86060830186614651565b6001600160401b039490941660208301525060400152919050565b6000816000190483118215151615614fdd57614fdd614adf565b50029056fea2646970667358221220ae01746a4560f00665eba343ce64401d2717d445f25188669c2ec4f9a67d247364736f6c634300080d0033", "devdoc": { "author": "Venus", "kind": "dev", @@ -1918,6 +1958,9 @@ "FallbackWithdraw(address,uint256)": { "notice": "Emits when locked token released manually by owner." }, + "InnerTokenAdded(address)": { + "notice": "Event emitted when inner token set successfully." + }, "OracleChanged(address,address)": { "notice": "Event emitted when oracle is modified." }, @@ -2168,7 +2211,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 10633, + "astId": 10697, "contract": "contracts/Bridge/XVSProxyOFTSrc.sol:XVSProxyOFTSrc", "label": "outboundAmount", "offset": 0, diff --git a/deployments/bsctestnet/solcInputs/62c3d453c4f2f09a9c75b9665a09cf0a.json b/deployments/bsctestnet/solcInputs/62c3d453c4f2f09a9c75b9665a09cf0a.json new file mode 100644 index 0000000..b682d1b --- /dev/null +++ b/deployments/bsctestnet/solcInputs/62c3d453c4f2f09a9c75b9665a09cf0a.json @@ -0,0 +1,90 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./OwnableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership} and {acceptOwnership}.\n *\n * This module is used through inheritance. It will make available all functions\n * from parent (Ownable).\n */\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\n function __Ownable2Step_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable2Step_init_unchained() internal onlyInitializing {\n }\n address private _pendingOwner;\n\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Returns the address of the pending owner.\n */\n function pendingOwner() public view virtual returns (address) {\n return _pendingOwner;\n }\n\n /**\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual override onlyOwner {\n _pendingOwner = newOwner;\n emit OwnershipTransferStarted(owner(), newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual override {\n delete _pendingOwner;\n super._transferOwnership(newOwner);\n }\n\n /**\n * @dev The new owner accepts the ownership transfer.\n */\n function acceptOwnership() public virtual {\n address sender = _msgSender();\n require(pendingOwner() == sender, \"Ownable2Step: caller is not the new owner\");\n _transferOwnership(sender);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts/access/IAccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\n\nimport \"./IAccessControlManagerV8.sol\";\n\n/**\n * @title AccessControlledV8\n * @author Venus\n * @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\n */\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\n /// @notice Access control manager contract\n IAccessControlManagerV8 private _accessControlManager;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n\n /// @notice Emitted when access control manager contract address is changed\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\n\n /// @notice Thrown when the action is prohibited by AccessControlManager\n error Unauthorized(address sender, address calledContract, string methodSignature);\n\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\n __Ownable2Step_init();\n __AccessControlled_init_unchained(accessControlManager_);\n }\n\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\n _setAccessControlManager(accessControlManager_);\n }\n\n /**\n * @notice Sets the address of AccessControlManager\n * @dev Admin function to set address of AccessControlManager\n * @param accessControlManager_ The new address of the AccessControlManager\n * @custom:event Emits NewAccessControlManager event\n * @custom:access Only Governance\n */\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\n _setAccessControlManager(accessControlManager_);\n }\n\n /**\n * @notice Returns the address of the access control manager contract\n */\n function accessControlManager() external view returns (IAccessControlManagerV8) {\n return _accessControlManager;\n }\n\n /**\n * @dev Internal function to set address of AccessControlManager\n * @param accessControlManager_ The new address of the AccessControlManager\n */\n function _setAccessControlManager(address accessControlManager_) internal {\n require(address(accessControlManager_) != address(0), \"invalid acess control manager address\");\n address oldAccessControlManager = address(_accessControlManager);\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\n }\n\n /**\n * @notice Reverts if the call is not allowed by AccessControlManager\n * @param signature Method signature\n */\n function _checkAccessAllowed(string memory signature) internal view {\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\n\n if (!isAllowedToCall) {\n revert Unauthorized(msg.sender, address(this), signature);\n }\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport \"@openzeppelin/contracts/access/IAccessControl.sol\";\n\n/**\n * @title IAccessControlManagerV8\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\n */\ninterface IAccessControlManagerV8 is IAccessControl {\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\n\n function hasPermission(\n address account,\n address contractAddress,\n string calldata functionSig\n ) external view returns (bool);\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/validators.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\nerror ZeroAddressNotAllowed();\n\n/// @notice Checks if the provided address is nonzero, reverts otherwise\n/// @param address_ Address to check\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\nfunction ensureNonzeroAddress(address address_) pure {\n if (address_ == address(0)) {\n revert ZeroAddressNotAllowed();\n }\n}\n" + }, + "contracts/Bridge/interfaces/IXVSProxyOFT.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/**\n * @title IXVSProxyOFT\n * @author Venus\n * @notice Interface implemented by `XVSProxyOFT`.\n */\ninterface IXVSProxyOFT {\n function transferOwnership(address addr) external;\n\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\n\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\n}\n" + }, + "contracts/Bridge/token/TokenController.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\nimport { IAccessControlManagerV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\";\nimport { Pausable } from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\n/**\n * @title TokenController\n * @author Venus\n * @notice TokenController contract acts as a governance and access control mechanism,\n * allowing the owner to manage minting restrictions and blacklist certain addresses to maintain control and security within the token ecosystem.\n * It provides a flexible framework for token-related operations.\n */\n\ncontract TokenController is Ownable, Pausable {\n /**\n * @notice Access control manager contract address.\n */\n address public accessControlManager;\n /**\n * @notice A Mapping used to keep track of the blacklist status of addresses.\n */\n mapping(address => bool) public _blacklist;\n /**\n * @notice A mapping is used to keep track of the maximum amount a minter is permitted to mint.\n */\n mapping(address => uint256) public minterToCap;\n /**\n * @notice A Mapping used to keep track of the amount i.e already m inted by minter.\n */\n mapping(address => uint256) public minterToMintedAmount;\n\n /**\n * @notice Emitted when the blacklist status of a user is updated.\n */\n event BlacklistUpdated(address indexed user, bool value);\n /**\n * @notice Emitted when the minting limit for a minter is increased.\n */\n event MintLimitIncreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting limit for a minter is decreased.\n */\n event MintLimitDecreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting cap for a minter is changed.\n */\n event MintCapChanged(address indexed minter, uint256 amount);\n /**\n * @notice Emitted when the address of the access control manager of the contract is updated.\n */\n event NewAccessControlManager(address indexed oldAccessControlManager, address indexed newAccessControlManager);\n\n /**\n * @notice This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap.\n */\n error MintLimitExceed();\n /**\n * @notice This error is used to indicate that minting is not allowed for the specified addresses.\n */\n error MintNotAllowed(address from, address to);\n\n /**\n * @notice This error is used to indicate that sender is not allowed to perform this action.\n */\n error Unauthorized();\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\n */\n constructor(address accessControlManager_) {\n ensureNonzeroAddress(accessControlManager_);\n accessControlManager = accessControlManager_;\n }\n\n /**\n * @notice Pauses Token\n * @custom:access Controlled by AccessControlManager.\n */\n function pause() external {\n _ensureAllowed(\"pause()\");\n _pause();\n }\n\n /**\n * @notice Resumes Token\n * @custom:access Controlled by AccessControlManager.\n */\n function unpause() external {\n _ensureAllowed(\"unpause()\");\n _unpause();\n }\n\n /**\n * @notice Function to update blacklist.\n * @param user_ User address to be affected.\n * @param value_ Boolean to toggle value.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits BlacklistUpdated event.\n */\n function updateBlacklist(address user_, bool value_) external {\n _ensureAllowed(\"updateBlacklist(address,bool)\");\n _blacklist[user_] = value_;\n emit BlacklistUpdated(user_, value_);\n }\n\n /**\n * @notice Sets the minitng cap for minter.\n * @param minter_ Minter address.\n * @param amount_ Cap for the minter.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintCapChanged.\n */\n function setMintCap(address minter_, uint256 amount_) external {\n _ensureAllowed(\"setMintCap(address,uint256)\");\n minterToCap[minter_] = amount_;\n emit MintCapChanged(minter_, amount_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract.\n * @dev Admin function to set the access control address.\n * @param newAccessControlAddress_ New address for the access control.\n * @custom:access Only owner.\n * @custom:event Emits NewAccessControlManager.\n * @custom:error ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.\n */\n function setAccessControlManager(address newAccessControlAddress_) external onlyOwner {\n ensureNonzeroAddress(newAccessControlAddress_);\n emit NewAccessControlManager(accessControlManager, newAccessControlAddress_);\n accessControlManager = newAccessControlAddress_;\n }\n\n /**\n * @notice Returns the blacklist status of the address.\n * @param user_ Address of user to check blacklist status.\n * @return bool status of blacklist.\n */\n function isBlackListed(address user_) external view returns (bool) {\n return _blacklist[user_];\n }\n\n /**\n * @dev Checks the minter cap and eligibility of receiver to receive tokens.\n * @param from_ Minter address.\n * @param to_ Receiver address.\n * @param amount_ Amount to be mint.\n */\n function _isEligibleToMint(address from_, address to_, uint256 amount_) internal {\n if (_blacklist[to_]) {\n revert MintNotAllowed(from_, to_);\n }\n uint256 mintingCap = minterToCap[from_];\n uint256 totalMintedOld = minterToMintedAmount[from_];\n uint256 totalMintedNew = totalMintedOld + amount_;\n\n if (totalMintedNew > mintingCap) {\n revert MintLimitExceed();\n }\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit = mintingCap - totalMintedNew;\n emit MintLimitDecreased(from_, availableLimit);\n }\n\n /**\n * @dev This is post hook of burn function, increases minitng limit of the minter.\n * @param from_ Minter address.\n * @param amount_ Amount burned.\n */\n function _increaseMintLimit(address from_, uint256 amount_) internal {\n uint256 totalMintedOld = minterToMintedAmount[from_];\n uint256 totalMintedNew = totalMintedOld - amount_;\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit = minterToCap[from_] - totalMintedNew;\n emit MintLimitIncreased(from_, availableLimit);\n }\n\n /// @dev Checks the caller is allowed to call the specified fuction\n function _ensureAllowed(string memory functionSig_) internal view {\n if (!IAccessControlManagerV8(accessControlManager).isAllowedToCall(msg.sender, functionSig_)) {\n revert Unauthorized();\n }\n }\n}\n" + }, + "contracts/Bridge/token/XVS.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\nimport { TokenController } from \"./TokenController.sol\";\n\n/**\n * @title XVS\n * @author Venus\n * @notice XVS contract serves as a customized ERC-20 token with additional minting and burning functionality.\n * It also incorporates access control features provided by the \"TokenController\" contract to ensure proper governance and restrictions on minting and burning operations.\n */\n\ncontract XVS is ERC20, TokenController {\n constructor(address accessControlManager_) ERC20(\"Venus XVS\", \"XVS\") TokenController(accessControlManager_) {}\n\n /**\n * @notice Creates `amount_` tokens and assigns them to `account_`, increasing\n * the total supply. Checks access and eligibility.\n * @param account_ Address to which tokens be assigned.\n * @param amount_ Amount of tokens to be assigned.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitDecreased with new available limit.\n * @custom:error MintNotAllowed is thrown when minting is not allowed to from_ address.\n * @custom:error MintLimitExceed is thrown when minting amount exceed the maximum cap.\n */\n function mint(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"mint(address,uint256)\");\n _isEligibleToMint(msg.sender, account_, amount_);\n _mint(account_, amount_);\n }\n\n /**\n * @notice Destroys `amount_` tokens from `account_`, reducing the\n * total supply. Checks access and eligibility.\n * @param account_ Address from which tokens be destroyed.\n * @param amount_ Amount of tokens to be destroyed.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitIncreased with new available limit.\n */\n function burn(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"burn(address,uint256)\");\n _burn(account_, amount_);\n _increaseMintLimit(msg.sender, amount_);\n }\n}\n" + }, + "contracts/Bridge/XVSBridgeAdmin.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.8.13;\n\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { IXVSProxyOFT } from \"./interfaces/IXVSProxyOFT.sol\";\n\n/**\n * @title XVSBridgeAdmin\n * @author Venus\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\n * It maintains a registry of function signatures and names,\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\n */\ncontract XVSBridgeAdmin is AccessControlledV8 {\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IXVSProxyOFT public immutable XVSBridge;\n /**\n * @notice A mapping keeps track of function signature associated with function name string.\n */\n mapping(bytes4 => string) public functionRegistry;\n\n // Event emitted when function registry updated\n event FunctionRegistryChanged(string signature, bool active);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address XVSBridge_) {\n ensureNonzeroAddress(XVSBridge_);\n XVSBridge = IXVSProxyOFT(XVSBridge_);\n _disableInitializers();\n }\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\n */\n function initialize(address accessControlManager_) external initializer {\n ensureNonzeroAddress(accessControlManager_);\n __AccessControlled_init(accessControlManager_);\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract\n * @custom:access Controlled by AccessControlManager.\n */\n fallback(bytes calldata data) external returns (bytes memory) {\n string memory fun = _getFunctionName(msg.sig);\n require(bytes(fun).length != 0, \"Function not found\");\n _checkAccessAllowed(fun);\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\n require(ok, \"call failed\");\n return res;\n }\n\n /**\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n */\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\n _checkAccessAllowed(\"setTrustedRemoteAddress(uint16,bytes)\");\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice A registry of functions that are allowed to be executed from proposals\n * @param signatures_ Function signature to be added or removed.\n * @param active_ bool value, should be true to add function.\n */\n function upsertSignature(string[] calldata signatures_, bool[] calldata active_) external onlyOwner {\n uint256 signatureLength = signatures_.length;\n require(signatureLength == active_.length, \"Input arrays must have the same length\");\n for (uint256 i; i < signatureLength; i++) {\n bytes4 sigHash = bytes4(keccak256(bytes(signatures_[i])));\n bytes memory signature = bytes(functionRegistry[sigHash]);\n if (active_[i] && signature.length == 0) {\n functionRegistry[sigHash] = signatures_[i];\n emit FunctionRegistryChanged(signatures_[i], true);\n } else if (!active_[i] && signature.length != 0) {\n delete functionRegistry[sigHash];\n emit FunctionRegistryChanged(signatures_[i], false);\n }\n }\n }\n\n /**\n * @notice This function transfer the ownership of the bridge from this contract to new owner.\n * @param newOwner_ New owner of the XVS Bridge.\n * @custom:access Controlled by AccessControlManager.\n */\n function transferBridgeOwnership(address newOwner_) external {\n _checkAccessAllowed(\"transferBridgeOwnership(address)\");\n ensureNonzeroAddress(newOwner_);\n XVSBridge.transferOwnership(newOwner_);\n }\n\n /**\n * @notice Returns bool = true if srcAddress_ is trustedRemote corresponds to chainId_.\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n */\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\n */\n function renounceOwnership() public override {}\n\n /**\n * @dev Returns function name string associated with function signature.\n */\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\n return functionRegistry[signature_];\n }\n\n function bytesToAddress(bytes calldata b) private pure returns (address) {\n return address(uint160(bytes20(b)));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200, + "details": { + "yul": true + } + }, + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/deployments/bsctestnet/solcInputs/df53eb8de81c9fdb7d3455a6cb9a397c.json b/deployments/bsctestnet/solcInputs/df53eb8de81c9fdb7d3455a6cb9a397c.json new file mode 100644 index 0000000..1843457 --- /dev/null +++ b/deployments/bsctestnet/solcInputs/df53eb8de81c9fdb7d3455a6cb9a397c.json @@ -0,0 +1,189 @@ +{ + "language": "Solidity", + "sources": { + "@layerzerolabs/solidity-examples/contracts/libraries/BytesLib.sol": { + "content": "// SPDX-License-Identifier: Unlicense\n/*\n * @title Solidity Bytes Arrays Utils\n * @author Gonçalo Sá \n *\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\n */\npragma solidity >=0.8.0 <0.9.0;\n\nlibrary BytesLib {\n function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {\n bytes memory tempBytes;\n\n assembly {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // Store the length of the first bytes array at the beginning of\n // the memory for tempBytes.\n let length := mload(_preBytes)\n mstore(tempBytes, length)\n\n // Maintain a memory counter for the current write location in the\n // temp bytes array by adding the 32 bytes for the array length to\n // the starting location.\n let mc := add(tempBytes, 0x20)\n // Stop copying when the memory counter reaches the length of the\n // first bytes array.\n let end := add(mc, length)\n\n for {\n // Initialize a copy counter to the start of the _preBytes data,\n // 32 bytes into its memory.\n let cc := add(_preBytes, 0x20)\n } lt(mc, end) {\n // Increase both counters by 32 bytes each iteration.\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n // Write the _preBytes data into the tempBytes memory 32 bytes\n // at a time.\n mstore(mc, mload(cc))\n }\n\n // Add the length of _postBytes to the current length of tempBytes\n // and store it as the new length in the first 32 bytes of the\n // tempBytes memory.\n length := mload(_postBytes)\n mstore(tempBytes, add(length, mload(tempBytes)))\n\n // Move the memory counter back from a multiple of 0x20 to the\n // actual end of the _preBytes data.\n mc := end\n // Stop copying when the memory counter reaches the new combined\n // length of the arrays.\n end := add(mc, length)\n\n for {\n let cc := add(_postBytes, 0x20)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n\n // Update the free-memory pointer by padding our last write location\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\n // next 32 byte block, then round down to the nearest multiple of\n // 32. If the sum of the length of the two arrays is zero then add\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\n mstore(\n 0x40,\n and(\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\n not(31) // Round down to the nearest 32 bytes.\n )\n )\n }\n\n return tempBytes;\n }\n\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\n assembly {\n // Read the first 32 bytes of _preBytes storage, which is the length\n // of the array. (We don't need to use the offset into the slot\n // because arrays use the entire slot.)\n let fslot := sload(_preBytes.slot)\n // Arrays of 31 bytes or less have an even value in their slot,\n // while longer arrays have an odd value. The actual length is\n // the slot divided by two for odd values, and the lowest order\n // byte divided by two for even values.\n // If the slot is even, bitwise and the slot with 255 and divide by\n // two to get the length. If the slot is odd, bitwise and the slot\n // with -1 and divide by two.\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n let mlength := mload(_postBytes)\n let newlength := add(slength, mlength)\n // slength can contain both the length and contents of the array\n // if length < 32 bytes so let's prepare for that\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\n switch add(lt(slength, 32), lt(newlength, 32))\n case 2 {\n // Since the new array still fits in the slot, we just need to\n // update the contents of the slot.\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\n sstore(\n _preBytes.slot,\n // all the modifications to the slot are inside this\n // next block\n add(\n // we can just add to the slot contents because the\n // bytes we want to change are the LSBs\n fslot,\n add(\n mul(\n div(\n // load the bytes from memory\n mload(add(_postBytes, 0x20)),\n // zero all bytes to the right\n exp(0x100, sub(32, mlength))\n ),\n // and now shift left the number of bytes to\n // leave space for the length in the slot\n exp(0x100, sub(32, newlength))\n ),\n // increase length by the double of the memory\n // bytes length\n mul(mlength, 2)\n )\n )\n )\n }\n case 1 {\n // The stored value fits in the slot, but the combined value\n // will exceed it.\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes.slot)\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n\n // save new length\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\n\n // The contents of the _postBytes array start 32 bytes into\n // the structure. Our first read should obtain the `submod`\n // bytes that can fit into the unused space in the last word\n // of the stored array. To get this, we read 32 bytes starting\n // from `submod`, so the data we read overlaps with the array\n // contents by `submod` bytes. Masking the lowest-order\n // `submod` bytes allows us to add that value directly to the\n // stored value.\n\n let submod := sub(32, slength)\n let mc := add(_postBytes, submod)\n let end := add(_postBytes, mlength)\n let mask := sub(exp(0x100, submod), 1)\n\n sstore(sc, add(and(fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00), and(mload(mc), mask)))\n\n for {\n mc := add(mc, 0x20)\n sc := add(sc, 1)\n } lt(mc, end) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n sstore(sc, mload(mc))\n }\n\n mask := exp(0x100, sub(mc, end))\n\n sstore(sc, mul(div(mload(mc), mask), mask))\n }\n default {\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes.slot)\n // Start copying to the last used word of the stored array.\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n\n // save new length\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\n\n // Copy over the first `submod` bytes of the new data as in\n // case 1 above.\n let slengthmod := mod(slength, 32)\n let mlengthmod := mod(mlength, 32)\n let submod := sub(32, slengthmod)\n let mc := add(_postBytes, submod)\n let end := add(_postBytes, mlength)\n let mask := sub(exp(0x100, submod), 1)\n\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\n\n for {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } lt(mc, end) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n sstore(sc, mload(mc))\n }\n\n mask := exp(0x100, sub(mc, end))\n\n sstore(sc, mul(div(mload(mc), mask), mask))\n }\n }\n }\n\n function slice(\n bytes memory _bytes,\n uint _start,\n uint _length\n ) internal pure returns (bytes memory) {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n\n bytes memory tempBytes;\n\n assembly {\n switch iszero(_length)\n case 0 {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // The first word of the slice result is potentially a partial\n // word read from the original array. To read it, we calculate\n // the length of that partial word and start copying that many\n // bytes into the array. The first word we copy will start with\n // data we don't care about, but the last `lengthmod` bytes will\n // land at the beginning of the contents of the new array. When\n // we're done copying, we overwrite the full first word with\n // the actual length of the slice.\n let lengthmod := and(_length, 31)\n\n // The multiplication in the next line is necessary\n // because when slicing multiples of 32 bytes (lengthmod == 0)\n // the following copy loop was copying the origin's length\n // and then ending prematurely not copying everything it should.\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n\n for {\n // The multiplication in the next line has the same exact purpose\n // as the one above.\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n\n mstore(tempBytes, _length)\n\n //update free-memory pointer\n //allocating the array padded to 32 bytes like the compiler does now\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n //if we want a zero-length slice let's just return a zero-length array\n default {\n tempBytes := mload(0x40)\n //zero out the 32 bytes slice we are about to return\n //we need to do it because Solidity does not garbage collect\n mstore(tempBytes, 0)\n\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n\n return tempBytes;\n }\n\n function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) {\n require(_bytes.length >= _start + 20, \"toAddress_outOfBounds\");\n address tempAddress;\n\n assembly {\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\n }\n\n return tempAddress;\n }\n\n function toUint8(bytes memory _bytes, uint _start) internal pure returns (uint8) {\n require(_bytes.length >= _start + 1, \"toUint8_outOfBounds\");\n uint8 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x1), _start))\n }\n\n return tempUint;\n }\n\n function toUint16(bytes memory _bytes, uint _start) internal pure returns (uint16) {\n require(_bytes.length >= _start + 2, \"toUint16_outOfBounds\");\n uint16 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x2), _start))\n }\n\n return tempUint;\n }\n\n function toUint32(bytes memory _bytes, uint _start) internal pure returns (uint32) {\n require(_bytes.length >= _start + 4, \"toUint32_outOfBounds\");\n uint32 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x4), _start))\n }\n\n return tempUint;\n }\n\n function toUint64(bytes memory _bytes, uint _start) internal pure returns (uint64) {\n require(_bytes.length >= _start + 8, \"toUint64_outOfBounds\");\n uint64 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x8), _start))\n }\n\n return tempUint;\n }\n\n function toUint96(bytes memory _bytes, uint _start) internal pure returns (uint96) {\n require(_bytes.length >= _start + 12, \"toUint96_outOfBounds\");\n uint96 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0xc), _start))\n }\n\n return tempUint;\n }\n\n function toUint128(bytes memory _bytes, uint _start) internal pure returns (uint128) {\n require(_bytes.length >= _start + 16, \"toUint128_outOfBounds\");\n uint128 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x10), _start))\n }\n\n return tempUint;\n }\n\n function toUint256(bytes memory _bytes, uint _start) internal pure returns (uint) {\n require(_bytes.length >= _start + 32, \"toUint256_outOfBounds\");\n uint tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x20), _start))\n }\n\n return tempUint;\n }\n\n function toBytes32(bytes memory _bytes, uint _start) internal pure returns (bytes32) {\n require(_bytes.length >= _start + 32, \"toBytes32_outOfBounds\");\n bytes32 tempBytes32;\n\n assembly {\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\n }\n\n return tempBytes32;\n }\n\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\n bool success = true;\n\n assembly {\n let length := mload(_preBytes)\n\n // if lengths don't match the arrays are not equal\n switch eq(length, mload(_postBytes))\n case 1 {\n // cb is a circuit breaker in the for loop since there's\n // no said feature for inline assembly loops\n // cb = 1 - don't breaker\n // cb = 0 - break\n let cb := 1\n\n let mc := add(_preBytes, 0x20)\n let end := add(mc, length)\n\n for {\n let cc := add(_postBytes, 0x20)\n // the next line is the loop condition:\n // while(uint256(mc < end) + cb == 2)\n } eq(add(lt(mc, end), cb), 2) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n // if any of these checks fails then arrays are not equal\n if iszero(eq(mload(mc), mload(cc))) {\n // unsuccess:\n success := 0\n cb := 0\n }\n }\n }\n default {\n // unsuccess:\n success := 0\n }\n }\n\n return success;\n }\n\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {\n bool success = true;\n\n assembly {\n // we know _preBytes_offset is 0\n let fslot := sload(_preBytes.slot)\n // Decode the length of the stored array like in concatStorage().\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n let mlength := mload(_postBytes)\n\n // if lengths don't match the arrays are not equal\n switch eq(slength, mlength)\n case 1 {\n // slength can contain both the length and contents of the array\n // if length < 32 bytes so let's prepare for that\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\n if iszero(iszero(slength)) {\n switch lt(slength, 32)\n case 1 {\n // blank the last byte which is the length\n fslot := mul(div(fslot, 0x100), 0x100)\n\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\n // unsuccess:\n success := 0\n }\n }\n default {\n // cb is a circuit breaker in the for loop since there's\n // no said feature for inline assembly loops\n // cb = 1 - don't breaker\n // cb = 0 - break\n let cb := 1\n\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes.slot)\n let sc := keccak256(0x0, 0x20)\n\n let mc := add(_postBytes, 0x20)\n let end := add(mc, mlength)\n\n // the next line is the loop condition:\n // while(uint256(mc < end) + cb == 2)\n for {\n\n } eq(add(lt(mc, end), cb), 2) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n if iszero(eq(sload(sc), mload(mc))) {\n // unsuccess:\n success := 0\n cb := 0\n }\n }\n }\n }\n }\n default {\n // unsuccess:\n success := 0\n }\n }\n\n return success;\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/libraries/ExcessivelySafeCall.sol": { + "content": "// SPDX-License-Identifier: MIT OR Apache-2.0\npragma solidity >=0.7.6;\n\nlibrary ExcessivelySafeCall {\n uint constant LOW_28_MASK = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\n\n /// @notice Use when you _really_ really _really_ don't trust the called\n /// contract. This prevents the called contract from causing reversion of\n /// the caller in as many ways as we can.\n /// @dev The main difference between this and a solidity low-level call is\n /// that we limit the number of bytes that the callee can cause to be\n /// copied to caller memory. This prevents stupid things like malicious\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\n /// to memory.\n /// @param _target The address to call\n /// @param _gas The amount of gas to forward to the remote contract\n /// @param _maxCopy The maximum number of bytes of returndata to copy\n /// to memory.\n /// @param _calldata The data to send to the remote contract\n /// @return success and returndata, as `.call()`. Returndata is capped to\n /// `_maxCopy` bytes.\n function excessivelySafeCall(\n address _target,\n uint _gas,\n uint16 _maxCopy,\n bytes memory _calldata\n ) internal returns (bool, bytes memory) {\n // set up for assembly call\n uint _toCopy;\n bool _success;\n bytes memory _returnData = new bytes(_maxCopy);\n // dispatch message to recipient\n // by assembly calling \"handle\" function\n // we call via assembly to avoid memcopying a very large returndata\n // returned by a malicious contract\n assembly {\n _success := call(\n _gas, // gas\n _target, // recipient\n 0, // ether value\n add(_calldata, 0x20), // inloc\n mload(_calldata), // inlen\n 0, // outloc\n 0 // outlen\n )\n // limit our copy to 256 bytes\n _toCopy := returndatasize()\n if gt(_toCopy, _maxCopy) {\n _toCopy := _maxCopy\n }\n // Store the length of the copied bytes\n mstore(_returnData, _toCopy)\n // copy the bytes from returndata[0:_toCopy]\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\n }\n return (_success, _returnData);\n }\n\n /// @notice Use when you _really_ really _really_ don't trust the called\n /// contract. This prevents the called contract from causing reversion of\n /// the caller in as many ways as we can.\n /// @dev The main difference between this and a solidity low-level call is\n /// that we limit the number of bytes that the callee can cause to be\n /// copied to caller memory. This prevents stupid things like malicious\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\n /// to memory.\n /// @param _target The address to call\n /// @param _gas The amount of gas to forward to the remote contract\n /// @param _maxCopy The maximum number of bytes of returndata to copy\n /// to memory.\n /// @param _calldata The data to send to the remote contract\n /// @return success and returndata, as `.call()`. Returndata is capped to\n /// `_maxCopy` bytes.\n function excessivelySafeStaticCall(\n address _target,\n uint _gas,\n uint16 _maxCopy,\n bytes memory _calldata\n ) internal view returns (bool, bytes memory) {\n // set up for assembly call\n uint _toCopy;\n bool _success;\n bytes memory _returnData = new bytes(_maxCopy);\n // dispatch message to recipient\n // by assembly calling \"handle\" function\n // we call via assembly to avoid memcopying a very large returndata\n // returned by a malicious contract\n assembly {\n _success := staticcall(\n _gas, // gas\n _target, // recipient\n add(_calldata, 0x20), // inloc\n mload(_calldata), // inlen\n 0, // outloc\n 0 // outlen\n )\n // limit our copy to 256 bytes\n _toCopy := returndatasize()\n if gt(_toCopy, _maxCopy) {\n _toCopy := _maxCopy\n }\n // Store the length of the copied bytes\n mstore(_returnData, _toCopy)\n // copy the bytes from returndata[0:_toCopy]\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\n }\n return (_success, _returnData);\n }\n\n /**\n * @notice Swaps function selectors in encoded contract calls\n * @dev Allows reuse of encoded calldata for functions with identical\n * argument types but different names. It simply swaps out the first 4 bytes\n * for the new selector. This function modifies memory in place, and should\n * only be used with caution.\n * @param _newSelector The new 4-byte selector\n * @param _buf The encoded contract args\n */\n function swapSelector(bytes4 _newSelector, bytes memory _buf) internal pure {\n require(_buf.length >= 4);\n uint _mask = LOW_28_MASK;\n assembly {\n // load the first word of\n let _word := mload(add(_buf, 0x20))\n // mask out the top 4 bytes\n // /x\n _word := and(_word, _mask)\n _word := or(_newSelector, _word)\n mstore(add(_buf, 0x20), _word)\n }\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroEndpoint.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\nimport \"./ILayerZeroUserApplicationConfig.sol\";\n\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\n // @param _dstChainId - the destination chain identifier\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\n // @param _payload - a custom bytes payload to send to the destination contract\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes calldata _adapterParams\n ) external payable;\n\n // @notice used by the messaging library to publish verified payload\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source contract (as bytes) at the source chain\n // @param _dstAddress - the address on destination chain\n // @param _nonce - the unbound message ordering nonce\n // @param _gasLimit - the gas limit for external contract execution\n // @param _payload - verified payload to send to the destination contract\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n address _dstAddress,\n uint64 _nonce,\n uint _gasLimit,\n bytes calldata _payload\n ) external;\n\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\n\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\n // @param _srcAddress - the source chain contract address\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\n\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\n // @param _dstChainId - the destination chain identifier\n // @param _userApplication - the user app address on this EVM chain\n // @param _payload - the custom message to send over LayerZero\n // @param _payInZRO - if false, user app pays the protocol fee in native token\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes calldata _payload,\n bool _payInZRO,\n bytes calldata _adapterParam\n ) external view returns (uint nativeFee, uint zroFee);\n\n // @notice get this Endpoint's immutable source identifier\n function getChainId() external view returns (uint16);\n\n // @notice the interface to retry failed message on this Endpoint destination\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n // @param _payload - the payload to be retried\n function retryPayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n bytes calldata _payload\n ) external;\n\n // @notice query if any STORED payload (message blocking) at the endpoint.\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\n\n // @notice query if the _libraryAddress is valid for sending msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getSendLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the _libraryAddress is valid for receiving msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the non-reentrancy guard for send() is on\n // @return true if the guard is on. false otherwise\n function isSendingPayload() external view returns (bool);\n\n // @notice query if the non-reentrancy guard for receive() is on\n // @return true if the guard is on. false otherwise\n function isReceivingPayload() external view returns (bool);\n\n // @notice get the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _userApplication - the contract address of the user application\n // @param _configType - type of configuration. every messaging library has its own convention.\n function getConfig(\n uint16 _version,\n uint16 _chainId,\n address _userApplication,\n uint _configType\n ) external view returns (bytes memory);\n\n // @notice get the send() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getSendVersion(address _userApplication) external view returns (uint16);\n\n // @notice get the lzReceive() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getReceiveVersion(address _userApplication) external view returns (uint16);\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroReceiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\ninterface ILayerZeroReceiver {\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\n // @param _srcChainId - the source endpoint identifier\n // @param _srcAddress - the source sending contract address from the source chain\n // @param _nonce - the ordered message nonce\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\n function lzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) external;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroUserApplicationConfig.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\ninterface ILayerZeroUserApplicationConfig {\n // @notice set the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _configType - type of configuration. every messaging library has its own convention.\n // @param _config - configuration in the bytes. can encode arbitrary content.\n function setConfig(\n uint16 _version,\n uint16 _chainId,\n uint _configType,\n bytes calldata _config\n ) external;\n\n // @notice set the send() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setSendVersion(uint16 _version) external;\n\n // @notice set the lzReceive() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setReceiveVersion(uint16 _version) external;\n\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\n // @param _srcChainId - the chainId of the source chain\n // @param _srcAddress - the contract address of the source contract at the source chain\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/libs/LzLib.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity >=0.6.0;\npragma experimental ABIEncoderV2;\n\nlibrary LzLib {\n // LayerZero communication\n struct CallParams {\n address payable refundAddress;\n address zroPaymentAddress;\n }\n\n //---------------------------------------------------------------------------\n // Address type handling\n\n struct AirdropParams {\n uint airdropAmount;\n bytes32 airdropAddress;\n }\n\n function buildAdapterParams(LzLib.AirdropParams memory _airdropParams, uint _uaGasLimit) internal pure returns (bytes memory adapterParams) {\n if (_airdropParams.airdropAmount == 0 && _airdropParams.airdropAddress == bytes32(0x0)) {\n adapterParams = buildDefaultAdapterParams(_uaGasLimit);\n } else {\n adapterParams = buildAirdropAdapterParams(_uaGasLimit, _airdropParams);\n }\n }\n\n // Build Adapter Params\n function buildDefaultAdapterParams(uint _uaGas) internal pure returns (bytes memory) {\n // txType 1\n // bytes [2 32 ]\n // fields [txType extraGas]\n return abi.encodePacked(uint16(1), _uaGas);\n }\n\n function buildAirdropAdapterParams(uint _uaGas, AirdropParams memory _params) internal pure returns (bytes memory) {\n require(_params.airdropAmount > 0, \"Airdrop amount must be greater than 0\");\n require(_params.airdropAddress != bytes32(0x0), \"Airdrop address must be set\");\n\n // txType 2\n // bytes [2 32 32 bytes[] ]\n // fields [txType extraGas dstNativeAmt dstNativeAddress]\n return abi.encodePacked(uint16(2), _uaGas, _params.airdropAmount, _params.airdropAddress);\n }\n\n function getGasLimit(bytes memory _adapterParams) internal pure returns (uint gasLimit) {\n require(_adapterParams.length == 34 || _adapterParams.length > 66, \"Invalid adapterParams\");\n assembly {\n gasLimit := mload(add(_adapterParams, 34))\n }\n }\n\n // Decode Adapter Params\n function decodeAdapterParams(bytes memory _adapterParams)\n internal\n pure\n returns (\n uint16 txType,\n uint uaGas,\n uint airdropAmount,\n address payable airdropAddress\n )\n {\n require(_adapterParams.length == 34 || _adapterParams.length > 66, \"Invalid adapterParams\");\n assembly {\n txType := mload(add(_adapterParams, 2))\n uaGas := mload(add(_adapterParams, 34))\n }\n require(txType == 1 || txType == 2, \"Unsupported txType\");\n require(uaGas > 0, \"Gas too low\");\n\n if (txType == 2) {\n assembly {\n airdropAmount := mload(add(_adapterParams, 66))\n airdropAddress := mload(add(_adapterParams, 86))\n }\n }\n }\n\n //---------------------------------------------------------------------------\n // Address type handling\n function bytes32ToAddress(bytes32 _bytes32Address) internal pure returns (address _address) {\n return address(uint160(uint(_bytes32Address)));\n }\n\n function addressToBytes32(address _address) internal pure returns (bytes32 _bytes32Address) {\n return bytes32(uint(uint160(_address)));\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/LzApp.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"./interfaces/ILayerZeroReceiver.sol\";\nimport \"./interfaces/ILayerZeroUserApplicationConfig.sol\";\nimport \"./interfaces/ILayerZeroEndpoint.sol\";\nimport \"../libraries/BytesLib.sol\";\n\n/*\n * a generic LzReceiver implementation\n */\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\n using BytesLib for bytes;\n\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\n uint public constant DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\n\n ILayerZeroEndpoint public immutable lzEndpoint;\n mapping(uint16 => bytes) public trustedRemoteLookup;\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\n mapping(uint16 => uint) public payloadSizeLimitLookup;\n address public precrime;\n\n event SetPrecrime(address precrime);\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\n\n constructor(address _endpoint) {\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\n }\n\n function lzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) public virtual override {\n // lzReceive must be called by the endpoint for security\n require(_msgSender() == address(lzEndpoint), \"LzApp: invalid endpoint caller\");\n\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\n require(\n _srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote),\n \"LzApp: invalid source sending contract\"\n );\n\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\n }\n\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\n function _blockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual;\n\n function _lzSend(\n uint16 _dstChainId,\n bytes memory _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams,\n uint _nativeFee\n ) internal virtual {\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\n require(trustedRemote.length != 0, \"LzApp: destination chain is not a trusted source\");\n _checkPayloadSize(_dstChainId, _payload.length);\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\n }\n\n function _checkGasLimit(\n uint16 _dstChainId,\n uint16 _type,\n bytes memory _adapterParams,\n uint _extraGas\n ) internal view virtual {\n uint providedGasLimit = _getGasLimit(_adapterParams);\n uint minGasLimit = minDstGasLookup[_dstChainId][_type];\n require(minGasLimit > 0, \"LzApp: minGasLimit not set\");\n require(providedGasLimit >= minGasLimit + _extraGas, \"LzApp: gas limit is too low\");\n }\n\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\n require(_adapterParams.length >= 34, \"LzApp: invalid adapterParams\");\n assembly {\n gasLimit := mload(add(_adapterParams, 34))\n }\n }\n\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\n if (payloadSizeLimit == 0) {\n // use default if not set\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\n }\n require(_payloadSize <= payloadSizeLimit, \"LzApp: payload size is too large\");\n }\n\n //---------------------------UserApplication config----------------------------------------\n function getConfig(\n uint16 _version,\n uint16 _chainId,\n address,\n uint _configType\n ) external view returns (bytes memory) {\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\n }\n\n // generic config for LayerZero user Application\n function setConfig(\n uint16 _version,\n uint16 _chainId,\n uint _configType,\n bytes calldata _config\n ) external override onlyOwner {\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\n }\n\n function setSendVersion(uint16 _version) external override onlyOwner {\n lzEndpoint.setSendVersion(_version);\n }\n\n function setReceiveVersion(uint16 _version) external override onlyOwner {\n lzEndpoint.setReceiveVersion(_version);\n }\n\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\n }\n\n // _path = abi.encodePacked(remoteAddress, localAddress)\n // this function set the trusted path for the cross-chain communication\n function setTrustedRemote(uint16 _remoteChainId, bytes calldata _path) external onlyOwner {\n trustedRemoteLookup[_remoteChainId] = _path;\n emit SetTrustedRemote(_remoteChainId, _path);\n }\n\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\n }\n\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\n bytes memory path = trustedRemoteLookup[_remoteChainId];\n require(path.length != 0, \"LzApp: no trusted path record\");\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\n }\n\n function setPrecrime(address _precrime) external onlyOwner {\n precrime = _precrime;\n emit SetPrecrime(_precrime);\n }\n\n function setMinDstGas(\n uint16 _dstChainId,\n uint16 _packetType,\n uint _minGas\n ) external onlyOwner {\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\n }\n\n // if the size is 0, it means default size limit\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\n payloadSizeLimitLookup[_dstChainId] = _size;\n }\n\n //--------------------------- VIEW FUNCTION ----------------------------------------\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\n return keccak256(trustedSource) == keccak256(_srcAddress);\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/mocks/LZEndpointMock.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.0;\npragma abicoder v2;\n\nimport \"../interfaces/ILayerZeroReceiver.sol\";\nimport \"../interfaces/ILayerZeroEndpoint.sol\";\nimport \"../libs/LzLib.sol\";\n\n/*\nlike a real LayerZero endpoint but can be mocked, which handle message transmission, verification, and receipt.\n- blocking: LayerZero provides ordered delivery of messages from a given sender to a destination chain.\n- non-reentrancy: endpoint has a non-reentrancy guard for both the send() and receive(), respectively.\n- adapter parameters: allows UAs to add arbitrary transaction params in the send() function, like airdrop on destination chain.\nunlike a real LayerZero endpoint, it is\n- no messaging library versioning\n- send() will short circuit to lzReceive()\n- no user application configuration\n*/\ncontract LZEndpointMock is ILayerZeroEndpoint {\n uint8 internal constant _NOT_ENTERED = 1;\n uint8 internal constant _ENTERED = 2;\n\n mapping(address => address) public lzEndpointLookup;\n\n uint16 public mockChainId;\n bool public nextMsgBlocked;\n\n // fee config\n RelayerFeeConfig public relayerFeeConfig;\n ProtocolFeeConfig public protocolFeeConfig;\n uint public oracleFee;\n bytes public defaultAdapterParams;\n\n // path = remote addrss + local address\n // inboundNonce = [srcChainId][path].\n mapping(uint16 => mapping(bytes => uint64)) public inboundNonce;\n //todo: this is a hack\n // outboundNonce = [dstChainId][srcAddress]\n mapping(uint16 => mapping(address => uint64)) public outboundNonce;\n // // outboundNonce = [dstChainId][path].\n // mapping(uint16 => mapping(bytes => uint64)) public outboundNonce;\n // storedPayload = [srcChainId][path]\n mapping(uint16 => mapping(bytes => StoredPayload)) public storedPayload;\n // msgToDeliver = [srcChainId][path]\n mapping(uint16 => mapping(bytes => QueuedPayload[])) public msgsToDeliver;\n\n // reentrancy guard\n uint8 internal _send_entered_state = 1;\n uint8 internal _receive_entered_state = 1;\n\n struct ProtocolFeeConfig {\n uint zroFee;\n uint nativeBP;\n }\n\n struct RelayerFeeConfig {\n uint128 dstPriceRatio; // 10^10\n uint128 dstGasPriceInWei;\n uint128 dstNativeAmtCap;\n uint64 baseGas;\n uint64 gasPerByte;\n }\n\n struct StoredPayload {\n uint64 payloadLength;\n address dstAddress;\n bytes32 payloadHash;\n }\n\n struct QueuedPayload {\n address dstAddress;\n uint64 nonce;\n bytes payload;\n }\n\n modifier sendNonReentrant() {\n require(_send_entered_state == _NOT_ENTERED, \"LayerZeroMock: no send reentrancy\");\n _send_entered_state = _ENTERED;\n _;\n _send_entered_state = _NOT_ENTERED;\n }\n\n modifier receiveNonReentrant() {\n require(_receive_entered_state == _NOT_ENTERED, \"LayerZeroMock: no receive reentrancy\");\n _receive_entered_state = _ENTERED;\n _;\n _receive_entered_state = _NOT_ENTERED;\n }\n\n event UaForceResumeReceive(uint16 chainId, bytes srcAddress);\n event PayloadCleared(uint16 srcChainId, bytes srcAddress, uint64 nonce, address dstAddress);\n event PayloadStored(uint16 srcChainId, bytes srcAddress, address dstAddress, uint64 nonce, bytes payload, bytes reason);\n event ValueTransferFailed(address indexed to, uint indexed quantity);\n\n constructor(uint16 _chainId) {\n mockChainId = _chainId;\n\n // init config\n relayerFeeConfig = RelayerFeeConfig({\n dstPriceRatio: 1e10, // 1:1, same chain, same native coin\n dstGasPriceInWei: 1e10,\n dstNativeAmtCap: 1e19,\n baseGas: 100,\n gasPerByte: 1\n });\n protocolFeeConfig = ProtocolFeeConfig({zroFee: 1e18, nativeBP: 1000}); // BP 0.1\n oracleFee = 1e16;\n defaultAdapterParams = LzLib.buildDefaultAdapterParams(200000);\n }\n\n // ------------------------------ ILayerZeroEndpoint Functions ------------------------------\n function send(\n uint16 _chainId,\n bytes memory _path,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams\n ) external payable override sendNonReentrant {\n require(_path.length == 40, \"LayerZeroMock: incorrect remote address size\"); // only support evm chains\n\n address dstAddr;\n assembly {\n dstAddr := mload(add(_path, 20))\n }\n\n address lzEndpoint = lzEndpointLookup[dstAddr];\n require(lzEndpoint != address(0), \"LayerZeroMock: destination LayerZero Endpoint not found\");\n\n // not handle zro token\n bytes memory adapterParams = _adapterParams.length > 0 ? _adapterParams : defaultAdapterParams;\n (uint nativeFee, ) = estimateFees(_chainId, msg.sender, _payload, _zroPaymentAddress != address(0x0), adapterParams);\n require(msg.value >= nativeFee, \"LayerZeroMock: not enough native for fees\");\n\n uint64 nonce = ++outboundNonce[_chainId][msg.sender];\n\n // refund if they send too much\n uint amount = msg.value - nativeFee;\n if (amount > 0) {\n (bool success, ) = _refundAddress.call{value: amount}(\"\");\n require(success, \"LayerZeroMock: failed to refund\");\n }\n\n // Mock the process of receiving msg on dst chain\n // Mock the relayer paying the dstNativeAddr the amount of extra native token\n (, uint extraGas, uint dstNativeAmt, address payable dstNativeAddr) = LzLib.decodeAdapterParams(adapterParams);\n if (dstNativeAmt > 0) {\n (bool success, ) = dstNativeAddr.call{value: dstNativeAmt}(\"\");\n if (!success) {\n emit ValueTransferFailed(dstNativeAddr, dstNativeAmt);\n }\n }\n\n bytes memory srcUaAddress = abi.encodePacked(msg.sender, dstAddr); // cast this address to bytes\n bytes memory payload = _payload;\n LZEndpointMock(lzEndpoint).receivePayload(mockChainId, srcUaAddress, dstAddr, nonce, extraGas, payload);\n }\n\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _path,\n address _dstAddress,\n uint64 _nonce,\n uint _gasLimit,\n bytes calldata _payload\n ) external override receiveNonReentrant {\n StoredPayload storage sp = storedPayload[_srcChainId][_path];\n\n // assert and increment the nonce. no message shuffling\n require(_nonce == ++inboundNonce[_srcChainId][_path], \"LayerZeroMock: wrong nonce\");\n\n // queue the following msgs inside of a stack to simulate a successful send on src, but not fully delivered on dst\n if (sp.payloadHash != bytes32(0)) {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_path];\n QueuedPayload memory newMsg = QueuedPayload(_dstAddress, _nonce, _payload);\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n // shift all the msgs over so we can treat this like a fifo via array.pop()\n if (msgs.length > 0) {\n // extend the array\n msgs.push(newMsg);\n\n // shift all the indexes up for pop()\n for (uint i = 0; i < msgs.length - 1; i++) {\n msgs[i + 1] = msgs[i];\n }\n\n // put the newMsg at the bottom of the stack\n msgs[0] = newMsg;\n } else {\n msgs.push(newMsg);\n }\n } else if (nextMsgBlocked) {\n storedPayload[_srcChainId][_path] = StoredPayload(uint64(_payload.length), _dstAddress, keccak256(_payload));\n emit PayloadStored(_srcChainId, _path, _dstAddress, _nonce, _payload, bytes(\"\"));\n // ensure the next msgs that go through are no longer blocked\n nextMsgBlocked = false;\n } else {\n try ILayerZeroReceiver(_dstAddress).lzReceive{gas: _gasLimit}(_srcChainId, _path, _nonce, _payload) {} catch (bytes memory reason) {\n storedPayload[_srcChainId][_path] = StoredPayload(uint64(_payload.length), _dstAddress, keccak256(_payload));\n emit PayloadStored(_srcChainId, _path, _dstAddress, _nonce, _payload, reason);\n // ensure the next msgs that go through are no longer blocked\n nextMsgBlocked = false;\n }\n }\n }\n\n function getInboundNonce(uint16 _chainID, bytes calldata _path) external view override returns (uint64) {\n return inboundNonce[_chainID][_path];\n }\n\n function getOutboundNonce(uint16 _chainID, address _srcAddress) external view override returns (uint64) {\n return outboundNonce[_chainID][_srcAddress];\n }\n\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes memory _payload,\n bool _payInZRO,\n bytes memory _adapterParams\n ) public view override returns (uint nativeFee, uint zroFee) {\n bytes memory adapterParams = _adapterParams.length > 0 ? _adapterParams : defaultAdapterParams;\n\n // Relayer Fee\n uint relayerFee = _getRelayerFee(_dstChainId, 1, _userApplication, _payload.length, adapterParams);\n\n // LayerZero Fee\n uint protocolFee = _getProtocolFees(_payInZRO, relayerFee, oracleFee);\n _payInZRO ? zroFee = protocolFee : nativeFee = protocolFee;\n\n // return the sum of fees\n nativeFee = nativeFee + relayerFee + oracleFee;\n }\n\n function getChainId() external view override returns (uint16) {\n return mockChainId;\n }\n\n function retryPayload(\n uint16 _srcChainId,\n bytes calldata _path,\n bytes calldata _payload\n ) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_path];\n require(sp.payloadHash != bytes32(0), \"LayerZeroMock: no stored payload\");\n require(_payload.length == sp.payloadLength && keccak256(_payload) == sp.payloadHash, \"LayerZeroMock: invalid payload\");\n\n address dstAddress = sp.dstAddress;\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n uint64 nonce = inboundNonce[_srcChainId][_path];\n\n ILayerZeroReceiver(dstAddress).lzReceive(_srcChainId, _path, nonce, _payload);\n emit PayloadCleared(_srcChainId, _path, nonce, dstAddress);\n }\n\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _path) external view override returns (bool) {\n StoredPayload storage sp = storedPayload[_srcChainId][_path];\n return sp.payloadHash != bytes32(0);\n }\n\n function getSendLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n\n function getReceiveLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n\n function isSendingPayload() external view override returns (bool) {\n return _send_entered_state == _ENTERED;\n }\n\n function isReceivingPayload() external view override returns (bool) {\n return _receive_entered_state == _ENTERED;\n }\n\n function getConfig(\n uint16, /*_version*/\n uint16, /*_chainId*/\n address, /*_ua*/\n uint /*_configType*/\n ) external pure override returns (bytes memory) {\n return \"\";\n }\n\n function getSendVersion(\n address /*_userApplication*/\n ) external pure override returns (uint16) {\n return 1;\n }\n\n function getReceiveVersion(\n address /*_userApplication*/\n ) external pure override returns (uint16) {\n return 1;\n }\n\n function setConfig(\n uint16, /*_version*/\n uint16, /*_chainId*/\n uint, /*_configType*/\n bytes memory /*_config*/\n ) external override {}\n\n function setSendVersion(\n uint16 /*version*/\n ) external override {}\n\n function setReceiveVersion(\n uint16 /*version*/\n ) external override {}\n\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _path) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_path];\n // revert if no messages are cached. safeguard malicious UA behaviour\n require(sp.payloadHash != bytes32(0), \"LayerZeroMock: no stored payload\");\n require(sp.dstAddress == msg.sender, \"LayerZeroMock: invalid caller\");\n\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n emit UaForceResumeReceive(_srcChainId, _path);\n\n // resume the receiving of msgs after we force clear the \"stuck\" msg\n _clearMsgQue(_srcChainId, _path);\n }\n\n // ------------------------------ Other Public/External Functions --------------------------------------------------\n\n function getLengthOfQueue(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint) {\n return msgsToDeliver[_srcChainId][_srcAddress].length;\n }\n\n // used to simulate messages received get stored as a payload\n function blockNextMsg() external {\n nextMsgBlocked = true;\n }\n\n function setDestLzEndpoint(address destAddr, address lzEndpointAddr) external {\n lzEndpointLookup[destAddr] = lzEndpointAddr;\n }\n\n function setRelayerPrice(\n uint128 _dstPriceRatio,\n uint128 _dstGasPriceInWei,\n uint128 _dstNativeAmtCap,\n uint64 _baseGas,\n uint64 _gasPerByte\n ) external {\n relayerFeeConfig.dstPriceRatio = _dstPriceRatio;\n relayerFeeConfig.dstGasPriceInWei = _dstGasPriceInWei;\n relayerFeeConfig.dstNativeAmtCap = _dstNativeAmtCap;\n relayerFeeConfig.baseGas = _baseGas;\n relayerFeeConfig.gasPerByte = _gasPerByte;\n }\n\n function setProtocolFee(uint _zroFee, uint _nativeBP) external {\n protocolFeeConfig.zroFee = _zroFee;\n protocolFeeConfig.nativeBP = _nativeBP;\n }\n\n function setOracleFee(uint _oracleFee) external {\n oracleFee = _oracleFee;\n }\n\n function setDefaultAdapterParams(bytes memory _adapterParams) external {\n defaultAdapterParams = _adapterParams;\n }\n\n // --------------------- Internal Functions ---------------------\n // simulates the relayer pushing through the rest of the msgs that got delayed due to the stored payload\n function _clearMsgQue(uint16 _srcChainId, bytes calldata _path) internal {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_path];\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n while (msgs.length > 0) {\n QueuedPayload memory payload = msgs[msgs.length - 1];\n ILayerZeroReceiver(payload.dstAddress).lzReceive(_srcChainId, _path, payload.nonce, payload.payload);\n msgs.pop();\n }\n }\n\n function _getProtocolFees(\n bool _payInZro,\n uint _relayerFee,\n uint _oracleFee\n ) internal view returns (uint) {\n if (_payInZro) {\n return protocolFeeConfig.zroFee;\n } else {\n return ((_relayerFee + _oracleFee) * protocolFeeConfig.nativeBP) / 10000;\n }\n }\n\n function _getRelayerFee(\n uint16, /* _dstChainId */\n uint16, /* _outboundProofType */\n address, /* _userApplication */\n uint _payloadSize,\n bytes memory _adapterParams\n ) internal view returns (uint) {\n (uint16 txType, uint extraGas, uint dstNativeAmt, ) = LzLib.decodeAdapterParams(_adapterParams);\n uint totalRemoteToken; // = baseGas + extraGas + requiredNativeAmount\n if (txType == 2) {\n require(relayerFeeConfig.dstNativeAmtCap >= dstNativeAmt, \"LayerZeroMock: dstNativeAmt too large \");\n totalRemoteToken += dstNativeAmt;\n }\n // remoteGasTotal = dstGasPriceInWei * (baseGas + extraGas)\n uint remoteGasTotal = relayerFeeConfig.dstGasPriceInWei * (relayerFeeConfig.baseGas + extraGas);\n totalRemoteToken += remoteGasTotal;\n\n // tokenConversionRate = dstPrice / localPrice\n // basePrice = totalRemoteToken * tokenConversionRate\n uint basePrice = (totalRemoteToken * relayerFeeConfig.dstPriceRatio) / 10**10;\n\n // pricePerByte = (dstGasPriceInWei * gasPerBytes) * tokenConversionRate\n uint pricePerByte = (relayerFeeConfig.dstGasPriceInWei * relayerFeeConfig.gasPerByte * relayerFeeConfig.dstPriceRatio) / 10**10;\n\n return basePrice + _payloadSize * pricePerByte;\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/NonblockingLzApp.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./LzApp.sol\";\nimport \"../libraries/ExcessivelySafeCall.sol\";\n\n/*\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\n */\nabstract contract NonblockingLzApp is LzApp {\n using ExcessivelySafeCall for address;\n\n constructor(address _endpoint) LzApp(_endpoint) {}\n\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\n\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\n\n // overriding the virtual function in LzReceiver\n function _blockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual override {\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\n gasleft(),\n 150,\n abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload)\n );\n // try-catch all errors/exceptions\n if (!success) {\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\n }\n }\n\n function _storeFailedMessage(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload,\n bytes memory _reason\n ) internal virtual {\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\n }\n\n function nonblockingLzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) public virtual {\n // only internal transaction\n require(_msgSender() == address(this), \"NonblockingLzApp: caller must be LzApp\");\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\n }\n\n //@notice override this function\n function _nonblockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual;\n\n function retryMessage(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) public payable virtual {\n // assert there is message to retry\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\n require(payloadHash != bytes32(0), \"NonblockingLzApp: no stored message\");\n require(keccak256(_payload) == payloadHash, \"NonblockingLzApp: invalid payload\");\n // clear the stored message\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\n // execute the message. revert if it fails again\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./OFTCoreV2.sol\";\nimport \"./interfaces/IOFTV2.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nabstract contract BaseOFTV2 is OFTCoreV2, ERC165, IOFTV2 {\n constructor(uint8 _sharedDecimals, address _lzEndpoint) OFTCoreV2(_sharedDecimals, _lzEndpoint) {}\n\n /************************************************************************\n * public functions\n ************************************************************************/\n function sendFrom(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n LzCallParams calldata _callParams\n ) public payable virtual override {\n _send(_from, _dstChainId, _toAddress, _amount, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);\n }\n\n function sendAndCall(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes calldata _payload,\n uint64 _dstGasForCall,\n LzCallParams calldata _callParams\n ) public payable virtual override {\n _sendAndCall(\n _from,\n _dstChainId,\n _toAddress,\n _amount,\n _payload,\n _dstGasForCall,\n _callParams.refundAddress,\n _callParams.zroPaymentAddress,\n _callParams.adapterParams\n );\n }\n\n /************************************************************************\n * public view functions\n ************************************************************************/\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return interfaceId == type(IOFTV2).interfaceId || super.supportsInterface(interfaceId);\n }\n\n function estimateSendFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bool _useZro,\n bytes calldata _adapterParams\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\n return _estimateSendFee(_dstChainId, _toAddress, _amount, _useZro, _adapterParams);\n }\n\n function estimateSendAndCallFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes calldata _payload,\n uint64 _dstGasForCall,\n bool _useZro,\n bytes calldata _adapterParams\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\n return _estimateSendAndCallFee(_dstChainId, _toAddress, _amount, _payload, _dstGasForCall, _useZro, _adapterParams);\n }\n\n function circulatingSupply() public view virtual override returns (uint);\n\n function token() public view virtual override returns (address);\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/ICommonOFT.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\n\n/**\n * @dev Interface of the IOFT core standard\n */\ninterface ICommonOFT is IERC165 {\n\n struct LzCallParams {\n address payable refundAddress;\n address zroPaymentAddress;\n bytes adapterParams;\n }\n\n /**\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\n * _dstChainId - L0 defined chain id to send tokens too\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\n * _amount - amount of the tokens to transfer\n * _useZro - indicates to use zro to pay L0 fees\n * _adapterParam - flexible bytes array to indicate messaging adapter services in L0\n */\n function estimateSendFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\n\n function estimateSendAndCallFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\n\n /**\n * @dev returns the circulating amount of tokens on current chain\n */\n function circulatingSupply() external view returns (uint);\n\n /**\n * @dev returns the address of the ERC20 token\n */\n function token() external view returns (address);\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTReceiverV2.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity >=0.5.0;\n\ninterface IOFTReceiverV2 {\n /**\n * @dev Called by the OFT contract when tokens are received from source chain.\n * @param _srcChainId The chain id of the source chain.\n * @param _srcAddress The address of the OFT token contract on the source chain.\n * @param _nonce The nonce of the transaction on the source chain.\n * @param _from The address of the account who calls the sendAndCall() on the source chain.\n * @param _amount The amount of tokens to transfer.\n * @param _payload Additional data with no specified format.\n */\n function onOFTReceived(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes32 _from, uint _amount, bytes calldata _payload) external;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\nimport \"./ICommonOFT.sol\";\n\n/**\n * @dev Interface of the IOFT core standard\n */\ninterface IOFTV2 is ICommonOFT {\n\n /**\n * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`\n * `_from` the owner of token\n * `_dstChainId` the destination chain identifier\n * `_toAddress` can be any size depending on the `dstChainId`.\n * `_amount` the quantity of tokens in wei\n * `_refundAddress` the address LayerZero refunds if too much message fee is sent\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\n */\n function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, LzCallParams calldata _callParams) external payable;\n\n function sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, LzCallParams calldata _callParams) external payable;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTCoreV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../../../lzApp/NonblockingLzApp.sol\";\nimport \"../../../libraries/ExcessivelySafeCall.sol\";\nimport \"./interfaces/ICommonOFT.sol\";\nimport \"./interfaces/IOFTReceiverV2.sol\";\n\nabstract contract OFTCoreV2 is NonblockingLzApp {\n using BytesLib for bytes;\n using ExcessivelySafeCall for address;\n\n uint public constant NO_EXTRA_GAS = 0;\n\n // packet type\n uint8 public constant PT_SEND = 0;\n uint8 public constant PT_SEND_AND_CALL = 1;\n\n uint8 public immutable sharedDecimals;\n\n mapping(uint16 => mapping(bytes => mapping(uint64 => bool))) public creditedPackets;\n\n /**\n * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\n * `_nonce` is the outbound nonce\n */\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes32 indexed _toAddress, uint _amount);\n\n /**\n * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\n * `_nonce` is the inbound nonce.\n */\n event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\n\n event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\n\n event NonContractAddress(address _address);\n\n // _sharedDecimals should be the minimum decimals on all chains\n constructor(uint8 _sharedDecimals, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\n sharedDecimals = _sharedDecimals;\n }\n\n /************************************************************************\n * public functions\n ************************************************************************/\n function callOnOFTReceived(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes32 _from,\n address _to,\n uint _amount,\n bytes calldata _payload,\n uint _gasForCall\n ) public virtual {\n require(_msgSender() == address(this), \"OFTCore: caller must be OFTCore\");\n\n // send\n _amount = _transferFrom(address(this), _to, _amount);\n emit ReceiveFromChain(_srcChainId, _to, _amount);\n\n // call\n IOFTReceiverV2(_to).onOFTReceived{gas: _gasForCall}(_srcChainId, _srcAddress, _nonce, _from, _amount, _payload);\n }\n\n /************************************************************************\n * internal functions\n ************************************************************************/\n function _estimateSendFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bool _useZro,\n bytes memory _adapterParams\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\n // mock the payload for sendFrom()\n bytes memory payload = _encodeSendPayload(_toAddress, _ld2sd(_amount));\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\n }\n\n function _estimateSendAndCallFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes memory _payload,\n uint64 _dstGasForCall,\n bool _useZro,\n bytes memory _adapterParams\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\n // mock the payload for sendAndCall()\n bytes memory payload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(_amount), _payload, _dstGasForCall);\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\n }\n\n function _nonblockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual override {\n uint8 packetType = _payload.toUint8(0);\n\n if (packetType == PT_SEND) {\n _sendAck(_srcChainId, _srcAddress, _nonce, _payload);\n } else if (packetType == PT_SEND_AND_CALL) {\n _sendAndCallAck(_srcChainId, _srcAddress, _nonce, _payload);\n } else {\n revert(\"OFTCore: unknown packet type\");\n }\n }\n\n function _send(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams\n ) internal virtual returns (uint amount) {\n _checkGasLimit(_dstChainId, PT_SEND, _adapterParams, NO_EXTRA_GAS);\n\n (amount, ) = _removeDust(_amount);\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount); // amount returned should not have dust\n require(amount > 0, \"OFTCore: amount too small\");\n\n bytes memory lzPayload = _encodeSendPayload(_toAddress, _ld2sd(amount));\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\n\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\n }\n\n function _sendAck(\n uint16 _srcChainId,\n bytes memory,\n uint64,\n bytes memory _payload\n ) internal virtual {\n (address to, uint64 amountSD) = _decodeSendPayload(_payload);\n if (to == address(0)) {\n to = address(0xdead);\n }\n\n uint amount = _sd2ld(amountSD);\n amount = _creditTo(_srcChainId, to, amount);\n\n emit ReceiveFromChain(_srcChainId, to, amount);\n }\n\n function _sendAndCall(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes memory _payload,\n uint64 _dstGasForCall,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams\n ) internal virtual returns (uint amount) {\n _checkGasLimit(_dstChainId, PT_SEND_AND_CALL, _adapterParams, _dstGasForCall);\n\n (amount, ) = _removeDust(_amount);\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount);\n require(amount > 0, \"OFTCore: amount too small\");\n\n // encode the msg.sender into the payload instead of _from\n bytes memory lzPayload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(amount), _payload, _dstGasForCall);\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\n\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\n }\n\n function _sendAndCallAck(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual {\n (bytes32 from, address to, uint64 amountSD, bytes memory payloadForCall, uint64 gasForCall) = _decodeSendAndCallPayload(_payload);\n\n bool credited = creditedPackets[_srcChainId][_srcAddress][_nonce];\n uint amount = _sd2ld(amountSD);\n\n // credit to this contract first, and then transfer to receiver only if callOnOFTReceived() succeeds\n if (!credited) {\n amount = _creditTo(_srcChainId, address(this), amount);\n creditedPackets[_srcChainId][_srcAddress][_nonce] = true;\n }\n\n if (!_isContract(to)) {\n emit NonContractAddress(to);\n return;\n }\n\n // workaround for stack too deep\n uint16 srcChainId = _srcChainId;\n bytes memory srcAddress = _srcAddress;\n uint64 nonce = _nonce;\n bytes memory payload = _payload;\n bytes32 from_ = from;\n address to_ = to;\n uint amount_ = amount;\n bytes memory payloadForCall_ = payloadForCall;\n\n // no gas limit for the call if retry\n uint gas = credited ? gasleft() : gasForCall;\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\n gasleft(),\n 150,\n abi.encodeWithSelector(this.callOnOFTReceived.selector, srcChainId, srcAddress, nonce, from_, to_, amount_, payloadForCall_, gas)\n );\n\n if (success) {\n bytes32 hash = keccak256(payload);\n emit CallOFTReceivedSuccess(srcChainId, srcAddress, nonce, hash);\n } else {\n // store the failed message into the nonblockingLzApp\n _storeFailedMessage(srcChainId, srcAddress, nonce, payload, reason);\n }\n }\n\n function _isContract(address _account) internal view returns (bool) {\n return _account.code.length > 0;\n }\n\n function _ld2sd(uint _amount) internal view virtual returns (uint64) {\n uint amountSD = _amount / _ld2sdRate();\n require(amountSD <= type(uint64).max, \"OFTCore: amountSD overflow\");\n return uint64(amountSD);\n }\n\n function _sd2ld(uint64 _amountSD) internal view virtual returns (uint) {\n return _amountSD * _ld2sdRate();\n }\n\n function _removeDust(uint _amount) internal view virtual returns (uint amountAfter, uint dust) {\n dust = _amount % _ld2sdRate();\n amountAfter = _amount - dust;\n }\n\n function _encodeSendPayload(bytes32 _toAddress, uint64 _amountSD) internal view virtual returns (bytes memory) {\n return abi.encodePacked(PT_SEND, _toAddress, _amountSD);\n }\n\n function _decodeSendPayload(bytes memory _payload) internal view virtual returns (address to, uint64 amountSD) {\n require(_payload.toUint8(0) == PT_SEND && _payload.length == 41, \"OFTCore: invalid payload\");\n\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\n amountSD = _payload.toUint64(33);\n }\n\n function _encodeSendAndCallPayload(\n address _from,\n bytes32 _toAddress,\n uint64 _amountSD,\n bytes memory _payload,\n uint64 _dstGasForCall\n ) internal view virtual returns (bytes memory) {\n return abi.encodePacked(PT_SEND_AND_CALL, _toAddress, _amountSD, _addressToBytes32(_from), _dstGasForCall, _payload);\n }\n\n function _decodeSendAndCallPayload(bytes memory _payload)\n internal\n view\n virtual\n returns (\n bytes32 from,\n address to,\n uint64 amountSD,\n bytes memory payload,\n uint64 dstGasForCall\n )\n {\n require(_payload.toUint8(0) == PT_SEND_AND_CALL, \"OFTCore: invalid payload\");\n\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\n amountSD = _payload.toUint64(33);\n from = _payload.toBytes32(41);\n dstGasForCall = _payload.toUint64(73);\n payload = _payload.slice(81, _payload.length - 81);\n }\n\n function _addressToBytes32(address _address) internal pure virtual returns (bytes32) {\n return bytes32(uint(uint160(_address)));\n }\n\n function _debitFrom(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount\n ) internal virtual returns (uint);\n\n function _creditTo(\n uint16 _srcChainId,\n address _toAddress,\n uint _amount\n ) internal virtual returns (uint);\n\n function _transferFrom(\n address _from,\n address _to,\n uint _amount\n ) internal virtual returns (uint);\n\n function _ld2sdRate() internal view virtual returns (uint);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./OwnableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership} and {acceptOwnership}.\n *\n * This module is used through inheritance. It will make available all functions\n * from parent (Ownable).\n */\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\n function __Ownable2Step_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable2Step_init_unchained() internal onlyInitializing {\n }\n address private _pendingOwner;\n\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Returns the address of the pending owner.\n */\n function pendingOwner() public view virtual returns (address) {\n return _pendingOwner;\n }\n\n /**\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual override onlyOwner {\n _pendingOwner = newOwner;\n emit OwnershipTransferStarted(owner(), newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual override {\n delete _pendingOwner;\n super._transferOwnership(newOwner);\n }\n\n /**\n * @dev The new owner accepts the ownership transfer.\n */\n function acceptOwnership() public virtual {\n address sender = _msgSender();\n require(pendingOwner() == sender, \"Ownable2Step: caller is not the new owner\");\n _transferOwnership(sender);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Strings.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```solidity\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```solidity\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(account),\n \" is missing role \",\n Strings.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/IAccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\n\nimport \"./IAccessControlManagerV8.sol\";\n\n/**\n * @title AccessControlledV8\n * @author Venus\n * @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\n */\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\n /// @notice Access control manager contract\n IAccessControlManagerV8 private _accessControlManager;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n\n /// @notice Emitted when access control manager contract address is changed\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\n\n /// @notice Thrown when the action is prohibited by AccessControlManager\n error Unauthorized(address sender, address calledContract, string methodSignature);\n\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\n __Ownable2Step_init();\n __AccessControlled_init_unchained(accessControlManager_);\n }\n\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\n _setAccessControlManager(accessControlManager_);\n }\n\n /**\n * @notice Sets the address of AccessControlManager\n * @dev Admin function to set address of AccessControlManager\n * @param accessControlManager_ The new address of the AccessControlManager\n * @custom:event Emits NewAccessControlManager event\n * @custom:access Only Governance\n */\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\n _setAccessControlManager(accessControlManager_);\n }\n\n /**\n * @notice Returns the address of the access control manager contract\n */\n function accessControlManager() external view returns (IAccessControlManagerV8) {\n return _accessControlManager;\n }\n\n /**\n * @dev Internal function to set address of AccessControlManager\n * @param accessControlManager_ The new address of the AccessControlManager\n */\n function _setAccessControlManager(address accessControlManager_) internal {\n require(address(accessControlManager_) != address(0), \"invalid acess control manager address\");\n address oldAccessControlManager = address(_accessControlManager);\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\n }\n\n /**\n * @notice Reverts if the call is not allowed by AccessControlManager\n * @param signature Method signature\n */\n function _checkAccessAllowed(string memory signature) internal view {\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\n\n if (!isAllowedToCall) {\n revert Unauthorized(msg.sender, address(this), signature);\n }\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport \"./IAccessControlManagerV8.sol\";\n\n/**\n * @title AccessControlManager\n * @author Venus\n * @dev This contract is a wrapper of OpenZeppelin AccessControl extending it in a way to standartize access control within Venus Smart Contract Ecosystem.\n * @notice Access control plays a crucial role in the Venus governance model. It is used to restrict functions so that they can only be called from one\n * account or list of accounts (EOA or Contract Accounts).\n *\n * The implementation of `AccessControlManager`(https://github.com/VenusProtocol/governance-contracts/blob/main/contracts/Governance/AccessControlManager.sol)\n * inherits the [Open Zeppelin AccessControl](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/AccessControl.sol)\n * contract as a base for role management logic. There are two role types: admin and granular permissions.\n * \n * ## Granular Roles\n * \n * Granular roles are built by hashing the contract address and its function signature. For example, given contract `Foo` with function `Foo.bar()` which\n * is guarded by ACM, calling `giveRolePermission` for account B do the following:\n * \n * 1. Compute `keccak256(contractFooAddress,functionSignatureBar)`\n * 1. Add the computed role to the roles of account B\n * 1. Account B now can call `ContractFoo.bar()`\n * \n * ## Admin Roles\n * \n * Admin roles allow for an address to call a function signature on any contract guarded by the `AccessControlManager`. This is particularly useful for\n * contracts created by factories.\n * \n * For Admin roles a null address is hashed in place of the contract address (`keccak256(0x0000000000000000000000000000000000000000,functionSignatureBar)`.\n * \n * In the previous example, giving account B the admin role, account B will have permissions to call the `bar()` function on any contract that is guarded by\n * ACM, not only contract A.\n * \n * ## Protocol Integration\n * \n * All restricted functions in Venus Protocol use a hook to ACM in order to check if the caller has the right permission to call the guarded function.\n * `AccessControlledV5` and `AccessControlledV8` abstract contract makes this integration easier. They call ACM's external method\n * `isAllowedToCall(address caller, string functionSig)`. Here is an example of how `setCollateralFactor` function in `Comptroller` is integrated with ACM:\n\n```\n contract Comptroller is [...] AccessControlledV8 {\n [...]\n function setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa, uint256 newLiquidationThresholdMantissa) external {\n _checkAccessAllowed(\"setCollateralFactor(address,uint256,uint256)\");\n [...]\n }\n }\n```\n */\ncontract AccessControlManager is AccessControl, IAccessControlManagerV8 {\n /// @notice Emitted when an account is given a permission to a certain contract function\n /// @dev If contract address is 0x000..0 this means that the account is a default admin of this function and\n /// can call any contract function with this signature\n event PermissionGranted(address account, address contractAddress, string functionSig);\n\n /// @notice Emitted when an account is revoked a permission to a certain contract function\n event PermissionRevoked(address account, address contractAddress, string functionSig);\n\n constructor() {\n // Grant the contract deployer the default admin role: it will be able\n // to grant and revoke any roles\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n /**\n * @notice Gives a function call permission to one single account\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * @param contractAddress address of contract for which call permissions will be granted\n * @dev if contractAddress is zero address, the account can access the specified function\n * on **any** contract managed by this ACL\n * @param functionSig signature e.g. \"functionName(uint256,bool)\"\n * @param accountToPermit account that will be given access to the contract function\n * @custom:event Emits a {RoleGranted} and {PermissionGranted} events.\n */\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) public {\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\n grantRole(role, accountToPermit);\n emit PermissionGranted(accountToPermit, contractAddress, functionSig);\n }\n\n /**\n * @notice Revokes an account's permission to a particular function call\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleRevoked} event.\n * @param contractAddress address of contract for which call permissions will be revoked\n * @param functionSig signature e.g. \"functionName(uint256,bool)\"\n * @custom:event Emits {RoleRevoked} and {PermissionRevoked} events.\n */\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) public {\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\n revokeRole(role, accountToRevoke);\n emit PermissionRevoked(accountToRevoke, contractAddress, functionSig);\n }\n\n /**\n * @notice Verifies if the given account can call a contract's guarded function\n * @dev Since restricted contracts using this function as a permission hook, we can get contracts address with msg.sender\n * @param account for which call permissions will be checked\n * @param functionSig restricted function signature e.g. \"functionName(uint256,bool)\"\n * @return false if the user account cannot call the particular contract function\n *\n */\n function isAllowedToCall(address account, string calldata functionSig) public view returns (bool) {\n bytes32 role = keccak256(abi.encodePacked(msg.sender, functionSig));\n\n if (hasRole(role, account)) {\n return true;\n } else {\n role = keccak256(abi.encodePacked(address(0), functionSig));\n return hasRole(role, account);\n }\n }\n\n /**\n * @notice Verifies if the given account can call a contract's guarded function\n * @dev This function is used as a view function to check permissions rather than contract hook for access restriction check.\n * @param account for which call permissions will be checked against\n * @param contractAddress address of the restricted contract\n * @param functionSig signature of the restricted function e.g. \"functionName(uint256,bool)\"\n * @return false if the user account cannot call the particular contract function\n */\n function hasPermission(\n address account,\n address contractAddress,\n string calldata functionSig\n ) public view returns (bool) {\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\n return hasRole(role, account);\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport \"@openzeppelin/contracts/access/IAccessControl.sol\";\n\n/**\n * @title IAccessControlManagerV8\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\n */\ninterface IAccessControlManagerV8 is IAccessControl {\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\n\n function hasPermission(\n address account,\n address contractAddress,\n string calldata functionSig\n ) external view returns (bool);\n}\n" + }, + "@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\ninterface OracleInterface {\n function getPrice(address asset) external view returns (uint256);\n}\n\ninterface ResilientOracleInterface is OracleInterface {\n function updatePrice(address vToken) external;\n\n function updateAssetPrice(address asset) external;\n\n function getUnderlyingPrice(address vToken) external view returns (uint256);\n}\n\ninterface TwapInterface is OracleInterface {\n function updateTwap(address asset) external returns (uint256);\n}\n\ninterface BoundValidatorInterface {\n function validatePriceWithAnchorPrice(\n address asset,\n uint256 reporterPrice,\n uint256 anchorPrice\n ) external view returns (bool);\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/constants.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\nuint256 constant EXP_SCALE = 1e18;\n\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\nuint256 constant MANTISSA_ONE = EXP_SCALE;\n" + }, + "@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { EXP_SCALE as EXP_SCALE_, MANTISSA_ONE as MANTISSA_ONE_ } from \"./constants.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n struct Exp {\n uint256 mantissa;\n }\n\n struct Double {\n uint256 mantissa;\n }\n\n uint256 internal constant EXP_SCALE = EXP_SCALE_;\n uint256 internal constant DOUBLE_SCALE = 1e36;\n uint256 internal constant HALF_EXP_SCALE = EXP_SCALE / 2;\n uint256 internal constant MANTISSA_ONE = MANTISSA_ONE_;\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * EXP_SCALE}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint256) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / EXP_SCALE;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n // solhint-disable-next-line func-name-mixedcase\n function mul_ScalarTruncate(Exp memory a, uint256 scalar) internal pure returns (uint256) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n // solhint-disable-next-line func-name-mixedcase\n function mul_ScalarTruncateAddUInt(Exp memory a, uint256 scalar, uint256 addend) internal pure returns (uint256) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n function safe224(uint256 n, string memory errorMessage) internal pure returns (uint224) {\n require(n <= type(uint224).max, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\n require(n <= type(uint32).max, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / EXP_SCALE });\n }\n\n function mul_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint256 a, Exp memory b) internal pure returns (uint256) {\n return mul_(a, b.mantissa) / EXP_SCALE;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / DOUBLE_SCALE });\n }\n\n function mul_(Double memory a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint256 a, Double memory b) internal pure returns (uint256) {\n return mul_(a, b.mantissa) / DOUBLE_SCALE;\n }\n\n function mul_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, EXP_SCALE), b.mantissa) });\n }\n\n function div_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint256 a, Exp memory b) internal pure returns (uint256) {\n return div_(mul_(a, EXP_SCALE), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, DOUBLE_SCALE), b.mantissa) });\n }\n\n function div_(Double memory a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint256 a, Double memory b) internal pure returns (uint256) {\n return div_(mul_(a, DOUBLE_SCALE), b.mantissa);\n }\n\n function div_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n function fraction(uint256 a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, DOUBLE_SCALE), b) });\n }\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/validators.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\nerror ZeroAddressNotAllowed();\n\n/// @notice Checks if the provided address is nonzero, reverts otherwise\n/// @param address_ Address to check\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\nfunction ensureNonzeroAddress(address address_) pure {\n if (address_ == address(0)) {\n revert ZeroAddressNotAllowed();\n }\n}\n" + }, + "contracts/Bridge/BaseXVSProxyOFT.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { Pausable } from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport { BaseOFTV2 } from \"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { ExponentialNoError } from \"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\";\n\n/**\n * @title BaseXVSProxyOFT\n * @author Venus\n * @notice The BaseXVSProxyOFT contract is tailored for facilitating cross-chain transactions with an ERC20 token.\n * It manages transaction limits of a single and daily transactions.\n * This contract inherits key functionalities from other contracts, including pausing capabilities and error handling.\n * It holds state variables for the inner token and maps for tracking transaction limits and statistics across various chains and addresses.\n * The contract allows the owner to configure limits, set whitelists, and control pausing.\n * Internal functions conduct eligibility check of transactions, making the contract a fundamental component for cross-chain token management.\n */\n\nabstract contract BaseXVSProxyOFT is Pausable, ExponentialNoError, BaseOFTV2 {\n using SafeERC20 for IERC20;\n IERC20 internal immutable innerToken;\n uint256 internal immutable ld2sdRate;\n\n /**\n * @notice The address of ResilientOracle contract wrapped in its interface.\n */\n ResilientOracleInterface public oracle;\n /**\n * @notice Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxSingleTransactionLimit;\n /**\n * @notice Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxDailyLimit;\n /**\n * @notice Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourTransferred;\n /**\n * @notice Timestamp when the last 24-hour window started from local chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourWindowStart;\n /**\n * @notice Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxSingleReceiveTransactionLimit;\n /**\n * @notice Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxDailyReceiveLimit;\n /**\n * @notice Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourReceived;\n /**\n * @notice Timestamp when the last 24-hour window started from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourReceiveWindowStart;\n /**\n * @notice Address on which cap check and bound limit is not appicable.\n */\n mapping(address => bool) public whitelist;\n\n /**\n * @notice Emmited when address is added to whitelist.\n */\n event SetWhitelist(address indexed addr, bool isWhitelist);\n /**\n * @notice Emitted when the maximum limit for a single transaction from local chain is modified.\n */\n event SetMaxSingleTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum daily limit of transactions from local chain is modified.\n */\n event SetMaxDailyLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum limit for a single receive transaction from remote chain is modified.\n */\n event SetMaxSingleReceiveTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\n */\n event SetMaxDailyReceiveLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Event emitted when oracle is modified.\n */\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\n /**\n * @notice Event emitted when trusted remote sets to empty.\n */\n event TrustedRemoteRemoved(uint16 chainId);\n /**\n * @notice Event emitted when inner token set successfully.\n */\n event InnerTokenAdded(address indexed innerToken);\n\n /**\n * @param tokenAddress_ Address of the inner token.\n * @param sharedDecimals_ No of shared decimals.\n * @param lzEndpoint_ Address of the layer zero endpoint contract.\n * @param oracle_ Address of the price oracle.\n * @custom:error ZeroAddressNotAllowed is thrown when token contract address is zero.\n * @custom:error ZeroAddressNotAllowed is thrown when lzEndpoint contract address is zero.\n * @custom:error ZeroAddressNotAllowed is thrown when oracle contract address is zero.\n */\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseOFTV2(sharedDecimals_, lzEndpoint_) {\n ensureNonzeroAddress(tokenAddress_);\n ensureNonzeroAddress(lzEndpoint_);\n\n innerToken = IERC20(tokenAddress_);\n\n (bool success, bytes memory data) = tokenAddress_.staticcall(abi.encodeWithSignature(\"decimals()\"));\n require(success, \"ProxyOFT: failed to get token decimals\");\n uint8 decimals = abi.decode(data, (uint8));\n\n require(sharedDecimals_ <= decimals, \"ProxyOFT: sharedDecimals must be <= decimals\");\n ld2sdRate = 10 ** (decimals - sharedDecimals_);\n\n ensureNonzeroAddress(oracle_);\n\n emit InnerTokenAdded(tokenAddress_);\n emit OracleChanged(address(0), oracle_);\n\n oracle = ResilientOracleInterface(oracle_);\n }\n\n /**\n * @notice Set the address of the ResilientOracle contract.\n * @dev Reverts if the new address is zero.\n * @param oracleAddress_ The new address of the ResilientOracle contract.\n * @custom:access Only owner.\n * @custom:event Emits OracleChanged with old and new oracle address.\n */\n function setOracle(address oracleAddress_) external onlyOwner {\n ensureNonzeroAddress(oracleAddress_);\n emit OracleChanged(address(oracle), oracleAddress_);\n oracle = ResilientOracleInterface(oracleAddress_);\n }\n\n /**\n * @notice Sets the limit of single transaction amount.\n * @param chainId_ Destination chain id.\n * @param limit_ Amount in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\n */\n function setMaxSingleTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ <= chainIdToMaxDailyLimit[chainId_], \"Single transaction limit > Daily limit\");\n emit SetMaxSingleTransactionLimit(chainId_, chainIdToMaxSingleTransactionLimit[chainId_], limit_);\n chainIdToMaxSingleTransactionLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the limit of daily (24 Hour) transactions amount.\n * @param chainId_ Destination chain id.\n * @param limit_ Amount in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxDailyLimit with old and new limit associated with chain id.\n */\n function setMaxDailyLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ >= chainIdToMaxSingleTransactionLimit[chainId_], \"Daily limit < single transaction limit\");\n emit SetMaxDailyLimit(chainId_, chainIdToMaxDailyLimit[chainId_], limit_);\n chainIdToMaxDailyLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the maximum limit for a single receive transaction.\n * @param chainId_ The destination chain ID.\n * @param limit_ The new maximum limit in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\n */\n function setMaxSingleReceiveTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ <= chainIdToMaxDailyReceiveLimit[chainId_], \"single receive transaction limit > Daily limit\");\n emit SetMaxSingleReceiveTransactionLimit(chainId_, chainIdToMaxSingleReceiveTransactionLimit[chainId_], limit_);\n chainIdToMaxSingleReceiveTransactionLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the maximum daily limit for receiving transactions.\n * @param chainId_ The destination chain ID.\n * @param limit_ The new maximum daily limit in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\n */\n function setMaxDailyReceiveLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(\n limit_ >= chainIdToMaxSingleReceiveTransactionLimit[chainId_],\n \"Daily limit < single receive transaction limit\"\n );\n emit SetMaxDailyReceiveLimit(chainId_, chainIdToMaxDailyReceiveLimit[chainId_], limit_);\n chainIdToMaxDailyReceiveLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the whitelist address to skip checks on transaction limit.\n * @param user_ Adress to be add in whitelist.\n * @param val_ Boolean to be set (true for user_ address is whitelisted).\n * @custom:access Only owner.\n * @custom:event Emits setWhitelist.\n */\n function setWhitelist(address user_, bool val_) external onlyOwner {\n emit SetWhitelist(user_, val_);\n whitelist[user_] = val_;\n }\n\n /**\n * @notice Triggers stopped state of the bridge.\n * @custom:access Only owner.\n */\n function pause() external onlyOwner {\n _pause();\n }\n\n /**\n * @notice Triggers resume state of the bridge.\n * @custom:access Only owner.\n */\n function unpause() external onlyOwner {\n _unpause();\n }\n\n /**\n * @notice Remove trusted remote from storage.\n * @param remoteChainId_ The chain's id corresponds to setting the trusted remote to empty.\n */\n function removeTrustedRemote(uint16 remoteChainId_) external onlyOwner {\n delete trustedRemoteLookup[remoteChainId_];\n emit TrustedRemoteRemoved(remoteChainId_);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\n */\n function renounceOwnership() public override {}\n\n /**\n * @notice Return's the address of the inner token of this bridge.\n */\n function token() public view override returns (address) {\n return address(innerToken);\n }\n\n function _isEligibleToSend(address from_, uint16 dstChainId_, uint256 amount_) internal {\n // Check if the sender's address is whitelisted\n bool isWhiteListedUser = whitelist[from_];\n // Check if the user is whitelisted and return if true\n if (isWhiteListedUser) {\n return;\n }\n\n // Calculate the amount in USD using the oracle price\n uint256 amountInUsd;\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\n\n // Load values for the 24-hour window checks\n uint256 currentBlockTimestamp = block.timestamp;\n uint256 lastDayWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\n uint256 transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\n uint256 maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\n uint256 maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\n\n // Revert if the amount exceeds the single transaction limit\n require(amountInUsd <= maxSingleTransactionLimit, \"Single Transaction Limit Exceed\");\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - lastDayWindowStart > 1 days) {\n transferredInWindow = amountInUsd;\n chainIdToLast24HourWindowStart[dstChainId_] = currentBlockTimestamp;\n } else {\n transferredInWindow += amountInUsd;\n }\n\n // Revert if the amount exceeds the daily limit\n require(transferredInWindow <= maxDailyLimit, \"Daily Transaction Limit Exceed\");\n\n // Update the amount for the 24-hour window\n chainIdToLast24HourTransferred[dstChainId_] = transferredInWindow;\n }\n\n function _isEligibleToReceive(address toAddress_, uint16 srcChainId_, uint256 receivedAmount_) internal {\n // Check if the recipient's address is whitelisted\n bool isWhiteListedUser = whitelist[toAddress_];\n // Check if the user is whitelisted and return if true\n if (isWhiteListedUser) {\n return;\n }\n\n // Calculate the received amount in USD using the oracle price\n uint256 receivedAmountInUsd;\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(address(token())) });\n receivedAmountInUsd = mul_ScalarTruncate(oraclePrice, receivedAmount_);\n\n uint256 currentBlockTimestamp = block.timestamp;\n\n // Load values for the 24-hour window checks for receiving\n uint256 lastDayReceiveWindowStart = chainIdToLast24HourReceiveWindowStart[srcChainId_];\n uint256 receivedInWindow = chainIdToLast24HourReceived[srcChainId_];\n uint256 maxSingleReceiveTransactionLimit = chainIdToMaxSingleReceiveTransactionLimit[srcChainId_];\n uint256 maxDailyReceiveLimit = chainIdToMaxDailyReceiveLimit[srcChainId_];\n\n // Check if the received amount exceeds the single transaction limit\n require(receivedAmountInUsd <= maxSingleReceiveTransactionLimit, \"Single Transaction Limit Exceed\");\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - lastDayReceiveWindowStart > 1 days) {\n receivedInWindow = receivedAmountInUsd;\n chainIdToLast24HourReceiveWindowStart[srcChainId_] = currentBlockTimestamp;\n } else {\n receivedInWindow += receivedAmountInUsd;\n }\n\n // Revert if the received amount exceeds the daily limit\n require(receivedInWindow <= maxDailyReceiveLimit, \"Daily Transaction Limit Exceed\");\n\n // Update the received amount for the 24-hour window\n chainIdToLast24HourReceived[srcChainId_] = receivedInWindow;\n }\n\n function _transferFrom(\n address from_,\n address to_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n uint256 before = innerToken.balanceOf(to_);\n if (from_ == address(this)) {\n innerToken.safeTransfer(to_, amount_);\n } else {\n innerToken.safeTransferFrom(from_, to_, amount_);\n }\n return innerToken.balanceOf(to_) - before;\n }\n\n function _nonblockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal override {\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\n require(\n _srcAddress.length == trustedRemote.length &&\n trustedRemote.length > 0 &&\n keccak256(_srcAddress) == keccak256(trustedRemote),\n \"LzApp: invalid source sending contract\"\n );\n super._nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\n }\n\n function _ld2sdRate() internal view override returns (uint256) {\n return ld2sdRate;\n }\n}\n" + }, + "contracts/Bridge/interfaces/IXVS.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/**\n * @title IXVS\n * @author Venus\n * @notice Interface implemented by `XVS` token.\n */\ninterface IXVS {\n function mint(address to, uint256 amount) external;\n\n function burn(address from, uint256 amount) external;\n}\n" + }, + "contracts/Bridge/interfaces/IXVSProxyOFT.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/**\n * @title IXVSProxyOFT\n * @author Venus\n * @notice Interface implemented by `XVSProxyOFT`.\n */\ninterface IXVSProxyOFT {\n function transferOwnership(address addr) external;\n\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\n\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\n}\n" + }, + "contracts/Bridge/token/TokenController.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\nimport { IAccessControlManagerV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\";\nimport { Pausable } from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\n/**\n * @title TokenController\n * @author Venus\n * @notice TokenController contract acts as a governance and access control mechanism,\n * allowing the owner to manage minting restrictions and blacklist certain addresses to maintain control and security within the token ecosystem.\n * It provides a flexible framework for token-related operations.\n */\n\ncontract TokenController is Ownable, Pausable {\n /**\n * @notice Access control manager contract address.\n */\n address public accessControlManager;\n /**\n * @notice A Mapping used to keep track of the blacklist status of addresses.\n */\n mapping(address => bool) public _blacklist;\n /**\n * @notice A mapping is used to keep track of the maximum amount a minter is permitted to miny..\n */\n mapping(address => uint256) public minterToCap;\n /**\n * @notice A Mapping used to keep track of the amount i.e already m inted by minter.\n */\n mapping(address => uint256) public minterToMintedAmount;\n\n /**\n * @notice Emitted when the blacklist status of a user is updated.\n */\n event BlacklistUpdated(address indexed user, bool value);\n /**\n * @notice Emitted when the minting limit for a minter is increased.\n */\n event MintLimitIncreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting limit for a minter is decreased.\n */\n event MintLimitDecreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting cap for a minter is changed.\n */\n event MintCapChanged(address indexed minter, uint256 amount);\n /**\n * @notice Emitted when the address of the access control manager of the contract is updated.\n */\n event NewAccessControlManager(address indexed oldAccessControlManager, address indexed newAccessControlManager);\n\n /**\n * @notice This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap.\n */\n error MintLimitExceed();\n /**\n * @notice This error is used to indicate that minting is not allowed for the specified addresses.\n */\n error MintNotAllowed(address from, address to);\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\n */\n constructor(address accessControlManager_) {\n ensureNonzeroAddress(accessControlManager_);\n accessControlManager = accessControlManager_;\n }\n\n /**\n * @notice Pauses Token\n * @custom:access Controlled by AccessControlManager.\n */\n function pause() external {\n _ensureAllowed(\"pause()\");\n _pause();\n }\n\n /**\n * @notice Resumes Token\n * @custom:access Controlled by AccessControlManager.\n */\n function unpause() external {\n _ensureAllowed(\"unpause()\");\n _unpause();\n }\n\n /**\n * @notice Function to update blacklist.\n * @param user_ User address to be affected.\n * @param value_ Boolean to toggle value.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits BlacklistUpdated event.\n */\n function updateBlacklist(address user_, bool value_) external {\n _ensureAllowed(\"updateBlacklist(address,bool)\");\n _blacklist[user_] = value_;\n emit BlacklistUpdated(user_, value_);\n }\n\n /**\n * @notice Sets the minitng cap for minter.\n * @param minter_ Minter address.\n * @param amount_ Cap for the minter.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintCapChanged.\n */\n function setMintCap(address minter_, uint256 amount_) external {\n _ensureAllowed(\"setMintCap(address,uint256)\");\n minterToCap[minter_] = amount_;\n emit MintCapChanged(minter_, amount_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract.\n * @dev Admin function to set the access control address.\n * @param newAccessControlAddress_ New address for the access control.\n * @custom:access Only owner.\n * @custom:event Emits NewAccessControlManager.\n * @custom:error ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.\n */\n function setAccessControlManager(address newAccessControlAddress_) external onlyOwner {\n ensureNonzeroAddress(newAccessControlAddress_);\n emit NewAccessControlManager(accessControlManager, newAccessControlAddress_);\n accessControlManager = newAccessControlAddress_;\n }\n\n /**\n * @notice Returns the blacklist status of the address.\n * @param user_ Address of user to check blacklist status.\n * @return bool status of blacklist.\n */\n function isBlackListed(address user_) external view returns (bool) {\n return _blacklist[user_];\n }\n\n /**\n * @dev Checks the minter cap and eligibility of receiver to receive tokens.\n * @param from_ Minter address.\n * @param to_ Receiver address.\n * @param amount_ Amount to be mint.\n */\n function _isEligibleToMint(address from_, address to_, uint256 amount_) internal {\n if (_blacklist[to_]) {\n revert MintNotAllowed(from_, to_);\n }\n uint256 mintingCap = minterToCap[from_];\n uint256 totalMintedOld = minterToMintedAmount[from_];\n uint256 totalMintedNew = totalMintedOld + amount_;\n\n if (totalMintedNew > mintingCap) {\n revert MintLimitExceed();\n }\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit = mintingCap - totalMintedNew;\n emit MintLimitDecreased(from_, availableLimit);\n }\n\n /**\n * @dev This is post hook of burn function, increases minitng limit of the minter.\n * @param from_ Minter address.\n * @param amount_ Amount burned.\n */\n function _increaseMintLimit(address from_, uint256 amount_) internal {\n uint256 totalMintedOld = minterToMintedAmount[from_];\n uint256 totalMintedNew = totalMintedOld - amount_;\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit = minterToCap[from_] - totalMintedNew;\n emit MintLimitIncreased(from_, availableLimit);\n }\n\n /// @dev Checks the caller is allowed to call the specified fuction\n function _ensureAllowed(string memory functionSig_) internal view {\n require(\n IAccessControlManagerV8(accessControlManager).isAllowedToCall(msg.sender, functionSig_),\n \"access denied\"\n );\n }\n}\n" + }, + "contracts/Bridge/token/XVS.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\nimport { TokenController } from \"./TokenController.sol\";\n\n/**\n * @title XVS\n * @author Venus\n * @notice XVS contract serves as a customized ERC-20 token with additional minting and burning functionality.\n * It also incorporates access control features provided by the \"TokenController\" contract to ensure proper governance and restrictions on minting and burning operations.\n */\n\ncontract XVS is ERC20, TokenController {\n constructor(address accessControlManager_) ERC20(\"Venus XVS\", \"XVS\") TokenController(accessControlManager_) {}\n\n /**\n * @notice Creates `amount_` tokens and assigns them to `account_`, increasing\n * the total supply. Checks access and eligibility.\n * @param account_ Address to which tokens be assigned.\n * @param amount_ Amount of tokens to be assigned.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitDecreased with new available limit.\n * @custom:error MintNotAllowed is thrown when minting is not allowed to from_ address.\n * @custom:error MintLimitExceed is thrown when minting amount exceed the maximum cap.\n */\n function mint(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"mint(address,uint256)\");\n _isEligibleToMint(msg.sender, account_, amount_);\n _mint(account_, amount_);\n }\n\n /**\n * @notice Destroys `amount_` tokens from `account_`, reducing the\n * total supply. Checks access and eligibility.\n * @param account_ Address from which tokens be destroyed.\n * @param amount_ Amount of tokens to be destroyed.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitIncreased with new available limit.\n */\n function burn(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"burn(address,uint256)\");\n _burn(account_, amount_);\n _increaseMintLimit(msg.sender, amount_);\n }\n}\n" + }, + "contracts/Bridge/XVSBridgeAdmin.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.8.13;\n\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { IXVSProxyOFT } from \"./interfaces/IXVSProxyOFT.sol\";\nimport \"hardhat/console.sol\";\n\n/**\n * @title XVSBridgeAdmin\n * @author Venus\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\n * It maintains a registry of function signatures and names,\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\n */\ncontract XVSBridgeAdmin is AccessControlledV8 {\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IXVSProxyOFT public immutable XVSBridge;\n /**\n * @notice A mapping keeps track of function signature associated with function name string.\n */\n mapping(bytes4 => string) public functionRegistry;\n\n // Event emitted when function registry updated\n event FunctionRegistryChanged(string signature, bool active);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address XVSBridge_) {\n ensureNonzeroAddress(XVSBridge_);\n XVSBridge = IXVSProxyOFT(XVSBridge_);\n _disableInitializers();\n }\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\n */\n function initialize(address accessControlManager_) external initializer {\n ensureNonzeroAddress(accessControlManager_);\n __AccessControlled_init(accessControlManager_);\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract\n * @custom:access Controlled by AccessControlManager.\n */\n fallback(bytes calldata data) external returns (bytes memory) {\n string memory fun = _getFunctionName(msg.sig);\n console.logBytes4(msg.sig);\n require(bytes(fun).length != 0, \"Function not found\");\n _checkAccessAllowed(fun);\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\n require(ok, \"call failed\");\n return res;\n }\n\n /**\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n */\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\n _checkAccessAllowed(\"setTrustedRemoteAddress(uint16,bytes)\");\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice A registry of functions that are allowed to be executed from proposals\n * @param signatures_ Function signature to be added or removed.\n * @param active_ bool value, should be true to add function.\n */\n function upsertSignature(string[] calldata signatures_, bool[] calldata active_) external onlyOwner {\n uint256 signatureLength = signatures_.length;\n require(signatureLength == active_.length, \"Input arrays must have the same length\");\n for (uint256 i; i < signatureLength; i++) {\n bytes4 sigHash = bytes4(keccak256(bytes(signatures_[i])));\n bytes memory signature = bytes(functionRegistry[sigHash]);\n if (active_[i] && signature.length == 0) {\n console.logBytes4(sigHash);\n console.log(signatures_[i], \"signatures_[i]\");\n\n functionRegistry[sigHash] = signatures_[i];\n emit FunctionRegistryChanged(signatures_[i], true);\n } else if (!active_[i] && signature.length != 0) {\n delete functionRegistry[sigHash];\n emit FunctionRegistryChanged(signatures_[i], false);\n }\n }\n }\n\n /**\n * @notice This function transfer the ownership of the bridge from this contract to new owner.\n * @param newOwner_ New owner of the XVS Bridge.\n * @custom:access Controlled by AccessControlManager.\n */\n function transferBridgeOwnership(address newOwner_) external {\n _checkAccessAllowed(\"transferBridgeOwnership(address)\");\n ensureNonzeroAddress(newOwner_);\n XVSBridge.transferOwnership(newOwner_);\n }\n\n /**\n * @notice Returns bool = true if srcAddress_ is trustedRemote corresponds to chainId_.\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n */\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\n */\n function renounceOwnership() public override {}\n\n /**\n * @dev Returns function name string associated with function signature.\n */\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\n return functionRegistry[signature_];\n }\n\n function bytesToAddress(bytes calldata b) private pure returns (address) {\n return address(uint160(bytes20(b)));\n }\n}\n" + }, + "contracts/Bridge/XVSProxyOFTDest.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { IXVS } from \"./interfaces/IXVS.sol\";\nimport { BaseXVSProxyOFT } from \"./BaseXVSProxyOFT.sol\";\n\n/**\n * @title XVSProxyOFTDest\n * @author Venus\n * @notice XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT,\n * and focuses on managing token transfers to the destination chain.\n * It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.\n */\n\ncontract XVSProxyOFTDest is BaseXVSProxyOFT {\n /**\n * @notice Emits when stored message dropped without successfull retrying.\n */\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\n\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\n\n /** @notice Clear failed messages from the storage.\n * @param srcChainId_ Chain id of source\n * @param srcAddress_ Address of source followed by current bridge address\n * @param nonce_ Nonce_ of the transaction\n */\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\n }\n\n /**\n * @notice Returns the total circulating supply of the token on the destination chain i.e (total supply).\n */\n function circulatingSupply() public view override returns (uint256) {\n return innerToken.totalSupply();\n }\n\n function _debitFrom(\n address from_,\n uint16 dstChainId_,\n bytes32,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n require(from_ == _msgSender(), \"ProxyOFT: owner is not send caller\");\n _isEligibleToSend(from_, dstChainId_, amount_);\n IXVS(address(innerToken)).burn(from_, amount_);\n return amount_;\n }\n\n function _creditTo(\n uint16 srcChainId_,\n address toAddress_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\n IXVS(address(innerToken)).mint(toAddress_, amount_);\n return amount_;\n }\n}\n" + }, + "contracts/Bridge/XVSProxyOFTSrc.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { BaseXVSProxyOFT } from \"./BaseXVSProxyOFT.sol\";\n\n/**\n * @title XVSProxyOFTSrc\n * @author Venus\n * @notice XVSProxyOFTSrc contract serves as a crucial component for cross-chain token transactions,\n * focusing on the source side of these transactions.\n * It monitors the total amount transferred to other chains, ensuring it complies with defined limits,\n * and provides functions for transferring tokens while maintaining control over the circulating supply on the source chain.\n */\n\ncontract XVSProxyOFTSrc is BaseXVSProxyOFT {\n using SafeERC20 for IERC20;\n /**\n * @notice total amount is transferred from this chain to other chains.\n */\n uint256 public outboundAmount;\n\n /**\n * @notice Emits when locked token released manually by owner.\n */\n event FallbackWithdraw(address indexed to, uint256 amount);\n /**\n * @notice Emits when stored message dropped without successfull retrying.\n */\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\n\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\n\n /** @notice Only call it when there is no way to recover the failed message.\n * `dropFailedMessage` must be called first if transaction is from remote->local chain to avoid double spending.\n * @param to_ The address to withdraw to\n * @param amount_ The amount of withdrawal\n */\n function fallbackWithdraw(address to_, uint256 amount_) external onlyOwner {\n outboundAmount -= amount_;\n _transferFrom(address(this), to_, amount_);\n emit FallbackWithdraw(to_, amount_);\n }\n\n /** @notice Clear failed messages from the storage.\n * @param srcChainId_ Chain id of source\n * @param srcAddress_ Address of source followed by current bridge address\n * @param nonce_ Nonce_ of the transaction\n */\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\n }\n\n /**\n * @notice Returns the total circulating supply of the token on the source chain i.e (total supply - locked in this contract).\n */\n function circulatingSupply() public view override returns (uint256) {\n return innerToken.totalSupply() - outboundAmount;\n }\n\n function _debitFrom(\n address from_,\n uint16 dstChainId_,\n bytes32,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n require(from_ == _msgSender(), \"ProxyOFT: owner is not send caller\");\n _isEligibleToSend(from_, dstChainId_, amount_);\n\n uint256 amount = _transferFrom(from_, address(this), amount_);\n outboundAmount += amount;\n return amount;\n }\n\n function _creditTo(\n uint16 srcChainId_,\n address toAddress_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\n outboundAmount -= amount_;\n // tokens are already in this contract, so no need to transfer\n if (toAddress_ == address(this)) {\n return amount_;\n }\n\n return _transferFrom(address(this), toAddress_, amount_);\n }\n}\n" + }, + "contracts/test/MockToken.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport { LZEndpointMock } from \"@layerzerolabs/solidity-examples/contracts/lzApp/mocks/LZEndpointMock.sol\";\nimport { AccessControlManager } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol\";\n\ncontract MockToken is ERC20 {\n uint8 private immutable _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function faucet(uint256 amount) external {\n _mint(msg.sender, amount);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return _decimals;\n }\n}\n" + }, + "hardhat/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS =\n 0x000000000000000000636F6e736F6c652e6c6f67;\n\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n pop(\n staticcall(\n gas(),\n consoleAddress,\n add(payload, 32),\n mload(payload),\n 0,\n 0\n )\n )\n }\n }\n\n function _castToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castToPure(_sendLogPayloadImplementation)(payload);\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200, + "details": { + "yul": true + } + }, + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/deployments/sepolia/XVSBridgeAdmin.json b/deployments/sepolia/XVSBridgeAdmin.json index be7715f..4af35d4 100644 --- a/deployments/sepolia/XVSBridgeAdmin.json +++ b/deployments/sepolia/XVSBridgeAdmin.json @@ -1,5 +1,5 @@ { - "address": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", + "address": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", "abi": [ { "anonymous": false, @@ -458,83 +458,83 @@ "type": "constructor" } ], - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", "receipt": { "to": null, "from": "0x03862dFa5D0be8F64509C001cb8C6188194469DF", - "contractAddress": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", - "transactionIndex": 30, + "contractAddress": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", + "transactionIndex": 37, "gasUsed": "796891", - "logsBloom": "0x00000000000000000000000000000100600000000000000000800000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000800000000800000000000000400000000000000000000000000000000000000000000080000000000000800000000000001000000000000000000400000000000000800000000000000000000000020020000000000000000200040000000002000400000000400000000020000000000000000000000000004000000000000800000000000000000000000000", - "blockHash": "0xbfb63d0a497359ffc12c4a4c8fd80bfccfe6a85d4022e3889c4e27b3fc486d07", - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", + "logsBloom": "0x40000000000000000000000000000000400000000000000000800000000000000000000000000000000000000000000000000010000000000000000000008000000000000000000000000000000002000001000000000100000000000000000000000000020000000000000000000800000000800000000000000000000000400000000000000000000000000000000000000000000080000012000000800000000000001000000000000000000400000000000000800000000000000000000100000020000000000000000200040000000000000400000000400000000020000000000000000000000000000000000000000800000000000000000000000000", + "blockHash": "0x4e085045772bbfbf9e91934d0a98e7151fe330ab52a6258f359155a8c31c511f", + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", "logs": [ { - "transactionIndex": 30, - "blockNumber": 4664738, - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", - "address": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", + "transactionIndex": 37, + "blockNumber": 4781343, + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", + "address": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x00000000000000000000000099217e4977d5e49bbad10842672a6dcb49a221a1" + "0x0000000000000000000000009a59dcab13883d6717098816210d3df4b271340b" ], "data": "0x", - "logIndex": 81, - "blockHash": "0xbfb63d0a497359ffc12c4a4c8fd80bfccfe6a85d4022e3889c4e27b3fc486d07" + "logIndex": 23, + "blockHash": "0x4e085045772bbfbf9e91934d0a98e7151fe330ab52a6258f359155a8c31c511f" }, { - "transactionIndex": 30, - "blockNumber": 4664738, - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", - "address": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", + "transactionIndex": 37, + "blockNumber": 4781343, + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", + "address": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x00000000000000000000000003862dfa5d0be8f64509c001cb8c6188194469df" ], "data": "0x", - "logIndex": 82, - "blockHash": "0xbfb63d0a497359ffc12c4a4c8fd80bfccfe6a85d4022e3889c4e27b3fc486d07" + "logIndex": 24, + "blockHash": "0x4e085045772bbfbf9e91934d0a98e7151fe330ab52a6258f359155a8c31c511f" }, { - "transactionIndex": 30, - "blockNumber": 4664738, - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", - "address": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", + "transactionIndex": 37, + "blockNumber": 4781343, + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", + "address": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bf705c00578d43b6147ab4eae04dbbed1cccdc96", - "logIndex": 83, - "blockHash": "0xbfb63d0a497359ffc12c4a4c8fd80bfccfe6a85d4022e3889c4e27b3fc486d07" + "logIndex": 25, + "blockHash": "0x4e085045772bbfbf9e91934d0a98e7151fe330ab52a6258f359155a8c31c511f" }, { - "transactionIndex": 30, - "blockNumber": 4664738, - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", - "address": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", + "transactionIndex": 37, + "blockNumber": 4781343, + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", + "address": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 84, - "blockHash": "0xbfb63d0a497359ffc12c4a4c8fd80bfccfe6a85d4022e3889c4e27b3fc486d07" + "logIndex": 26, + "blockHash": "0x4e085045772bbfbf9e91934d0a98e7151fe330ab52a6258f359155a8c31c511f" }, { - "transactionIndex": 30, - "blockNumber": 4664738, - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", - "address": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", + "transactionIndex": 37, + "blockNumber": 4781343, + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", + "address": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f707294b965b57ca16f191d8015aab72627c7d6e", - "logIndex": 85, - "blockHash": "0xbfb63d0a497359ffc12c4a4c8fd80bfccfe6a85d4022e3889c4e27b3fc486d07" + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001435866babd91311b1355cf3af488cca36db68e", + "logIndex": 27, + "blockHash": "0x4e085045772bbfbf9e91934d0a98e7151fe330ab52a6258f359155a8c31c511f" } ], - "blockNumber": 4664738, - "cumulativeGasUsed": "6831419", + "blockNumber": 4781343, + "cumulativeGasUsed": "4073134", "status": 1, "byzantium": true }, "args": [ - "0x99217E4977D5e49BBaD10842672a6DCb49a221A1", - "0xf707294B965B57ca16f191D8015AAB72627C7d6e", + "0x9a59dCAB13883D6717098816210D3dF4B271340B", + "0x01435866babd91311b1355cf3af488cca36db68e", "0xc4d66de8000000000000000000000000bf705c00578d43b6147ab4eae04dbbed1cccdc96" ], "numDeployments": 1, @@ -546,7 +546,7 @@ "methodName": "initialize", "args": ["0xbf705C00578d43B6147ab4eaE04DBBEd1ccCdc96"] }, - "implementation": "0x99217E4977D5e49BBaD10842672a6DCb49a221A1", + "implementation": "0x9a59dCAB13883D6717098816210D3dF4B271340B", "devdoc": { "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", "kind": "dev", diff --git a/deployments/sepolia/XVSBridgeAdmin_Implementation.json b/deployments/sepolia/XVSBridgeAdmin_Implementation.json index b4633cb..7c488da 100644 --- a/deployments/sepolia/XVSBridgeAdmin_Implementation.json +++ b/deployments/sepolia/XVSBridgeAdmin_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x99217E4977D5e49BBaD10842672a6DCb49a221A1", + "address": "0x9a59dCAB13883D6717098816210D3dF4B271340B", "abi": [ { "inputs": [ @@ -329,36 +329,36 @@ "type": "function" } ], - "transactionHash": "0xf9215e60078b3a31576cf0f8ceca26d2e1e4aa894b7a5844ce5e7ce26b223f14", + "transactionHash": "0x25586e6af9776b5c4fbcb90435671df6b26db2c153385a9c5d66b1948c417c09", "receipt": { "to": null, "from": "0x03862dFa5D0be8F64509C001cb8C6188194469DF", - "contractAddress": "0x99217E4977D5e49BBaD10842672a6DCb49a221A1", - "transactionIndex": 20, + "contractAddress": "0x9a59dCAB13883D6717098816210D3dF4B271340B", + "transactionIndex": 95, "gasUsed": "1256061", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080400000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000800000000", - "blockHash": "0xfd42e98b3f2b3e713e26573460236638bc565582fe1da6fdf1ae0ad820a6e01b", - "transactionHash": "0xf9215e60078b3a31576cf0f8ceca26d2e1e4aa894b7a5844ce5e7ce26b223f14", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000100000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000400000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x49ca0c6f5895ac7c38b722aaab3d20f4a13f208b72900a775ea6f25aea05b329", + "transactionHash": "0x25586e6af9776b5c4fbcb90435671df6b26db2c153385a9c5d66b1948c417c09", "logs": [ { - "transactionIndex": 20, - "blockNumber": 4664737, - "transactionHash": "0xf9215e60078b3a31576cf0f8ceca26d2e1e4aa894b7a5844ce5e7ce26b223f14", - "address": "0x99217E4977D5e49BBaD10842672a6DCb49a221A1", + "transactionIndex": 95, + "blockNumber": 4781342, + "transactionHash": "0x25586e6af9776b5c4fbcb90435671df6b26db2c153385a9c5d66b1948c417c09", + "address": "0x9a59dCAB13883D6717098816210D3dF4B271340B", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 38, - "blockHash": "0xfd42e98b3f2b3e713e26573460236638bc565582fe1da6fdf1ae0ad820a6e01b" + "logIndex": 59, + "blockHash": "0x49ca0c6f5895ac7c38b722aaab3d20f4a13f208b72900a775ea6f25aea05b329" } ], - "blockNumber": 4664737, - "cumulativeGasUsed": "3968158", + "blockNumber": 4781342, + "cumulativeGasUsed": "7408783", "status": 1, "byzantium": true }, - "args": ["0xbb772AFB415aa20cf2B9585c4a638247Baf4DC22"], + "args": ["0x307C77D8606d7E486aC5D73d309e16996A336dbd"], "numDeployments": 1, - "solcInputHash": "5783c9d97cabcd0faa109c57f1e4ca57", + "solcInputHash": "62c3d453c4f2f09a9c75b9665a09cf0a", "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"XVSBridge_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"}],\"name\":\"FunctionRegistryChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlManager\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"XVSBridge\",\"outputs\":[{\"internalType\":\"contract IXVSProxyOFT\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"name\":\"functionRegistry\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner_\",\"type\":\"address\"}],\"name\":\"transferBridgeOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"signatures_\",\"type\":\"string[]\"},{\"internalType\":\"bool[]\",\"name\":\"active_\",\"type\":\"bool[]\"}],\"name\":\"upsertSignature\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"custom:error\":\"ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\",\"params\":{\"accessControlManager_\":\"Address of access control manager contract.\"}},\"isTrustedRemote(uint16,bytes)\":{\"custom:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"setAccessControlManager(address)\":{\"custom:access\":\"Only Governance\",\"custom:event\":\"Emits NewAccessControlManager event\",\"details\":\"Admin function to set address of AccessControlManager\",\"params\":{\"accessControlManager_\":\"The new address of the AccessControlManager\"}},\"setTrustedRemoteAddress(uint16,bytes)\":{\"custom:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"}},\"transferBridgeOwnership(address)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"params\":{\"newOwner_\":\"New owner of the XVS Bridge.\"}},\"transferOwnership(address)\":{\"details\":\"Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.\"},\"upsertSignature(string[],bool[])\":{\"params\":{\"active_\":\"bool value, should be true to add function.\",\"signatures_\":\"Function signature to be added or removed.\"}}},\"stateVariables\":{\"XVSBridge\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"XVSBridgeAdmin\",\"version\":1},\"userdoc\":{\"errors\":{\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"}},\"kind\":\"user\",\"methods\":{\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"functionRegistry(bytes4)\":{\"notice\":\"A mapping keeps track of function signature associated with function name string.\"},\"isTrustedRemote(uint16,bytes)\":{\"notice\":\"Returns bool = true if srcAddress_ is trustedRemote corresponds to chainId_.\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening.\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"transferBridgeOwnership(address)\":{\"notice\":\"This function transfer the ownership of the bridge from this contract to new owner.\"},\"upsertSignature(string[],bool[])\":{\"notice\":\"A registry of functions that are allowed to be executed from proposals\"}},\"notice\":\"The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT. It maintains a registry of function signatures and names, allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/XVSBridgeAdmin.sol\":\"XVSBridgeAdmin\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OwnableUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\\n function __Ownable2Step_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable2Step_init_unchained() internal onlyInitializing {\\n }\\n address private _pendingOwner;\\n\\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Returns the address of the pending owner.\\n */\\n function pendingOwner() public view virtual returns (address) {\\n return _pendingOwner;\\n }\\n\\n /**\\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual override onlyOwner {\\n _pendingOwner = newOwner;\\n emit OwnershipTransferStarted(owner(), newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual override {\\n delete _pendingOwner;\\n super._transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev The new owner accepts the ownership transfer.\\n */\\n function acceptOwnership() public virtual {\\n address sender = _msgSender();\\n require(pendingOwner() == sender, \\\"Ownable2Step: caller is not the new owner\\\");\\n _transferOwnership(sender);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x84efb8889801b0ac817324aff6acc691d07bbee816b671817132911d287a8c63\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\\\";\\n\\nimport \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title AccessControlledV8\\n * @author Venus\\n * @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)\\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\\n */\\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\\n /// @notice Access control manager contract\\n IAccessControlManagerV8 private _accessControlManager;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n\\n /// @notice Emitted when access control manager contract address is changed\\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\\n\\n /// @notice Thrown when the action is prohibited by AccessControlManager\\n error Unauthorized(address sender, address calledContract, string methodSignature);\\n\\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\\n __Ownable2Step_init();\\n __AccessControlled_init_unchained(accessControlManager_);\\n }\\n\\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Sets the address of AccessControlManager\\n * @dev Admin function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n * @custom:event Emits NewAccessControlManager event\\n * @custom:access Only Governance\\n */\\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Returns the address of the access control manager contract\\n */\\n function accessControlManager() external view returns (IAccessControlManagerV8) {\\n return _accessControlManager;\\n }\\n\\n /**\\n * @dev Internal function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n */\\n function _setAccessControlManager(address accessControlManager_) internal {\\n require(address(accessControlManager_) != address(0), \\\"invalid acess control manager address\\\");\\n address oldAccessControlManager = address(_accessControlManager);\\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\\n }\\n\\n /**\\n * @notice Reverts if the call is not allowed by AccessControlManager\\n * @param signature Method signature\\n */\\n function _checkAccessAllowed(string memory signature) internal view {\\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\\n\\n if (!isAllowedToCall) {\\n revert Unauthorized(msg.sender, address(this), signature);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1b805a5d09990e2c4f7839afe7726a02f8452261eb3d0d488e24129ec0a7736d\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x8adbe291d659987faf4de606736227ad9d8e1a0e284a33a6ca12b30ab2a504b2\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0x909eb76841ebd57d8f53686b76b1a09da7bbbbcddb29510c41674d5aa84c713e\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/XVSBridgeAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.13;\\n\\nimport { AccessControlledV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { IXVSProxyOFT } from \\\"./interfaces/IXVSProxyOFT.sol\\\";\\n\\n/**\\n * @title XVSBridgeAdmin\\n * @author Venus\\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\\n * It maintains a registry of function signatures and names,\\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\\n */\\ncontract XVSBridgeAdmin is AccessControlledV8 {\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n IXVSProxyOFT public immutable XVSBridge;\\n /**\\n * @notice A mapping keeps track of function signature associated with function name string.\\n */\\n mapping(bytes4 => string) public functionRegistry;\\n\\n // Event emitted when function registry updated\\n event FunctionRegistryChanged(string signature, bool active);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(address XVSBridge_) {\\n ensureNonzeroAddress(XVSBridge_);\\n XVSBridge = IXVSProxyOFT(XVSBridge_);\\n _disableInitializers();\\n }\\n\\n /**\\n * @param accessControlManager_ Address of access control manager contract.\\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\\n */\\n function initialize(address accessControlManager_) external initializer {\\n ensureNonzeroAddress(accessControlManager_);\\n __AccessControlled_init(accessControlManager_);\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract\\n * @custom:access Controlled by AccessControlManager.\\n */\\n fallback(bytes calldata data) external returns (bytes memory) {\\n string memory fun = _getFunctionName(msg.sig);\\n require(bytes(fun).length != 0, \\\"Function not found\\\");\\n _checkAccessAllowed(fun);\\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n\\n /**\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n */\\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\\n _checkAccessAllowed(\\\"setTrustedRemoteAddress(uint16,bytes)\\\");\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice A registry of functions that are allowed to be executed from proposals\\n * @param signatures_ Function signature to be added or removed.\\n * @param active_ bool value, should be true to add function.\\n */\\n function upsertSignature(string[] calldata signatures_, bool[] calldata active_) external onlyOwner {\\n uint256 signatureLength = signatures_.length;\\n require(signatureLength == active_.length, \\\"Input arrays must have the same length\\\");\\n for (uint256 i; i < signatureLength; i++) {\\n bytes4 sigHash = bytes4(keccak256(bytes(signatures_[i])));\\n bytes memory signature = bytes(functionRegistry[sigHash]);\\n if (active_[i] && signature.length == 0) {\\n functionRegistry[sigHash] = signatures_[i];\\n emit FunctionRegistryChanged(signatures_[i], true);\\n } else if (!active_[i] && signature.length != 0) {\\n delete functionRegistry[sigHash];\\n emit FunctionRegistryChanged(signatures_[i], false);\\n }\\n }\\n }\\n\\n /**\\n * @notice This function transfer the ownership of the bridge from this contract to new owner.\\n * @param newOwner_ New owner of the XVS Bridge.\\n * @custom:access Controlled by AccessControlManager.\\n */\\n function transferBridgeOwnership(address newOwner_) external {\\n _checkAccessAllowed(\\\"transferBridgeOwnership(address)\\\");\\n ensureNonzeroAddress(newOwner_);\\n XVSBridge.transferOwnership(newOwner_);\\n }\\n\\n /**\\n * @notice Returns bool = true if srcAddress_ is trustedRemote corresponds to chainId_.\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n */\\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @dev Returns function name string associated with function signature.\\n */\\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\\n return functionRegistry[signature_];\\n }\\n\\n function bytesToAddress(bytes calldata b) private pure returns (address) {\\n return address(uint160(bytes20(b)));\\n }\\n}\\n\",\"keccak256\":\"0xa3f5c4bd52601bad0e8123b5e3c2abce8de730fe3b5cdc8d36ccef8d8de76c31\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/interfaces/IXVSProxyOFT.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/**\\n * @title IXVSProxyOFT\\n * @author Venus\\n * @notice Interface implemented by `XVSProxyOFT`.\\n */\\ninterface IXVSProxyOFT {\\n function transferOwnership(address addr) external;\\n\\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\\n\\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\\n}\\n\",\"keccak256\":\"0x854518f3e4c2270ca52184e63dc1f9d27f2893388216ee6153e6ab8cf2d7c960\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", "bytecode": "0x60a06040523480156200001157600080fd5b50604051620016f0380380620016f0833981016040819052620000349162000149565b6200003f816200005d565b6001600160a01b0381166080526200005662000088565b506200017b565b6001600160a01b03811662000085576040516342bcdf7f60e11b815260040160405180910390fd5b50565b600054610100900460ff1615620000f55760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000147576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200015c57600080fd5b81516001600160a01b03811681146200017457600080fd5b9392505050565b60805161153d620001b3600039600081816101610152818161026c015281816105d6015281816106c00152610b3e015261153d6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf31461031b578063c4d66de81461032c578063e30c39781461033f578063f2fde38b14610350576100ea565b806379ba5097146102ef5780638da5cb5b146102f7578063a6c3d16514610308576100ea565b80633d8b38f6116100c85780633d8b38f6146102a65780633f90b540146102c95780634bb7453e146102dc578063715018a61461023c576100ea565b80630e32cb8614610229578063180d295c1461023e57806327a020ef14610267575b600036606060006101066000356001600160e01b031916610363565b905080516000036101535760405162461bcd60e51b8152602060048201526012602482015271119d5b98dd1a5bdb881b9bdd08199bdd5b9960721b60448201526064015b60405180910390fd5b61015c81610410565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168686604051610199929190611088565b6000604051808303816000865af19150503d80600081146101d6576040519150601f19603f3d011682016040523d82523d6000602084013e6101db565b606091505b50915091508161021b5760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014a565b805195506020019350505050f35b61023c610237366004611098565b6104ae565b005b61025161024c3660046110c8565b6104c2565b60405161025e919061113f565b60405180910390f35b61028e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161025e565b6102b96102b4366004611152565b61055c565b604051901515815260200161025e565b61023c6102d7366004611098565b61065a565b61023c6102ea36600461122a565b61071f565b61023c610a33565b6033546001600160a01b031661028e565b61023c610316366004611152565b610aaa565b6097546001600160a01b031661028e565b61023c61033a366004611098565b610bae565b6065546001600160a01b031661028e565b61023c61035e366004611098565b610cca565b6001600160e01b03198116600090815260c96020526040902080546060919061038b90611296565b80601f01602080910402602001604051908101604052809291908181526020018280546103b790611296565b80156104045780601f106103d957610100808354040283529160200191610404565b820191906000526020600020905b8154815290600101906020018083116103e757829003601f168201915b50505050509050919050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab9061044390339086906004016112d0565b602060405180830381865afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104849190611302565b9050806104aa57333083604051634a3fa29360e01b815260040161014a9392919061131f565b5050565b6104b6610d3b565b6104bf81610d95565b50565b60c960205260009081526040902080546104db90611296565b80601f016020809104026020016040519081016040528092919081815260200182805461050790611296565b80156105545780601f1061052957610100808354040283529160200191610554565b820191906000526020600020905b81548152906001019060200180831161053757829003601f168201915b505050505081565b60008361ffff166000036105ad5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b6105bf6105ba8484610e53565b610e69565b604051631ec59c7b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633d8b38f69061060f9087908790879060040161137d565b6020604051808303816000875af115801561062e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106529190611302565b949350505050565b6106986040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610410565b6106a181610e69565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b15801561070457600080fd5b505af1158015610718573d6000803e3d6000fd5b5050505050565b610727610d3b565b828181146107865760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d65206044820152650d8cadccee8d60d31b606482015260840161014a565b60005b81811015610a295760008686838181106107a5576107a561139b565b90506020028101906107b791906113b1565b6040516107c5929190611088565b60408051918290039091206001600160e01b03198116600090815260c96020529182208054919350906107f790611296565b80601f016020809104026020016040519081016040528092919081815260200182805461082390611296565b80156108705780601f1061084557610100808354040283529160200191610870565b820191906000526020600020905b81548152906001019060200180831161085357829003601f168201915b505050505090508585848181106108895761088961139b565b905060200201602081019061089e91906113f8565b80156108a957508051155b1561095a578787848181106108c0576108c061139b565b90506020028101906108d291906113b1565b6001600160e01b03198416600090815260c9602052604090206108f6929091610fb9565b507f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa88888581811061092a5761092a61139b565b905060200281019061093c91906113b1565b600160405161094d93929190611415565b60405180910390a1610a14565b85858481811061096c5761096c61139b565b905060200201602081019061098191906113f8565b15801561098e5750805115155b15610a14576001600160e01b03198216600090815260c9602052604081206109b59161103d565b7f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109e8576109e861139b565b90506020028101906109fa91906113b1565b6000604051610a0b93929190611415565b60405180910390a15b50508080610a219061143b565b915050610789565b505050505050565b565b60655433906001600160a01b03168114610aa15760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014a565b6104bf81610e90565b610acb6040518060600160405280602581526020016114e360259139610410565b8261ffff16600003610b1a5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b610b276105ba8383610e53565b60405163a6c3d16560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610b779086908690869060040161137d565b600060405180830381600087803b158015610b9157600080fd5b505af1158015610ba5573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610bce5750600054600160ff909116105b80610be85750303b158015610be8575060005460ff166001145b610c4b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014a565b6000805460ff191660011790558015610c6e576000805461ff0019166101001790555b610c7782610e69565b610c8082610ea9565b80156104aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610cd2610d3b565b606580546001600160a01b0383166001600160a01b03199091168117909155610d036033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6033546001600160a01b03163314610a315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014a565b6001600160a01b038116610df95760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014a565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610cbe565b6000610e5f8284611462565b60601c9392505050565b6001600160a01b0381166104bf576040516342bcdf7f60e11b815260040160405180910390fd5b606580546001600160a01b03191690556104bf81610ee1565b600054610100900460ff16610ed05760405162461bcd60e51b815260040161014a90611497565b610ed8610f33565b6104bf81610f62565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610f5a5760405162461bcd60e51b815260040161014a90611497565b610a31610f89565b600054610100900460ff166104b65760405162461bcd60e51b815260040161014a90611497565b600054610100900460ff16610fb05760405162461bcd60e51b815260040161014a90611497565b610a3133610e90565b828054610fc590611296565b90600052602060002090601f016020900481019282610fe7576000855561102d565b82601f106110005782800160ff1982351617855561102d565b8280016001018555821561102d579182015b8281111561102d578235825591602001919060010190611012565b50611039929150611073565b5090565b50805461104990611296565b6000825580601f10611059575050565b601f0160209004906000526020600020908101906104bf91905b5b808211156110395760008155600101611074565b8183823760009101908152919050565b6000602082840312156110aa57600080fd5b81356001600160a01b03811681146110c157600080fd5b9392505050565b6000602082840312156110da57600080fd5b81356001600160e01b0319811681146110c157600080fd5b6000815180845260005b81811015611118576020818501810151868301820152016110fc565b8181111561112a576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006110c160208301846110f2565b60008060006040848603121561116757600080fd5b833561ffff8116811461117957600080fd5b9250602084013567ffffffffffffffff8082111561119657600080fd5b818601915086601f8301126111aa57600080fd5b8135818111156111b957600080fd5b8760208285010111156111cb57600080fd5b6020830194508093505050509250925092565b60008083601f8401126111f057600080fd5b50813567ffffffffffffffff81111561120857600080fd5b6020830191508360208260051b850101111561122357600080fd5b9250929050565b6000806000806040858703121561124057600080fd5b843567ffffffffffffffff8082111561125857600080fd5b611264888389016111de565b9096509450602087013591508082111561127d57600080fd5b5061128a878288016111de565b95989497509550505050565b600181811c908216806112aa57607f821691505b6020821081036112ca57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0383168152604060208201819052600090610652908301846110f2565b80151581146104bf57600080fd5b60006020828403121561131457600080fd5b81516110c1816112f4565b6001600160a01b0384811682528316602082015260606040820181905260009061134b908301846110f2565b95945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061134b604083018486611354565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126113c857600080fd5b83018035915067ffffffffffffffff8211156113e357600080fd5b60200191503681900382131561122357600080fd5b60006020828403121561140a57600080fd5b81356110c1816112f4565b604081526000611429604083018587611354565b90508215156020830152949350505050565b60006001820161145b57634e487b7160e01b600052601160045260246000fd5b5060010190565b6bffffffffffffffffffffffff19813581811691601485101561148f5780818660140360031b1b83161692505b505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a264697066735822122014d6939b50c25980eb5fa59f72f30eb784faf785cd7219c963048ad91aa4c1ad64736f6c634300080d0033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf31461031b578063c4d66de81461032c578063e30c39781461033f578063f2fde38b14610350576100ea565b806379ba5097146102ef5780638da5cb5b146102f7578063a6c3d16514610308576100ea565b80633d8b38f6116100c85780633d8b38f6146102a65780633f90b540146102c95780634bb7453e146102dc578063715018a61461023c576100ea565b80630e32cb8614610229578063180d295c1461023e57806327a020ef14610267575b600036606060006101066000356001600160e01b031916610363565b905080516000036101535760405162461bcd60e51b8152602060048201526012602482015271119d5b98dd1a5bdb881b9bdd08199bdd5b9960721b60448201526064015b60405180910390fd5b61015c81610410565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168686604051610199929190611088565b6000604051808303816000865af19150503d80600081146101d6576040519150601f19603f3d011682016040523d82523d6000602084013e6101db565b606091505b50915091508161021b5760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014a565b805195506020019350505050f35b61023c610237366004611098565b6104ae565b005b61025161024c3660046110c8565b6104c2565b60405161025e919061113f565b60405180910390f35b61028e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161025e565b6102b96102b4366004611152565b61055c565b604051901515815260200161025e565b61023c6102d7366004611098565b61065a565b61023c6102ea36600461122a565b61071f565b61023c610a33565b6033546001600160a01b031661028e565b61023c610316366004611152565b610aaa565b6097546001600160a01b031661028e565b61023c61033a366004611098565b610bae565b6065546001600160a01b031661028e565b61023c61035e366004611098565b610cca565b6001600160e01b03198116600090815260c96020526040902080546060919061038b90611296565b80601f01602080910402602001604051908101604052809291908181526020018280546103b790611296565b80156104045780601f106103d957610100808354040283529160200191610404565b820191906000526020600020905b8154815290600101906020018083116103e757829003601f168201915b50505050509050919050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab9061044390339086906004016112d0565b602060405180830381865afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104849190611302565b9050806104aa57333083604051634a3fa29360e01b815260040161014a9392919061131f565b5050565b6104b6610d3b565b6104bf81610d95565b50565b60c960205260009081526040902080546104db90611296565b80601f016020809104026020016040519081016040528092919081815260200182805461050790611296565b80156105545780601f1061052957610100808354040283529160200191610554565b820191906000526020600020905b81548152906001019060200180831161053757829003601f168201915b505050505081565b60008361ffff166000036105ad5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b6105bf6105ba8484610e53565b610e69565b604051631ec59c7b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633d8b38f69061060f9087908790879060040161137d565b6020604051808303816000875af115801561062e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106529190611302565b949350505050565b6106986040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610410565b6106a181610e69565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b15801561070457600080fd5b505af1158015610718573d6000803e3d6000fd5b5050505050565b610727610d3b565b828181146107865760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d65206044820152650d8cadccee8d60d31b606482015260840161014a565b60005b81811015610a295760008686838181106107a5576107a561139b565b90506020028101906107b791906113b1565b6040516107c5929190611088565b60408051918290039091206001600160e01b03198116600090815260c96020529182208054919350906107f790611296565b80601f016020809104026020016040519081016040528092919081815260200182805461082390611296565b80156108705780601f1061084557610100808354040283529160200191610870565b820191906000526020600020905b81548152906001019060200180831161085357829003601f168201915b505050505090508585848181106108895761088961139b565b905060200201602081019061089e91906113f8565b80156108a957508051155b1561095a578787848181106108c0576108c061139b565b90506020028101906108d291906113b1565b6001600160e01b03198416600090815260c9602052604090206108f6929091610fb9565b507f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa88888581811061092a5761092a61139b565b905060200281019061093c91906113b1565b600160405161094d93929190611415565b60405180910390a1610a14565b85858481811061096c5761096c61139b565b905060200201602081019061098191906113f8565b15801561098e5750805115155b15610a14576001600160e01b03198216600090815260c9602052604081206109b59161103d565b7f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109e8576109e861139b565b90506020028101906109fa91906113b1565b6000604051610a0b93929190611415565b60405180910390a15b50508080610a219061143b565b915050610789565b505050505050565b565b60655433906001600160a01b03168114610aa15760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014a565b6104bf81610e90565b610acb6040518060600160405280602581526020016114e360259139610410565b8261ffff16600003610b1a5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b610b276105ba8383610e53565b60405163a6c3d16560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610b779086908690869060040161137d565b600060405180830381600087803b158015610b9157600080fd5b505af1158015610ba5573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610bce5750600054600160ff909116105b80610be85750303b158015610be8575060005460ff166001145b610c4b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014a565b6000805460ff191660011790558015610c6e576000805461ff0019166101001790555b610c7782610e69565b610c8082610ea9565b80156104aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610cd2610d3b565b606580546001600160a01b0383166001600160a01b03199091168117909155610d036033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6033546001600160a01b03163314610a315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014a565b6001600160a01b038116610df95760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014a565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610cbe565b6000610e5f8284611462565b60601c9392505050565b6001600160a01b0381166104bf576040516342bcdf7f60e11b815260040160405180910390fd5b606580546001600160a01b03191690556104bf81610ee1565b600054610100900460ff16610ed05760405162461bcd60e51b815260040161014a90611497565b610ed8610f33565b6104bf81610f62565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610f5a5760405162461bcd60e51b815260040161014a90611497565b610a31610f89565b600054610100900460ff166104b65760405162461bcd60e51b815260040161014a90611497565b600054610100900460ff16610fb05760405162461bcd60e51b815260040161014a90611497565b610a3133610e90565b828054610fc590611296565b90600052602060002090601f016020900481019282610fe7576000855561102d565b82601f106110005782800160ff1982351617855561102d565b8280016001018555821561102d579182015b8281111561102d578235825591602001919060010190611012565b50611039929150611073565b5090565b50805461104990611296565b6000825580601f10611059575050565b601f0160209004906000526020600020908101906104bf91905b5b808211156110395760008155600101611074565b8183823760009101908152919050565b6000602082840312156110aa57600080fd5b81356001600160a01b03811681146110c157600080fd5b9392505050565b6000602082840312156110da57600080fd5b81356001600160e01b0319811681146110c157600080fd5b6000815180845260005b81811015611118576020818501810151868301820152016110fc565b8181111561112a576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006110c160208301846110f2565b60008060006040848603121561116757600080fd5b833561ffff8116811461117957600080fd5b9250602084013567ffffffffffffffff8082111561119657600080fd5b818601915086601f8301126111aa57600080fd5b8135818111156111b957600080fd5b8760208285010111156111cb57600080fd5b6020830194508093505050509250925092565b60008083601f8401126111f057600080fd5b50813567ffffffffffffffff81111561120857600080fd5b6020830191508360208260051b850101111561122357600080fd5b9250929050565b6000806000806040858703121561124057600080fd5b843567ffffffffffffffff8082111561125857600080fd5b611264888389016111de565b9096509450602087013591508082111561127d57600080fd5b5061128a878288016111de565b95989497509550505050565b600181811c908216806112aa57607f821691505b6020821081036112ca57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0383168152604060208201819052600090610652908301846110f2565b80151581146104bf57600080fd5b60006020828403121561131457600080fd5b81516110c1816112f4565b6001600160a01b0384811682528316602082015260606040820181905260009061134b908301846110f2565b95945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061134b604083018486611354565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126113c857600080fd5b83018035915067ffffffffffffffff8211156113e357600080fd5b60200191503681900382131561122357600080fd5b60006020828403121561140a57600080fd5b81356110c1816112f4565b604081526000611429604083018587611354565b90508215156020830152949350505050565b60006001820161145b57634e487b7160e01b600052601160045260246000fd5b5060010190565b6bffffffffffffffffffffffff19813581811691601485101561148f5780818660140360031b1b83161692505b505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a264697066735822122014d6939b50c25980eb5fa59f72f30eb784faf785cd7219c963048ad91aa4c1ad64736f6c634300080d0033", @@ -478,7 +478,7 @@ "storageLayout": { "storage": [ { - "astId": 4452, + "astId": 244, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_initialized", "offset": 0, @@ -486,7 +486,7 @@ "type": "t_uint8" }, { - "astId": 4455, + "astId": 247, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_initializing", "offset": 1, @@ -494,7 +494,7 @@ "type": "t_bool" }, { - "astId": 4985, + "astId": 777, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "__gap", "offset": 0, @@ -502,7 +502,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 4324, + "astId": 116, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_owner", "offset": 0, @@ -510,7 +510,7 @@ "type": "t_address" }, { - "astId": 4444, + "astId": 236, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "__gap", "offset": 0, @@ -518,7 +518,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 4233, + "astId": 25, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_pendingOwner", "offset": 0, @@ -526,7 +526,7 @@ "type": "t_address" }, { - "astId": 4312, + "astId": 104, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "__gap", "offset": 0, @@ -534,15 +534,15 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 8479, + "astId": 1798, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_accessControlManager", "offset": 0, "slot": "151", - "type": "t_contract(IAccessControlManagerV8)8664" + "type": "t_contract(IAccessControlManagerV8)1983" }, { - "astId": 8484, + "astId": 1803, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "__gap", "offset": 0, @@ -550,7 +550,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 10174, + "astId": 2026, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "functionRegistry", "offset": 0, @@ -586,7 +586,7 @@ "label": "bytes4", "numberOfBytes": "4" }, - "t_contract(IAccessControlManagerV8)8664": { + "t_contract(IAccessControlManagerV8)1983": { "encoding": "inplace", "label": "contract IAccessControlManagerV8", "numberOfBytes": "20" diff --git a/deployments/sepolia/XVSBridgeAdmin_Proxy.json b/deployments/sepolia/XVSBridgeAdmin_Proxy.json index 6092086..5296f33 100644 --- a/deployments/sepolia/XVSBridgeAdmin_Proxy.json +++ b/deployments/sepolia/XVSBridgeAdmin_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", + "address": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", "abi": [ { "inputs": [ @@ -146,83 +146,83 @@ "type": "receive" } ], - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", "receipt": { "to": null, "from": "0x03862dFa5D0be8F64509C001cb8C6188194469DF", - "contractAddress": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", - "transactionIndex": 30, + "contractAddress": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", + "transactionIndex": 37, "gasUsed": "796891", - "logsBloom": "0x00000000000000000000000000000100600000000000000000800000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000800000000800000000000000400000000000000000000000000000000000000000000080000000000000800000000000001000000000000000000400000000000000800000000000000000000000020020000000000000000200040000000002000400000000400000000020000000000000000000000000004000000000000800000000000000000000000000", - "blockHash": "0xbfb63d0a497359ffc12c4a4c8fd80bfccfe6a85d4022e3889c4e27b3fc486d07", - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", + "logsBloom": "0x40000000000000000000000000000000400000000000000000800000000000000000000000000000000000000000000000000010000000000000000000008000000000000000000000000000000002000001000000000100000000000000000000000000020000000000000000000800000000800000000000000000000000400000000000000000000000000000000000000000000080000012000000800000000000001000000000000000000400000000000000800000000000000000000100000020000000000000000200040000000000000400000000400000000020000000000000000000000000000000000000000800000000000000000000000000", + "blockHash": "0x4e085045772bbfbf9e91934d0a98e7151fe330ab52a6258f359155a8c31c511f", + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", "logs": [ { - "transactionIndex": 30, - "blockNumber": 4664738, - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", - "address": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", + "transactionIndex": 37, + "blockNumber": 4781343, + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", + "address": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x00000000000000000000000099217e4977d5e49bbad10842672a6dcb49a221a1" + "0x0000000000000000000000009a59dcab13883d6717098816210d3df4b271340b" ], "data": "0x", - "logIndex": 81, - "blockHash": "0xbfb63d0a497359ffc12c4a4c8fd80bfccfe6a85d4022e3889c4e27b3fc486d07" + "logIndex": 23, + "blockHash": "0x4e085045772bbfbf9e91934d0a98e7151fe330ab52a6258f359155a8c31c511f" }, { - "transactionIndex": 30, - "blockNumber": 4664738, - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", - "address": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", + "transactionIndex": 37, + "blockNumber": 4781343, + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", + "address": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x00000000000000000000000003862dfa5d0be8f64509c001cb8c6188194469df" ], "data": "0x", - "logIndex": 82, - "blockHash": "0xbfb63d0a497359ffc12c4a4c8fd80bfccfe6a85d4022e3889c4e27b3fc486d07" + "logIndex": 24, + "blockHash": "0x4e085045772bbfbf9e91934d0a98e7151fe330ab52a6258f359155a8c31c511f" }, { - "transactionIndex": 30, - "blockNumber": 4664738, - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", - "address": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", + "transactionIndex": 37, + "blockNumber": 4781343, + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", + "address": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bf705c00578d43b6147ab4eae04dbbed1cccdc96", - "logIndex": 83, - "blockHash": "0xbfb63d0a497359ffc12c4a4c8fd80bfccfe6a85d4022e3889c4e27b3fc486d07" + "logIndex": 25, + "blockHash": "0x4e085045772bbfbf9e91934d0a98e7151fe330ab52a6258f359155a8c31c511f" }, { - "transactionIndex": 30, - "blockNumber": 4664738, - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", - "address": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", + "transactionIndex": 37, + "blockNumber": 4781343, + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", + "address": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 84, - "blockHash": "0xbfb63d0a497359ffc12c4a4c8fd80bfccfe6a85d4022e3889c4e27b3fc486d07" + "logIndex": 26, + "blockHash": "0x4e085045772bbfbf9e91934d0a98e7151fe330ab52a6258f359155a8c31c511f" }, { - "transactionIndex": 30, - "blockNumber": 4664738, - "transactionHash": "0xdd4d492d5a76274db33c30ca0ae463d7778b725ecaba9be74bbe6608f7436e7b", - "address": "0x2c4a1560fa2635Bd81b3555D449e795cf3AD7591", + "transactionIndex": 37, + "blockNumber": 4781343, + "transactionHash": "0xa69d7d278aeb56ad559924237e1fae8836288d91f44ce2a143976f86c4db60eb", + "address": "0x4A4a5f6Ecc4DB4ad199E8f1Db388FFFb707fad52", "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f707294b965b57ca16f191d8015aab72627c7d6e", - "logIndex": 85, - "blockHash": "0xbfb63d0a497359ffc12c4a4c8fd80bfccfe6a85d4022e3889c4e27b3fc486d07" + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001435866babd91311b1355cf3af488cca36db68e", + "logIndex": 27, + "blockHash": "0x4e085045772bbfbf9e91934d0a98e7151fe330ab52a6258f359155a8c31c511f" } ], - "blockNumber": 4664738, - "cumulativeGasUsed": "6831419", + "blockNumber": 4781343, + "cumulativeGasUsed": "4073134", "status": 1, "byzantium": true }, "args": [ - "0x99217E4977D5e49BBaD10842672a6DCb49a221A1", - "0xf707294B965B57ca16f191D8015AAB72627C7d6e", + "0x9a59dCAB13883D6717098816210D3dF4B271340B", + "0x01435866babd91311b1355cf3af488cca36db68e", "0xc4d66de8000000000000000000000000bf705c00578d43b6147ab4eae04dbbed1cccdc96" ], "numDeployments": 1, diff --git a/deployments/sepolia/XVSProxyOFTDest.json b/deployments/sepolia/XVSProxyOFTDest.json index 0ecabcb..c71dc53 100644 --- a/deployments/sepolia/XVSProxyOFTDest.json +++ b/deployments/sepolia/XVSProxyOFTDest.json @@ -1,5 +1,5 @@ { - "address": "0xbb772AFB415aa20cf2B9585c4a638247Baf4DC22", + "address": "0x307C77D8606d7E486aC5D73d309e16996A336dbd", "abi": [ { "inputs": [ @@ -1729,61 +1729,61 @@ "type": "function" } ], - "transactionHash": "0x33da52d23731de6994dd47f7b2212dd20f1e69decc7b53f159817788743da86f", + "transactionHash": "0xe0add2d8fac6628219dac1dae598a51d2a3b588cca18560ee4be9b11efdbbfbb", "receipt": { "to": null, "from": "0x03862dFa5D0be8F64509C001cb8C6188194469DF", - "contractAddress": "0xbb772AFB415aa20cf2B9585c4a638247Baf4DC22", - "transactionIndex": 14, - "gasUsed": "4539123", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000800000000000040000800000000000000000000000000000000000000000000000000000000000000000080000000000000001000020000400000000000000040000000000020000000000000000000800000000000000000001000000000000400000000000000000000000000000000000000000000000000000000000000080000000001000000000000000100000000000000010000000040000000000000000000000000000000000000200000000000000000000020000400000000020000000000000000000000000000000020000000000000004000000000000000000", - "blockHash": "0x85bdc6807d5f5d9c86c44bebe2ce56f5b02e5ba7940425fc9737fcc43c867bbc", - "transactionHash": "0x33da52d23731de6994dd47f7b2212dd20f1e69decc7b53f159817788743da86f", + "contractAddress": "0x307C77D8606d7E486aC5D73d309e16996A336dbd", + "transactionIndex": 43, + "gasUsed": "4539111", + "logsBloom": "0x00000000800000000000000400000000000000000000000000800000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000080000000000000001000022000000000000004000000000000000020000000000000000000800000000000000000001000000000000400000000000000000000000000000000010000000000000000000000000000080000000001000000000000000100000000000000010000000040000000000000000000000000000000000000200000000000000000000020000400000000020000000000000000000000000000000000000000000000000000000000000000040", + "blockHash": "0xde4b39654763da4fcfca9829ceae2714427be415dd23593100ec99830aa53565", + "transactionHash": "0xe0add2d8fac6628219dac1dae598a51d2a3b588cca18560ee4be9b11efdbbfbb", "logs": [ { - "transactionIndex": 14, - "blockNumber": 4664735, - "transactionHash": "0x33da52d23731de6994dd47f7b2212dd20f1e69decc7b53f159817788743da86f", - "address": "0xbb772AFB415aa20cf2B9585c4a638247Baf4DC22", + "transactionIndex": 43, + "blockNumber": 4781341, + "transactionHash": "0xe0add2d8fac6628219dac1dae598a51d2a3b588cca18560ee4be9b11efdbbfbb", + "address": "0x307C77D8606d7E486aC5D73d309e16996A336dbd", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x00000000000000000000000003862dfa5d0be8f64509c001cb8c6188194469df" ], "data": "0x", - "logIndex": 59, - "blockHash": "0x85bdc6807d5f5d9c86c44bebe2ce56f5b02e5ba7940425fc9737fcc43c867bbc" + "logIndex": 38, + "blockHash": "0xde4b39654763da4fcfca9829ceae2714427be415dd23593100ec99830aa53565" }, { - "transactionIndex": 14, - "blockNumber": 4664735, - "transactionHash": "0x33da52d23731de6994dd47f7b2212dd20f1e69decc7b53f159817788743da86f", - "address": "0xbb772AFB415aa20cf2B9585c4a638247Baf4DC22", + "transactionIndex": 43, + "blockNumber": 4781341, + "transactionHash": "0xe0add2d8fac6628219dac1dae598a51d2a3b588cca18560ee4be9b11efdbbfbb", + "address": "0x307C77D8606d7E486aC5D73d309e16996A336dbd", "topics": [ "0x0b673f021ff9a27bbe58f282908695869e130b3103029190387b83650806c2c3", "0x000000000000000000000000db633c11d3f9e6b8d17ac2c972c9e3b05da59bf9" ], "data": "0x", - "logIndex": 60, - "blockHash": "0x85bdc6807d5f5d9c86c44bebe2ce56f5b02e5ba7940425fc9737fcc43c867bbc" + "logIndex": 39, + "blockHash": "0xde4b39654763da4fcfca9829ceae2714427be415dd23593100ec99830aa53565" }, { - "transactionIndex": 14, - "blockNumber": 4664735, - "transactionHash": "0x33da52d23731de6994dd47f7b2212dd20f1e69decc7b53f159817788743da86f", - "address": "0xbb772AFB415aa20cf2B9585c4a638247Baf4DC22", + "transactionIndex": 43, + "blockNumber": 4781341, + "transactionHash": "0xe0add2d8fac6628219dac1dae598a51d2a3b588cca18560ee4be9b11efdbbfbb", + "address": "0x307C77D8606d7E486aC5D73d309e16996A336dbd", "topics": [ "0x05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000009005091f2e0b20bef6aaf2bd7f21dfd45da8af07" + "0x0000000000000000000000008000eca36201dddf5805aa4befd73d1eb4d23264" ], "data": "0x", - "logIndex": 61, - "blockHash": "0x85bdc6807d5f5d9c86c44bebe2ce56f5b02e5ba7940425fc9737fcc43c867bbc" + "logIndex": 40, + "blockHash": "0xde4b39654763da4fcfca9829ceae2714427be415dd23593100ec99830aa53565" } ], - "blockNumber": 4664735, - "cumulativeGasUsed": "8175118", + "blockNumber": 4781341, + "cumulativeGasUsed": "9868360", "status": 1, "byzantium": true }, @@ -1791,10 +1791,10 @@ "0xDb633C11D3F9E6B8D17aC2c972C9e3B05DA59bF9", 8, "0xae92d5aD7583AD66E49A0c67BAd18F6ba52dDDc1", - "0x9005091f2E0b20bEf6AaF2bD7F21dfd45DA8Af07" + "0x8000eca36201dddf5805Aa4BeFD73d1EB4D23264" ], "numDeployments": 1, - "solcInputHash": "5783c9d97cabcd0faa109c57f1e4ca57", + "solcInputHash": "df53eb8de81c9fdb7d3455a6cb9a397c", "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress_\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"sharedDecimals_\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"lzEndpoint_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracle_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"CallOFTReceivedSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"name\":\"DropFailedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"innerToken\",\"type\":\"address\"}],\"name\":\"InnerTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"NonContractAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOracle\",\"type\":\"address\"}],\"name\":\"OracleChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ReceiveFromChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_payloadHash\",\"type\":\"bytes32\"}],\"name\":\"RetryMessageSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"SendToChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxDailyLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxDailyReceiveLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxSingleReceiveTransactionLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxSingleTransactionLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minDstGas\",\"type\":\"uint256\"}],\"name\":\"SetMinDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"precrime\",\"type\":\"address\"}],\"name\":\"SetPrecrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemoteAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isWhitelist\",\"type\":\"bool\"}],\"name\":\"SetWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"}],\"name\":\"TrustedRemoteRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_PAYLOAD_SIZE_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NO_EXTRA_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND_AND_CALL\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"_from\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasForCall\",\"type\":\"uint256\"}],\"name\":\"callOnOFTReceived\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourReceiveWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourReceived\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourTransferred\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxDailyLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxDailyReceiveLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxSingleReceiveTransactionLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxSingleTransactionLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"circulatingSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"creditedPackets\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"srcChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"srcAddress_\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"nonce_\",\"type\":\"uint64\"}],\"name\":\"dropFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_dstGasForCall\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendAndCallFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"failedMessages\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"forceResumeReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getTrustedRemoteAddress\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lzEndpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"lzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"minDstGasLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"nonblockingLzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"internalType\":\"contract ResilientOracleInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"payloadSizeLimitLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"precrime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"}],\"name\":\"removeTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_dstGasForCall\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"_callParams\",\"type\":\"tuple\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"_callParams\",\"type\":\"tuple\"}],\"name\":\"sendFrom\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_config\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyReceiveLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxSingleReceiveTransactionLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxSingleTransactionLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_packetType\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_minGas\",\"type\":\"uint256\"}],\"name\":\"setMinDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oracleAddress_\",\"type\":\"address\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"}],\"name\":\"setPayloadSizeLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_precrime\",\"type\":\"address\"}],\"name\":\"setPrecrime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setReceiveVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setSendVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"val_\",\"type\":\"bool\"}],\"name\":\"setWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sharedDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"trustedRemoteLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"dropFailedMessage(uint16,bytes,uint64)\":{\"params\":{\"nonce_\":\"Nonce_ of the transaction\",\"srcAddress_\":\"Address of source followed by current bridge address\",\"srcChainId_\":\"Chain id of source\"}},\"estimateSendFee(uint16,bytes32,uint256,bool,bytes)\":{\"details\":\"estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _amount - amount of the tokens to transfer _useZro - indicates to use zro to pay L0 fees _adapterParam - flexible bytes array to indicate messaging adapter services in L0\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"custom:access\":\"Only owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"removeTrustedRemote(uint16)\":{\"params\":{\"remoteChainId_\":\"The chain's id corresponds to setting the trusted remote to empty.\"}},\"sendFrom(address,uint16,bytes32,uint256,(address,address,bytes))\":{\"details\":\"send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from` `_from` the owner of token `_dstChainId` the destination chain identifier `_toAddress` can be any size depending on the `dstChainId`. `_amount` the quantity of tokens in wei `_refundAddress` the address LayerZero refunds if too much message fee is sent `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services\"},\"setMaxDailyLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxDailyLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"Destination chain id.\",\"limit_\":\"Amount in USD(scaled with 18 decimals).\"}},\"setMaxDailyReceiveLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"The destination chain ID.\",\"limit_\":\"The new maximum daily limit in USD(scaled with 18 decimals).\"}},\"setMaxSingleReceiveTransactionLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"The destination chain ID.\",\"limit_\":\"The new maximum limit in USD(scaled with 18 decimals).\"}},\"setMaxSingleTransactionLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"Destination chain id.\",\"limit_\":\"Amount in USD(scaled with 18 decimals).\"}},\"setOracle(address)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits OracleChanged with old and new oracle address.\",\"details\":\"Reverts if the new address is zero.\",\"params\":{\"oracleAddress_\":\"The new address of the ResilientOracle contract.\"}},\"setWhitelist(address,bool)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setWhitelist.\",\"params\":{\"user_\":\"Adress to be add in whitelist.\",\"val_\":\"Boolean to be set (true for user_ address is whitelisted).\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"custom:access\":\"Only owner.\"}},\"title\":\"XVSProxyOFTDest\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"DropFailedMessage(uint16,bytes,uint64)\":{\"notice\":\"Emits when stored message dropped without successfull retrying.\"},\"InnerTokenAdded(address)\":{\"notice\":\"Event emitted when inner token set successfully.\"},\"OracleChanged(address,address)\":{\"notice\":\"Event emitted when oracle is modified.\"},\"SetMaxDailyLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit of transactions from local chain is modified.\"},\"SetMaxDailyReceiveLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\"},\"SetMaxSingleReceiveTransactionLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum limit for a single receive transaction from remote chain is modified.\"},\"SetMaxSingleTransactionLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum limit for a single transaction from local chain is modified.\"},\"SetWhitelist(address,bool)\":{\"notice\":\"Emmited when address is added to whitelist.\"},\"TrustedRemoteRemoved(uint16)\":{\"notice\":\"Event emitted when trusted remote sets to empty.\"}},\"kind\":\"user\",\"methods\":{\"chainIdToLast24HourReceiveWindowStart(uint16)\":{\"notice\":\"Timestamp when the last 24-hour window started from remote chain.\"},\"chainIdToLast24HourReceived(uint16)\":{\"notice\":\"Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\"},\"chainIdToLast24HourTransferred(uint16)\":{\"notice\":\"Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\"},\"chainIdToLast24HourWindowStart(uint16)\":{\"notice\":\"Timestamp when the last 24-hour window started from local chain.\"},\"chainIdToMaxDailyLimit(uint16)\":{\"notice\":\"Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\"},\"chainIdToMaxDailyReceiveLimit(uint16)\":{\"notice\":\"Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\"},\"chainIdToMaxSingleReceiveTransactionLimit(uint16)\":{\"notice\":\"Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\"},\"chainIdToMaxSingleTransactionLimit(uint16)\":{\"notice\":\"Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\"},\"circulatingSupply()\":{\"notice\":\"Returns the total circulating supply of the token on the destination chain i.e (total supply).\"},\"dropFailedMessage(uint16,bytes,uint64)\":{\"notice\":\"Clear failed messages from the storage.\"},\"oracle()\":{\"notice\":\"The address of ResilientOracle contract wrapped in its interface.\"},\"pause()\":{\"notice\":\"Triggers stopped state of the bridge.\"},\"removeTrustedRemote(uint16)\":{\"notice\":\"Remove trusted remote from storage.\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening.\"},\"setMaxDailyLimit(uint16,uint256)\":{\"notice\":\"Sets the limit of daily (24 Hour) transactions amount.\"},\"setMaxDailyReceiveLimit(uint16,uint256)\":{\"notice\":\"Sets the maximum daily limit for receiving transactions.\"},\"setMaxSingleReceiveTransactionLimit(uint16,uint256)\":{\"notice\":\"Sets the maximum limit for a single receive transaction.\"},\"setMaxSingleTransactionLimit(uint16,uint256)\":{\"notice\":\"Sets the limit of single transaction amount.\"},\"setOracle(address)\":{\"notice\":\"Set the address of the ResilientOracle contract.\"},\"setWhitelist(address,bool)\":{\"notice\":\"Sets the whitelist address to skip checks on transaction limit.\"},\"token()\":{\"notice\":\"Return's the address of the inner token of this bridge.\"},\"unpause()\":{\"notice\":\"Triggers resume state of the bridge.\"},\"whitelist(address)\":{\"notice\":\"Address on which cap check and bound limit is not appicable.\"}},\"notice\":\"XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT, and focuses on managing token transfers to the destination chain. It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/XVSProxyOFTDest.sol\":\"XVSProxyOFTDest\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@layerzerolabs/solidity-examples/contracts/libraries/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\n/*\\n * @title Solidity Bytes Arrays Utils\\n * @author Gon\\u00e7alo S\\u00e1 \\n *\\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\\n */\\npragma solidity >=0.8.0 <0.9.0;\\n\\nlibrary BytesLib {\\n function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(\\n 0x40,\\n and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n )\\n )\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(and(fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00), and(mload(mc), mask)))\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint _start,\\n uint _length\\n ) internal pure returns (bytes memory) {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) {\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint _start) internal pure returns (uint8) {\\n require(_bytes.length >= _start + 1, \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint16(bytes memory _bytes, uint _start) internal pure returns (uint16) {\\n require(_bytes.length >= _start + 2, \\\"toUint16_outOfBounds\\\");\\n uint16 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x2), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint32(bytes memory _bytes, uint _start) internal pure returns (uint32) {\\n require(_bytes.length >= _start + 4, \\\"toUint32_outOfBounds\\\");\\n uint32 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x4), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint64(bytes memory _bytes, uint _start) internal pure returns (uint64) {\\n require(_bytes.length >= _start + 8, \\\"toUint64_outOfBounds\\\");\\n uint64 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x8), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint96(bytes memory _bytes, uint _start) internal pure returns (uint96) {\\n require(_bytes.length >= _start + 12, \\\"toUint96_outOfBounds\\\");\\n uint96 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0xc), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint128(bytes memory _bytes, uint _start) internal pure returns (uint128) {\\n require(_bytes.length >= _start + 16, \\\"toUint128_outOfBounds\\\");\\n uint128 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x10), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint256(bytes memory _bytes, uint _start) internal pure returns (uint) {\\n require(_bytes.length >= _start + 32, \\\"toUint256_outOfBounds\\\");\\n uint tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toBytes32(bytes memory _bytes, uint _start) internal pure returns (bytes32) {\\n require(_bytes.length >= _start + 32, \\\"toBytes32_outOfBounds\\\");\\n bytes32 tempBytes32;\\n\\n assembly {\\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempBytes32;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n for {\\n\\n } eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n}\\n\",\"keccak256\":\"0x7e64cccdf22a03f513d94960f2145dd801fb5ec88d971de079b5186a9f5e93c4\",\"license\":\"Unlicense\"},\"@layerzerolabs/solidity-examples/contracts/libraries/ExcessivelySafeCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT OR Apache-2.0\\npragma solidity >=0.7.6;\\n\\nlibrary ExcessivelySafeCall {\\n uint constant LOW_28_MASK = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeCall(\\n address _target,\\n uint _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal returns (bool, bytes memory) {\\n // set up for assembly call\\n uint _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := call(\\n _gas, // gas\\n _target, // recipient\\n 0, // ether value\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeStaticCall(\\n address _target,\\n uint _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal view returns (bool, bytes memory) {\\n // set up for assembly call\\n uint _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := staticcall(\\n _gas, // gas\\n _target, // recipient\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /**\\n * @notice Swaps function selectors in encoded contract calls\\n * @dev Allows reuse of encoded calldata for functions with identical\\n * argument types but different names. It simply swaps out the first 4 bytes\\n * for the new selector. This function modifies memory in place, and should\\n * only be used with caution.\\n * @param _newSelector The new 4-byte selector\\n * @param _buf The encoded contract args\\n */\\n function swapSelector(bytes4 _newSelector, bytes memory _buf) internal pure {\\n require(_buf.length >= 4);\\n uint _mask = LOW_28_MASK;\\n assembly {\\n // load the first word of\\n let _word := mload(add(_buf, 0x20))\\n // mask out the top 4 bytes\\n // /x\\n _word := and(_word, _mask)\\n _word := or(_newSelector, _word)\\n mstore(add(_buf, 0x20), _word)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd4e52af409b5ec80432292d86fb01906785eb78ac31da3bab4565aabcd6e3e56\",\"license\":\"MIT OR Apache-2.0\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/LzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"./interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"./interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\nimport \\\"./interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"../libraries/BytesLib.sol\\\";\\n\\n/*\\n * a generic LzReceiver implementation\\n */\\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using BytesLib for bytes;\\n\\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\\n uint public constant DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\\n\\n ILayerZeroEndpoint public immutable lzEndpoint;\\n mapping(uint16 => bytes) public trustedRemoteLookup;\\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\\n mapping(uint16 => uint) public payloadSizeLimitLookup;\\n address public precrime;\\n\\n event SetPrecrime(address precrime);\\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\\n\\n constructor(address _endpoint) {\\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public virtual override {\\n // lzReceive must be called by the endpoint for security\\n require(_msgSender() == address(lzEndpoint), \\\"LzApp: invalid endpoint caller\\\");\\n\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(\\n _srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote),\\n \\\"LzApp: invalid source sending contract\\\"\\n );\\n\\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\\n function _blockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual;\\n\\n function _lzSend(\\n uint16 _dstChainId,\\n bytes memory _payload,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams,\\n uint _nativeFee\\n ) internal virtual {\\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\\n require(trustedRemote.length != 0, \\\"LzApp: destination chain is not a trusted source\\\");\\n _checkPayloadSize(_dstChainId, _payload.length);\\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _checkGasLimit(\\n uint16 _dstChainId,\\n uint16 _type,\\n bytes memory _adapterParams,\\n uint _extraGas\\n ) internal view virtual {\\n uint providedGasLimit = _getGasLimit(_adapterParams);\\n uint minGasLimit = minDstGasLookup[_dstChainId][_type];\\n require(minGasLimit > 0, \\\"LzApp: minGasLimit not set\\\");\\n require(providedGasLimit >= minGasLimit + _extraGas, \\\"LzApp: gas limit is too low\\\");\\n }\\n\\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\\n require(_adapterParams.length >= 34, \\\"LzApp: invalid adapterParams\\\");\\n assembly {\\n gasLimit := mload(add(_adapterParams, 34))\\n }\\n }\\n\\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\\n if (payloadSizeLimit == 0) {\\n // use default if not set\\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\\n }\\n require(_payloadSize <= payloadSizeLimit, \\\"LzApp: payload size is too large\\\");\\n }\\n\\n //---------------------------UserApplication config----------------------------------------\\n function getConfig(\\n uint16 _version,\\n uint16 _chainId,\\n address,\\n uint _configType\\n ) external view returns (bytes memory) {\\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\\n }\\n\\n // generic config for LayerZero user Application\\n function setConfig(\\n uint16 _version,\\n uint16 _chainId,\\n uint _configType,\\n bytes calldata _config\\n ) external override onlyOwner {\\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\\n }\\n\\n function setSendVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setSendVersion(_version);\\n }\\n\\n function setReceiveVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setReceiveVersion(_version);\\n }\\n\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\\n }\\n\\n // _path = abi.encodePacked(remoteAddress, localAddress)\\n // this function set the trusted path for the cross-chain communication\\n function setTrustedRemote(uint16 _remoteChainId, bytes calldata _path) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = _path;\\n emit SetTrustedRemote(_remoteChainId, _path);\\n }\\n\\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\\n }\\n\\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\\n bytes memory path = trustedRemoteLookup[_remoteChainId];\\n require(path.length != 0, \\\"LzApp: no trusted path record\\\");\\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\\n }\\n\\n function setPrecrime(address _precrime) external onlyOwner {\\n precrime = _precrime;\\n emit SetPrecrime(_precrime);\\n }\\n\\n function setMinDstGas(\\n uint16 _dstChainId,\\n uint16 _packetType,\\n uint _minGas\\n ) external onlyOwner {\\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\\n }\\n\\n // if the size is 0, it means default size limit\\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\\n payloadSizeLimitLookup[_dstChainId] = _size;\\n }\\n\\n //--------------------------- VIEW FUNCTION ----------------------------------------\\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\\n return keccak256(trustedSource) == keccak256(_srcAddress);\\n }\\n}\\n\",\"keccak256\":\"0x309c994bdcf69ad63c6789694a28eb72a773e2d9db58fe572ab2b34a475972ce\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/NonblockingLzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LzApp.sol\\\";\\nimport \\\"../libraries/ExcessivelySafeCall.sol\\\";\\n\\n/*\\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\\n */\\nabstract contract NonblockingLzApp is LzApp {\\n using ExcessivelySafeCall for address;\\n\\n constructor(address _endpoint) LzApp(_endpoint) {}\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\\n\\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\\n\\n // overriding the virtual function in LzReceiver\\n function _blockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual override {\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\\n gasleft(),\\n 150,\\n abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload)\\n );\\n // try-catch all errors/exceptions\\n if (!success) {\\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\\n }\\n }\\n\\n function _storeFailedMessage(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload,\\n bytes memory _reason\\n ) internal virtual {\\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\\n }\\n\\n function nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public virtual {\\n // only internal transaction\\n require(_msgSender() == address(this), \\\"NonblockingLzApp: caller must be LzApp\\\");\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n //@notice override this function\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual;\\n\\n function retryMessage(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public payable virtual {\\n // assert there is message to retry\\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\\n require(payloadHash != bytes32(0), \\\"NonblockingLzApp: no stored message\\\");\\n require(keccak256(_payload) == payloadHash, \\\"NonblockingLzApp: invalid payload\\\");\\n // clear the stored message\\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\\n // execute the message. revert if it fails again\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\\n }\\n}\\n\",\"keccak256\":\"0x612ff1f2a158b7e64e873885b5ff08afa348998fd9005f384d555d643ba7968d\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(\\n uint16 _dstChainId,\\n bytes calldata _destination,\\n bytes calldata _payload,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes calldata _adapterParams\\n ) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n address _dstAddress,\\n uint64 _nonce,\\n uint _gasLimit,\\n bytes calldata _payload\\n ) external;\\n\\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(\\n uint16 _dstChainId,\\n address _userApplication,\\n bytes calldata _payload,\\n bool _payInZRO,\\n bytes calldata _adapterParam\\n ) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n bytes calldata _payload\\n ) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(\\n uint16 _version,\\n uint16 _chainId,\\n address _userApplication,\\n uint _configType\\n ) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xab7fcacc672251c850f00c0abd4100df9afcc4ad70b8d331a2fd4cb07acab9f4\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroReceiver {\\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\\n // @param _srcChainId - the source endpoint identifier\\n // @param _srcAddress - the source sending contract address from the source chain\\n // @param _nonce - the ordered message nonce\\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) external;\\n}\\n\",\"keccak256\":\"0xac1966c1229bd4dc36b6c69eeb94a537bd9aa2198d7623b9ba7f8f7dbe79bb4c\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(\\n uint16 _version,\\n uint16 _chainId,\\n uint _configType,\\n bytes calldata _config\\n ) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xb4df93aeb0fb46373a4fb728ad2603edc8b9a1577eee8d801768dc115bf96498\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OFTCoreV2.sol\\\";\\nimport \\\"./interfaces/IOFTV2.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nabstract contract BaseOFTV2 is OFTCoreV2, ERC165, IOFTV2 {\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) OFTCoreV2(_sharedDecimals, _lzEndpoint) {}\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function sendFrom(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n LzCallParams calldata _callParams\\n ) public payable virtual override {\\n _send(_from, _dstChainId, _toAddress, _amount, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);\\n }\\n\\n function sendAndCall(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes calldata _payload,\\n uint64 _dstGasForCall,\\n LzCallParams calldata _callParams\\n ) public payable virtual override {\\n _sendAndCall(\\n _from,\\n _dstChainId,\\n _toAddress,\\n _amount,\\n _payload,\\n _dstGasForCall,\\n _callParams.refundAddress,\\n _callParams.zroPaymentAddress,\\n _callParams.adapterParams\\n );\\n }\\n\\n /************************************************************************\\n * public view functions\\n ************************************************************************/\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IOFTV2).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n function estimateSendFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bool _useZro,\\n bytes calldata _adapterParams\\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendFee(_dstChainId, _toAddress, _amount, _useZro, _adapterParams);\\n }\\n\\n function estimateSendAndCallFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes calldata _payload,\\n uint64 _dstGasForCall,\\n bool _useZro,\\n bytes calldata _adapterParams\\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendAndCallFee(_dstChainId, _toAddress, _amount, _payload, _dstGasForCall, _useZro, _adapterParams);\\n }\\n\\n function circulatingSupply() public view virtual override returns (uint);\\n\\n function token() public view virtual override returns (address);\\n}\\n\",\"keccak256\":\"0x59d2d32dd14a4f58232b126a7d69608a85f82137bd56d8ce0fc28ff646cba943\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTCoreV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../../lzApp/NonblockingLzApp.sol\\\";\\nimport \\\"../../../libraries/ExcessivelySafeCall.sol\\\";\\nimport \\\"./interfaces/ICommonOFT.sol\\\";\\nimport \\\"./interfaces/IOFTReceiverV2.sol\\\";\\n\\nabstract contract OFTCoreV2 is NonblockingLzApp {\\n using BytesLib for bytes;\\n using ExcessivelySafeCall for address;\\n\\n uint public constant NO_EXTRA_GAS = 0;\\n\\n // packet type\\n uint8 public constant PT_SEND = 0;\\n uint8 public constant PT_SEND_AND_CALL = 1;\\n\\n uint8 public immutable sharedDecimals;\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bool))) public creditedPackets;\\n\\n /**\\n * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\\n * `_nonce` is the outbound nonce\\n */\\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes32 indexed _toAddress, uint _amount);\\n\\n /**\\n * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\\n * `_nonce` is the inbound nonce.\\n */\\n event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\\n\\n event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\\n\\n event NonContractAddress(address _address);\\n\\n // _sharedDecimals should be the minimum decimals on all chains\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\\n sharedDecimals = _sharedDecimals;\\n }\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function callOnOFTReceived(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes32 _from,\\n address _to,\\n uint _amount,\\n bytes calldata _payload,\\n uint _gasForCall\\n ) public virtual {\\n require(_msgSender() == address(this), \\\"OFTCore: caller must be OFTCore\\\");\\n\\n // send\\n _amount = _transferFrom(address(this), _to, _amount);\\n emit ReceiveFromChain(_srcChainId, _to, _amount);\\n\\n // call\\n IOFTReceiverV2(_to).onOFTReceived{gas: _gasForCall}(_srcChainId, _srcAddress, _nonce, _from, _amount, _payload);\\n }\\n\\n /************************************************************************\\n * internal functions\\n ************************************************************************/\\n function _estimateSendFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bool _useZro,\\n bytes memory _adapterParams\\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendFrom()\\n bytes memory payload = _encodeSendPayload(_toAddress, _ld2sd(_amount));\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _estimateSendAndCallFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes memory _payload,\\n uint64 _dstGasForCall,\\n bool _useZro,\\n bytes memory _adapterParams\\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendAndCall()\\n bytes memory payload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(_amount), _payload, _dstGasForCall);\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual override {\\n uint8 packetType = _payload.toUint8(0);\\n\\n if (packetType == PT_SEND) {\\n _sendAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else if (packetType == PT_SEND_AND_CALL) {\\n _sendAndCallAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else {\\n revert(\\\"OFTCore: unknown packet type\\\");\\n }\\n }\\n\\n function _send(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams\\n ) internal virtual returns (uint amount) {\\n _checkGasLimit(_dstChainId, PT_SEND, _adapterParams, NO_EXTRA_GAS);\\n\\n (amount, ) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount); // amount returned should not have dust\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n bytes memory lzPayload = _encodeSendPayload(_toAddress, _ld2sd(amount));\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAck(\\n uint16 _srcChainId,\\n bytes memory,\\n uint64,\\n bytes memory _payload\\n ) internal virtual {\\n (address to, uint64 amountSD) = _decodeSendPayload(_payload);\\n if (to == address(0)) {\\n to = address(0xdead);\\n }\\n\\n uint amount = _sd2ld(amountSD);\\n amount = _creditTo(_srcChainId, to, amount);\\n\\n emit ReceiveFromChain(_srcChainId, to, amount);\\n }\\n\\n function _sendAndCall(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes memory _payload,\\n uint64 _dstGasForCall,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams\\n ) internal virtual returns (uint amount) {\\n _checkGasLimit(_dstChainId, PT_SEND_AND_CALL, _adapterParams, _dstGasForCall);\\n\\n (amount, ) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount);\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n // encode the msg.sender into the payload instead of _from\\n bytes memory lzPayload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(amount), _payload, _dstGasForCall);\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAndCallAck(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual {\\n (bytes32 from, address to, uint64 amountSD, bytes memory payloadForCall, uint64 gasForCall) = _decodeSendAndCallPayload(_payload);\\n\\n bool credited = creditedPackets[_srcChainId][_srcAddress][_nonce];\\n uint amount = _sd2ld(amountSD);\\n\\n // credit to this contract first, and then transfer to receiver only if callOnOFTReceived() succeeds\\n if (!credited) {\\n amount = _creditTo(_srcChainId, address(this), amount);\\n creditedPackets[_srcChainId][_srcAddress][_nonce] = true;\\n }\\n\\n if (!_isContract(to)) {\\n emit NonContractAddress(to);\\n return;\\n }\\n\\n // workaround for stack too deep\\n uint16 srcChainId = _srcChainId;\\n bytes memory srcAddress = _srcAddress;\\n uint64 nonce = _nonce;\\n bytes memory payload = _payload;\\n bytes32 from_ = from;\\n address to_ = to;\\n uint amount_ = amount;\\n bytes memory payloadForCall_ = payloadForCall;\\n\\n // no gas limit for the call if retry\\n uint gas = credited ? gasleft() : gasForCall;\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\\n gasleft(),\\n 150,\\n abi.encodeWithSelector(this.callOnOFTReceived.selector, srcChainId, srcAddress, nonce, from_, to_, amount_, payloadForCall_, gas)\\n );\\n\\n if (success) {\\n bytes32 hash = keccak256(payload);\\n emit CallOFTReceivedSuccess(srcChainId, srcAddress, nonce, hash);\\n } else {\\n // store the failed message into the nonblockingLzApp\\n _storeFailedMessage(srcChainId, srcAddress, nonce, payload, reason);\\n }\\n }\\n\\n function _isContract(address _account) internal view returns (bool) {\\n return _account.code.length > 0;\\n }\\n\\n function _ld2sd(uint _amount) internal view virtual returns (uint64) {\\n uint amountSD = _amount / _ld2sdRate();\\n require(amountSD <= type(uint64).max, \\\"OFTCore: amountSD overflow\\\");\\n return uint64(amountSD);\\n }\\n\\n function _sd2ld(uint64 _amountSD) internal view virtual returns (uint) {\\n return _amountSD * _ld2sdRate();\\n }\\n\\n function _removeDust(uint _amount) internal view virtual returns (uint amountAfter, uint dust) {\\n dust = _amount % _ld2sdRate();\\n amountAfter = _amount - dust;\\n }\\n\\n function _encodeSendPayload(bytes32 _toAddress, uint64 _amountSD) internal view virtual returns (bytes memory) {\\n return abi.encodePacked(PT_SEND, _toAddress, _amountSD);\\n }\\n\\n function _decodeSendPayload(bytes memory _payload) internal view virtual returns (address to, uint64 amountSD) {\\n require(_payload.toUint8(0) == PT_SEND && _payload.length == 41, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n }\\n\\n function _encodeSendAndCallPayload(\\n address _from,\\n bytes32 _toAddress,\\n uint64 _amountSD,\\n bytes memory _payload,\\n uint64 _dstGasForCall\\n ) internal view virtual returns (bytes memory) {\\n return abi.encodePacked(PT_SEND_AND_CALL, _toAddress, _amountSD, _addressToBytes32(_from), _dstGasForCall, _payload);\\n }\\n\\n function _decodeSendAndCallPayload(bytes memory _payload)\\n internal\\n view\\n virtual\\n returns (\\n bytes32 from,\\n address to,\\n uint64 amountSD,\\n bytes memory payload,\\n uint64 dstGasForCall\\n )\\n {\\n require(_payload.toUint8(0) == PT_SEND_AND_CALL, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n from = _payload.toBytes32(41);\\n dstGasForCall = _payload.toUint64(73);\\n payload = _payload.slice(81, _payload.length - 81);\\n }\\n\\n function _addressToBytes32(address _address) internal pure virtual returns (bytes32) {\\n return bytes32(uint(uint160(_address)));\\n }\\n\\n function _debitFrom(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _creditTo(\\n uint16 _srcChainId,\\n address _toAddress,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _transferFrom(\\n address _from,\\n address _to,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _ld2sdRate() internal view virtual returns (uint);\\n}\\n\",\"keccak256\":\"0x96cf7a10c5af4243822d25e77985a4a46d12264f839593ded5378cd6519a8df0\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/ICommonOFT.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface ICommonOFT is IERC165 {\\n\\n struct LzCallParams {\\n address payable refundAddress;\\n address zroPaymentAddress;\\n bytes adapterParams;\\n }\\n\\n /**\\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\\n * _dstChainId - L0 defined chain id to send tokens too\\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n * _amount - amount of the tokens to transfer\\n * _useZro - indicates to use zro to pay L0 fees\\n * _adapterParam - flexible bytes array to indicate messaging adapter services in L0\\n */\\n function estimateSendFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n function estimateSendAndCallFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n /**\\n * @dev returns the circulating amount of tokens on current chain\\n */\\n function circulatingSupply() external view returns (uint);\\n\\n /**\\n * @dev returns the address of the ERC20 token\\n */\\n function token() external view returns (address);\\n}\\n\",\"keccak256\":\"0x1d034ba786436c1fce8057352c87373098bd1d8026b24c8fbc7be28636d0c15d\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTReceiverV2.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.5.0;\\n\\ninterface IOFTReceiverV2 {\\n /**\\n * @dev Called by the OFT contract when tokens are received from source chain.\\n * @param _srcChainId The chain id of the source chain.\\n * @param _srcAddress The address of the OFT token contract on the source chain.\\n * @param _nonce The nonce of the transaction on the source chain.\\n * @param _from The address of the account who calls the sendAndCall() on the source chain.\\n * @param _amount The amount of tokens to transfer.\\n * @param _payload Additional data with no specified format.\\n */\\n function onOFTReceived(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes32 _from, uint _amount, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0xf57e437ced3bc10bb333123bb49475dab47c7615b86401c4d872c29ad4928fd5\",\"license\":\"BUSL-1.1\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ICommonOFT.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface IOFTV2 is ICommonOFT {\\n\\n /**\\n * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`\\n * `_from` the owner of token\\n * `_dstChainId` the destination chain identifier\\n * `_toAddress` can be any size depending on the `dstChainId`.\\n * `_amount` the quantity of tokens in wei\\n * `_refundAddress` the address LayerZero refunds if too much message fee is sent\\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\\n */\\n function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, LzCallParams calldata _callParams) external payable;\\n\\n function sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, LzCallParams calldata _callParams) external payable;\\n}\\n\",\"keccak256\":\"0xb1d31f341715347d49db4e2c0de27c49bbd70b5b3d9b0adb1050b2b3a305ab87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\ninterface OracleInterface {\\n function getPrice(address asset) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n\\n function updateAssetPrice(address asset) external;\\n\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address asset) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address asset,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x40031b19684ca0c912e794d08c2c0b0d8be77d3c1bdc937830a0658eff899650\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { EXP_SCALE as EXP_SCALE_, MANTISSA_ONE as MANTISSA_ONE_ } from \\\"./constants.sol\\\";\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Compound\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract ExponentialNoError {\\n struct Exp {\\n uint256 mantissa;\\n }\\n\\n struct Double {\\n uint256 mantissa;\\n }\\n\\n uint256 internal constant EXP_SCALE = EXP_SCALE_;\\n uint256 internal constant DOUBLE_SCALE = 1e36;\\n uint256 internal constant HALF_EXP_SCALE = EXP_SCALE / 2;\\n uint256 internal constant MANTISSA_ONE = MANTISSA_ONE_;\\n\\n /**\\n * @dev Truncates the given exp to a whole number value.\\n * For example, truncate(Exp{mantissa: 15 * EXP_SCALE}) = 15\\n */\\n function truncate(Exp memory exp) internal pure returns (uint256) {\\n // Note: We are not using careful math here as we're performing a division that cannot fail\\n return exp.mantissa / EXP_SCALE;\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function mul_ScalarTruncate(Exp memory a, uint256 scalar) internal pure returns (uint256) {\\n Exp memory product = mul_(a, scalar);\\n return truncate(product);\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function mul_ScalarTruncateAddUInt(Exp memory a, uint256 scalar, uint256 addend) internal pure returns (uint256) {\\n Exp memory product = mul_(a, scalar);\\n return add_(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Checks if first Exp is less than second Exp.\\n */\\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa < right.mantissa;\\n }\\n\\n function safe224(uint256 n, string memory errorMessage) internal pure returns (uint224) {\\n require(n <= type(uint224).max, errorMessage);\\n return uint224(n);\\n }\\n\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n <= type(uint32).max, errorMessage);\\n return uint32(n);\\n }\\n\\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / EXP_SCALE });\\n }\\n\\n function mul_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint256 a, Exp memory b) internal pure returns (uint256) {\\n return mul_(a, b.mantissa) / EXP_SCALE;\\n }\\n\\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / DOUBLE_SCALE });\\n }\\n\\n function mul_(Double memory a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint256 a, Double memory b) internal pure returns (uint256) {\\n return mul_(a, b.mantissa) / DOUBLE_SCALE;\\n }\\n\\n function mul_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(mul_(a.mantissa, EXP_SCALE), b.mantissa) });\\n }\\n\\n function div_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint256 a, Exp memory b) internal pure returns (uint256) {\\n return div_(mul_(a, EXP_SCALE), b.mantissa);\\n }\\n\\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a.mantissa, DOUBLE_SCALE), b.mantissa) });\\n }\\n\\n function div_(Double memory a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint256 a, Double memory b) internal pure returns (uint256) {\\n return div_(mul_(a, DOUBLE_SCALE), b.mantissa);\\n }\\n\\n function div_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n function fraction(uint256 a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a, DOUBLE_SCALE), b) });\\n }\\n}\\n\",\"keccak256\":\"0x6cf5430c2db151ab24ef0f567ed443c0b75b8b6051a62cacbe83f28b16834605\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/constants.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\\nuint256 constant EXP_SCALE = 1e18;\\n\\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\\nuint256 constant MANTISSA_ONE = EXP_SCALE;\\n\",\"keccak256\":\"0x44de02d7837ee1d4dcf6e9f5e783e9d9e0bec0154f23f5661fb54810cff9f892\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0x909eb76841ebd57d8f53686b76b1a09da7bbbbcddb29510c41674d5aa84c713e\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/BaseXVSProxyOFT.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { ResilientOracleInterface } from \\\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\\\";\\nimport { Pausable } from \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport { BaseOFTV2 } from \\\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { ExponentialNoError } from \\\"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\\\";\\n\\n/**\\n * @title BaseXVSProxyOFT\\n * @author Venus\\n * @notice The BaseXVSProxyOFT contract is tailored for facilitating cross-chain transactions with an ERC20 token.\\n * It manages transaction limits of a single and daily transactions.\\n * This contract inherits key functionalities from other contracts, including pausing capabilities and error handling.\\n * It holds state variables for the inner token and maps for tracking transaction limits and statistics across various chains and addresses.\\n * The contract allows the owner to configure limits, set whitelists, and control pausing.\\n * Internal functions conduct eligibility check of transactions, making the contract a fundamental component for cross-chain token management.\\n */\\n\\nabstract contract BaseXVSProxyOFT is Pausable, ExponentialNoError, BaseOFTV2 {\\n using SafeERC20 for IERC20;\\n IERC20 internal immutable innerToken;\\n uint256 internal immutable ld2sdRate;\\n\\n /**\\n * @notice The address of ResilientOracle contract wrapped in its interface.\\n */\\n ResilientOracleInterface public oracle;\\n /**\\n * @notice Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxSingleTransactionLimit;\\n /**\\n * @notice Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxDailyLimit;\\n /**\\n * @notice Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourTransferred;\\n /**\\n * @notice Timestamp when the last 24-hour window started from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourWindowStart;\\n /**\\n * @notice Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxSingleReceiveTransactionLimit;\\n /**\\n * @notice Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxDailyReceiveLimit;\\n /**\\n * @notice Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourReceived;\\n /**\\n * @notice Timestamp when the last 24-hour window started from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourReceiveWindowStart;\\n /**\\n * @notice Address on which cap check and bound limit is not appicable.\\n */\\n mapping(address => bool) public whitelist;\\n\\n /**\\n * @notice Emmited when address is added to whitelist.\\n */\\n event SetWhitelist(address indexed addr, bool isWhitelist);\\n /**\\n * @notice Emitted when the maximum limit for a single transaction from local chain is modified.\\n */\\n event SetMaxSingleTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum daily limit of transactions from local chain is modified.\\n */\\n event SetMaxDailyLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum limit for a single receive transaction from remote chain is modified.\\n */\\n event SetMaxSingleReceiveTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\\n */\\n event SetMaxDailyReceiveLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Event emitted when oracle is modified.\\n */\\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\\n /**\\n * @notice Event emitted when trusted remote sets to empty.\\n */\\n event TrustedRemoteRemoved(uint16 chainId);\\n /**\\n * @notice Event emitted when inner token set successfully.\\n */\\n event InnerTokenAdded(address indexed innerToken);\\n\\n /**\\n * @param tokenAddress_ Address of the inner token.\\n * @param sharedDecimals_ No of shared decimals.\\n * @param lzEndpoint_ Address of the layer zero endpoint contract.\\n * @param oracle_ Address of the price oracle.\\n * @custom:error ZeroAddressNotAllowed is thrown when token contract address is zero.\\n * @custom:error ZeroAddressNotAllowed is thrown when lzEndpoint contract address is zero.\\n * @custom:error ZeroAddressNotAllowed is thrown when oracle contract address is zero.\\n */\\n constructor(\\n address tokenAddress_,\\n uint8 sharedDecimals_,\\n address lzEndpoint_,\\n address oracle_\\n ) BaseOFTV2(sharedDecimals_, lzEndpoint_) {\\n ensureNonzeroAddress(tokenAddress_);\\n ensureNonzeroAddress(lzEndpoint_);\\n\\n innerToken = IERC20(tokenAddress_);\\n\\n (bool success, bytes memory data) = tokenAddress_.staticcall(abi.encodeWithSignature(\\\"decimals()\\\"));\\n require(success, \\\"ProxyOFT: failed to get token decimals\\\");\\n uint8 decimals = abi.decode(data, (uint8));\\n\\n require(sharedDecimals_ <= decimals, \\\"ProxyOFT: sharedDecimals must be <= decimals\\\");\\n ld2sdRate = 10 ** (decimals - sharedDecimals_);\\n\\n ensureNonzeroAddress(oracle_);\\n\\n emit InnerTokenAdded(tokenAddress_);\\n emit OracleChanged(address(0), oracle_);\\n\\n oracle = ResilientOracleInterface(oracle_);\\n }\\n\\n /**\\n * @notice Set the address of the ResilientOracle contract.\\n * @dev Reverts if the new address is zero.\\n * @param oracleAddress_ The new address of the ResilientOracle contract.\\n * @custom:access Only owner.\\n * @custom:event Emits OracleChanged with old and new oracle address.\\n */\\n function setOracle(address oracleAddress_) external onlyOwner {\\n ensureNonzeroAddress(oracleAddress_);\\n emit OracleChanged(address(oracle), oracleAddress_);\\n oracle = ResilientOracleInterface(oracleAddress_);\\n }\\n\\n /**\\n * @notice Sets the limit of single transaction amount.\\n * @param chainId_ Destination chain id.\\n * @param limit_ Amount in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\\n */\\n function setMaxSingleTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ <= chainIdToMaxDailyLimit[chainId_], \\\"Single transaction limit > Daily limit\\\");\\n emit SetMaxSingleTransactionLimit(chainId_, chainIdToMaxSingleTransactionLimit[chainId_], limit_);\\n chainIdToMaxSingleTransactionLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the limit of daily (24 Hour) transactions amount.\\n * @param chainId_ Destination chain id.\\n * @param limit_ Amount in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxDailyLimit with old and new limit associated with chain id.\\n */\\n function setMaxDailyLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ >= chainIdToMaxSingleTransactionLimit[chainId_], \\\"Daily limit < single transaction limit\\\");\\n emit SetMaxDailyLimit(chainId_, chainIdToMaxDailyLimit[chainId_], limit_);\\n chainIdToMaxDailyLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the maximum limit for a single receive transaction.\\n * @param chainId_ The destination chain ID.\\n * @param limit_ The new maximum limit in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\\n */\\n function setMaxSingleReceiveTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ <= chainIdToMaxDailyReceiveLimit[chainId_], \\\"single receive transaction limit > Daily limit\\\");\\n emit SetMaxSingleReceiveTransactionLimit(chainId_, chainIdToMaxSingleReceiveTransactionLimit[chainId_], limit_);\\n chainIdToMaxSingleReceiveTransactionLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the maximum daily limit for receiving transactions.\\n * @param chainId_ The destination chain ID.\\n * @param limit_ The new maximum daily limit in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\\n */\\n function setMaxDailyReceiveLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(\\n limit_ >= chainIdToMaxSingleReceiveTransactionLimit[chainId_],\\n \\\"Daily limit < single receive transaction limit\\\"\\n );\\n emit SetMaxDailyReceiveLimit(chainId_, chainIdToMaxDailyReceiveLimit[chainId_], limit_);\\n chainIdToMaxDailyReceiveLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the whitelist address to skip checks on transaction limit.\\n * @param user_ Adress to be add in whitelist.\\n * @param val_ Boolean to be set (true for user_ address is whitelisted).\\n * @custom:access Only owner.\\n * @custom:event Emits setWhitelist.\\n */\\n function setWhitelist(address user_, bool val_) external onlyOwner {\\n emit SetWhitelist(user_, val_);\\n whitelist[user_] = val_;\\n }\\n\\n /**\\n * @notice Triggers stopped state of the bridge.\\n * @custom:access Only owner.\\n */\\n function pause() external onlyOwner {\\n _pause();\\n }\\n\\n /**\\n * @notice Triggers resume state of the bridge.\\n * @custom:access Only owner.\\n */\\n function unpause() external onlyOwner {\\n _unpause();\\n }\\n\\n /**\\n * @notice Remove trusted remote from storage.\\n * @param remoteChainId_ The chain's id corresponds to setting the trusted remote to empty.\\n */\\n function removeTrustedRemote(uint16 remoteChainId_) external onlyOwner {\\n delete trustedRemoteLookup[remoteChainId_];\\n emit TrustedRemoteRemoved(remoteChainId_);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @notice Return's the address of the inner token of this bridge.\\n */\\n function token() public view override returns (address) {\\n return address(innerToken);\\n }\\n\\n function _isEligibleToSend(address from_, uint16 dstChainId_, uint256 amount_) internal {\\n // Check if the sender's address is whitelisted\\n bool isWhiteListedUser = whitelist[from_];\\n // Check if the user is whitelisted and return if true\\n if (isWhiteListedUser) {\\n return;\\n }\\n\\n // Calculate the amount in USD using the oracle price\\n uint256 amountInUsd;\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\\n\\n // Load values for the 24-hour window checks\\n uint256 currentBlockTimestamp = block.timestamp;\\n uint256 lastDayWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\\n uint256 transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\\n uint256 maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\\n uint256 maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\\n\\n // Revert if the amount exceeds the single transaction limit\\n require(amountInUsd <= maxSingleTransactionLimit, \\\"Single Transaction Limit Exceed\\\");\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - lastDayWindowStart > 1 days) {\\n transferredInWindow = amountInUsd;\\n chainIdToLast24HourWindowStart[dstChainId_] = currentBlockTimestamp;\\n } else {\\n transferredInWindow += amountInUsd;\\n }\\n\\n // Revert if the amount exceeds the daily limit\\n require(transferredInWindow <= maxDailyLimit, \\\"Daily Transaction Limit Exceed\\\");\\n\\n // Update the amount for the 24-hour window\\n chainIdToLast24HourTransferred[dstChainId_] = transferredInWindow;\\n }\\n\\n function _isEligibleToReceive(address toAddress_, uint16 srcChainId_, uint256 receivedAmount_) internal {\\n // Check if the recipient's address is whitelisted\\n bool isWhiteListedUser = whitelist[toAddress_];\\n // Check if the user is whitelisted and return if true\\n if (isWhiteListedUser) {\\n return;\\n }\\n\\n // Calculate the received amount in USD using the oracle price\\n uint256 receivedAmountInUsd;\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(address(token())) });\\n receivedAmountInUsd = mul_ScalarTruncate(oraclePrice, receivedAmount_);\\n\\n uint256 currentBlockTimestamp = block.timestamp;\\n\\n // Load values for the 24-hour window checks for receiving\\n uint256 lastDayReceiveWindowStart = chainIdToLast24HourReceiveWindowStart[srcChainId_];\\n uint256 receivedInWindow = chainIdToLast24HourReceived[srcChainId_];\\n uint256 maxSingleReceiveTransactionLimit = chainIdToMaxSingleReceiveTransactionLimit[srcChainId_];\\n uint256 maxDailyReceiveLimit = chainIdToMaxDailyReceiveLimit[srcChainId_];\\n\\n // Check if the received amount exceeds the single transaction limit\\n require(receivedAmountInUsd <= maxSingleReceiveTransactionLimit, \\\"Single Transaction Limit Exceed\\\");\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - lastDayReceiveWindowStart > 1 days) {\\n receivedInWindow = receivedAmountInUsd;\\n chainIdToLast24HourReceiveWindowStart[srcChainId_] = currentBlockTimestamp;\\n } else {\\n receivedInWindow += receivedAmountInUsd;\\n }\\n\\n // Revert if the received amount exceeds the daily limit\\n require(receivedInWindow <= maxDailyReceiveLimit, \\\"Daily Transaction Limit Exceed\\\");\\n\\n // Update the received amount for the 24-hour window\\n chainIdToLast24HourReceived[srcChainId_] = receivedInWindow;\\n }\\n\\n function _transferFrom(\\n address from_,\\n address to_,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n uint256 before = innerToken.balanceOf(to_);\\n if (from_ == address(this)) {\\n innerToken.safeTransfer(to_, amount_);\\n } else {\\n innerToken.safeTransferFrom(from_, to_, amount_);\\n }\\n return innerToken.balanceOf(to_) - before;\\n }\\n\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal override {\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(\\n _srcAddress.length == trustedRemote.length &&\\n trustedRemote.length > 0 &&\\n keccak256(_srcAddress) == keccak256(trustedRemote),\\n \\\"LzApp: invalid source sending contract\\\"\\n );\\n super._nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n function _ld2sdRate() internal view override returns (uint256) {\\n return ld2sdRate;\\n }\\n}\\n\",\"keccak256\":\"0x7030de25abd4194b3a359d485fbb5a4001ac53da49d62c87e1847fe98226ec5c\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/XVSProxyOFTDest.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { IXVS } from \\\"./interfaces/IXVS.sol\\\";\\nimport { BaseXVSProxyOFT } from \\\"./BaseXVSProxyOFT.sol\\\";\\n\\n/**\\n * @title XVSProxyOFTDest\\n * @author Venus\\n * @notice XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT,\\n * and focuses on managing token transfers to the destination chain.\\n * It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.\\n */\\n\\ncontract XVSProxyOFTDest is BaseXVSProxyOFT {\\n /**\\n * @notice Emits when stored message dropped without successfull retrying.\\n */\\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\\n\\n constructor(\\n address tokenAddress_,\\n uint8 sharedDecimals_,\\n address lzEndpoint_,\\n address oracle_\\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\\n\\n /** @notice Clear failed messages from the storage.\\n * @param srcChainId_ Chain id of source\\n * @param srcAddress_ Address of source followed by current bridge address\\n * @param nonce_ Nonce_ of the transaction\\n */\\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\\n }\\n\\n /**\\n * @notice Returns the total circulating supply of the token on the destination chain i.e (total supply).\\n */\\n function circulatingSupply() public view override returns (uint256) {\\n return innerToken.totalSupply();\\n }\\n\\n function _debitFrom(\\n address from_,\\n uint16 dstChainId_,\\n bytes32,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n require(from_ == _msgSender(), \\\"ProxyOFT: owner is not send caller\\\");\\n _isEligibleToSend(from_, dstChainId_, amount_);\\n IXVS(address(innerToken)).burn(from_, amount_);\\n return amount_;\\n }\\n\\n function _creditTo(\\n uint16 srcChainId_,\\n address toAddress_,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\\n IXVS(address(innerToken)).mint(toAddress_, amount_);\\n return amount_;\\n }\\n}\\n\",\"keccak256\":\"0x94e3fb2b5ac5ac30ce5d6833c23e151a0fd95310a8621288f1608e13bc1a4677\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/interfaces/IXVS.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/**\\n * @title IXVS\\n * @author Venus\\n * @notice Interface implemented by `XVS` token.\\n */\\ninterface IXVS {\\n function mint(address to, uint256 amount) external;\\n\\n function burn(address from, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x55c954155c4499e8ef1915ad28c5567c247e4397dc12ba553b33c5edb1114dba\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", "bytecode": "0x6101006040523480156200001257600080fd5b506040516200562038038062005620833981016040819052620000359162000373565b6000805460ff19169055838383838282818180806200005433620002c0565b6001600160a01b0316608052505060ff1660a052506200007690508462000319565b620000818262000319565b6001600160a01b03841660c081905260408051600481526024810182526020810180516001600160e01b031663313ce56760e01b179052905160009283929091620000cd9190620003d0565b600060405180830381855afa9150503d80600081146200010a576040519150601f19603f3d011682016040523d82523d6000602084013e6200010f565b606091505b509150915081620001765760405162461bcd60e51b815260206004820152602660248201527f50726f78794f46543a206661696c656420746f2067657420746f6b656e20646560448201526563696d616c7360d01b60648201526084015b60405180910390fd5b6000818060200190518101906200018e91906200040e565b90508060ff168660ff161115620001fd5760405162461bcd60e51b815260206004820152602c60248201527f50726f78794f46543a20736861726564446563696d616c73206d75737420626560448201526b203c3d20646563696d616c7360a01b60648201526084016200016d565b62000209868262000449565b6200021690600a6200056e565b60e052620002248462000319565b6040516001600160a01b038816907f0b673f021ff9a27bbe58f282908695869e130b3103029190387b83650806c2c390600090a26040516001600160a01b038516906000907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd908290a35050600780546001600160a01b0319166001600160a01b039390931692909217909155506200057f9650505050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03811662000341576040516342bcdf7f60e11b815260040160405180910390fd5b50565b80516001600160a01b03811681146200035c57600080fd5b919050565b805160ff811681146200035c57600080fd5b600080600080608085870312156200038a57600080fd5b620003958562000344565b9350620003a56020860162000361565b9250620003b56040860162000344565b9150620003c56060860162000344565b905092959194509250565b6000825160005b81811015620003f35760208186018101518583015201620003d7565b8181111562000403576000828501525b509190910192915050565b6000602082840312156200042157600080fd5b6200042c8262000361565b9392505050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff84168082101562000466576200046662000433565b90039392505050565b600181815b80851115620004b057816000190482111562000494576200049462000433565b80851615620004a257918102915b93841c939080029062000474565b509250929050565b600082620004c95750600162000568565b81620004d85750600062000568565b8160018114620004f15760028114620004fc576200051c565b600191505062000568565b60ff84111562000510576200051062000433565b50506001821b62000568565b5060208310610133831016604e8410600b841016171562000541575081810a62000568565b6200054d83836200046f565b806000190482111562000564576200056462000433565b0290505b92915050565b60006200042c60ff841683620004b8565b60805160a05160c05160e051614fdb6200064560003960008181612c4901528181612e7401526139c6015260008181610bbd0152818161183901528181612933015281816129bf015281816129f801528181612a4101528181612f4a0152818161362401528181613a2f0152613c80015260006107f40152600081816109f401528181610c1101528181610e5801528181610f00015281816111cc01528181611b6b01528181612165015281816123280152818161287901526130d80152614fdb6000f3fe60806040526004361061038b5760003560e01c80638456cb59116101dc578063baf3292d11610102578063df2a5b3b116100a0578063f2fde38b1161006f578063f2fde38b14610b6e578063f5ecbdbc14610b8e578063fc0c546a14610bae578063fdff235b14610be157600080fd5b8063df2a5b3b14610af9578063e6a20ae614610b19578063eaffd49a14610b2e578063eb8d72b714610b4e57600080fd5b8063cc01e9b6116100dc578063cc01e9b614610a6c578063cc7015ae14610a8c578063d1deba1f14610ab9578063d708a46814610acc57600080fd5b8063baf3292d14610a16578063c446183414610a36578063cbed8b9c14610a4c57600080fd5b806393a61d6c1161017a5780639f38369a116101495780639f38369a14610982578063a4c51df5146109a2578063a6c3d165146109c2578063b353aaa7146109e257600080fd5b806393a61d6c146108b3578063950c8a74146108e05780639b19251a146109005780639bdb98121461093057600080fd5b80638cfd8f5c116101b65780638cfd8f5c146108165780638da5cb5b1461084e57806390436567146108715780639358928b1461089e57600080fd5b80638456cb59146107ad57806384e69c69146107c2578063857749b0146107e257600080fd5b80634c42899a116102c157806366ad5c8a1161025f5780637533d7881161022e5780637533d7881461071557806376203b48146107425780637adbf973146107555780637dc0d1d01461077557600080fd5b806366ad5c8a146106b6578063695ef6bf146106d657806369c1e7b8146106e9578063715018a61461070957600080fd5b806353489d6c1161029b57806353489d6c1461060f57806353d6fd591461062f5780635b8c41e61461064f5780635c975abb1461069e57600080fd5b80634c42899a1461058e5780634cec6256146105b55780634f4ba0f4146105e257600080fd5b8063365260b41161032e5780633f1f4fa4116103085780633f1f4fa4146105175780633f4ba83a1461054457806342d65a8d14610559578063447705151461057957600080fd5b8063365260b4146104875780633c4ec39b146104bc5780633d8b38f6146104f757600080fd5b80630df374831161036a5780630df374831461040757806310ddb137146104275780632488eec8146104475780632dbbec081461046757600080fd5b80621d35671461039057806301ffc9a7146103b257806307e0db17146103e7575b600080fd5b34801561039c57600080fd5b506103b06103ab366004614239565b610c0e565b005b3480156103be57600080fd5b506103d26103cd3660046142cc565b610e00565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b506103b06104023660046142f6565b610e37565b34801561041357600080fd5b506103b0610422366004614311565b610ec0565b34801561043357600080fd5b506103b06104423660046142f6565b610edf565b34801561045357600080fd5b506103b0610462366004614311565b610f37565b34801561047357600080fd5b506103b06104823660046142f6565b61101b565b34801561049357600080fd5b506104a76104a2366004614349565b61107a565b604080519283526020830191909152016103de565b3480156104c857600080fd5b506104e96104d73660046142f6565b600d6020526000908152604090205481565b6040519081526020016103de565b34801561050357600080fd5b506103d26105123660046143b0565b6110cf565b34801561052357600080fd5b506104e96105323660046142f6565b60036020526000908152604090205481565b34801561055057600080fd5b506103b061119b565b34801561056557600080fd5b506103b06105743660046143b0565b6111ad565b34801561058557600080fd5b506104e9600081565b34801561059a57600080fd5b506105a3600081565b60405160ff90911681526020016103de565b3480156105c157600080fd5b506104e96105d03660046142f6565b600a6020526000908152604090205481565b3480156105ee57600080fd5b506104e96105fd3660046142f6565b60096020526000908152604090205481565b34801561061b57600080fd5b506103b061062a366004614311565b611233565b34801561063b57600080fd5b506103b061064a366004614417565b611317565b34801561065b57600080fd5b506104e961066a3660046144bd565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156106aa57600080fd5b5060005460ff166103d2565b3480156106c257600080fd5b506103b06106d1366004614239565b61138f565b6103b06106e4366004614575565b61146b565b3480156106f557600080fd5b506103b0610704366004614311565b6114d6565b3480156103b057600080fd5b34801561072157600080fd5b506107356107303660046142f6565b6115c2565b6040516103de9190614640565b6103b0610750366004614653565b61165c565b34801561076157600080fd5b506103b0610770366004614705565b61170b565b34801561078157600080fd5b50600754610795906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b3480156107b957600080fd5b506103b0611778565b3480156107ce57600080fd5b506103b06107dd3660046144bd565b611788565b3480156107ee57600080fd5b506105a37f000000000000000000000000000000000000000000000000000000000000000081565b34801561082257600080fd5b506104e9610831366004614722565b600260209081526000928352604080842090915290825290205481565b34801561085a57600080fd5b5060005461010090046001600160a01b0316610795565b34801561087d57600080fd5b506104e961088c3660046142f6565b600c6020526000908152604090205481565b3480156108aa57600080fd5b506104e9611835565b3480156108bf57600080fd5b506104e96108ce3660046142f6565b600b6020526000908152604090205481565b3480156108ec57600080fd5b50600454610795906001600160a01b031681565b34801561090c57600080fd5b506103d261091b366004614705565b60106020526000908152604090205460ff1681565b34801561093c57600080fd5b506103d261094b3660046144bd565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b34801561098e57600080fd5b5061073561099d3660046142f6565b6118be565b3480156109ae57600080fd5b506104a76109bd366004614755565b6119d4565b3480156109ce57600080fd5b506103b06109dd3660046143b0565b611a63565b3480156109ee57600080fd5b506107957f000000000000000000000000000000000000000000000000000000000000000081565b348015610a2257600080fd5b506103b0610a31366004614705565b611af6565b348015610a4257600080fd5b506104e961271081565b348015610a5857600080fd5b506103b0610a67366004614812565b611b4c565b348015610a7857600080fd5b506103b0610a87366004614311565b611bd6565b348015610a9857600080fd5b506104e9610aa73660046142f6565b60086020526000908152604090205481565b6103b0610ac7366004614239565b611cc2565b348015610ad857600080fd5b506104e9610ae73660046142f6565b600e6020526000908152604090205481565b348015610b0557600080fd5b506103b0610b14366004614880565b611ed8565b348015610b2557600080fd5b506105a3600181565b348015610b3a57600080fd5b506103b0610b493660046148bc565b611f42565b348015610b5a57600080fd5b506103b0610b693660046143b0565b612061565b348015610b7a57600080fd5b506103b0610b89366004614705565b6120bb565b348015610b9a57600080fd5b50610735610ba9366004614984565b612134565b348015610bba57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610795565b348015610bed57600080fd5b506104e9610bfc3660046142f6565b600f6020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c8b5760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610ca9906149d1565b80601f0160208091040260200160405190810160405280929190818152602001828054610cd5906149d1565b8015610d225780601f10610cf757610100808354040283529160200191610d22565b820191906000526020600020905b815481529060010190602001808311610d0557829003601f168201915b50505050509050805186869050148015610d3d575060008151115b8015610d65575080516020820120604051610d5b9088908890614a05565b6040518091039020145b610d815760405162461bcd60e51b8152600401610c8290614a15565b610df78787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506121e792505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610e3157506301ffc9a760e01b6001600160e01b03198316145b92915050565b610e3f612260565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610ea557600080fd5b505af1158015610eb9573d6000803e3d6000fd5b5050505050565b610ec8612260565b61ffff909116600090815260036020526040902055565b610ee7612260565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610e8b565b610f3f612260565b61ffff8216600090815260086020526040902054811015610fb15760405162461bcd60e51b815260206004820152602660248201527f4461696c79206c696d6974203c2073696e676c65207472616e73616374696f6e604482015265081b1a5b5a5d60d21b6064820152608401610c82565b61ffff82166000818152600960209081526040918290205482519384529083015281018290527f4dd31065e259d5284e44d1f9265710da72eafcf78dc925e3881189fc3b71f6939060600160405180910390a161ffff909116600090815260096020526040902055565b611023612260565b61ffff8116600090815260016020526040812061103f9161407c565b60405161ffff821681527f6d5075c81d4d9e75bec6052f4e44f58f8a8cf1327544addbbf015fb06f83bd37906020015b60405180910390a150565b6000806110c08888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506122c092505050565b91509150965096945050505050565b61ffff8316600090815260016020526040812080548291906110f0906149d1565b80601f016020809104026020016040519081016040528092919081815260200182805461111c906149d1565b80156111695780601f1061113e57610100808354040283529160200191611169565b820191906000526020600020905b81548152906001019060200180831161114c57829003601f168201915b505050505090508383604051611180929190614a05565b60405180910390208180519060200120149150509392505050565b6111a3612260565b6111ab6123b4565b565b6111b5612260565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061120590869086908690600401614a84565b600060405180830381600087803b15801561121f57600080fd5b505af1158015610df7573d6000803e3d6000fd5b61123b612260565b61ffff82166000908152600960205260409020548111156112ad5760405162461bcd60e51b815260206004820152602660248201527f53696e676c65207472616e73616374696f6e206c696d6974203e204461696c79604482015265081b1a5b5a5d60d21b6064820152608401610c82565b61ffff82166000818152600860209081526040918290205482519384529083015281018290527f7babeac42ccbb33537ee421fedc4db7b5f251b5d2a3fa5c0ff4b35b2d783be879060600160405180910390a161ffff909116600090815260086020526040902055565b61131f612260565b816001600160a01b03167ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb8260405161135c911515815260200190565b60405180910390a26001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b3330146113ed5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610c82565b6114638686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061240692505050565b505050505050565b6114638585858561147f6020870187614705565b61148f6040880160208901614705565b61149c6040890189614aa2565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506124f792505050565b6114de612260565b61ffff82166000908152600c60205260409020548110156115585760405162461bcd60e51b815260206004820152602e60248201527f4461696c79206c696d6974203c2073696e676c6520726563656976652074726160448201526d1b9cd858dd1a5bdb881b1a5b5a5d60921b6064820152608401610c82565b61ffff82166000818152600d60209081526040918290205482519384529083015281018290527f95dc51094cd27cf4ee3fd0dbb50cf96f8df1629c822f5434c4a34d7eb03c97249060600160405180910390a161ffff9091166000908152600d6020526040902055565b600160205260009081526040902080546115db906149d1565b80601f0160208091040260200160405190810160405280929190818152602001828054611607906149d1565b80156116545780601f1061162957610100808354040283529160200191611654565b820191906000526020600020905b81548152906001019060200180831161163757829003601f168201915b505050505081565b6117008888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92506116a99150506020890189614705565b6116b960408a0160208b01614705565b6116c660408b018b614aa2565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506125df92505050565b505050505050505050565b611713612260565b61171c816126db565b6007546040516001600160a01b038084169216907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd90600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b611780612260565b6111ab612702565b611790612260565b61ffff831660009081526005602052604080822090516117b1908590614ae8565b9081526040805191829003602090810183206001600160401b0386166000908152915220919091556117e4908390614ae8565b6040805191829003822061ffff861683526001600160401b0384166020840152917f48a980eea4ea1c540209e2f9f32a4c2edf51fab37b1d21f453868301ecb6e2ee910160405180910390a2505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611895573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b99190614b04565b905090565b61ffff81166000908152600160205260408120805460609291906118e1906149d1565b80601f016020809104026020016040519081016040528092919081815260200182805461190d906149d1565b801561195a5780601f1061192f5761010080835404028352916020019161195a565b820191906000526020600020905b81548152906001019060200180831161193d57829003601f168201915b5050505050905080516000036119b25760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610c82565b6119cd6000601483516119c59190614b33565b83919061273f565b9392505050565b600080611a518b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c908190840183828082843760009201919091525061284c92505050565b91509150995099975050505050505050565b611a6b612260565b818130604051602001611a8093929190614b4a565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251611ab5939192909101906140b6565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611ae993929190614a84565b60405180910390a1505050565b611afe612260565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b9060200161106f565b611b54612260565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611ba89088908890889088908890600401614b70565b600060405180830381600087803b158015611bc257600080fd5b505af1158015611700573d6000803e3d6000fd5b611bde612260565b61ffff82166000908152600d6020526040902054811115611c585760405162461bcd60e51b815260206004820152602e60248201527f73696e676c652072656365697665207472616e73616374696f6e206c696d697460448201526d080f8811185a5b1e481b1a5b5a5d60921b6064820152608401610c82565b61ffff82166000818152600c60209081526040918290205482519384529083015281018290527f2c42997a938a029910a78e7c28d762b349c28e70f3a89c1fbccbb1a46020b1599060600160405180910390a161ffff9091166000908152600c6020526040902055565b61ffff86166000908152600560205260408082209051611ce59088908890614a05565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080611d655760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610c82565b808383604051611d76929190614a05565b604051809103902014611dd55760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610c82565b61ffff87166000908152600560205260408082209051611df89089908990614a05565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252611e90918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061240692505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051611ec7959493929190614b9e565b60405180910390a150505050505050565b611ee0612260565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611ae9565b333014611f915760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610c82565b611f9c308686612907565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf86604051611fde91815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da908390612022908e908e908e908e908e908d908d908d90600401614bd9565b600060405180830381600088803b15801561203c57600080fd5b5087f1158015612050573d6000803e3d6000fd5b505050505050505050505050505050565b612069612260565b61ffff8316600090815260016020526040902061208790838361413a565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611ae993929190614a84565b6120c3612260565b6001600160a01b0381166121285760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c82565b61213181612ac1565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa1580156121b4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121dc9190810190614c34565b90505b949350505050565b60008061224a5a60966366ad5c8a60e01b8989898960405160240161220f9493929190614ca1565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612b1a565b9150915081611463576114638686868685612ba4565b6000546001600160a01b036101009091041633146111ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c82565b600080600061230e876122d288612c41565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612365908b90309086908b908b90600401614cdf565b6040805180830381865afa158015612381573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a59190614d33565b92509250509550959350505050565b6123bc612cc7565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b61ffff841660009081526001602052604081208054612424906149d1565b80601f0160208091040260200160405190810160405280929190818152602001828054612450906149d1565b801561249d5780601f106124725761010080835404028352916020019161249d565b820191906000526020600020905b81548152906001019060200180831161248057829003601f168201915b50505050509050805184511480156124b6575060008151115b80156124cf575080805190602001208480519060200120145b6124eb5760405162461bcd60e51b8152600401610c8290614a15565b610eb985858585612d10565b600061250587828481612d97565b61250e85612e6c565b50905061251d88888884612eac565b90506000811161256b5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610c82565b600061257a876122d284612c41565b905061258a888287878734612faf565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a856040516125cb91815260200190565b60405180910390a450979650505050505050565b60006125f7896001846001600160401b038916612d97565b61260087612e6c565b50905061260f8a8a8a84612eac565b90506000811161265d5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610c82565b6000612674338a61266d85612c41565b8a8a613154565b90506126848a8287878734612faf565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a856040516126c591815260200190565b60405180910390a4509998505050505050505050565b6001600160a01b038116612131576040516342bcdf7f60e11b815260040160405180910390fd5b61270a613195565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586123e93390565b60608161274d81601f614d57565b101561278c5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610c82565b6127968284614d57565b845110156127da5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610c82565b6060821580156127f95760405191506000825260208201604052612843565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561283257805183526020928301920161281a565b5050858452601f01601f1916604052505b50949350505050565b600080600061285f338a61266d8b612c41565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb10906128b6908d90309086908b908b90600401614cdf565b6040805180830381865afa1580156128d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128f69190614d33565b925092505097509795505050505050565b6000612911613195565b6040516370a0823160e01b81526001600160a01b0384811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561297c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129a09190614b04565b9050306001600160a01b038616036129eb576129e66001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001685856131db565b612a20565b612a206001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868686613243565b6040516370a0823160e01b81526001600160a01b03858116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612a8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aae9190614b04565b612ab89190614b33565b95945050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6000606060008060008661ffff166001600160401b03811115612b3f57612b3f614450565b6040519080825280601f01601f191660200182016040528015612b69576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612b8b578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051612bd59190614ae8565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90612c329087908790879087908790614d6f565b60405180910390a15050505050565b600080612c6e7f000000000000000000000000000000000000000000000000000000000000000084614dd7565b90506001600160401b03811115610e315760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610c82565b60005460ff166111ab5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c82565b6000612d1c8282613281565b905060ff8116612d3757612d32858585856132dd565b610eb9565b60001960ff821601612d4f57612d328585858561336d565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610c82565b6000612da28361357b565b61ffff80871660009081526002602090815260408083209389168352929052205490915080612e135760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610c82565b612e1d8382614d57565b8210156114635760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610c82565b600080612e997f000000000000000000000000000000000000000000000000000000000000000084614deb565b9050612ea58184614b33565b9150915091565b6000612eb6613195565b6001600160a01b0385163314612f195760405162461bcd60e51b815260206004820152602260248201527f50726f78794f46543a206f776e6572206973206e6f742073656e642063616c6c60448201526132b960f11b6064820152608401610c82565b612f248585846135d7565b604051632770a7eb60e21b81526001600160a01b038681166004830152602482018490527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac90604401600060405180830381600087803b158015612f8e57600080fd5b505af1158015612fa2573d6000803e3d6000fd5b5093979650505050505050565b61ffff861660009081526001602052604081208054612fcd906149d1565b80601f0160208091040260200160405190810160405280929190818152602001828054612ff9906149d1565b80156130465780601f1061301b57610100808354040283529160200191613046565b820191906000526020600020905b81548152906001019060200180831161302957829003601f168201915b5050505050905080516000036130b75760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610c82565b6130c28787516137f4565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490613119908b9086908c908c908c908c90600401614dff565b6000604051808303818588803b15801561313257600080fd5b505af1158015613146573d6000803e3d6000fd5b505050505050505050505050565b6060600185856001600160a01b038916858760405160200161317b96959493929190614e66565b604051602081830303815290604052905095945050505050565b60005460ff16156111ab5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c82565b6040516001600160a01b03831660248201526044810182905261323e90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613865565b505050565b6040516001600160a01b038085166024830152831660448201526064810182905261327b9085906323b872dd60e01b90608401613207565b50505050565b600061328e826001614d57565b835110156132d45760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610c82565b50016001015190565b6000806132e98361393a565b90925090506001600160a01b0382166133025761dead91505b600061330d826139bf565b905061331a8784836139f4565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8360405161335c91815260200190565b60405180910390a350505050505050565b600080600080600061337e86613a93565b945094509450945094506000600660008b61ffff1661ffff168152602001908152602001600020896040516133b39190614ae8565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff1691506133e6856139bf565b905081613454576133f88b30836139f4565b61ffff8c16600090815260066020526040908190209051919250600191613420908d90614ae8565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b6134ab576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a15050505050505061327b565b8a8a8a8a8a8a868a60008a6134c9578b6001600160401b03166134cb565b5a5b90506000806134fd5a609663eaffd49a60e01b8e8e8e8d8d8d8d8d60405160240161220f989796959493929190614ec7565b915091508115613556578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd88490613548908e908e908690614f3b565b60405180910390a250613563565b6135638b8b8b8b85612ba4565b50505050505050505050505050505050505050505050565b60006022825110156135cf5760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610c82565b506022015190565b6001600160a01b03831660009081526010602052604090205460ff1680156135ff5750505050565b6040805160208101909152600754600091829181906001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613687573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136ab9190614b04565b905290506136b98185613b4a565b61ffff86166000908152600b6020908152604080832054600a8352818420546008845282852054600990945291909320549395504293909190818711156137425760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610c82565b620151806137508587614b33565b11156137745761ffff8a166000908152600b60205260409020859055869250613781565b61377e8784614d57565b92505b808311156137d15760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610c82565b505061ffff9097166000908152600a602052604090209690965550505050505050565b61ffff82166000908152600360205260408120549081900361381557506127105b8082111561323e5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610c82565b60006138ba826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613b629092919063ffffffff16565b90508051600014806138db5750808060200190518101906138db9190614f69565b61323e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610c82565b600080806139488482613281565b60ff16148015613959575082516029145b6139a05760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610c82565b6139ab83600d613b71565b91506139b8836021613bd6565b9050915091565b6000610e317f00000000000000000000000000000000000000000000000000000000000000006001600160401b038416614f86565b60006139fe613195565b613a09838584613c33565b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b158015613a7357600080fd5b505af1158015613a87573d6000803e3d6000fd5b50939695505050505050565b600080806060816001613aa68783613281565b60ff1614613af15760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610c82565b613afc86600d613b71565b9350613b09866021613bd6565b9250613b16866029613e50565b9450613b23866049613bd6565b9050613b3f6051808851613b379190614b33565b88919061273f565b915091939590929450565b600080613b578484613eae565b90506121df81613edf565b60606121df8484600085613ef7565b6000613b7e826014614d57565b83511015613bc65760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610c82565b500160200151600160601b900490565b6000613be3826008614d57565b83511015613c2a5760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610c82565b50016008015190565b6001600160a01b03831660009081526010602052604090205460ff168015613c5b5750505050565b6040805160208101909152600754600091829181906001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613ce3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d079190614b04565b90529050613d158185613b4a565b61ffff86166000908152600f6020908152604080832054600e835281842054600c845282852054600d9094529190932054939550429390919081871115613d9e5760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610c82565b62015180613dac8587614b33565b1115613dd05761ffff8a166000908152600f60205260409020859055869250613ddd565b613dda8784614d57565b92505b80831115613e2d5760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610c82565b505061ffff9097166000908152600e602052604090209690965550505050505050565b6000613e5d826020614d57565b83511015613ea55760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610c82565b50016020015190565b6040805160208101909152600081526040518060200160405280613ed6856000015185613fd2565b90529392505050565b8051600090610e3190670de0b6b3a764000090614dd7565b606082471015613f585760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610c82565b600080866001600160a01b03168587604051613f749190614ae8565b60006040518083038185875af1925050503d8060008114613fb1576040519150601f19603f3d011682016040523d82523d6000602084013e613fb6565b606091505b5091509150613fc787838387613fde565b979650505050505050565b60006119cd8284614f86565b6060831561404d578251600003614046576001600160a01b0385163b6140465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c82565b50816121df565b6121df83838151156140625781518083602001fd5b8060405162461bcd60e51b8152600401610c829190614640565b508054614088906149d1565b6000825580601f10614098575050565b601f01602090049060005260206000209081019061213191906141ae565b8280546140c2906149d1565b90600052602060002090601f0160209004810192826140e4576000855561412a565b82601f106140fd57805160ff191683800117855561412a565b8280016001018555821561412a579182015b8281111561412a57825182559160200191906001019061410f565b506141369291506141ae565b5090565b828054614146906149d1565b90600052602060002090601f016020900481019282614168576000855561412a565b82601f106141815782800160ff1982351617855561412a565b8280016001018555821561412a579182015b8281111561412a578235825591602001919060010190614193565b5b8082111561413657600081556001016141af565b803561ffff811681146141d557600080fd5b919050565b60008083601f8401126141ec57600080fd5b5081356001600160401b0381111561420357600080fd5b60208301915083602082850101111561421b57600080fd5b9250929050565b80356001600160401b03811681146141d557600080fd5b6000806000806000806080878903121561425257600080fd5b61425b876141c3565b955060208701356001600160401b038082111561427757600080fd5b6142838a838b016141da565b909750955085915061429760408a01614222565b945060608901359150808211156142ad57600080fd5b506142ba89828a016141da565b979a9699509497509295939492505050565b6000602082840312156142de57600080fd5b81356001600160e01b0319811681146119cd57600080fd5b60006020828403121561430857600080fd5b6119cd826141c3565b6000806040838503121561432457600080fd5b61432d836141c3565b946020939093013593505050565b801515811461213157600080fd5b60008060008060008060a0878903121561436257600080fd5b61436b876141c3565b9550602087013594506040870135935060608701356143898161433b565b925060808701356001600160401b038111156143a457600080fd5b6142ba89828a016141da565b6000806000604084860312156143c557600080fd5b6143ce846141c3565b925060208401356001600160401b038111156143e957600080fd5b6143f5868287016141da565b9497909650939450505050565b6001600160a01b038116811461213157600080fd5b6000806040838503121561442a57600080fd5b823561443581614402565b915060208301356144458161433b565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561448e5761448e614450565b604052919050565b60006001600160401b038211156144af576144af614450565b50601f01601f191660200190565b6000806000606084860312156144d257600080fd5b6144db846141c3565b925060208401356001600160401b038111156144f657600080fd5b8401601f8101861361450757600080fd5b803561451a61451582614496565b614466565b81815287602083850101111561452f57600080fd5b8160208401602083013760006020838301015280945050505061455460408501614222565b90509250925092565b60006060828403121561456f57600080fd5b50919050565b600080600080600060a0868803121561458d57600080fd5b853561459881614402565b94506145a6602087016141c3565b9350604086013592506060860135915060808601356001600160401b038111156145cf57600080fd5b6145db8882890161455d565b9150509295509295909350565b60005b838110156146035781810151838201526020016145eb565b8381111561327b5750506000910152565b6000815180845261462c8160208601602086016145e8565b601f01601f19169290920160200192915050565b6020815260006119cd6020830184614614565b60008060008060008060008060e0898b03121561466f57600080fd5b883561467a81614402565b975061468860208a016141c3565b9650604089013595506060890135945060808901356001600160401b03808211156146b257600080fd5b6146be8c838d016141da565b90965094508491506146d260a08c01614222565b935060c08b01359150808211156146e857600080fd5b506146f58b828c0161455d565b9150509295985092959890939650565b60006020828403121561471757600080fd5b81356119cd81614402565b6000806040838503121561473557600080fd5b61473e836141c3565b915061474c602084016141c3565b90509250929050565b600080600080600080600080600060e08a8c03121561477357600080fd5b61477c8a6141c3565b985060208a0135975060408a0135965060608a01356001600160401b03808211156147a657600080fd5b6147b28d838e016141da565b90985096508691506147c660808d01614222565b955060a08c013591506147d88261433b565b90935060c08b013590808211156147ee57600080fd5b506147fb8c828d016141da565b915080935050809150509295985092959850929598565b60008060008060006080868803121561482a57600080fd5b614833866141c3565b9450614841602087016141c3565b93506040860135925060608601356001600160401b0381111561486357600080fd5b61486f888289016141da565b969995985093965092949392505050565b60008060006060848603121561489557600080fd5b61489e846141c3565b92506148ac602085016141c3565b9150604084013590509250925092565b6000806000806000806000806000806101008b8d0312156148dc57600080fd5b6148e58b6141c3565b995060208b01356001600160401b038082111561490157600080fd5b61490d8e838f016141da565b909b50995089915061492160408e01614222565b985060608d0135975060808d0135915061493a82614402565b90955060a08c0135945060c08c0135908082111561495757600080fd5b506149648d828e016141da565b9150809450508092505060e08b013590509295989b9194979a5092959850565b6000806000806080858703121561499a57600080fd5b6149a3856141c3565b93506149b1602086016141c3565b925060408501356149c181614402565b9396929550929360600135925050565b600181811c908216806149e557607f821691505b60208210810361456f57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b60208082526026908201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6040820152651b9d1c9858dd60d21b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff841681526040602082015260006121dc604083018486614a5b565b6000808335601e19843603018112614ab957600080fd5b8301803591506001600160401b03821115614ad357600080fd5b60200191503681900382131561421b57600080fd5b60008251614afa8184602087016145e8565b9190910192915050565b600060208284031215614b1657600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015614b4557614b45614b1d565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152613fc7608083018486614a5b565b61ffff86168152608060208201526000614bbc608083018688614a5b565b6001600160401b0394909416604083015250606001529392505050565b61ffff8916815260c060208201526000614bf760c08301898b614a5b565b6001600160401b038816604084015286606084015285608084015282810360a0840152614c25818587614a5b565b9b9a5050505050505050505050565b600060208284031215614c4657600080fd5b81516001600160401b03811115614c5c57600080fd5b8201601f81018413614c6d57600080fd5b8051614c7b61451582614496565b818152856020838501011115614c9057600080fd5b612ab88260208301602086016145e8565b61ffff85168152608060208201526000614cbe6080830186614614565b6001600160401b03851660408401528281036060840152613fc78185614614565b61ffff861681526001600160a01b038516602082015260a060408201819052600090614d0d90830186614614565b84151560608401528281036080840152614d278185614614565b98975050505050505050565b60008060408385031215614d4657600080fd5b505080516020909101519092909150565b60008219821115614d6a57614d6a614b1d565b500190565b61ffff8616815260a060208201526000614d8c60a0830187614614565b6001600160401b03861660408401528281036060840152614dad8186614614565b90508281036080840152614d278185614614565b634e487b7160e01b600052601260045260246000fd5b600082614de657614de6614dc1565b500490565b600082614dfa57614dfa614dc1565b500690565b61ffff8716815260c060208201526000614e1c60c0830188614614565b8281036040840152614e2e8188614614565b6001600160a01b0387811660608601528616608085015283810360a08501529050614e598185614614565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b166049840152508251614eb58160518501602087016145e8565b91909101605101979650505050505050565b600061010061ffff8b168352806020840152614ee58184018b614614565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c08501529050614f258186614614565b9150508260e08301529998505050505050505050565b606081526000614f4e6060830186614614565b6001600160401b039490941660208301525060400152919050565b600060208284031215614f7b57600080fd5b81516119cd8161433b565b6000816000190483118215151615614fa057614fa0614b1d565b50029056fea2646970667358221220aea24e5617c296c42ddf68c6a500466514da301ac83b159539800b48b50dfe8a64736f6c634300080d0033", "deployedBytecode": "0x60806040526004361061038b5760003560e01c80638456cb59116101dc578063baf3292d11610102578063df2a5b3b116100a0578063f2fde38b1161006f578063f2fde38b14610b6e578063f5ecbdbc14610b8e578063fc0c546a14610bae578063fdff235b14610be157600080fd5b8063df2a5b3b14610af9578063e6a20ae614610b19578063eaffd49a14610b2e578063eb8d72b714610b4e57600080fd5b8063cc01e9b6116100dc578063cc01e9b614610a6c578063cc7015ae14610a8c578063d1deba1f14610ab9578063d708a46814610acc57600080fd5b8063baf3292d14610a16578063c446183414610a36578063cbed8b9c14610a4c57600080fd5b806393a61d6c1161017a5780639f38369a116101495780639f38369a14610982578063a4c51df5146109a2578063a6c3d165146109c2578063b353aaa7146109e257600080fd5b806393a61d6c146108b3578063950c8a74146108e05780639b19251a146109005780639bdb98121461093057600080fd5b80638cfd8f5c116101b65780638cfd8f5c146108165780638da5cb5b1461084e57806390436567146108715780639358928b1461089e57600080fd5b80638456cb59146107ad57806384e69c69146107c2578063857749b0146107e257600080fd5b80634c42899a116102c157806366ad5c8a1161025f5780637533d7881161022e5780637533d7881461071557806376203b48146107425780637adbf973146107555780637dc0d1d01461077557600080fd5b806366ad5c8a146106b6578063695ef6bf146106d657806369c1e7b8146106e9578063715018a61461070957600080fd5b806353489d6c1161029b57806353489d6c1461060f57806353d6fd591461062f5780635b8c41e61461064f5780635c975abb1461069e57600080fd5b80634c42899a1461058e5780634cec6256146105b55780634f4ba0f4146105e257600080fd5b8063365260b41161032e5780633f1f4fa4116103085780633f1f4fa4146105175780633f4ba83a1461054457806342d65a8d14610559578063447705151461057957600080fd5b8063365260b4146104875780633c4ec39b146104bc5780633d8b38f6146104f757600080fd5b80630df374831161036a5780630df374831461040757806310ddb137146104275780632488eec8146104475780632dbbec081461046757600080fd5b80621d35671461039057806301ffc9a7146103b257806307e0db17146103e7575b600080fd5b34801561039c57600080fd5b506103b06103ab366004614239565b610c0e565b005b3480156103be57600080fd5b506103d26103cd3660046142cc565b610e00565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b506103b06104023660046142f6565b610e37565b34801561041357600080fd5b506103b0610422366004614311565b610ec0565b34801561043357600080fd5b506103b06104423660046142f6565b610edf565b34801561045357600080fd5b506103b0610462366004614311565b610f37565b34801561047357600080fd5b506103b06104823660046142f6565b61101b565b34801561049357600080fd5b506104a76104a2366004614349565b61107a565b604080519283526020830191909152016103de565b3480156104c857600080fd5b506104e96104d73660046142f6565b600d6020526000908152604090205481565b6040519081526020016103de565b34801561050357600080fd5b506103d26105123660046143b0565b6110cf565b34801561052357600080fd5b506104e96105323660046142f6565b60036020526000908152604090205481565b34801561055057600080fd5b506103b061119b565b34801561056557600080fd5b506103b06105743660046143b0565b6111ad565b34801561058557600080fd5b506104e9600081565b34801561059a57600080fd5b506105a3600081565b60405160ff90911681526020016103de565b3480156105c157600080fd5b506104e96105d03660046142f6565b600a6020526000908152604090205481565b3480156105ee57600080fd5b506104e96105fd3660046142f6565b60096020526000908152604090205481565b34801561061b57600080fd5b506103b061062a366004614311565b611233565b34801561063b57600080fd5b506103b061064a366004614417565b611317565b34801561065b57600080fd5b506104e961066a3660046144bd565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156106aa57600080fd5b5060005460ff166103d2565b3480156106c257600080fd5b506103b06106d1366004614239565b61138f565b6103b06106e4366004614575565b61146b565b3480156106f557600080fd5b506103b0610704366004614311565b6114d6565b3480156103b057600080fd5b34801561072157600080fd5b506107356107303660046142f6565b6115c2565b6040516103de9190614640565b6103b0610750366004614653565b61165c565b34801561076157600080fd5b506103b0610770366004614705565b61170b565b34801561078157600080fd5b50600754610795906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b3480156107b957600080fd5b506103b0611778565b3480156107ce57600080fd5b506103b06107dd3660046144bd565b611788565b3480156107ee57600080fd5b506105a37f000000000000000000000000000000000000000000000000000000000000000081565b34801561082257600080fd5b506104e9610831366004614722565b600260209081526000928352604080842090915290825290205481565b34801561085a57600080fd5b5060005461010090046001600160a01b0316610795565b34801561087d57600080fd5b506104e961088c3660046142f6565b600c6020526000908152604090205481565b3480156108aa57600080fd5b506104e9611835565b3480156108bf57600080fd5b506104e96108ce3660046142f6565b600b6020526000908152604090205481565b3480156108ec57600080fd5b50600454610795906001600160a01b031681565b34801561090c57600080fd5b506103d261091b366004614705565b60106020526000908152604090205460ff1681565b34801561093c57600080fd5b506103d261094b3660046144bd565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b34801561098e57600080fd5b5061073561099d3660046142f6565b6118be565b3480156109ae57600080fd5b506104a76109bd366004614755565b6119d4565b3480156109ce57600080fd5b506103b06109dd3660046143b0565b611a63565b3480156109ee57600080fd5b506107957f000000000000000000000000000000000000000000000000000000000000000081565b348015610a2257600080fd5b506103b0610a31366004614705565b611af6565b348015610a4257600080fd5b506104e961271081565b348015610a5857600080fd5b506103b0610a67366004614812565b611b4c565b348015610a7857600080fd5b506103b0610a87366004614311565b611bd6565b348015610a9857600080fd5b506104e9610aa73660046142f6565b60086020526000908152604090205481565b6103b0610ac7366004614239565b611cc2565b348015610ad857600080fd5b506104e9610ae73660046142f6565b600e6020526000908152604090205481565b348015610b0557600080fd5b506103b0610b14366004614880565b611ed8565b348015610b2557600080fd5b506105a3600181565b348015610b3a57600080fd5b506103b0610b493660046148bc565b611f42565b348015610b5a57600080fd5b506103b0610b693660046143b0565b612061565b348015610b7a57600080fd5b506103b0610b89366004614705565b6120bb565b348015610b9a57600080fd5b50610735610ba9366004614984565b612134565b348015610bba57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610795565b348015610bed57600080fd5b506104e9610bfc3660046142f6565b600f6020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c8b5760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610ca9906149d1565b80601f0160208091040260200160405190810160405280929190818152602001828054610cd5906149d1565b8015610d225780601f10610cf757610100808354040283529160200191610d22565b820191906000526020600020905b815481529060010190602001808311610d0557829003601f168201915b50505050509050805186869050148015610d3d575060008151115b8015610d65575080516020820120604051610d5b9088908890614a05565b6040518091039020145b610d815760405162461bcd60e51b8152600401610c8290614a15565b610df78787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506121e792505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610e3157506301ffc9a760e01b6001600160e01b03198316145b92915050565b610e3f612260565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610ea557600080fd5b505af1158015610eb9573d6000803e3d6000fd5b5050505050565b610ec8612260565b61ffff909116600090815260036020526040902055565b610ee7612260565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610e8b565b610f3f612260565b61ffff8216600090815260086020526040902054811015610fb15760405162461bcd60e51b815260206004820152602660248201527f4461696c79206c696d6974203c2073696e676c65207472616e73616374696f6e604482015265081b1a5b5a5d60d21b6064820152608401610c82565b61ffff82166000818152600960209081526040918290205482519384529083015281018290527f4dd31065e259d5284e44d1f9265710da72eafcf78dc925e3881189fc3b71f6939060600160405180910390a161ffff909116600090815260096020526040902055565b611023612260565b61ffff8116600090815260016020526040812061103f9161407c565b60405161ffff821681527f6d5075c81d4d9e75bec6052f4e44f58f8a8cf1327544addbbf015fb06f83bd37906020015b60405180910390a150565b6000806110c08888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506122c092505050565b91509150965096945050505050565b61ffff8316600090815260016020526040812080548291906110f0906149d1565b80601f016020809104026020016040519081016040528092919081815260200182805461111c906149d1565b80156111695780601f1061113e57610100808354040283529160200191611169565b820191906000526020600020905b81548152906001019060200180831161114c57829003601f168201915b505050505090508383604051611180929190614a05565b60405180910390208180519060200120149150509392505050565b6111a3612260565b6111ab6123b4565b565b6111b5612260565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061120590869086908690600401614a84565b600060405180830381600087803b15801561121f57600080fd5b505af1158015610df7573d6000803e3d6000fd5b61123b612260565b61ffff82166000908152600960205260409020548111156112ad5760405162461bcd60e51b815260206004820152602660248201527f53696e676c65207472616e73616374696f6e206c696d6974203e204461696c79604482015265081b1a5b5a5d60d21b6064820152608401610c82565b61ffff82166000818152600860209081526040918290205482519384529083015281018290527f7babeac42ccbb33537ee421fedc4db7b5f251b5d2a3fa5c0ff4b35b2d783be879060600160405180910390a161ffff909116600090815260086020526040902055565b61131f612260565b816001600160a01b03167ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb8260405161135c911515815260200190565b60405180910390a26001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b3330146113ed5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610c82565b6114638686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061240692505050565b505050505050565b6114638585858561147f6020870187614705565b61148f6040880160208901614705565b61149c6040890189614aa2565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506124f792505050565b6114de612260565b61ffff82166000908152600c60205260409020548110156115585760405162461bcd60e51b815260206004820152602e60248201527f4461696c79206c696d6974203c2073696e676c6520726563656976652074726160448201526d1b9cd858dd1a5bdb881b1a5b5a5d60921b6064820152608401610c82565b61ffff82166000818152600d60209081526040918290205482519384529083015281018290527f95dc51094cd27cf4ee3fd0dbb50cf96f8df1629c822f5434c4a34d7eb03c97249060600160405180910390a161ffff9091166000908152600d6020526040902055565b600160205260009081526040902080546115db906149d1565b80601f0160208091040260200160405190810160405280929190818152602001828054611607906149d1565b80156116545780601f1061162957610100808354040283529160200191611654565b820191906000526020600020905b81548152906001019060200180831161163757829003601f168201915b505050505081565b6117008888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92506116a99150506020890189614705565b6116b960408a0160208b01614705565b6116c660408b018b614aa2565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506125df92505050565b505050505050505050565b611713612260565b61171c816126db565b6007546040516001600160a01b038084169216907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd90600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b611780612260565b6111ab612702565b611790612260565b61ffff831660009081526005602052604080822090516117b1908590614ae8565b9081526040805191829003602090810183206001600160401b0386166000908152915220919091556117e4908390614ae8565b6040805191829003822061ffff861683526001600160401b0384166020840152917f48a980eea4ea1c540209e2f9f32a4c2edf51fab37b1d21f453868301ecb6e2ee910160405180910390a2505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611895573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b99190614b04565b905090565b61ffff81166000908152600160205260408120805460609291906118e1906149d1565b80601f016020809104026020016040519081016040528092919081815260200182805461190d906149d1565b801561195a5780601f1061192f5761010080835404028352916020019161195a565b820191906000526020600020905b81548152906001019060200180831161193d57829003601f168201915b5050505050905080516000036119b25760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610c82565b6119cd6000601483516119c59190614b33565b83919061273f565b9392505050565b600080611a518b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c908190840183828082843760009201919091525061284c92505050565b91509150995099975050505050505050565b611a6b612260565b818130604051602001611a8093929190614b4a565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251611ab5939192909101906140b6565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611ae993929190614a84565b60405180910390a1505050565b611afe612260565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b9060200161106f565b611b54612260565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611ba89088908890889088908890600401614b70565b600060405180830381600087803b158015611bc257600080fd5b505af1158015611700573d6000803e3d6000fd5b611bde612260565b61ffff82166000908152600d6020526040902054811115611c585760405162461bcd60e51b815260206004820152602e60248201527f73696e676c652072656365697665207472616e73616374696f6e206c696d697460448201526d080f8811185a5b1e481b1a5b5a5d60921b6064820152608401610c82565b61ffff82166000818152600c60209081526040918290205482519384529083015281018290527f2c42997a938a029910a78e7c28d762b349c28e70f3a89c1fbccbb1a46020b1599060600160405180910390a161ffff9091166000908152600c6020526040902055565b61ffff86166000908152600560205260408082209051611ce59088908890614a05565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080611d655760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610c82565b808383604051611d76929190614a05565b604051809103902014611dd55760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610c82565b61ffff87166000908152600560205260408082209051611df89089908990614a05565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252611e90918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061240692505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051611ec7959493929190614b9e565b60405180910390a150505050505050565b611ee0612260565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611ae9565b333014611f915760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610c82565b611f9c308686612907565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf86604051611fde91815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da908390612022908e908e908e908e908e908d908d908d90600401614bd9565b600060405180830381600088803b15801561203c57600080fd5b5087f1158015612050573d6000803e3d6000fd5b505050505050505050505050505050565b612069612260565b61ffff8316600090815260016020526040902061208790838361413a565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611ae993929190614a84565b6120c3612260565b6001600160a01b0381166121285760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c82565b61213181612ac1565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa1580156121b4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121dc9190810190614c34565b90505b949350505050565b60008061224a5a60966366ad5c8a60e01b8989898960405160240161220f9493929190614ca1565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612b1a565b9150915081611463576114638686868685612ba4565b6000546001600160a01b036101009091041633146111ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c82565b600080600061230e876122d288612c41565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612365908b90309086908b908b90600401614cdf565b6040805180830381865afa158015612381573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a59190614d33565b92509250509550959350505050565b6123bc612cc7565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b61ffff841660009081526001602052604081208054612424906149d1565b80601f0160208091040260200160405190810160405280929190818152602001828054612450906149d1565b801561249d5780601f106124725761010080835404028352916020019161249d565b820191906000526020600020905b81548152906001019060200180831161248057829003601f168201915b50505050509050805184511480156124b6575060008151115b80156124cf575080805190602001208480519060200120145b6124eb5760405162461bcd60e51b8152600401610c8290614a15565b610eb985858585612d10565b600061250587828481612d97565b61250e85612e6c565b50905061251d88888884612eac565b90506000811161256b5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610c82565b600061257a876122d284612c41565b905061258a888287878734612faf565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a856040516125cb91815260200190565b60405180910390a450979650505050505050565b60006125f7896001846001600160401b038916612d97565b61260087612e6c565b50905061260f8a8a8a84612eac565b90506000811161265d5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610c82565b6000612674338a61266d85612c41565b8a8a613154565b90506126848a8287878734612faf565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a856040516126c591815260200190565b60405180910390a4509998505050505050505050565b6001600160a01b038116612131576040516342bcdf7f60e11b815260040160405180910390fd5b61270a613195565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586123e93390565b60608161274d81601f614d57565b101561278c5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610c82565b6127968284614d57565b845110156127da5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610c82565b6060821580156127f95760405191506000825260208201604052612843565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561283257805183526020928301920161281a565b5050858452601f01601f1916604052505b50949350505050565b600080600061285f338a61266d8b612c41565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb10906128b6908d90309086908b908b90600401614cdf565b6040805180830381865afa1580156128d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128f69190614d33565b925092505097509795505050505050565b6000612911613195565b6040516370a0823160e01b81526001600160a01b0384811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561297c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129a09190614b04565b9050306001600160a01b038616036129eb576129e66001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001685856131db565b612a20565b612a206001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868686613243565b6040516370a0823160e01b81526001600160a01b03858116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612a8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aae9190614b04565b612ab89190614b33565b95945050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6000606060008060008661ffff166001600160401b03811115612b3f57612b3f614450565b6040519080825280601f01601f191660200182016040528015612b69576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612b8b578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051612bd59190614ae8565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90612c329087908790879087908790614d6f565b60405180910390a15050505050565b600080612c6e7f000000000000000000000000000000000000000000000000000000000000000084614dd7565b90506001600160401b03811115610e315760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610c82565b60005460ff166111ab5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c82565b6000612d1c8282613281565b905060ff8116612d3757612d32858585856132dd565b610eb9565b60001960ff821601612d4f57612d328585858561336d565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610c82565b6000612da28361357b565b61ffff80871660009081526002602090815260408083209389168352929052205490915080612e135760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610c82565b612e1d8382614d57565b8210156114635760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610c82565b600080612e997f000000000000000000000000000000000000000000000000000000000000000084614deb565b9050612ea58184614b33565b9150915091565b6000612eb6613195565b6001600160a01b0385163314612f195760405162461bcd60e51b815260206004820152602260248201527f50726f78794f46543a206f776e6572206973206e6f742073656e642063616c6c60448201526132b960f11b6064820152608401610c82565b612f248585846135d7565b604051632770a7eb60e21b81526001600160a01b038681166004830152602482018490527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac90604401600060405180830381600087803b158015612f8e57600080fd5b505af1158015612fa2573d6000803e3d6000fd5b5093979650505050505050565b61ffff861660009081526001602052604081208054612fcd906149d1565b80601f0160208091040260200160405190810160405280929190818152602001828054612ff9906149d1565b80156130465780601f1061301b57610100808354040283529160200191613046565b820191906000526020600020905b81548152906001019060200180831161302957829003601f168201915b5050505050905080516000036130b75760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610c82565b6130c28787516137f4565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490613119908b9086908c908c908c908c90600401614dff565b6000604051808303818588803b15801561313257600080fd5b505af1158015613146573d6000803e3d6000fd5b505050505050505050505050565b6060600185856001600160a01b038916858760405160200161317b96959493929190614e66565b604051602081830303815290604052905095945050505050565b60005460ff16156111ab5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c82565b6040516001600160a01b03831660248201526044810182905261323e90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613865565b505050565b6040516001600160a01b038085166024830152831660448201526064810182905261327b9085906323b872dd60e01b90608401613207565b50505050565b600061328e826001614d57565b835110156132d45760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610c82565b50016001015190565b6000806132e98361393a565b90925090506001600160a01b0382166133025761dead91505b600061330d826139bf565b905061331a8784836139f4565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8360405161335c91815260200190565b60405180910390a350505050505050565b600080600080600061337e86613a93565b945094509450945094506000600660008b61ffff1661ffff168152602001908152602001600020896040516133b39190614ae8565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff1691506133e6856139bf565b905081613454576133f88b30836139f4565b61ffff8c16600090815260066020526040908190209051919250600191613420908d90614ae8565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b6134ab576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a15050505050505061327b565b8a8a8a8a8a8a868a60008a6134c9578b6001600160401b03166134cb565b5a5b90506000806134fd5a609663eaffd49a60e01b8e8e8e8d8d8d8d8d60405160240161220f989796959493929190614ec7565b915091508115613556578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd88490613548908e908e908690614f3b565b60405180910390a250613563565b6135638b8b8b8b85612ba4565b50505050505050505050505050505050505050505050565b60006022825110156135cf5760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610c82565b506022015190565b6001600160a01b03831660009081526010602052604090205460ff1680156135ff5750505050565b6040805160208101909152600754600091829181906001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613687573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136ab9190614b04565b905290506136b98185613b4a565b61ffff86166000908152600b6020908152604080832054600a8352818420546008845282852054600990945291909320549395504293909190818711156137425760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610c82565b620151806137508587614b33565b11156137745761ffff8a166000908152600b60205260409020859055869250613781565b61377e8784614d57565b92505b808311156137d15760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610c82565b505061ffff9097166000908152600a602052604090209690965550505050505050565b61ffff82166000908152600360205260408120549081900361381557506127105b8082111561323e5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610c82565b60006138ba826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613b629092919063ffffffff16565b90508051600014806138db5750808060200190518101906138db9190614f69565b61323e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610c82565b600080806139488482613281565b60ff16148015613959575082516029145b6139a05760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610c82565b6139ab83600d613b71565b91506139b8836021613bd6565b9050915091565b6000610e317f00000000000000000000000000000000000000000000000000000000000000006001600160401b038416614f86565b60006139fe613195565b613a09838584613c33565b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b158015613a7357600080fd5b505af1158015613a87573d6000803e3d6000fd5b50939695505050505050565b600080806060816001613aa68783613281565b60ff1614613af15760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610c82565b613afc86600d613b71565b9350613b09866021613bd6565b9250613b16866029613e50565b9450613b23866049613bd6565b9050613b3f6051808851613b379190614b33565b88919061273f565b915091939590929450565b600080613b578484613eae565b90506121df81613edf565b60606121df8484600085613ef7565b6000613b7e826014614d57565b83511015613bc65760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610c82565b500160200151600160601b900490565b6000613be3826008614d57565b83511015613c2a5760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610c82565b50016008015190565b6001600160a01b03831660009081526010602052604090205460ff168015613c5b5750505050565b6040805160208101909152600754600091829181906001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613ce3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d079190614b04565b90529050613d158185613b4a565b61ffff86166000908152600f6020908152604080832054600e835281842054600c845282852054600d9094529190932054939550429390919081871115613d9e5760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610c82565b62015180613dac8587614b33565b1115613dd05761ffff8a166000908152600f60205260409020859055869250613ddd565b613dda8784614d57565b92505b80831115613e2d5760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610c82565b505061ffff9097166000908152600e602052604090209690965550505050505050565b6000613e5d826020614d57565b83511015613ea55760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610c82565b50016020015190565b6040805160208101909152600081526040518060200160405280613ed6856000015185613fd2565b90529392505050565b8051600090610e3190670de0b6b3a764000090614dd7565b606082471015613f585760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610c82565b600080866001600160a01b03168587604051613f749190614ae8565b60006040518083038185875af1925050503d8060008114613fb1576040519150601f19603f3d011682016040523d82523d6000602084013e613fb6565b606091505b5091509150613fc787838387613fde565b979650505050505050565b60006119cd8284614f86565b6060831561404d578251600003614046576001600160a01b0385163b6140465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c82565b50816121df565b6121df83838151156140625781518083602001fd5b8060405162461bcd60e51b8152600401610c829190614640565b508054614088906149d1565b6000825580601f10614098575050565b601f01602090049060005260206000209081019061213191906141ae565b8280546140c2906149d1565b90600052602060002090601f0160209004810192826140e4576000855561412a565b82601f106140fd57805160ff191683800117855561412a565b8280016001018555821561412a579182015b8281111561412a57825182559160200191906001019061410f565b506141369291506141ae565b5090565b828054614146906149d1565b90600052602060002090601f016020900481019282614168576000855561412a565b82601f106141815782800160ff1982351617855561412a565b8280016001018555821561412a579182015b8281111561412a578235825591602001919060010190614193565b5b8082111561413657600081556001016141af565b803561ffff811681146141d557600080fd5b919050565b60008083601f8401126141ec57600080fd5b5081356001600160401b0381111561420357600080fd5b60208301915083602082850101111561421b57600080fd5b9250929050565b80356001600160401b03811681146141d557600080fd5b6000806000806000806080878903121561425257600080fd5b61425b876141c3565b955060208701356001600160401b038082111561427757600080fd5b6142838a838b016141da565b909750955085915061429760408a01614222565b945060608901359150808211156142ad57600080fd5b506142ba89828a016141da565b979a9699509497509295939492505050565b6000602082840312156142de57600080fd5b81356001600160e01b0319811681146119cd57600080fd5b60006020828403121561430857600080fd5b6119cd826141c3565b6000806040838503121561432457600080fd5b61432d836141c3565b946020939093013593505050565b801515811461213157600080fd5b60008060008060008060a0878903121561436257600080fd5b61436b876141c3565b9550602087013594506040870135935060608701356143898161433b565b925060808701356001600160401b038111156143a457600080fd5b6142ba89828a016141da565b6000806000604084860312156143c557600080fd5b6143ce846141c3565b925060208401356001600160401b038111156143e957600080fd5b6143f5868287016141da565b9497909650939450505050565b6001600160a01b038116811461213157600080fd5b6000806040838503121561442a57600080fd5b823561443581614402565b915060208301356144458161433b565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561448e5761448e614450565b604052919050565b60006001600160401b038211156144af576144af614450565b50601f01601f191660200190565b6000806000606084860312156144d257600080fd5b6144db846141c3565b925060208401356001600160401b038111156144f657600080fd5b8401601f8101861361450757600080fd5b803561451a61451582614496565b614466565b81815287602083850101111561452f57600080fd5b8160208401602083013760006020838301015280945050505061455460408501614222565b90509250925092565b60006060828403121561456f57600080fd5b50919050565b600080600080600060a0868803121561458d57600080fd5b853561459881614402565b94506145a6602087016141c3565b9350604086013592506060860135915060808601356001600160401b038111156145cf57600080fd5b6145db8882890161455d565b9150509295509295909350565b60005b838110156146035781810151838201526020016145eb565b8381111561327b5750506000910152565b6000815180845261462c8160208601602086016145e8565b601f01601f19169290920160200192915050565b6020815260006119cd6020830184614614565b60008060008060008060008060e0898b03121561466f57600080fd5b883561467a81614402565b975061468860208a016141c3565b9650604089013595506060890135945060808901356001600160401b03808211156146b257600080fd5b6146be8c838d016141da565b90965094508491506146d260a08c01614222565b935060c08b01359150808211156146e857600080fd5b506146f58b828c0161455d565b9150509295985092959890939650565b60006020828403121561471757600080fd5b81356119cd81614402565b6000806040838503121561473557600080fd5b61473e836141c3565b915061474c602084016141c3565b90509250929050565b600080600080600080600080600060e08a8c03121561477357600080fd5b61477c8a6141c3565b985060208a0135975060408a0135965060608a01356001600160401b03808211156147a657600080fd5b6147b28d838e016141da565b90985096508691506147c660808d01614222565b955060a08c013591506147d88261433b565b90935060c08b013590808211156147ee57600080fd5b506147fb8c828d016141da565b915080935050809150509295985092959850929598565b60008060008060006080868803121561482a57600080fd5b614833866141c3565b9450614841602087016141c3565b93506040860135925060608601356001600160401b0381111561486357600080fd5b61486f888289016141da565b969995985093965092949392505050565b60008060006060848603121561489557600080fd5b61489e846141c3565b92506148ac602085016141c3565b9150604084013590509250925092565b6000806000806000806000806000806101008b8d0312156148dc57600080fd5b6148e58b6141c3565b995060208b01356001600160401b038082111561490157600080fd5b61490d8e838f016141da565b909b50995089915061492160408e01614222565b985060608d0135975060808d0135915061493a82614402565b90955060a08c0135945060c08c0135908082111561495757600080fd5b506149648d828e016141da565b9150809450508092505060e08b013590509295989b9194979a5092959850565b6000806000806080858703121561499a57600080fd5b6149a3856141c3565b93506149b1602086016141c3565b925060408501356149c181614402565b9396929550929360600135925050565b600181811c908216806149e557607f821691505b60208210810361456f57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b60208082526026908201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6040820152651b9d1c9858dd60d21b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff841681526040602082015260006121dc604083018486614a5b565b6000808335601e19843603018112614ab957600080fd5b8301803591506001600160401b03821115614ad357600080fd5b60200191503681900382131561421b57600080fd5b60008251614afa8184602087016145e8565b9190910192915050565b600060208284031215614b1657600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015614b4557614b45614b1d565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152613fc7608083018486614a5b565b61ffff86168152608060208201526000614bbc608083018688614a5b565b6001600160401b0394909416604083015250606001529392505050565b61ffff8916815260c060208201526000614bf760c08301898b614a5b565b6001600160401b038816604084015286606084015285608084015282810360a0840152614c25818587614a5b565b9b9a5050505050505050505050565b600060208284031215614c4657600080fd5b81516001600160401b03811115614c5c57600080fd5b8201601f81018413614c6d57600080fd5b8051614c7b61451582614496565b818152856020838501011115614c9057600080fd5b612ab88260208301602086016145e8565b61ffff85168152608060208201526000614cbe6080830186614614565b6001600160401b03851660408401528281036060840152613fc78185614614565b61ffff861681526001600160a01b038516602082015260a060408201819052600090614d0d90830186614614565b84151560608401528281036080840152614d278185614614565b98975050505050505050565b60008060408385031215614d4657600080fd5b505080516020909101519092909150565b60008219821115614d6a57614d6a614b1d565b500190565b61ffff8616815260a060208201526000614d8c60a0830187614614565b6001600160401b03861660408401528281036060840152614dad8186614614565b90508281036080840152614d278185614614565b634e487b7160e01b600052601260045260246000fd5b600082614de657614de6614dc1565b500490565b600082614dfa57614dfa614dc1565b500690565b61ffff8716815260c060208201526000614e1c60c0830188614614565b8281036040840152614e2e8188614614565b6001600160a01b0387811660608601528616608085015283810360a08501529050614e598185614614565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b166049840152508251614eb58160518501602087016145e8565b91909101605101979650505050505050565b600061010061ffff8b168352806020840152614ee58184018b614614565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c08501529050614f258186614614565b9150508260e08301529998505050505050505050565b606081526000614f4e6060830186614614565b6001600160401b039490941660208301525060400152919050565b600060208284031215614f7b57600080fd5b81516119cd8161433b565b6000816000190483118215151615614fa057614fa0614b1d565b50029056fea2646970667358221220aea24e5617c296c42ddf68c6a500466514da301ac83b159539800b48b50dfe8a64736f6c634300080d0033", diff --git a/deployments/sepolia/solcInputs/62c3d453c4f2f09a9c75b9665a09cf0a.json b/deployments/sepolia/solcInputs/62c3d453c4f2f09a9c75b9665a09cf0a.json new file mode 100644 index 0000000..b682d1b --- /dev/null +++ b/deployments/sepolia/solcInputs/62c3d453c4f2f09a9c75b9665a09cf0a.json @@ -0,0 +1,90 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./OwnableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership} and {acceptOwnership}.\n *\n * This module is used through inheritance. It will make available all functions\n * from parent (Ownable).\n */\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\n function __Ownable2Step_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable2Step_init_unchained() internal onlyInitializing {\n }\n address private _pendingOwner;\n\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Returns the address of the pending owner.\n */\n function pendingOwner() public view virtual returns (address) {\n return _pendingOwner;\n }\n\n /**\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual override onlyOwner {\n _pendingOwner = newOwner;\n emit OwnershipTransferStarted(owner(), newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual override {\n delete _pendingOwner;\n super._transferOwnership(newOwner);\n }\n\n /**\n * @dev The new owner accepts the ownership transfer.\n */\n function acceptOwnership() public virtual {\n address sender = _msgSender();\n require(pendingOwner() == sender, \"Ownable2Step: caller is not the new owner\");\n _transferOwnership(sender);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts/access/IAccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\n\nimport \"./IAccessControlManagerV8.sol\";\n\n/**\n * @title AccessControlledV8\n * @author Venus\n * @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\n */\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\n /// @notice Access control manager contract\n IAccessControlManagerV8 private _accessControlManager;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n\n /// @notice Emitted when access control manager contract address is changed\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\n\n /// @notice Thrown when the action is prohibited by AccessControlManager\n error Unauthorized(address sender, address calledContract, string methodSignature);\n\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\n __Ownable2Step_init();\n __AccessControlled_init_unchained(accessControlManager_);\n }\n\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\n _setAccessControlManager(accessControlManager_);\n }\n\n /**\n * @notice Sets the address of AccessControlManager\n * @dev Admin function to set address of AccessControlManager\n * @param accessControlManager_ The new address of the AccessControlManager\n * @custom:event Emits NewAccessControlManager event\n * @custom:access Only Governance\n */\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\n _setAccessControlManager(accessControlManager_);\n }\n\n /**\n * @notice Returns the address of the access control manager contract\n */\n function accessControlManager() external view returns (IAccessControlManagerV8) {\n return _accessControlManager;\n }\n\n /**\n * @dev Internal function to set address of AccessControlManager\n * @param accessControlManager_ The new address of the AccessControlManager\n */\n function _setAccessControlManager(address accessControlManager_) internal {\n require(address(accessControlManager_) != address(0), \"invalid acess control manager address\");\n address oldAccessControlManager = address(_accessControlManager);\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\n }\n\n /**\n * @notice Reverts if the call is not allowed by AccessControlManager\n * @param signature Method signature\n */\n function _checkAccessAllowed(string memory signature) internal view {\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\n\n if (!isAllowedToCall) {\n revert Unauthorized(msg.sender, address(this), signature);\n }\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport \"@openzeppelin/contracts/access/IAccessControl.sol\";\n\n/**\n * @title IAccessControlManagerV8\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\n */\ninterface IAccessControlManagerV8 is IAccessControl {\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\n\n function hasPermission(\n address account,\n address contractAddress,\n string calldata functionSig\n ) external view returns (bool);\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/validators.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\nerror ZeroAddressNotAllowed();\n\n/// @notice Checks if the provided address is nonzero, reverts otherwise\n/// @param address_ Address to check\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\nfunction ensureNonzeroAddress(address address_) pure {\n if (address_ == address(0)) {\n revert ZeroAddressNotAllowed();\n }\n}\n" + }, + "contracts/Bridge/interfaces/IXVSProxyOFT.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/**\n * @title IXVSProxyOFT\n * @author Venus\n * @notice Interface implemented by `XVSProxyOFT`.\n */\ninterface IXVSProxyOFT {\n function transferOwnership(address addr) external;\n\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\n\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\n}\n" + }, + "contracts/Bridge/token/TokenController.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\nimport { IAccessControlManagerV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\";\nimport { Pausable } from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\n/**\n * @title TokenController\n * @author Venus\n * @notice TokenController contract acts as a governance and access control mechanism,\n * allowing the owner to manage minting restrictions and blacklist certain addresses to maintain control and security within the token ecosystem.\n * It provides a flexible framework for token-related operations.\n */\n\ncontract TokenController is Ownable, Pausable {\n /**\n * @notice Access control manager contract address.\n */\n address public accessControlManager;\n /**\n * @notice A Mapping used to keep track of the blacklist status of addresses.\n */\n mapping(address => bool) public _blacklist;\n /**\n * @notice A mapping is used to keep track of the maximum amount a minter is permitted to mint.\n */\n mapping(address => uint256) public minterToCap;\n /**\n * @notice A Mapping used to keep track of the amount i.e already m inted by minter.\n */\n mapping(address => uint256) public minterToMintedAmount;\n\n /**\n * @notice Emitted when the blacklist status of a user is updated.\n */\n event BlacklistUpdated(address indexed user, bool value);\n /**\n * @notice Emitted when the minting limit for a minter is increased.\n */\n event MintLimitIncreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting limit for a minter is decreased.\n */\n event MintLimitDecreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting cap for a minter is changed.\n */\n event MintCapChanged(address indexed minter, uint256 amount);\n /**\n * @notice Emitted when the address of the access control manager of the contract is updated.\n */\n event NewAccessControlManager(address indexed oldAccessControlManager, address indexed newAccessControlManager);\n\n /**\n * @notice This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap.\n */\n error MintLimitExceed();\n /**\n * @notice This error is used to indicate that minting is not allowed for the specified addresses.\n */\n error MintNotAllowed(address from, address to);\n\n /**\n * @notice This error is used to indicate that sender is not allowed to perform this action.\n */\n error Unauthorized();\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\n */\n constructor(address accessControlManager_) {\n ensureNonzeroAddress(accessControlManager_);\n accessControlManager = accessControlManager_;\n }\n\n /**\n * @notice Pauses Token\n * @custom:access Controlled by AccessControlManager.\n */\n function pause() external {\n _ensureAllowed(\"pause()\");\n _pause();\n }\n\n /**\n * @notice Resumes Token\n * @custom:access Controlled by AccessControlManager.\n */\n function unpause() external {\n _ensureAllowed(\"unpause()\");\n _unpause();\n }\n\n /**\n * @notice Function to update blacklist.\n * @param user_ User address to be affected.\n * @param value_ Boolean to toggle value.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits BlacklistUpdated event.\n */\n function updateBlacklist(address user_, bool value_) external {\n _ensureAllowed(\"updateBlacklist(address,bool)\");\n _blacklist[user_] = value_;\n emit BlacklistUpdated(user_, value_);\n }\n\n /**\n * @notice Sets the minitng cap for minter.\n * @param minter_ Minter address.\n * @param amount_ Cap for the minter.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintCapChanged.\n */\n function setMintCap(address minter_, uint256 amount_) external {\n _ensureAllowed(\"setMintCap(address,uint256)\");\n minterToCap[minter_] = amount_;\n emit MintCapChanged(minter_, amount_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract.\n * @dev Admin function to set the access control address.\n * @param newAccessControlAddress_ New address for the access control.\n * @custom:access Only owner.\n * @custom:event Emits NewAccessControlManager.\n * @custom:error ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.\n */\n function setAccessControlManager(address newAccessControlAddress_) external onlyOwner {\n ensureNonzeroAddress(newAccessControlAddress_);\n emit NewAccessControlManager(accessControlManager, newAccessControlAddress_);\n accessControlManager = newAccessControlAddress_;\n }\n\n /**\n * @notice Returns the blacklist status of the address.\n * @param user_ Address of user to check blacklist status.\n * @return bool status of blacklist.\n */\n function isBlackListed(address user_) external view returns (bool) {\n return _blacklist[user_];\n }\n\n /**\n * @dev Checks the minter cap and eligibility of receiver to receive tokens.\n * @param from_ Minter address.\n * @param to_ Receiver address.\n * @param amount_ Amount to be mint.\n */\n function _isEligibleToMint(address from_, address to_, uint256 amount_) internal {\n if (_blacklist[to_]) {\n revert MintNotAllowed(from_, to_);\n }\n uint256 mintingCap = minterToCap[from_];\n uint256 totalMintedOld = minterToMintedAmount[from_];\n uint256 totalMintedNew = totalMintedOld + amount_;\n\n if (totalMintedNew > mintingCap) {\n revert MintLimitExceed();\n }\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit = mintingCap - totalMintedNew;\n emit MintLimitDecreased(from_, availableLimit);\n }\n\n /**\n * @dev This is post hook of burn function, increases minitng limit of the minter.\n * @param from_ Minter address.\n * @param amount_ Amount burned.\n */\n function _increaseMintLimit(address from_, uint256 amount_) internal {\n uint256 totalMintedOld = minterToMintedAmount[from_];\n uint256 totalMintedNew = totalMintedOld - amount_;\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit = minterToCap[from_] - totalMintedNew;\n emit MintLimitIncreased(from_, availableLimit);\n }\n\n /// @dev Checks the caller is allowed to call the specified fuction\n function _ensureAllowed(string memory functionSig_) internal view {\n if (!IAccessControlManagerV8(accessControlManager).isAllowedToCall(msg.sender, functionSig_)) {\n revert Unauthorized();\n }\n }\n}\n" + }, + "contracts/Bridge/token/XVS.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\nimport { TokenController } from \"./TokenController.sol\";\n\n/**\n * @title XVS\n * @author Venus\n * @notice XVS contract serves as a customized ERC-20 token with additional minting and burning functionality.\n * It also incorporates access control features provided by the \"TokenController\" contract to ensure proper governance and restrictions on minting and burning operations.\n */\n\ncontract XVS is ERC20, TokenController {\n constructor(address accessControlManager_) ERC20(\"Venus XVS\", \"XVS\") TokenController(accessControlManager_) {}\n\n /**\n * @notice Creates `amount_` tokens and assigns them to `account_`, increasing\n * the total supply. Checks access and eligibility.\n * @param account_ Address to which tokens be assigned.\n * @param amount_ Amount of tokens to be assigned.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitDecreased with new available limit.\n * @custom:error MintNotAllowed is thrown when minting is not allowed to from_ address.\n * @custom:error MintLimitExceed is thrown when minting amount exceed the maximum cap.\n */\n function mint(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"mint(address,uint256)\");\n _isEligibleToMint(msg.sender, account_, amount_);\n _mint(account_, amount_);\n }\n\n /**\n * @notice Destroys `amount_` tokens from `account_`, reducing the\n * total supply. Checks access and eligibility.\n * @param account_ Address from which tokens be destroyed.\n * @param amount_ Amount of tokens to be destroyed.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitIncreased with new available limit.\n */\n function burn(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"burn(address,uint256)\");\n _burn(account_, amount_);\n _increaseMintLimit(msg.sender, amount_);\n }\n}\n" + }, + "contracts/Bridge/XVSBridgeAdmin.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.8.13;\n\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { IXVSProxyOFT } from \"./interfaces/IXVSProxyOFT.sol\";\n\n/**\n * @title XVSBridgeAdmin\n * @author Venus\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\n * It maintains a registry of function signatures and names,\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\n */\ncontract XVSBridgeAdmin is AccessControlledV8 {\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IXVSProxyOFT public immutable XVSBridge;\n /**\n * @notice A mapping keeps track of function signature associated with function name string.\n */\n mapping(bytes4 => string) public functionRegistry;\n\n // Event emitted when function registry updated\n event FunctionRegistryChanged(string signature, bool active);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address XVSBridge_) {\n ensureNonzeroAddress(XVSBridge_);\n XVSBridge = IXVSProxyOFT(XVSBridge_);\n _disableInitializers();\n }\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\n */\n function initialize(address accessControlManager_) external initializer {\n ensureNonzeroAddress(accessControlManager_);\n __AccessControlled_init(accessControlManager_);\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract\n * @custom:access Controlled by AccessControlManager.\n */\n fallback(bytes calldata data) external returns (bytes memory) {\n string memory fun = _getFunctionName(msg.sig);\n require(bytes(fun).length != 0, \"Function not found\");\n _checkAccessAllowed(fun);\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\n require(ok, \"call failed\");\n return res;\n }\n\n /**\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n */\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\n _checkAccessAllowed(\"setTrustedRemoteAddress(uint16,bytes)\");\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice A registry of functions that are allowed to be executed from proposals\n * @param signatures_ Function signature to be added or removed.\n * @param active_ bool value, should be true to add function.\n */\n function upsertSignature(string[] calldata signatures_, bool[] calldata active_) external onlyOwner {\n uint256 signatureLength = signatures_.length;\n require(signatureLength == active_.length, \"Input arrays must have the same length\");\n for (uint256 i; i < signatureLength; i++) {\n bytes4 sigHash = bytes4(keccak256(bytes(signatures_[i])));\n bytes memory signature = bytes(functionRegistry[sigHash]);\n if (active_[i] && signature.length == 0) {\n functionRegistry[sigHash] = signatures_[i];\n emit FunctionRegistryChanged(signatures_[i], true);\n } else if (!active_[i] && signature.length != 0) {\n delete functionRegistry[sigHash];\n emit FunctionRegistryChanged(signatures_[i], false);\n }\n }\n }\n\n /**\n * @notice This function transfer the ownership of the bridge from this contract to new owner.\n * @param newOwner_ New owner of the XVS Bridge.\n * @custom:access Controlled by AccessControlManager.\n */\n function transferBridgeOwnership(address newOwner_) external {\n _checkAccessAllowed(\"transferBridgeOwnership(address)\");\n ensureNonzeroAddress(newOwner_);\n XVSBridge.transferOwnership(newOwner_);\n }\n\n /**\n * @notice Returns bool = true if srcAddress_ is trustedRemote corresponds to chainId_.\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n */\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\n */\n function renounceOwnership() public override {}\n\n /**\n * @dev Returns function name string associated with function signature.\n */\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\n return functionRegistry[signature_];\n }\n\n function bytesToAddress(bytes calldata b) private pure returns (address) {\n return address(uint160(bytes20(b)));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200, + "details": { + "yul": true + } + }, + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/deployments/sepolia/solcInputs/df53eb8de81c9fdb7d3455a6cb9a397c.json b/deployments/sepolia/solcInputs/df53eb8de81c9fdb7d3455a6cb9a397c.json new file mode 100644 index 0000000..1843457 --- /dev/null +++ b/deployments/sepolia/solcInputs/df53eb8de81c9fdb7d3455a6cb9a397c.json @@ -0,0 +1,189 @@ +{ + "language": "Solidity", + "sources": { + "@layerzerolabs/solidity-examples/contracts/libraries/BytesLib.sol": { + "content": "// SPDX-License-Identifier: Unlicense\n/*\n * @title Solidity Bytes Arrays Utils\n * @author Gonçalo Sá \n *\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\n */\npragma solidity >=0.8.0 <0.9.0;\n\nlibrary BytesLib {\n function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {\n bytes memory tempBytes;\n\n assembly {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // Store the length of the first bytes array at the beginning of\n // the memory for tempBytes.\n let length := mload(_preBytes)\n mstore(tempBytes, length)\n\n // Maintain a memory counter for the current write location in the\n // temp bytes array by adding the 32 bytes for the array length to\n // the starting location.\n let mc := add(tempBytes, 0x20)\n // Stop copying when the memory counter reaches the length of the\n // first bytes array.\n let end := add(mc, length)\n\n for {\n // Initialize a copy counter to the start of the _preBytes data,\n // 32 bytes into its memory.\n let cc := add(_preBytes, 0x20)\n } lt(mc, end) {\n // Increase both counters by 32 bytes each iteration.\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n // Write the _preBytes data into the tempBytes memory 32 bytes\n // at a time.\n mstore(mc, mload(cc))\n }\n\n // Add the length of _postBytes to the current length of tempBytes\n // and store it as the new length in the first 32 bytes of the\n // tempBytes memory.\n length := mload(_postBytes)\n mstore(tempBytes, add(length, mload(tempBytes)))\n\n // Move the memory counter back from a multiple of 0x20 to the\n // actual end of the _preBytes data.\n mc := end\n // Stop copying when the memory counter reaches the new combined\n // length of the arrays.\n end := add(mc, length)\n\n for {\n let cc := add(_postBytes, 0x20)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n\n // Update the free-memory pointer by padding our last write location\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\n // next 32 byte block, then round down to the nearest multiple of\n // 32. If the sum of the length of the two arrays is zero then add\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\n mstore(\n 0x40,\n and(\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\n not(31) // Round down to the nearest 32 bytes.\n )\n )\n }\n\n return tempBytes;\n }\n\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\n assembly {\n // Read the first 32 bytes of _preBytes storage, which is the length\n // of the array. (We don't need to use the offset into the slot\n // because arrays use the entire slot.)\n let fslot := sload(_preBytes.slot)\n // Arrays of 31 bytes or less have an even value in their slot,\n // while longer arrays have an odd value. The actual length is\n // the slot divided by two for odd values, and the lowest order\n // byte divided by two for even values.\n // If the slot is even, bitwise and the slot with 255 and divide by\n // two to get the length. If the slot is odd, bitwise and the slot\n // with -1 and divide by two.\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n let mlength := mload(_postBytes)\n let newlength := add(slength, mlength)\n // slength can contain both the length and contents of the array\n // if length < 32 bytes so let's prepare for that\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\n switch add(lt(slength, 32), lt(newlength, 32))\n case 2 {\n // Since the new array still fits in the slot, we just need to\n // update the contents of the slot.\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\n sstore(\n _preBytes.slot,\n // all the modifications to the slot are inside this\n // next block\n add(\n // we can just add to the slot contents because the\n // bytes we want to change are the LSBs\n fslot,\n add(\n mul(\n div(\n // load the bytes from memory\n mload(add(_postBytes, 0x20)),\n // zero all bytes to the right\n exp(0x100, sub(32, mlength))\n ),\n // and now shift left the number of bytes to\n // leave space for the length in the slot\n exp(0x100, sub(32, newlength))\n ),\n // increase length by the double of the memory\n // bytes length\n mul(mlength, 2)\n )\n )\n )\n }\n case 1 {\n // The stored value fits in the slot, but the combined value\n // will exceed it.\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes.slot)\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n\n // save new length\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\n\n // The contents of the _postBytes array start 32 bytes into\n // the structure. Our first read should obtain the `submod`\n // bytes that can fit into the unused space in the last word\n // of the stored array. To get this, we read 32 bytes starting\n // from `submod`, so the data we read overlaps with the array\n // contents by `submod` bytes. Masking the lowest-order\n // `submod` bytes allows us to add that value directly to the\n // stored value.\n\n let submod := sub(32, slength)\n let mc := add(_postBytes, submod)\n let end := add(_postBytes, mlength)\n let mask := sub(exp(0x100, submod), 1)\n\n sstore(sc, add(and(fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00), and(mload(mc), mask)))\n\n for {\n mc := add(mc, 0x20)\n sc := add(sc, 1)\n } lt(mc, end) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n sstore(sc, mload(mc))\n }\n\n mask := exp(0x100, sub(mc, end))\n\n sstore(sc, mul(div(mload(mc), mask), mask))\n }\n default {\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes.slot)\n // Start copying to the last used word of the stored array.\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n\n // save new length\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\n\n // Copy over the first `submod` bytes of the new data as in\n // case 1 above.\n let slengthmod := mod(slength, 32)\n let mlengthmod := mod(mlength, 32)\n let submod := sub(32, slengthmod)\n let mc := add(_postBytes, submod)\n let end := add(_postBytes, mlength)\n let mask := sub(exp(0x100, submod), 1)\n\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\n\n for {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } lt(mc, end) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n sstore(sc, mload(mc))\n }\n\n mask := exp(0x100, sub(mc, end))\n\n sstore(sc, mul(div(mload(mc), mask), mask))\n }\n }\n }\n\n function slice(\n bytes memory _bytes,\n uint _start,\n uint _length\n ) internal pure returns (bytes memory) {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n\n bytes memory tempBytes;\n\n assembly {\n switch iszero(_length)\n case 0 {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // The first word of the slice result is potentially a partial\n // word read from the original array. To read it, we calculate\n // the length of that partial word and start copying that many\n // bytes into the array. The first word we copy will start with\n // data we don't care about, but the last `lengthmod` bytes will\n // land at the beginning of the contents of the new array. When\n // we're done copying, we overwrite the full first word with\n // the actual length of the slice.\n let lengthmod := and(_length, 31)\n\n // The multiplication in the next line is necessary\n // because when slicing multiples of 32 bytes (lengthmod == 0)\n // the following copy loop was copying the origin's length\n // and then ending prematurely not copying everything it should.\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n\n for {\n // The multiplication in the next line has the same exact purpose\n // as the one above.\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n\n mstore(tempBytes, _length)\n\n //update free-memory pointer\n //allocating the array padded to 32 bytes like the compiler does now\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n //if we want a zero-length slice let's just return a zero-length array\n default {\n tempBytes := mload(0x40)\n //zero out the 32 bytes slice we are about to return\n //we need to do it because Solidity does not garbage collect\n mstore(tempBytes, 0)\n\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n\n return tempBytes;\n }\n\n function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) {\n require(_bytes.length >= _start + 20, \"toAddress_outOfBounds\");\n address tempAddress;\n\n assembly {\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\n }\n\n return tempAddress;\n }\n\n function toUint8(bytes memory _bytes, uint _start) internal pure returns (uint8) {\n require(_bytes.length >= _start + 1, \"toUint8_outOfBounds\");\n uint8 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x1), _start))\n }\n\n return tempUint;\n }\n\n function toUint16(bytes memory _bytes, uint _start) internal pure returns (uint16) {\n require(_bytes.length >= _start + 2, \"toUint16_outOfBounds\");\n uint16 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x2), _start))\n }\n\n return tempUint;\n }\n\n function toUint32(bytes memory _bytes, uint _start) internal pure returns (uint32) {\n require(_bytes.length >= _start + 4, \"toUint32_outOfBounds\");\n uint32 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x4), _start))\n }\n\n return tempUint;\n }\n\n function toUint64(bytes memory _bytes, uint _start) internal pure returns (uint64) {\n require(_bytes.length >= _start + 8, \"toUint64_outOfBounds\");\n uint64 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x8), _start))\n }\n\n return tempUint;\n }\n\n function toUint96(bytes memory _bytes, uint _start) internal pure returns (uint96) {\n require(_bytes.length >= _start + 12, \"toUint96_outOfBounds\");\n uint96 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0xc), _start))\n }\n\n return tempUint;\n }\n\n function toUint128(bytes memory _bytes, uint _start) internal pure returns (uint128) {\n require(_bytes.length >= _start + 16, \"toUint128_outOfBounds\");\n uint128 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x10), _start))\n }\n\n return tempUint;\n }\n\n function toUint256(bytes memory _bytes, uint _start) internal pure returns (uint) {\n require(_bytes.length >= _start + 32, \"toUint256_outOfBounds\");\n uint tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x20), _start))\n }\n\n return tempUint;\n }\n\n function toBytes32(bytes memory _bytes, uint _start) internal pure returns (bytes32) {\n require(_bytes.length >= _start + 32, \"toBytes32_outOfBounds\");\n bytes32 tempBytes32;\n\n assembly {\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\n }\n\n return tempBytes32;\n }\n\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\n bool success = true;\n\n assembly {\n let length := mload(_preBytes)\n\n // if lengths don't match the arrays are not equal\n switch eq(length, mload(_postBytes))\n case 1 {\n // cb is a circuit breaker in the for loop since there's\n // no said feature for inline assembly loops\n // cb = 1 - don't breaker\n // cb = 0 - break\n let cb := 1\n\n let mc := add(_preBytes, 0x20)\n let end := add(mc, length)\n\n for {\n let cc := add(_postBytes, 0x20)\n // the next line is the loop condition:\n // while(uint256(mc < end) + cb == 2)\n } eq(add(lt(mc, end), cb), 2) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n // if any of these checks fails then arrays are not equal\n if iszero(eq(mload(mc), mload(cc))) {\n // unsuccess:\n success := 0\n cb := 0\n }\n }\n }\n default {\n // unsuccess:\n success := 0\n }\n }\n\n return success;\n }\n\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {\n bool success = true;\n\n assembly {\n // we know _preBytes_offset is 0\n let fslot := sload(_preBytes.slot)\n // Decode the length of the stored array like in concatStorage().\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n let mlength := mload(_postBytes)\n\n // if lengths don't match the arrays are not equal\n switch eq(slength, mlength)\n case 1 {\n // slength can contain both the length and contents of the array\n // if length < 32 bytes so let's prepare for that\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\n if iszero(iszero(slength)) {\n switch lt(slength, 32)\n case 1 {\n // blank the last byte which is the length\n fslot := mul(div(fslot, 0x100), 0x100)\n\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\n // unsuccess:\n success := 0\n }\n }\n default {\n // cb is a circuit breaker in the for loop since there's\n // no said feature for inline assembly loops\n // cb = 1 - don't breaker\n // cb = 0 - break\n let cb := 1\n\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes.slot)\n let sc := keccak256(0x0, 0x20)\n\n let mc := add(_postBytes, 0x20)\n let end := add(mc, mlength)\n\n // the next line is the loop condition:\n // while(uint256(mc < end) + cb == 2)\n for {\n\n } eq(add(lt(mc, end), cb), 2) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n if iszero(eq(sload(sc), mload(mc))) {\n // unsuccess:\n success := 0\n cb := 0\n }\n }\n }\n }\n }\n default {\n // unsuccess:\n success := 0\n }\n }\n\n return success;\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/libraries/ExcessivelySafeCall.sol": { + "content": "// SPDX-License-Identifier: MIT OR Apache-2.0\npragma solidity >=0.7.6;\n\nlibrary ExcessivelySafeCall {\n uint constant LOW_28_MASK = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\n\n /// @notice Use when you _really_ really _really_ don't trust the called\n /// contract. This prevents the called contract from causing reversion of\n /// the caller in as many ways as we can.\n /// @dev The main difference between this and a solidity low-level call is\n /// that we limit the number of bytes that the callee can cause to be\n /// copied to caller memory. This prevents stupid things like malicious\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\n /// to memory.\n /// @param _target The address to call\n /// @param _gas The amount of gas to forward to the remote contract\n /// @param _maxCopy The maximum number of bytes of returndata to copy\n /// to memory.\n /// @param _calldata The data to send to the remote contract\n /// @return success and returndata, as `.call()`. Returndata is capped to\n /// `_maxCopy` bytes.\n function excessivelySafeCall(\n address _target,\n uint _gas,\n uint16 _maxCopy,\n bytes memory _calldata\n ) internal returns (bool, bytes memory) {\n // set up for assembly call\n uint _toCopy;\n bool _success;\n bytes memory _returnData = new bytes(_maxCopy);\n // dispatch message to recipient\n // by assembly calling \"handle\" function\n // we call via assembly to avoid memcopying a very large returndata\n // returned by a malicious contract\n assembly {\n _success := call(\n _gas, // gas\n _target, // recipient\n 0, // ether value\n add(_calldata, 0x20), // inloc\n mload(_calldata), // inlen\n 0, // outloc\n 0 // outlen\n )\n // limit our copy to 256 bytes\n _toCopy := returndatasize()\n if gt(_toCopy, _maxCopy) {\n _toCopy := _maxCopy\n }\n // Store the length of the copied bytes\n mstore(_returnData, _toCopy)\n // copy the bytes from returndata[0:_toCopy]\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\n }\n return (_success, _returnData);\n }\n\n /// @notice Use when you _really_ really _really_ don't trust the called\n /// contract. This prevents the called contract from causing reversion of\n /// the caller in as many ways as we can.\n /// @dev The main difference between this and a solidity low-level call is\n /// that we limit the number of bytes that the callee can cause to be\n /// copied to caller memory. This prevents stupid things like malicious\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\n /// to memory.\n /// @param _target The address to call\n /// @param _gas The amount of gas to forward to the remote contract\n /// @param _maxCopy The maximum number of bytes of returndata to copy\n /// to memory.\n /// @param _calldata The data to send to the remote contract\n /// @return success and returndata, as `.call()`. Returndata is capped to\n /// `_maxCopy` bytes.\n function excessivelySafeStaticCall(\n address _target,\n uint _gas,\n uint16 _maxCopy,\n bytes memory _calldata\n ) internal view returns (bool, bytes memory) {\n // set up for assembly call\n uint _toCopy;\n bool _success;\n bytes memory _returnData = new bytes(_maxCopy);\n // dispatch message to recipient\n // by assembly calling \"handle\" function\n // we call via assembly to avoid memcopying a very large returndata\n // returned by a malicious contract\n assembly {\n _success := staticcall(\n _gas, // gas\n _target, // recipient\n add(_calldata, 0x20), // inloc\n mload(_calldata), // inlen\n 0, // outloc\n 0 // outlen\n )\n // limit our copy to 256 bytes\n _toCopy := returndatasize()\n if gt(_toCopy, _maxCopy) {\n _toCopy := _maxCopy\n }\n // Store the length of the copied bytes\n mstore(_returnData, _toCopy)\n // copy the bytes from returndata[0:_toCopy]\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\n }\n return (_success, _returnData);\n }\n\n /**\n * @notice Swaps function selectors in encoded contract calls\n * @dev Allows reuse of encoded calldata for functions with identical\n * argument types but different names. It simply swaps out the first 4 bytes\n * for the new selector. This function modifies memory in place, and should\n * only be used with caution.\n * @param _newSelector The new 4-byte selector\n * @param _buf The encoded contract args\n */\n function swapSelector(bytes4 _newSelector, bytes memory _buf) internal pure {\n require(_buf.length >= 4);\n uint _mask = LOW_28_MASK;\n assembly {\n // load the first word of\n let _word := mload(add(_buf, 0x20))\n // mask out the top 4 bytes\n // /x\n _word := and(_word, _mask)\n _word := or(_newSelector, _word)\n mstore(add(_buf, 0x20), _word)\n }\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroEndpoint.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\nimport \"./ILayerZeroUserApplicationConfig.sol\";\n\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\n // @param _dstChainId - the destination chain identifier\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\n // @param _payload - a custom bytes payload to send to the destination contract\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes calldata _adapterParams\n ) external payable;\n\n // @notice used by the messaging library to publish verified payload\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source contract (as bytes) at the source chain\n // @param _dstAddress - the address on destination chain\n // @param _nonce - the unbound message ordering nonce\n // @param _gasLimit - the gas limit for external contract execution\n // @param _payload - verified payload to send to the destination contract\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n address _dstAddress,\n uint64 _nonce,\n uint _gasLimit,\n bytes calldata _payload\n ) external;\n\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\n\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\n // @param _srcAddress - the source chain contract address\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\n\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\n // @param _dstChainId - the destination chain identifier\n // @param _userApplication - the user app address on this EVM chain\n // @param _payload - the custom message to send over LayerZero\n // @param _payInZRO - if false, user app pays the protocol fee in native token\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes calldata _payload,\n bool _payInZRO,\n bytes calldata _adapterParam\n ) external view returns (uint nativeFee, uint zroFee);\n\n // @notice get this Endpoint's immutable source identifier\n function getChainId() external view returns (uint16);\n\n // @notice the interface to retry failed message on this Endpoint destination\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n // @param _payload - the payload to be retried\n function retryPayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n bytes calldata _payload\n ) external;\n\n // @notice query if any STORED payload (message blocking) at the endpoint.\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\n\n // @notice query if the _libraryAddress is valid for sending msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getSendLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the _libraryAddress is valid for receiving msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the non-reentrancy guard for send() is on\n // @return true if the guard is on. false otherwise\n function isSendingPayload() external view returns (bool);\n\n // @notice query if the non-reentrancy guard for receive() is on\n // @return true if the guard is on. false otherwise\n function isReceivingPayload() external view returns (bool);\n\n // @notice get the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _userApplication - the contract address of the user application\n // @param _configType - type of configuration. every messaging library has its own convention.\n function getConfig(\n uint16 _version,\n uint16 _chainId,\n address _userApplication,\n uint _configType\n ) external view returns (bytes memory);\n\n // @notice get the send() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getSendVersion(address _userApplication) external view returns (uint16);\n\n // @notice get the lzReceive() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getReceiveVersion(address _userApplication) external view returns (uint16);\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroReceiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\ninterface ILayerZeroReceiver {\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\n // @param _srcChainId - the source endpoint identifier\n // @param _srcAddress - the source sending contract address from the source chain\n // @param _nonce - the ordered message nonce\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\n function lzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) external;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroUserApplicationConfig.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\ninterface ILayerZeroUserApplicationConfig {\n // @notice set the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _configType - type of configuration. every messaging library has its own convention.\n // @param _config - configuration in the bytes. can encode arbitrary content.\n function setConfig(\n uint16 _version,\n uint16 _chainId,\n uint _configType,\n bytes calldata _config\n ) external;\n\n // @notice set the send() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setSendVersion(uint16 _version) external;\n\n // @notice set the lzReceive() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setReceiveVersion(uint16 _version) external;\n\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\n // @param _srcChainId - the chainId of the source chain\n // @param _srcAddress - the contract address of the source contract at the source chain\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/libs/LzLib.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity >=0.6.0;\npragma experimental ABIEncoderV2;\n\nlibrary LzLib {\n // LayerZero communication\n struct CallParams {\n address payable refundAddress;\n address zroPaymentAddress;\n }\n\n //---------------------------------------------------------------------------\n // Address type handling\n\n struct AirdropParams {\n uint airdropAmount;\n bytes32 airdropAddress;\n }\n\n function buildAdapterParams(LzLib.AirdropParams memory _airdropParams, uint _uaGasLimit) internal pure returns (bytes memory adapterParams) {\n if (_airdropParams.airdropAmount == 0 && _airdropParams.airdropAddress == bytes32(0x0)) {\n adapterParams = buildDefaultAdapterParams(_uaGasLimit);\n } else {\n adapterParams = buildAirdropAdapterParams(_uaGasLimit, _airdropParams);\n }\n }\n\n // Build Adapter Params\n function buildDefaultAdapterParams(uint _uaGas) internal pure returns (bytes memory) {\n // txType 1\n // bytes [2 32 ]\n // fields [txType extraGas]\n return abi.encodePacked(uint16(1), _uaGas);\n }\n\n function buildAirdropAdapterParams(uint _uaGas, AirdropParams memory _params) internal pure returns (bytes memory) {\n require(_params.airdropAmount > 0, \"Airdrop amount must be greater than 0\");\n require(_params.airdropAddress != bytes32(0x0), \"Airdrop address must be set\");\n\n // txType 2\n // bytes [2 32 32 bytes[] ]\n // fields [txType extraGas dstNativeAmt dstNativeAddress]\n return abi.encodePacked(uint16(2), _uaGas, _params.airdropAmount, _params.airdropAddress);\n }\n\n function getGasLimit(bytes memory _adapterParams) internal pure returns (uint gasLimit) {\n require(_adapterParams.length == 34 || _adapterParams.length > 66, \"Invalid adapterParams\");\n assembly {\n gasLimit := mload(add(_adapterParams, 34))\n }\n }\n\n // Decode Adapter Params\n function decodeAdapterParams(bytes memory _adapterParams)\n internal\n pure\n returns (\n uint16 txType,\n uint uaGas,\n uint airdropAmount,\n address payable airdropAddress\n )\n {\n require(_adapterParams.length == 34 || _adapterParams.length > 66, \"Invalid adapterParams\");\n assembly {\n txType := mload(add(_adapterParams, 2))\n uaGas := mload(add(_adapterParams, 34))\n }\n require(txType == 1 || txType == 2, \"Unsupported txType\");\n require(uaGas > 0, \"Gas too low\");\n\n if (txType == 2) {\n assembly {\n airdropAmount := mload(add(_adapterParams, 66))\n airdropAddress := mload(add(_adapterParams, 86))\n }\n }\n }\n\n //---------------------------------------------------------------------------\n // Address type handling\n function bytes32ToAddress(bytes32 _bytes32Address) internal pure returns (address _address) {\n return address(uint160(uint(_bytes32Address)));\n }\n\n function addressToBytes32(address _address) internal pure returns (bytes32 _bytes32Address) {\n return bytes32(uint(uint160(_address)));\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/LzApp.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"./interfaces/ILayerZeroReceiver.sol\";\nimport \"./interfaces/ILayerZeroUserApplicationConfig.sol\";\nimport \"./interfaces/ILayerZeroEndpoint.sol\";\nimport \"../libraries/BytesLib.sol\";\n\n/*\n * a generic LzReceiver implementation\n */\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\n using BytesLib for bytes;\n\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\n uint public constant DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\n\n ILayerZeroEndpoint public immutable lzEndpoint;\n mapping(uint16 => bytes) public trustedRemoteLookup;\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\n mapping(uint16 => uint) public payloadSizeLimitLookup;\n address public precrime;\n\n event SetPrecrime(address precrime);\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\n\n constructor(address _endpoint) {\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\n }\n\n function lzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) public virtual override {\n // lzReceive must be called by the endpoint for security\n require(_msgSender() == address(lzEndpoint), \"LzApp: invalid endpoint caller\");\n\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\n require(\n _srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote),\n \"LzApp: invalid source sending contract\"\n );\n\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\n }\n\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\n function _blockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual;\n\n function _lzSend(\n uint16 _dstChainId,\n bytes memory _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams,\n uint _nativeFee\n ) internal virtual {\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\n require(trustedRemote.length != 0, \"LzApp: destination chain is not a trusted source\");\n _checkPayloadSize(_dstChainId, _payload.length);\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\n }\n\n function _checkGasLimit(\n uint16 _dstChainId,\n uint16 _type,\n bytes memory _adapterParams,\n uint _extraGas\n ) internal view virtual {\n uint providedGasLimit = _getGasLimit(_adapterParams);\n uint minGasLimit = minDstGasLookup[_dstChainId][_type];\n require(minGasLimit > 0, \"LzApp: minGasLimit not set\");\n require(providedGasLimit >= minGasLimit + _extraGas, \"LzApp: gas limit is too low\");\n }\n\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\n require(_adapterParams.length >= 34, \"LzApp: invalid adapterParams\");\n assembly {\n gasLimit := mload(add(_adapterParams, 34))\n }\n }\n\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\n if (payloadSizeLimit == 0) {\n // use default if not set\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\n }\n require(_payloadSize <= payloadSizeLimit, \"LzApp: payload size is too large\");\n }\n\n //---------------------------UserApplication config----------------------------------------\n function getConfig(\n uint16 _version,\n uint16 _chainId,\n address,\n uint _configType\n ) external view returns (bytes memory) {\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\n }\n\n // generic config for LayerZero user Application\n function setConfig(\n uint16 _version,\n uint16 _chainId,\n uint _configType,\n bytes calldata _config\n ) external override onlyOwner {\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\n }\n\n function setSendVersion(uint16 _version) external override onlyOwner {\n lzEndpoint.setSendVersion(_version);\n }\n\n function setReceiveVersion(uint16 _version) external override onlyOwner {\n lzEndpoint.setReceiveVersion(_version);\n }\n\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\n }\n\n // _path = abi.encodePacked(remoteAddress, localAddress)\n // this function set the trusted path for the cross-chain communication\n function setTrustedRemote(uint16 _remoteChainId, bytes calldata _path) external onlyOwner {\n trustedRemoteLookup[_remoteChainId] = _path;\n emit SetTrustedRemote(_remoteChainId, _path);\n }\n\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\n }\n\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\n bytes memory path = trustedRemoteLookup[_remoteChainId];\n require(path.length != 0, \"LzApp: no trusted path record\");\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\n }\n\n function setPrecrime(address _precrime) external onlyOwner {\n precrime = _precrime;\n emit SetPrecrime(_precrime);\n }\n\n function setMinDstGas(\n uint16 _dstChainId,\n uint16 _packetType,\n uint _minGas\n ) external onlyOwner {\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\n }\n\n // if the size is 0, it means default size limit\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\n payloadSizeLimitLookup[_dstChainId] = _size;\n }\n\n //--------------------------- VIEW FUNCTION ----------------------------------------\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\n return keccak256(trustedSource) == keccak256(_srcAddress);\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/mocks/LZEndpointMock.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.0;\npragma abicoder v2;\n\nimport \"../interfaces/ILayerZeroReceiver.sol\";\nimport \"../interfaces/ILayerZeroEndpoint.sol\";\nimport \"../libs/LzLib.sol\";\n\n/*\nlike a real LayerZero endpoint but can be mocked, which handle message transmission, verification, and receipt.\n- blocking: LayerZero provides ordered delivery of messages from a given sender to a destination chain.\n- non-reentrancy: endpoint has a non-reentrancy guard for both the send() and receive(), respectively.\n- adapter parameters: allows UAs to add arbitrary transaction params in the send() function, like airdrop on destination chain.\nunlike a real LayerZero endpoint, it is\n- no messaging library versioning\n- send() will short circuit to lzReceive()\n- no user application configuration\n*/\ncontract LZEndpointMock is ILayerZeroEndpoint {\n uint8 internal constant _NOT_ENTERED = 1;\n uint8 internal constant _ENTERED = 2;\n\n mapping(address => address) public lzEndpointLookup;\n\n uint16 public mockChainId;\n bool public nextMsgBlocked;\n\n // fee config\n RelayerFeeConfig public relayerFeeConfig;\n ProtocolFeeConfig public protocolFeeConfig;\n uint public oracleFee;\n bytes public defaultAdapterParams;\n\n // path = remote addrss + local address\n // inboundNonce = [srcChainId][path].\n mapping(uint16 => mapping(bytes => uint64)) public inboundNonce;\n //todo: this is a hack\n // outboundNonce = [dstChainId][srcAddress]\n mapping(uint16 => mapping(address => uint64)) public outboundNonce;\n // // outboundNonce = [dstChainId][path].\n // mapping(uint16 => mapping(bytes => uint64)) public outboundNonce;\n // storedPayload = [srcChainId][path]\n mapping(uint16 => mapping(bytes => StoredPayload)) public storedPayload;\n // msgToDeliver = [srcChainId][path]\n mapping(uint16 => mapping(bytes => QueuedPayload[])) public msgsToDeliver;\n\n // reentrancy guard\n uint8 internal _send_entered_state = 1;\n uint8 internal _receive_entered_state = 1;\n\n struct ProtocolFeeConfig {\n uint zroFee;\n uint nativeBP;\n }\n\n struct RelayerFeeConfig {\n uint128 dstPriceRatio; // 10^10\n uint128 dstGasPriceInWei;\n uint128 dstNativeAmtCap;\n uint64 baseGas;\n uint64 gasPerByte;\n }\n\n struct StoredPayload {\n uint64 payloadLength;\n address dstAddress;\n bytes32 payloadHash;\n }\n\n struct QueuedPayload {\n address dstAddress;\n uint64 nonce;\n bytes payload;\n }\n\n modifier sendNonReentrant() {\n require(_send_entered_state == _NOT_ENTERED, \"LayerZeroMock: no send reentrancy\");\n _send_entered_state = _ENTERED;\n _;\n _send_entered_state = _NOT_ENTERED;\n }\n\n modifier receiveNonReentrant() {\n require(_receive_entered_state == _NOT_ENTERED, \"LayerZeroMock: no receive reentrancy\");\n _receive_entered_state = _ENTERED;\n _;\n _receive_entered_state = _NOT_ENTERED;\n }\n\n event UaForceResumeReceive(uint16 chainId, bytes srcAddress);\n event PayloadCleared(uint16 srcChainId, bytes srcAddress, uint64 nonce, address dstAddress);\n event PayloadStored(uint16 srcChainId, bytes srcAddress, address dstAddress, uint64 nonce, bytes payload, bytes reason);\n event ValueTransferFailed(address indexed to, uint indexed quantity);\n\n constructor(uint16 _chainId) {\n mockChainId = _chainId;\n\n // init config\n relayerFeeConfig = RelayerFeeConfig({\n dstPriceRatio: 1e10, // 1:1, same chain, same native coin\n dstGasPriceInWei: 1e10,\n dstNativeAmtCap: 1e19,\n baseGas: 100,\n gasPerByte: 1\n });\n protocolFeeConfig = ProtocolFeeConfig({zroFee: 1e18, nativeBP: 1000}); // BP 0.1\n oracleFee = 1e16;\n defaultAdapterParams = LzLib.buildDefaultAdapterParams(200000);\n }\n\n // ------------------------------ ILayerZeroEndpoint Functions ------------------------------\n function send(\n uint16 _chainId,\n bytes memory _path,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams\n ) external payable override sendNonReentrant {\n require(_path.length == 40, \"LayerZeroMock: incorrect remote address size\"); // only support evm chains\n\n address dstAddr;\n assembly {\n dstAddr := mload(add(_path, 20))\n }\n\n address lzEndpoint = lzEndpointLookup[dstAddr];\n require(lzEndpoint != address(0), \"LayerZeroMock: destination LayerZero Endpoint not found\");\n\n // not handle zro token\n bytes memory adapterParams = _adapterParams.length > 0 ? _adapterParams : defaultAdapterParams;\n (uint nativeFee, ) = estimateFees(_chainId, msg.sender, _payload, _zroPaymentAddress != address(0x0), adapterParams);\n require(msg.value >= nativeFee, \"LayerZeroMock: not enough native for fees\");\n\n uint64 nonce = ++outboundNonce[_chainId][msg.sender];\n\n // refund if they send too much\n uint amount = msg.value - nativeFee;\n if (amount > 0) {\n (bool success, ) = _refundAddress.call{value: amount}(\"\");\n require(success, \"LayerZeroMock: failed to refund\");\n }\n\n // Mock the process of receiving msg on dst chain\n // Mock the relayer paying the dstNativeAddr the amount of extra native token\n (, uint extraGas, uint dstNativeAmt, address payable dstNativeAddr) = LzLib.decodeAdapterParams(adapterParams);\n if (dstNativeAmt > 0) {\n (bool success, ) = dstNativeAddr.call{value: dstNativeAmt}(\"\");\n if (!success) {\n emit ValueTransferFailed(dstNativeAddr, dstNativeAmt);\n }\n }\n\n bytes memory srcUaAddress = abi.encodePacked(msg.sender, dstAddr); // cast this address to bytes\n bytes memory payload = _payload;\n LZEndpointMock(lzEndpoint).receivePayload(mockChainId, srcUaAddress, dstAddr, nonce, extraGas, payload);\n }\n\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _path,\n address _dstAddress,\n uint64 _nonce,\n uint _gasLimit,\n bytes calldata _payload\n ) external override receiveNonReentrant {\n StoredPayload storage sp = storedPayload[_srcChainId][_path];\n\n // assert and increment the nonce. no message shuffling\n require(_nonce == ++inboundNonce[_srcChainId][_path], \"LayerZeroMock: wrong nonce\");\n\n // queue the following msgs inside of a stack to simulate a successful send on src, but not fully delivered on dst\n if (sp.payloadHash != bytes32(0)) {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_path];\n QueuedPayload memory newMsg = QueuedPayload(_dstAddress, _nonce, _payload);\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n // shift all the msgs over so we can treat this like a fifo via array.pop()\n if (msgs.length > 0) {\n // extend the array\n msgs.push(newMsg);\n\n // shift all the indexes up for pop()\n for (uint i = 0; i < msgs.length - 1; i++) {\n msgs[i + 1] = msgs[i];\n }\n\n // put the newMsg at the bottom of the stack\n msgs[0] = newMsg;\n } else {\n msgs.push(newMsg);\n }\n } else if (nextMsgBlocked) {\n storedPayload[_srcChainId][_path] = StoredPayload(uint64(_payload.length), _dstAddress, keccak256(_payload));\n emit PayloadStored(_srcChainId, _path, _dstAddress, _nonce, _payload, bytes(\"\"));\n // ensure the next msgs that go through are no longer blocked\n nextMsgBlocked = false;\n } else {\n try ILayerZeroReceiver(_dstAddress).lzReceive{gas: _gasLimit}(_srcChainId, _path, _nonce, _payload) {} catch (bytes memory reason) {\n storedPayload[_srcChainId][_path] = StoredPayload(uint64(_payload.length), _dstAddress, keccak256(_payload));\n emit PayloadStored(_srcChainId, _path, _dstAddress, _nonce, _payload, reason);\n // ensure the next msgs that go through are no longer blocked\n nextMsgBlocked = false;\n }\n }\n }\n\n function getInboundNonce(uint16 _chainID, bytes calldata _path) external view override returns (uint64) {\n return inboundNonce[_chainID][_path];\n }\n\n function getOutboundNonce(uint16 _chainID, address _srcAddress) external view override returns (uint64) {\n return outboundNonce[_chainID][_srcAddress];\n }\n\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes memory _payload,\n bool _payInZRO,\n bytes memory _adapterParams\n ) public view override returns (uint nativeFee, uint zroFee) {\n bytes memory adapterParams = _adapterParams.length > 0 ? _adapterParams : defaultAdapterParams;\n\n // Relayer Fee\n uint relayerFee = _getRelayerFee(_dstChainId, 1, _userApplication, _payload.length, adapterParams);\n\n // LayerZero Fee\n uint protocolFee = _getProtocolFees(_payInZRO, relayerFee, oracleFee);\n _payInZRO ? zroFee = protocolFee : nativeFee = protocolFee;\n\n // return the sum of fees\n nativeFee = nativeFee + relayerFee + oracleFee;\n }\n\n function getChainId() external view override returns (uint16) {\n return mockChainId;\n }\n\n function retryPayload(\n uint16 _srcChainId,\n bytes calldata _path,\n bytes calldata _payload\n ) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_path];\n require(sp.payloadHash != bytes32(0), \"LayerZeroMock: no stored payload\");\n require(_payload.length == sp.payloadLength && keccak256(_payload) == sp.payloadHash, \"LayerZeroMock: invalid payload\");\n\n address dstAddress = sp.dstAddress;\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n uint64 nonce = inboundNonce[_srcChainId][_path];\n\n ILayerZeroReceiver(dstAddress).lzReceive(_srcChainId, _path, nonce, _payload);\n emit PayloadCleared(_srcChainId, _path, nonce, dstAddress);\n }\n\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _path) external view override returns (bool) {\n StoredPayload storage sp = storedPayload[_srcChainId][_path];\n return sp.payloadHash != bytes32(0);\n }\n\n function getSendLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n\n function getReceiveLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n\n function isSendingPayload() external view override returns (bool) {\n return _send_entered_state == _ENTERED;\n }\n\n function isReceivingPayload() external view override returns (bool) {\n return _receive_entered_state == _ENTERED;\n }\n\n function getConfig(\n uint16, /*_version*/\n uint16, /*_chainId*/\n address, /*_ua*/\n uint /*_configType*/\n ) external pure override returns (bytes memory) {\n return \"\";\n }\n\n function getSendVersion(\n address /*_userApplication*/\n ) external pure override returns (uint16) {\n return 1;\n }\n\n function getReceiveVersion(\n address /*_userApplication*/\n ) external pure override returns (uint16) {\n return 1;\n }\n\n function setConfig(\n uint16, /*_version*/\n uint16, /*_chainId*/\n uint, /*_configType*/\n bytes memory /*_config*/\n ) external override {}\n\n function setSendVersion(\n uint16 /*version*/\n ) external override {}\n\n function setReceiveVersion(\n uint16 /*version*/\n ) external override {}\n\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _path) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_path];\n // revert if no messages are cached. safeguard malicious UA behaviour\n require(sp.payloadHash != bytes32(0), \"LayerZeroMock: no stored payload\");\n require(sp.dstAddress == msg.sender, \"LayerZeroMock: invalid caller\");\n\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n emit UaForceResumeReceive(_srcChainId, _path);\n\n // resume the receiving of msgs after we force clear the \"stuck\" msg\n _clearMsgQue(_srcChainId, _path);\n }\n\n // ------------------------------ Other Public/External Functions --------------------------------------------------\n\n function getLengthOfQueue(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint) {\n return msgsToDeliver[_srcChainId][_srcAddress].length;\n }\n\n // used to simulate messages received get stored as a payload\n function blockNextMsg() external {\n nextMsgBlocked = true;\n }\n\n function setDestLzEndpoint(address destAddr, address lzEndpointAddr) external {\n lzEndpointLookup[destAddr] = lzEndpointAddr;\n }\n\n function setRelayerPrice(\n uint128 _dstPriceRatio,\n uint128 _dstGasPriceInWei,\n uint128 _dstNativeAmtCap,\n uint64 _baseGas,\n uint64 _gasPerByte\n ) external {\n relayerFeeConfig.dstPriceRatio = _dstPriceRatio;\n relayerFeeConfig.dstGasPriceInWei = _dstGasPriceInWei;\n relayerFeeConfig.dstNativeAmtCap = _dstNativeAmtCap;\n relayerFeeConfig.baseGas = _baseGas;\n relayerFeeConfig.gasPerByte = _gasPerByte;\n }\n\n function setProtocolFee(uint _zroFee, uint _nativeBP) external {\n protocolFeeConfig.zroFee = _zroFee;\n protocolFeeConfig.nativeBP = _nativeBP;\n }\n\n function setOracleFee(uint _oracleFee) external {\n oracleFee = _oracleFee;\n }\n\n function setDefaultAdapterParams(bytes memory _adapterParams) external {\n defaultAdapterParams = _adapterParams;\n }\n\n // --------------------- Internal Functions ---------------------\n // simulates the relayer pushing through the rest of the msgs that got delayed due to the stored payload\n function _clearMsgQue(uint16 _srcChainId, bytes calldata _path) internal {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_path];\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n while (msgs.length > 0) {\n QueuedPayload memory payload = msgs[msgs.length - 1];\n ILayerZeroReceiver(payload.dstAddress).lzReceive(_srcChainId, _path, payload.nonce, payload.payload);\n msgs.pop();\n }\n }\n\n function _getProtocolFees(\n bool _payInZro,\n uint _relayerFee,\n uint _oracleFee\n ) internal view returns (uint) {\n if (_payInZro) {\n return protocolFeeConfig.zroFee;\n } else {\n return ((_relayerFee + _oracleFee) * protocolFeeConfig.nativeBP) / 10000;\n }\n }\n\n function _getRelayerFee(\n uint16, /* _dstChainId */\n uint16, /* _outboundProofType */\n address, /* _userApplication */\n uint _payloadSize,\n bytes memory _adapterParams\n ) internal view returns (uint) {\n (uint16 txType, uint extraGas, uint dstNativeAmt, ) = LzLib.decodeAdapterParams(_adapterParams);\n uint totalRemoteToken; // = baseGas + extraGas + requiredNativeAmount\n if (txType == 2) {\n require(relayerFeeConfig.dstNativeAmtCap >= dstNativeAmt, \"LayerZeroMock: dstNativeAmt too large \");\n totalRemoteToken += dstNativeAmt;\n }\n // remoteGasTotal = dstGasPriceInWei * (baseGas + extraGas)\n uint remoteGasTotal = relayerFeeConfig.dstGasPriceInWei * (relayerFeeConfig.baseGas + extraGas);\n totalRemoteToken += remoteGasTotal;\n\n // tokenConversionRate = dstPrice / localPrice\n // basePrice = totalRemoteToken * tokenConversionRate\n uint basePrice = (totalRemoteToken * relayerFeeConfig.dstPriceRatio) / 10**10;\n\n // pricePerByte = (dstGasPriceInWei * gasPerBytes) * tokenConversionRate\n uint pricePerByte = (relayerFeeConfig.dstGasPriceInWei * relayerFeeConfig.gasPerByte * relayerFeeConfig.dstPriceRatio) / 10**10;\n\n return basePrice + _payloadSize * pricePerByte;\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/NonblockingLzApp.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./LzApp.sol\";\nimport \"../libraries/ExcessivelySafeCall.sol\";\n\n/*\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\n */\nabstract contract NonblockingLzApp is LzApp {\n using ExcessivelySafeCall for address;\n\n constructor(address _endpoint) LzApp(_endpoint) {}\n\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\n\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\n\n // overriding the virtual function in LzReceiver\n function _blockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual override {\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\n gasleft(),\n 150,\n abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload)\n );\n // try-catch all errors/exceptions\n if (!success) {\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\n }\n }\n\n function _storeFailedMessage(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload,\n bytes memory _reason\n ) internal virtual {\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\n }\n\n function nonblockingLzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) public virtual {\n // only internal transaction\n require(_msgSender() == address(this), \"NonblockingLzApp: caller must be LzApp\");\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\n }\n\n //@notice override this function\n function _nonblockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual;\n\n function retryMessage(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) public payable virtual {\n // assert there is message to retry\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\n require(payloadHash != bytes32(0), \"NonblockingLzApp: no stored message\");\n require(keccak256(_payload) == payloadHash, \"NonblockingLzApp: invalid payload\");\n // clear the stored message\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\n // execute the message. revert if it fails again\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./OFTCoreV2.sol\";\nimport \"./interfaces/IOFTV2.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nabstract contract BaseOFTV2 is OFTCoreV2, ERC165, IOFTV2 {\n constructor(uint8 _sharedDecimals, address _lzEndpoint) OFTCoreV2(_sharedDecimals, _lzEndpoint) {}\n\n /************************************************************************\n * public functions\n ************************************************************************/\n function sendFrom(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n LzCallParams calldata _callParams\n ) public payable virtual override {\n _send(_from, _dstChainId, _toAddress, _amount, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);\n }\n\n function sendAndCall(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes calldata _payload,\n uint64 _dstGasForCall,\n LzCallParams calldata _callParams\n ) public payable virtual override {\n _sendAndCall(\n _from,\n _dstChainId,\n _toAddress,\n _amount,\n _payload,\n _dstGasForCall,\n _callParams.refundAddress,\n _callParams.zroPaymentAddress,\n _callParams.adapterParams\n );\n }\n\n /************************************************************************\n * public view functions\n ************************************************************************/\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return interfaceId == type(IOFTV2).interfaceId || super.supportsInterface(interfaceId);\n }\n\n function estimateSendFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bool _useZro,\n bytes calldata _adapterParams\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\n return _estimateSendFee(_dstChainId, _toAddress, _amount, _useZro, _adapterParams);\n }\n\n function estimateSendAndCallFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes calldata _payload,\n uint64 _dstGasForCall,\n bool _useZro,\n bytes calldata _adapterParams\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\n return _estimateSendAndCallFee(_dstChainId, _toAddress, _amount, _payload, _dstGasForCall, _useZro, _adapterParams);\n }\n\n function circulatingSupply() public view virtual override returns (uint);\n\n function token() public view virtual override returns (address);\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/ICommonOFT.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\n\n/**\n * @dev Interface of the IOFT core standard\n */\ninterface ICommonOFT is IERC165 {\n\n struct LzCallParams {\n address payable refundAddress;\n address zroPaymentAddress;\n bytes adapterParams;\n }\n\n /**\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\n * _dstChainId - L0 defined chain id to send tokens too\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\n * _amount - amount of the tokens to transfer\n * _useZro - indicates to use zro to pay L0 fees\n * _adapterParam - flexible bytes array to indicate messaging adapter services in L0\n */\n function estimateSendFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\n\n function estimateSendAndCallFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\n\n /**\n * @dev returns the circulating amount of tokens on current chain\n */\n function circulatingSupply() external view returns (uint);\n\n /**\n * @dev returns the address of the ERC20 token\n */\n function token() external view returns (address);\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTReceiverV2.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity >=0.5.0;\n\ninterface IOFTReceiverV2 {\n /**\n * @dev Called by the OFT contract when tokens are received from source chain.\n * @param _srcChainId The chain id of the source chain.\n * @param _srcAddress The address of the OFT token contract on the source chain.\n * @param _nonce The nonce of the transaction on the source chain.\n * @param _from The address of the account who calls the sendAndCall() on the source chain.\n * @param _amount The amount of tokens to transfer.\n * @param _payload Additional data with no specified format.\n */\n function onOFTReceived(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes32 _from, uint _amount, bytes calldata _payload) external;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\nimport \"./ICommonOFT.sol\";\n\n/**\n * @dev Interface of the IOFT core standard\n */\ninterface IOFTV2 is ICommonOFT {\n\n /**\n * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`\n * `_from` the owner of token\n * `_dstChainId` the destination chain identifier\n * `_toAddress` can be any size depending on the `dstChainId`.\n * `_amount` the quantity of tokens in wei\n * `_refundAddress` the address LayerZero refunds if too much message fee is sent\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\n */\n function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, LzCallParams calldata _callParams) external payable;\n\n function sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, LzCallParams calldata _callParams) external payable;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTCoreV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../../../lzApp/NonblockingLzApp.sol\";\nimport \"../../../libraries/ExcessivelySafeCall.sol\";\nimport \"./interfaces/ICommonOFT.sol\";\nimport \"./interfaces/IOFTReceiverV2.sol\";\n\nabstract contract OFTCoreV2 is NonblockingLzApp {\n using BytesLib for bytes;\n using ExcessivelySafeCall for address;\n\n uint public constant NO_EXTRA_GAS = 0;\n\n // packet type\n uint8 public constant PT_SEND = 0;\n uint8 public constant PT_SEND_AND_CALL = 1;\n\n uint8 public immutable sharedDecimals;\n\n mapping(uint16 => mapping(bytes => mapping(uint64 => bool))) public creditedPackets;\n\n /**\n * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\n * `_nonce` is the outbound nonce\n */\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes32 indexed _toAddress, uint _amount);\n\n /**\n * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\n * `_nonce` is the inbound nonce.\n */\n event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\n\n event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\n\n event NonContractAddress(address _address);\n\n // _sharedDecimals should be the minimum decimals on all chains\n constructor(uint8 _sharedDecimals, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\n sharedDecimals = _sharedDecimals;\n }\n\n /************************************************************************\n * public functions\n ************************************************************************/\n function callOnOFTReceived(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes32 _from,\n address _to,\n uint _amount,\n bytes calldata _payload,\n uint _gasForCall\n ) public virtual {\n require(_msgSender() == address(this), \"OFTCore: caller must be OFTCore\");\n\n // send\n _amount = _transferFrom(address(this), _to, _amount);\n emit ReceiveFromChain(_srcChainId, _to, _amount);\n\n // call\n IOFTReceiverV2(_to).onOFTReceived{gas: _gasForCall}(_srcChainId, _srcAddress, _nonce, _from, _amount, _payload);\n }\n\n /************************************************************************\n * internal functions\n ************************************************************************/\n function _estimateSendFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bool _useZro,\n bytes memory _adapterParams\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\n // mock the payload for sendFrom()\n bytes memory payload = _encodeSendPayload(_toAddress, _ld2sd(_amount));\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\n }\n\n function _estimateSendAndCallFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes memory _payload,\n uint64 _dstGasForCall,\n bool _useZro,\n bytes memory _adapterParams\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\n // mock the payload for sendAndCall()\n bytes memory payload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(_amount), _payload, _dstGasForCall);\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\n }\n\n function _nonblockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual override {\n uint8 packetType = _payload.toUint8(0);\n\n if (packetType == PT_SEND) {\n _sendAck(_srcChainId, _srcAddress, _nonce, _payload);\n } else if (packetType == PT_SEND_AND_CALL) {\n _sendAndCallAck(_srcChainId, _srcAddress, _nonce, _payload);\n } else {\n revert(\"OFTCore: unknown packet type\");\n }\n }\n\n function _send(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams\n ) internal virtual returns (uint amount) {\n _checkGasLimit(_dstChainId, PT_SEND, _adapterParams, NO_EXTRA_GAS);\n\n (amount, ) = _removeDust(_amount);\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount); // amount returned should not have dust\n require(amount > 0, \"OFTCore: amount too small\");\n\n bytes memory lzPayload = _encodeSendPayload(_toAddress, _ld2sd(amount));\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\n\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\n }\n\n function _sendAck(\n uint16 _srcChainId,\n bytes memory,\n uint64,\n bytes memory _payload\n ) internal virtual {\n (address to, uint64 amountSD) = _decodeSendPayload(_payload);\n if (to == address(0)) {\n to = address(0xdead);\n }\n\n uint amount = _sd2ld(amountSD);\n amount = _creditTo(_srcChainId, to, amount);\n\n emit ReceiveFromChain(_srcChainId, to, amount);\n }\n\n function _sendAndCall(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes memory _payload,\n uint64 _dstGasForCall,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams\n ) internal virtual returns (uint amount) {\n _checkGasLimit(_dstChainId, PT_SEND_AND_CALL, _adapterParams, _dstGasForCall);\n\n (amount, ) = _removeDust(_amount);\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount);\n require(amount > 0, \"OFTCore: amount too small\");\n\n // encode the msg.sender into the payload instead of _from\n bytes memory lzPayload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(amount), _payload, _dstGasForCall);\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\n\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\n }\n\n function _sendAndCallAck(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual {\n (bytes32 from, address to, uint64 amountSD, bytes memory payloadForCall, uint64 gasForCall) = _decodeSendAndCallPayload(_payload);\n\n bool credited = creditedPackets[_srcChainId][_srcAddress][_nonce];\n uint amount = _sd2ld(amountSD);\n\n // credit to this contract first, and then transfer to receiver only if callOnOFTReceived() succeeds\n if (!credited) {\n amount = _creditTo(_srcChainId, address(this), amount);\n creditedPackets[_srcChainId][_srcAddress][_nonce] = true;\n }\n\n if (!_isContract(to)) {\n emit NonContractAddress(to);\n return;\n }\n\n // workaround for stack too deep\n uint16 srcChainId = _srcChainId;\n bytes memory srcAddress = _srcAddress;\n uint64 nonce = _nonce;\n bytes memory payload = _payload;\n bytes32 from_ = from;\n address to_ = to;\n uint amount_ = amount;\n bytes memory payloadForCall_ = payloadForCall;\n\n // no gas limit for the call if retry\n uint gas = credited ? gasleft() : gasForCall;\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\n gasleft(),\n 150,\n abi.encodeWithSelector(this.callOnOFTReceived.selector, srcChainId, srcAddress, nonce, from_, to_, amount_, payloadForCall_, gas)\n );\n\n if (success) {\n bytes32 hash = keccak256(payload);\n emit CallOFTReceivedSuccess(srcChainId, srcAddress, nonce, hash);\n } else {\n // store the failed message into the nonblockingLzApp\n _storeFailedMessage(srcChainId, srcAddress, nonce, payload, reason);\n }\n }\n\n function _isContract(address _account) internal view returns (bool) {\n return _account.code.length > 0;\n }\n\n function _ld2sd(uint _amount) internal view virtual returns (uint64) {\n uint amountSD = _amount / _ld2sdRate();\n require(amountSD <= type(uint64).max, \"OFTCore: amountSD overflow\");\n return uint64(amountSD);\n }\n\n function _sd2ld(uint64 _amountSD) internal view virtual returns (uint) {\n return _amountSD * _ld2sdRate();\n }\n\n function _removeDust(uint _amount) internal view virtual returns (uint amountAfter, uint dust) {\n dust = _amount % _ld2sdRate();\n amountAfter = _amount - dust;\n }\n\n function _encodeSendPayload(bytes32 _toAddress, uint64 _amountSD) internal view virtual returns (bytes memory) {\n return abi.encodePacked(PT_SEND, _toAddress, _amountSD);\n }\n\n function _decodeSendPayload(bytes memory _payload) internal view virtual returns (address to, uint64 amountSD) {\n require(_payload.toUint8(0) == PT_SEND && _payload.length == 41, \"OFTCore: invalid payload\");\n\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\n amountSD = _payload.toUint64(33);\n }\n\n function _encodeSendAndCallPayload(\n address _from,\n bytes32 _toAddress,\n uint64 _amountSD,\n bytes memory _payload,\n uint64 _dstGasForCall\n ) internal view virtual returns (bytes memory) {\n return abi.encodePacked(PT_SEND_AND_CALL, _toAddress, _amountSD, _addressToBytes32(_from), _dstGasForCall, _payload);\n }\n\n function _decodeSendAndCallPayload(bytes memory _payload)\n internal\n view\n virtual\n returns (\n bytes32 from,\n address to,\n uint64 amountSD,\n bytes memory payload,\n uint64 dstGasForCall\n )\n {\n require(_payload.toUint8(0) == PT_SEND_AND_CALL, \"OFTCore: invalid payload\");\n\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\n amountSD = _payload.toUint64(33);\n from = _payload.toBytes32(41);\n dstGasForCall = _payload.toUint64(73);\n payload = _payload.slice(81, _payload.length - 81);\n }\n\n function _addressToBytes32(address _address) internal pure virtual returns (bytes32) {\n return bytes32(uint(uint160(_address)));\n }\n\n function _debitFrom(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount\n ) internal virtual returns (uint);\n\n function _creditTo(\n uint16 _srcChainId,\n address _toAddress,\n uint _amount\n ) internal virtual returns (uint);\n\n function _transferFrom(\n address _from,\n address _to,\n uint _amount\n ) internal virtual returns (uint);\n\n function _ld2sdRate() internal view virtual returns (uint);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./OwnableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership} and {acceptOwnership}.\n *\n * This module is used through inheritance. It will make available all functions\n * from parent (Ownable).\n */\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\n function __Ownable2Step_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable2Step_init_unchained() internal onlyInitializing {\n }\n address private _pendingOwner;\n\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Returns the address of the pending owner.\n */\n function pendingOwner() public view virtual returns (address) {\n return _pendingOwner;\n }\n\n /**\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual override onlyOwner {\n _pendingOwner = newOwner;\n emit OwnershipTransferStarted(owner(), newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual override {\n delete _pendingOwner;\n super._transferOwnership(newOwner);\n }\n\n /**\n * @dev The new owner accepts the ownership transfer.\n */\n function acceptOwnership() public virtual {\n address sender = _msgSender();\n require(pendingOwner() == sender, \"Ownable2Step: caller is not the new owner\");\n _transferOwnership(sender);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Strings.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```solidity\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```solidity\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(account),\n \" is missing role \",\n Strings.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/IAccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\n\nimport \"./IAccessControlManagerV8.sol\";\n\n/**\n * @title AccessControlledV8\n * @author Venus\n * @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\n */\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\n /// @notice Access control manager contract\n IAccessControlManagerV8 private _accessControlManager;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n\n /// @notice Emitted when access control manager contract address is changed\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\n\n /// @notice Thrown when the action is prohibited by AccessControlManager\n error Unauthorized(address sender, address calledContract, string methodSignature);\n\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\n __Ownable2Step_init();\n __AccessControlled_init_unchained(accessControlManager_);\n }\n\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\n _setAccessControlManager(accessControlManager_);\n }\n\n /**\n * @notice Sets the address of AccessControlManager\n * @dev Admin function to set address of AccessControlManager\n * @param accessControlManager_ The new address of the AccessControlManager\n * @custom:event Emits NewAccessControlManager event\n * @custom:access Only Governance\n */\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\n _setAccessControlManager(accessControlManager_);\n }\n\n /**\n * @notice Returns the address of the access control manager contract\n */\n function accessControlManager() external view returns (IAccessControlManagerV8) {\n return _accessControlManager;\n }\n\n /**\n * @dev Internal function to set address of AccessControlManager\n * @param accessControlManager_ The new address of the AccessControlManager\n */\n function _setAccessControlManager(address accessControlManager_) internal {\n require(address(accessControlManager_) != address(0), \"invalid acess control manager address\");\n address oldAccessControlManager = address(_accessControlManager);\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\n }\n\n /**\n * @notice Reverts if the call is not allowed by AccessControlManager\n * @param signature Method signature\n */\n function _checkAccessAllowed(string memory signature) internal view {\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\n\n if (!isAllowedToCall) {\n revert Unauthorized(msg.sender, address(this), signature);\n }\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport \"./IAccessControlManagerV8.sol\";\n\n/**\n * @title AccessControlManager\n * @author Venus\n * @dev This contract is a wrapper of OpenZeppelin AccessControl extending it in a way to standartize access control within Venus Smart Contract Ecosystem.\n * @notice Access control plays a crucial role in the Venus governance model. It is used to restrict functions so that they can only be called from one\n * account or list of accounts (EOA or Contract Accounts).\n *\n * The implementation of `AccessControlManager`(https://github.com/VenusProtocol/governance-contracts/blob/main/contracts/Governance/AccessControlManager.sol)\n * inherits the [Open Zeppelin AccessControl](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/AccessControl.sol)\n * contract as a base for role management logic. There are two role types: admin and granular permissions.\n * \n * ## Granular Roles\n * \n * Granular roles are built by hashing the contract address and its function signature. For example, given contract `Foo` with function `Foo.bar()` which\n * is guarded by ACM, calling `giveRolePermission` for account B do the following:\n * \n * 1. Compute `keccak256(contractFooAddress,functionSignatureBar)`\n * 1. Add the computed role to the roles of account B\n * 1. Account B now can call `ContractFoo.bar()`\n * \n * ## Admin Roles\n * \n * Admin roles allow for an address to call a function signature on any contract guarded by the `AccessControlManager`. This is particularly useful for\n * contracts created by factories.\n * \n * For Admin roles a null address is hashed in place of the contract address (`keccak256(0x0000000000000000000000000000000000000000,functionSignatureBar)`.\n * \n * In the previous example, giving account B the admin role, account B will have permissions to call the `bar()` function on any contract that is guarded by\n * ACM, not only contract A.\n * \n * ## Protocol Integration\n * \n * All restricted functions in Venus Protocol use a hook to ACM in order to check if the caller has the right permission to call the guarded function.\n * `AccessControlledV5` and `AccessControlledV8` abstract contract makes this integration easier. They call ACM's external method\n * `isAllowedToCall(address caller, string functionSig)`. Here is an example of how `setCollateralFactor` function in `Comptroller` is integrated with ACM:\n\n```\n contract Comptroller is [...] AccessControlledV8 {\n [...]\n function setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa, uint256 newLiquidationThresholdMantissa) external {\n _checkAccessAllowed(\"setCollateralFactor(address,uint256,uint256)\");\n [...]\n }\n }\n```\n */\ncontract AccessControlManager is AccessControl, IAccessControlManagerV8 {\n /// @notice Emitted when an account is given a permission to a certain contract function\n /// @dev If contract address is 0x000..0 this means that the account is a default admin of this function and\n /// can call any contract function with this signature\n event PermissionGranted(address account, address contractAddress, string functionSig);\n\n /// @notice Emitted when an account is revoked a permission to a certain contract function\n event PermissionRevoked(address account, address contractAddress, string functionSig);\n\n constructor() {\n // Grant the contract deployer the default admin role: it will be able\n // to grant and revoke any roles\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n /**\n * @notice Gives a function call permission to one single account\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * @param contractAddress address of contract for which call permissions will be granted\n * @dev if contractAddress is zero address, the account can access the specified function\n * on **any** contract managed by this ACL\n * @param functionSig signature e.g. \"functionName(uint256,bool)\"\n * @param accountToPermit account that will be given access to the contract function\n * @custom:event Emits a {RoleGranted} and {PermissionGranted} events.\n */\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) public {\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\n grantRole(role, accountToPermit);\n emit PermissionGranted(accountToPermit, contractAddress, functionSig);\n }\n\n /**\n * @notice Revokes an account's permission to a particular function call\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleRevoked} event.\n * @param contractAddress address of contract for which call permissions will be revoked\n * @param functionSig signature e.g. \"functionName(uint256,bool)\"\n * @custom:event Emits {RoleRevoked} and {PermissionRevoked} events.\n */\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) public {\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\n revokeRole(role, accountToRevoke);\n emit PermissionRevoked(accountToRevoke, contractAddress, functionSig);\n }\n\n /**\n * @notice Verifies if the given account can call a contract's guarded function\n * @dev Since restricted contracts using this function as a permission hook, we can get contracts address with msg.sender\n * @param account for which call permissions will be checked\n * @param functionSig restricted function signature e.g. \"functionName(uint256,bool)\"\n * @return false if the user account cannot call the particular contract function\n *\n */\n function isAllowedToCall(address account, string calldata functionSig) public view returns (bool) {\n bytes32 role = keccak256(abi.encodePacked(msg.sender, functionSig));\n\n if (hasRole(role, account)) {\n return true;\n } else {\n role = keccak256(abi.encodePacked(address(0), functionSig));\n return hasRole(role, account);\n }\n }\n\n /**\n * @notice Verifies if the given account can call a contract's guarded function\n * @dev This function is used as a view function to check permissions rather than contract hook for access restriction check.\n * @param account for which call permissions will be checked against\n * @param contractAddress address of the restricted contract\n * @param functionSig signature of the restricted function e.g. \"functionName(uint256,bool)\"\n * @return false if the user account cannot call the particular contract function\n */\n function hasPermission(\n address account,\n address contractAddress,\n string calldata functionSig\n ) public view returns (bool) {\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\n return hasRole(role, account);\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport \"@openzeppelin/contracts/access/IAccessControl.sol\";\n\n/**\n * @title IAccessControlManagerV8\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\n */\ninterface IAccessControlManagerV8 is IAccessControl {\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\n\n function hasPermission(\n address account,\n address contractAddress,\n string calldata functionSig\n ) external view returns (bool);\n}\n" + }, + "@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\ninterface OracleInterface {\n function getPrice(address asset) external view returns (uint256);\n}\n\ninterface ResilientOracleInterface is OracleInterface {\n function updatePrice(address vToken) external;\n\n function updateAssetPrice(address asset) external;\n\n function getUnderlyingPrice(address vToken) external view returns (uint256);\n}\n\ninterface TwapInterface is OracleInterface {\n function updateTwap(address asset) external returns (uint256);\n}\n\ninterface BoundValidatorInterface {\n function validatePriceWithAnchorPrice(\n address asset,\n uint256 reporterPrice,\n uint256 anchorPrice\n ) external view returns (bool);\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/constants.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\nuint256 constant EXP_SCALE = 1e18;\n\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\nuint256 constant MANTISSA_ONE = EXP_SCALE;\n" + }, + "@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { EXP_SCALE as EXP_SCALE_, MANTISSA_ONE as MANTISSA_ONE_ } from \"./constants.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n struct Exp {\n uint256 mantissa;\n }\n\n struct Double {\n uint256 mantissa;\n }\n\n uint256 internal constant EXP_SCALE = EXP_SCALE_;\n uint256 internal constant DOUBLE_SCALE = 1e36;\n uint256 internal constant HALF_EXP_SCALE = EXP_SCALE / 2;\n uint256 internal constant MANTISSA_ONE = MANTISSA_ONE_;\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * EXP_SCALE}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint256) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / EXP_SCALE;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n // solhint-disable-next-line func-name-mixedcase\n function mul_ScalarTruncate(Exp memory a, uint256 scalar) internal pure returns (uint256) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n // solhint-disable-next-line func-name-mixedcase\n function mul_ScalarTruncateAddUInt(Exp memory a, uint256 scalar, uint256 addend) internal pure returns (uint256) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n function safe224(uint256 n, string memory errorMessage) internal pure returns (uint224) {\n require(n <= type(uint224).max, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\n require(n <= type(uint32).max, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / EXP_SCALE });\n }\n\n function mul_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint256 a, Exp memory b) internal pure returns (uint256) {\n return mul_(a, b.mantissa) / EXP_SCALE;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / DOUBLE_SCALE });\n }\n\n function mul_(Double memory a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint256 a, Double memory b) internal pure returns (uint256) {\n return mul_(a, b.mantissa) / DOUBLE_SCALE;\n }\n\n function mul_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, EXP_SCALE), b.mantissa) });\n }\n\n function div_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint256 a, Exp memory b) internal pure returns (uint256) {\n return div_(mul_(a, EXP_SCALE), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, DOUBLE_SCALE), b.mantissa) });\n }\n\n function div_(Double memory a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint256 a, Double memory b) internal pure returns (uint256) {\n return div_(mul_(a, DOUBLE_SCALE), b.mantissa);\n }\n\n function div_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n function fraction(uint256 a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, DOUBLE_SCALE), b) });\n }\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/validators.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\nerror ZeroAddressNotAllowed();\n\n/// @notice Checks if the provided address is nonzero, reverts otherwise\n/// @param address_ Address to check\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\nfunction ensureNonzeroAddress(address address_) pure {\n if (address_ == address(0)) {\n revert ZeroAddressNotAllowed();\n }\n}\n" + }, + "contracts/Bridge/BaseXVSProxyOFT.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { Pausable } from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport { BaseOFTV2 } from \"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { ExponentialNoError } from \"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\";\n\n/**\n * @title BaseXVSProxyOFT\n * @author Venus\n * @notice The BaseXVSProxyOFT contract is tailored for facilitating cross-chain transactions with an ERC20 token.\n * It manages transaction limits of a single and daily transactions.\n * This contract inherits key functionalities from other contracts, including pausing capabilities and error handling.\n * It holds state variables for the inner token and maps for tracking transaction limits and statistics across various chains and addresses.\n * The contract allows the owner to configure limits, set whitelists, and control pausing.\n * Internal functions conduct eligibility check of transactions, making the contract a fundamental component for cross-chain token management.\n */\n\nabstract contract BaseXVSProxyOFT is Pausable, ExponentialNoError, BaseOFTV2 {\n using SafeERC20 for IERC20;\n IERC20 internal immutable innerToken;\n uint256 internal immutable ld2sdRate;\n\n /**\n * @notice The address of ResilientOracle contract wrapped in its interface.\n */\n ResilientOracleInterface public oracle;\n /**\n * @notice Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxSingleTransactionLimit;\n /**\n * @notice Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxDailyLimit;\n /**\n * @notice Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourTransferred;\n /**\n * @notice Timestamp when the last 24-hour window started from local chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourWindowStart;\n /**\n * @notice Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxSingleReceiveTransactionLimit;\n /**\n * @notice Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxDailyReceiveLimit;\n /**\n * @notice Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourReceived;\n /**\n * @notice Timestamp when the last 24-hour window started from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourReceiveWindowStart;\n /**\n * @notice Address on which cap check and bound limit is not appicable.\n */\n mapping(address => bool) public whitelist;\n\n /**\n * @notice Emmited when address is added to whitelist.\n */\n event SetWhitelist(address indexed addr, bool isWhitelist);\n /**\n * @notice Emitted when the maximum limit for a single transaction from local chain is modified.\n */\n event SetMaxSingleTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum daily limit of transactions from local chain is modified.\n */\n event SetMaxDailyLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum limit for a single receive transaction from remote chain is modified.\n */\n event SetMaxSingleReceiveTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\n */\n event SetMaxDailyReceiveLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Event emitted when oracle is modified.\n */\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\n /**\n * @notice Event emitted when trusted remote sets to empty.\n */\n event TrustedRemoteRemoved(uint16 chainId);\n /**\n * @notice Event emitted when inner token set successfully.\n */\n event InnerTokenAdded(address indexed innerToken);\n\n /**\n * @param tokenAddress_ Address of the inner token.\n * @param sharedDecimals_ No of shared decimals.\n * @param lzEndpoint_ Address of the layer zero endpoint contract.\n * @param oracle_ Address of the price oracle.\n * @custom:error ZeroAddressNotAllowed is thrown when token contract address is zero.\n * @custom:error ZeroAddressNotAllowed is thrown when lzEndpoint contract address is zero.\n * @custom:error ZeroAddressNotAllowed is thrown when oracle contract address is zero.\n */\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseOFTV2(sharedDecimals_, lzEndpoint_) {\n ensureNonzeroAddress(tokenAddress_);\n ensureNonzeroAddress(lzEndpoint_);\n\n innerToken = IERC20(tokenAddress_);\n\n (bool success, bytes memory data) = tokenAddress_.staticcall(abi.encodeWithSignature(\"decimals()\"));\n require(success, \"ProxyOFT: failed to get token decimals\");\n uint8 decimals = abi.decode(data, (uint8));\n\n require(sharedDecimals_ <= decimals, \"ProxyOFT: sharedDecimals must be <= decimals\");\n ld2sdRate = 10 ** (decimals - sharedDecimals_);\n\n ensureNonzeroAddress(oracle_);\n\n emit InnerTokenAdded(tokenAddress_);\n emit OracleChanged(address(0), oracle_);\n\n oracle = ResilientOracleInterface(oracle_);\n }\n\n /**\n * @notice Set the address of the ResilientOracle contract.\n * @dev Reverts if the new address is zero.\n * @param oracleAddress_ The new address of the ResilientOracle contract.\n * @custom:access Only owner.\n * @custom:event Emits OracleChanged with old and new oracle address.\n */\n function setOracle(address oracleAddress_) external onlyOwner {\n ensureNonzeroAddress(oracleAddress_);\n emit OracleChanged(address(oracle), oracleAddress_);\n oracle = ResilientOracleInterface(oracleAddress_);\n }\n\n /**\n * @notice Sets the limit of single transaction amount.\n * @param chainId_ Destination chain id.\n * @param limit_ Amount in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\n */\n function setMaxSingleTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ <= chainIdToMaxDailyLimit[chainId_], \"Single transaction limit > Daily limit\");\n emit SetMaxSingleTransactionLimit(chainId_, chainIdToMaxSingleTransactionLimit[chainId_], limit_);\n chainIdToMaxSingleTransactionLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the limit of daily (24 Hour) transactions amount.\n * @param chainId_ Destination chain id.\n * @param limit_ Amount in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxDailyLimit with old and new limit associated with chain id.\n */\n function setMaxDailyLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ >= chainIdToMaxSingleTransactionLimit[chainId_], \"Daily limit < single transaction limit\");\n emit SetMaxDailyLimit(chainId_, chainIdToMaxDailyLimit[chainId_], limit_);\n chainIdToMaxDailyLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the maximum limit for a single receive transaction.\n * @param chainId_ The destination chain ID.\n * @param limit_ The new maximum limit in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\n */\n function setMaxSingleReceiveTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ <= chainIdToMaxDailyReceiveLimit[chainId_], \"single receive transaction limit > Daily limit\");\n emit SetMaxSingleReceiveTransactionLimit(chainId_, chainIdToMaxSingleReceiveTransactionLimit[chainId_], limit_);\n chainIdToMaxSingleReceiveTransactionLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the maximum daily limit for receiving transactions.\n * @param chainId_ The destination chain ID.\n * @param limit_ The new maximum daily limit in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\n */\n function setMaxDailyReceiveLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(\n limit_ >= chainIdToMaxSingleReceiveTransactionLimit[chainId_],\n \"Daily limit < single receive transaction limit\"\n );\n emit SetMaxDailyReceiveLimit(chainId_, chainIdToMaxDailyReceiveLimit[chainId_], limit_);\n chainIdToMaxDailyReceiveLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the whitelist address to skip checks on transaction limit.\n * @param user_ Adress to be add in whitelist.\n * @param val_ Boolean to be set (true for user_ address is whitelisted).\n * @custom:access Only owner.\n * @custom:event Emits setWhitelist.\n */\n function setWhitelist(address user_, bool val_) external onlyOwner {\n emit SetWhitelist(user_, val_);\n whitelist[user_] = val_;\n }\n\n /**\n * @notice Triggers stopped state of the bridge.\n * @custom:access Only owner.\n */\n function pause() external onlyOwner {\n _pause();\n }\n\n /**\n * @notice Triggers resume state of the bridge.\n * @custom:access Only owner.\n */\n function unpause() external onlyOwner {\n _unpause();\n }\n\n /**\n * @notice Remove trusted remote from storage.\n * @param remoteChainId_ The chain's id corresponds to setting the trusted remote to empty.\n */\n function removeTrustedRemote(uint16 remoteChainId_) external onlyOwner {\n delete trustedRemoteLookup[remoteChainId_];\n emit TrustedRemoteRemoved(remoteChainId_);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\n */\n function renounceOwnership() public override {}\n\n /**\n * @notice Return's the address of the inner token of this bridge.\n */\n function token() public view override returns (address) {\n return address(innerToken);\n }\n\n function _isEligibleToSend(address from_, uint16 dstChainId_, uint256 amount_) internal {\n // Check if the sender's address is whitelisted\n bool isWhiteListedUser = whitelist[from_];\n // Check if the user is whitelisted and return if true\n if (isWhiteListedUser) {\n return;\n }\n\n // Calculate the amount in USD using the oracle price\n uint256 amountInUsd;\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\n\n // Load values for the 24-hour window checks\n uint256 currentBlockTimestamp = block.timestamp;\n uint256 lastDayWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\n uint256 transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\n uint256 maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\n uint256 maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\n\n // Revert if the amount exceeds the single transaction limit\n require(amountInUsd <= maxSingleTransactionLimit, \"Single Transaction Limit Exceed\");\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - lastDayWindowStart > 1 days) {\n transferredInWindow = amountInUsd;\n chainIdToLast24HourWindowStart[dstChainId_] = currentBlockTimestamp;\n } else {\n transferredInWindow += amountInUsd;\n }\n\n // Revert if the amount exceeds the daily limit\n require(transferredInWindow <= maxDailyLimit, \"Daily Transaction Limit Exceed\");\n\n // Update the amount for the 24-hour window\n chainIdToLast24HourTransferred[dstChainId_] = transferredInWindow;\n }\n\n function _isEligibleToReceive(address toAddress_, uint16 srcChainId_, uint256 receivedAmount_) internal {\n // Check if the recipient's address is whitelisted\n bool isWhiteListedUser = whitelist[toAddress_];\n // Check if the user is whitelisted and return if true\n if (isWhiteListedUser) {\n return;\n }\n\n // Calculate the received amount in USD using the oracle price\n uint256 receivedAmountInUsd;\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(address(token())) });\n receivedAmountInUsd = mul_ScalarTruncate(oraclePrice, receivedAmount_);\n\n uint256 currentBlockTimestamp = block.timestamp;\n\n // Load values for the 24-hour window checks for receiving\n uint256 lastDayReceiveWindowStart = chainIdToLast24HourReceiveWindowStart[srcChainId_];\n uint256 receivedInWindow = chainIdToLast24HourReceived[srcChainId_];\n uint256 maxSingleReceiveTransactionLimit = chainIdToMaxSingleReceiveTransactionLimit[srcChainId_];\n uint256 maxDailyReceiveLimit = chainIdToMaxDailyReceiveLimit[srcChainId_];\n\n // Check if the received amount exceeds the single transaction limit\n require(receivedAmountInUsd <= maxSingleReceiveTransactionLimit, \"Single Transaction Limit Exceed\");\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - lastDayReceiveWindowStart > 1 days) {\n receivedInWindow = receivedAmountInUsd;\n chainIdToLast24HourReceiveWindowStart[srcChainId_] = currentBlockTimestamp;\n } else {\n receivedInWindow += receivedAmountInUsd;\n }\n\n // Revert if the received amount exceeds the daily limit\n require(receivedInWindow <= maxDailyReceiveLimit, \"Daily Transaction Limit Exceed\");\n\n // Update the received amount for the 24-hour window\n chainIdToLast24HourReceived[srcChainId_] = receivedInWindow;\n }\n\n function _transferFrom(\n address from_,\n address to_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n uint256 before = innerToken.balanceOf(to_);\n if (from_ == address(this)) {\n innerToken.safeTransfer(to_, amount_);\n } else {\n innerToken.safeTransferFrom(from_, to_, amount_);\n }\n return innerToken.balanceOf(to_) - before;\n }\n\n function _nonblockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal override {\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\n require(\n _srcAddress.length == trustedRemote.length &&\n trustedRemote.length > 0 &&\n keccak256(_srcAddress) == keccak256(trustedRemote),\n \"LzApp: invalid source sending contract\"\n );\n super._nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\n }\n\n function _ld2sdRate() internal view override returns (uint256) {\n return ld2sdRate;\n }\n}\n" + }, + "contracts/Bridge/interfaces/IXVS.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/**\n * @title IXVS\n * @author Venus\n * @notice Interface implemented by `XVS` token.\n */\ninterface IXVS {\n function mint(address to, uint256 amount) external;\n\n function burn(address from, uint256 amount) external;\n}\n" + }, + "contracts/Bridge/interfaces/IXVSProxyOFT.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/**\n * @title IXVSProxyOFT\n * @author Venus\n * @notice Interface implemented by `XVSProxyOFT`.\n */\ninterface IXVSProxyOFT {\n function transferOwnership(address addr) external;\n\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\n\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\n}\n" + }, + "contracts/Bridge/token/TokenController.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\nimport { IAccessControlManagerV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\";\nimport { Pausable } from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\n/**\n * @title TokenController\n * @author Venus\n * @notice TokenController contract acts as a governance and access control mechanism,\n * allowing the owner to manage minting restrictions and blacklist certain addresses to maintain control and security within the token ecosystem.\n * It provides a flexible framework for token-related operations.\n */\n\ncontract TokenController is Ownable, Pausable {\n /**\n * @notice Access control manager contract address.\n */\n address public accessControlManager;\n /**\n * @notice A Mapping used to keep track of the blacklist status of addresses.\n */\n mapping(address => bool) public _blacklist;\n /**\n * @notice A mapping is used to keep track of the maximum amount a minter is permitted to miny..\n */\n mapping(address => uint256) public minterToCap;\n /**\n * @notice A Mapping used to keep track of the amount i.e already m inted by minter.\n */\n mapping(address => uint256) public minterToMintedAmount;\n\n /**\n * @notice Emitted when the blacklist status of a user is updated.\n */\n event BlacklistUpdated(address indexed user, bool value);\n /**\n * @notice Emitted when the minting limit for a minter is increased.\n */\n event MintLimitIncreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting limit for a minter is decreased.\n */\n event MintLimitDecreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting cap for a minter is changed.\n */\n event MintCapChanged(address indexed minter, uint256 amount);\n /**\n * @notice Emitted when the address of the access control manager of the contract is updated.\n */\n event NewAccessControlManager(address indexed oldAccessControlManager, address indexed newAccessControlManager);\n\n /**\n * @notice This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap.\n */\n error MintLimitExceed();\n /**\n * @notice This error is used to indicate that minting is not allowed for the specified addresses.\n */\n error MintNotAllowed(address from, address to);\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\n */\n constructor(address accessControlManager_) {\n ensureNonzeroAddress(accessControlManager_);\n accessControlManager = accessControlManager_;\n }\n\n /**\n * @notice Pauses Token\n * @custom:access Controlled by AccessControlManager.\n */\n function pause() external {\n _ensureAllowed(\"pause()\");\n _pause();\n }\n\n /**\n * @notice Resumes Token\n * @custom:access Controlled by AccessControlManager.\n */\n function unpause() external {\n _ensureAllowed(\"unpause()\");\n _unpause();\n }\n\n /**\n * @notice Function to update blacklist.\n * @param user_ User address to be affected.\n * @param value_ Boolean to toggle value.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits BlacklistUpdated event.\n */\n function updateBlacklist(address user_, bool value_) external {\n _ensureAllowed(\"updateBlacklist(address,bool)\");\n _blacklist[user_] = value_;\n emit BlacklistUpdated(user_, value_);\n }\n\n /**\n * @notice Sets the minitng cap for minter.\n * @param minter_ Minter address.\n * @param amount_ Cap for the minter.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintCapChanged.\n */\n function setMintCap(address minter_, uint256 amount_) external {\n _ensureAllowed(\"setMintCap(address,uint256)\");\n minterToCap[minter_] = amount_;\n emit MintCapChanged(minter_, amount_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract.\n * @dev Admin function to set the access control address.\n * @param newAccessControlAddress_ New address for the access control.\n * @custom:access Only owner.\n * @custom:event Emits NewAccessControlManager.\n * @custom:error ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.\n */\n function setAccessControlManager(address newAccessControlAddress_) external onlyOwner {\n ensureNonzeroAddress(newAccessControlAddress_);\n emit NewAccessControlManager(accessControlManager, newAccessControlAddress_);\n accessControlManager = newAccessControlAddress_;\n }\n\n /**\n * @notice Returns the blacklist status of the address.\n * @param user_ Address of user to check blacklist status.\n * @return bool status of blacklist.\n */\n function isBlackListed(address user_) external view returns (bool) {\n return _blacklist[user_];\n }\n\n /**\n * @dev Checks the minter cap and eligibility of receiver to receive tokens.\n * @param from_ Minter address.\n * @param to_ Receiver address.\n * @param amount_ Amount to be mint.\n */\n function _isEligibleToMint(address from_, address to_, uint256 amount_) internal {\n if (_blacklist[to_]) {\n revert MintNotAllowed(from_, to_);\n }\n uint256 mintingCap = minterToCap[from_];\n uint256 totalMintedOld = minterToMintedAmount[from_];\n uint256 totalMintedNew = totalMintedOld + amount_;\n\n if (totalMintedNew > mintingCap) {\n revert MintLimitExceed();\n }\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit = mintingCap - totalMintedNew;\n emit MintLimitDecreased(from_, availableLimit);\n }\n\n /**\n * @dev This is post hook of burn function, increases minitng limit of the minter.\n * @param from_ Minter address.\n * @param amount_ Amount burned.\n */\n function _increaseMintLimit(address from_, uint256 amount_) internal {\n uint256 totalMintedOld = minterToMintedAmount[from_];\n uint256 totalMintedNew = totalMintedOld - amount_;\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit = minterToCap[from_] - totalMintedNew;\n emit MintLimitIncreased(from_, availableLimit);\n }\n\n /// @dev Checks the caller is allowed to call the specified fuction\n function _ensureAllowed(string memory functionSig_) internal view {\n require(\n IAccessControlManagerV8(accessControlManager).isAllowedToCall(msg.sender, functionSig_),\n \"access denied\"\n );\n }\n}\n" + }, + "contracts/Bridge/token/XVS.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\nimport { TokenController } from \"./TokenController.sol\";\n\n/**\n * @title XVS\n * @author Venus\n * @notice XVS contract serves as a customized ERC-20 token with additional minting and burning functionality.\n * It also incorporates access control features provided by the \"TokenController\" contract to ensure proper governance and restrictions on minting and burning operations.\n */\n\ncontract XVS is ERC20, TokenController {\n constructor(address accessControlManager_) ERC20(\"Venus XVS\", \"XVS\") TokenController(accessControlManager_) {}\n\n /**\n * @notice Creates `amount_` tokens and assigns them to `account_`, increasing\n * the total supply. Checks access and eligibility.\n * @param account_ Address to which tokens be assigned.\n * @param amount_ Amount of tokens to be assigned.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitDecreased with new available limit.\n * @custom:error MintNotAllowed is thrown when minting is not allowed to from_ address.\n * @custom:error MintLimitExceed is thrown when minting amount exceed the maximum cap.\n */\n function mint(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"mint(address,uint256)\");\n _isEligibleToMint(msg.sender, account_, amount_);\n _mint(account_, amount_);\n }\n\n /**\n * @notice Destroys `amount_` tokens from `account_`, reducing the\n * total supply. Checks access and eligibility.\n * @param account_ Address from which tokens be destroyed.\n * @param amount_ Amount of tokens to be destroyed.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitIncreased with new available limit.\n */\n function burn(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"burn(address,uint256)\");\n _burn(account_, amount_);\n _increaseMintLimit(msg.sender, amount_);\n }\n}\n" + }, + "contracts/Bridge/XVSBridgeAdmin.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.8.13;\n\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { IXVSProxyOFT } from \"./interfaces/IXVSProxyOFT.sol\";\nimport \"hardhat/console.sol\";\n\n/**\n * @title XVSBridgeAdmin\n * @author Venus\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\n * It maintains a registry of function signatures and names,\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\n */\ncontract XVSBridgeAdmin is AccessControlledV8 {\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IXVSProxyOFT public immutable XVSBridge;\n /**\n * @notice A mapping keeps track of function signature associated with function name string.\n */\n mapping(bytes4 => string) public functionRegistry;\n\n // Event emitted when function registry updated\n event FunctionRegistryChanged(string signature, bool active);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address XVSBridge_) {\n ensureNonzeroAddress(XVSBridge_);\n XVSBridge = IXVSProxyOFT(XVSBridge_);\n _disableInitializers();\n }\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\n */\n function initialize(address accessControlManager_) external initializer {\n ensureNonzeroAddress(accessControlManager_);\n __AccessControlled_init(accessControlManager_);\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract\n * @custom:access Controlled by AccessControlManager.\n */\n fallback(bytes calldata data) external returns (bytes memory) {\n string memory fun = _getFunctionName(msg.sig);\n console.logBytes4(msg.sig);\n require(bytes(fun).length != 0, \"Function not found\");\n _checkAccessAllowed(fun);\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\n require(ok, \"call failed\");\n return res;\n }\n\n /**\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n */\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\n _checkAccessAllowed(\"setTrustedRemoteAddress(uint16,bytes)\");\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice A registry of functions that are allowed to be executed from proposals\n * @param signatures_ Function signature to be added or removed.\n * @param active_ bool value, should be true to add function.\n */\n function upsertSignature(string[] calldata signatures_, bool[] calldata active_) external onlyOwner {\n uint256 signatureLength = signatures_.length;\n require(signatureLength == active_.length, \"Input arrays must have the same length\");\n for (uint256 i; i < signatureLength; i++) {\n bytes4 sigHash = bytes4(keccak256(bytes(signatures_[i])));\n bytes memory signature = bytes(functionRegistry[sigHash]);\n if (active_[i] && signature.length == 0) {\n console.logBytes4(sigHash);\n console.log(signatures_[i], \"signatures_[i]\");\n\n functionRegistry[sigHash] = signatures_[i];\n emit FunctionRegistryChanged(signatures_[i], true);\n } else if (!active_[i] && signature.length != 0) {\n delete functionRegistry[sigHash];\n emit FunctionRegistryChanged(signatures_[i], false);\n }\n }\n }\n\n /**\n * @notice This function transfer the ownership of the bridge from this contract to new owner.\n * @param newOwner_ New owner of the XVS Bridge.\n * @custom:access Controlled by AccessControlManager.\n */\n function transferBridgeOwnership(address newOwner_) external {\n _checkAccessAllowed(\"transferBridgeOwnership(address)\");\n ensureNonzeroAddress(newOwner_);\n XVSBridge.transferOwnership(newOwner_);\n }\n\n /**\n * @notice Returns bool = true if srcAddress_ is trustedRemote corresponds to chainId_.\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n */\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\n */\n function renounceOwnership() public override {}\n\n /**\n * @dev Returns function name string associated with function signature.\n */\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\n return functionRegistry[signature_];\n }\n\n function bytesToAddress(bytes calldata b) private pure returns (address) {\n return address(uint160(bytes20(b)));\n }\n}\n" + }, + "contracts/Bridge/XVSProxyOFTDest.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { IXVS } from \"./interfaces/IXVS.sol\";\nimport { BaseXVSProxyOFT } from \"./BaseXVSProxyOFT.sol\";\n\n/**\n * @title XVSProxyOFTDest\n * @author Venus\n * @notice XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT,\n * and focuses on managing token transfers to the destination chain.\n * It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.\n */\n\ncontract XVSProxyOFTDest is BaseXVSProxyOFT {\n /**\n * @notice Emits when stored message dropped without successfull retrying.\n */\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\n\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\n\n /** @notice Clear failed messages from the storage.\n * @param srcChainId_ Chain id of source\n * @param srcAddress_ Address of source followed by current bridge address\n * @param nonce_ Nonce_ of the transaction\n */\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\n }\n\n /**\n * @notice Returns the total circulating supply of the token on the destination chain i.e (total supply).\n */\n function circulatingSupply() public view override returns (uint256) {\n return innerToken.totalSupply();\n }\n\n function _debitFrom(\n address from_,\n uint16 dstChainId_,\n bytes32,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n require(from_ == _msgSender(), \"ProxyOFT: owner is not send caller\");\n _isEligibleToSend(from_, dstChainId_, amount_);\n IXVS(address(innerToken)).burn(from_, amount_);\n return amount_;\n }\n\n function _creditTo(\n uint16 srcChainId_,\n address toAddress_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\n IXVS(address(innerToken)).mint(toAddress_, amount_);\n return amount_;\n }\n}\n" + }, + "contracts/Bridge/XVSProxyOFTSrc.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { BaseXVSProxyOFT } from \"./BaseXVSProxyOFT.sol\";\n\n/**\n * @title XVSProxyOFTSrc\n * @author Venus\n * @notice XVSProxyOFTSrc contract serves as a crucial component for cross-chain token transactions,\n * focusing on the source side of these transactions.\n * It monitors the total amount transferred to other chains, ensuring it complies with defined limits,\n * and provides functions for transferring tokens while maintaining control over the circulating supply on the source chain.\n */\n\ncontract XVSProxyOFTSrc is BaseXVSProxyOFT {\n using SafeERC20 for IERC20;\n /**\n * @notice total amount is transferred from this chain to other chains.\n */\n uint256 public outboundAmount;\n\n /**\n * @notice Emits when locked token released manually by owner.\n */\n event FallbackWithdraw(address indexed to, uint256 amount);\n /**\n * @notice Emits when stored message dropped without successfull retrying.\n */\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\n\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\n\n /** @notice Only call it when there is no way to recover the failed message.\n * `dropFailedMessage` must be called first if transaction is from remote->local chain to avoid double spending.\n * @param to_ The address to withdraw to\n * @param amount_ The amount of withdrawal\n */\n function fallbackWithdraw(address to_, uint256 amount_) external onlyOwner {\n outboundAmount -= amount_;\n _transferFrom(address(this), to_, amount_);\n emit FallbackWithdraw(to_, amount_);\n }\n\n /** @notice Clear failed messages from the storage.\n * @param srcChainId_ Chain id of source\n * @param srcAddress_ Address of source followed by current bridge address\n * @param nonce_ Nonce_ of the transaction\n */\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\n }\n\n /**\n * @notice Returns the total circulating supply of the token on the source chain i.e (total supply - locked in this contract).\n */\n function circulatingSupply() public view override returns (uint256) {\n return innerToken.totalSupply() - outboundAmount;\n }\n\n function _debitFrom(\n address from_,\n uint16 dstChainId_,\n bytes32,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n require(from_ == _msgSender(), \"ProxyOFT: owner is not send caller\");\n _isEligibleToSend(from_, dstChainId_, amount_);\n\n uint256 amount = _transferFrom(from_, address(this), amount_);\n outboundAmount += amount;\n return amount;\n }\n\n function _creditTo(\n uint16 srcChainId_,\n address toAddress_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\n outboundAmount -= amount_;\n // tokens are already in this contract, so no need to transfer\n if (toAddress_ == address(this)) {\n return amount_;\n }\n\n return _transferFrom(address(this), toAddress_, amount_);\n }\n}\n" + }, + "contracts/test/MockToken.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport { LZEndpointMock } from \"@layerzerolabs/solidity-examples/contracts/lzApp/mocks/LZEndpointMock.sol\";\nimport { AccessControlManager } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol\";\n\ncontract MockToken is ERC20 {\n uint8 private immutable _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function faucet(uint256 amount) external {\n _mint(msg.sender, amount);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return _decimals;\n }\n}\n" + }, + "hardhat/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS =\n 0x000000000000000000636F6e736F6c652e6c6f67;\n\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n pop(\n staticcall(\n gas(),\n consoleAddress,\n add(payload, 32),\n mload(payload),\n 0,\n 0\n )\n )\n }\n }\n\n function _castToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castToPure(_sendLogPayloadImplementation)(payload);\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200, + "details": { + "yul": true + } + }, + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +}