From 1cdd2c9ef01e178b37aafdd4763f7121772ff2ff Mon Sep 17 00:00:00 2001 From: SvineruS <37367870+SvineruS@users.noreply.github.com> Date: Mon, 17 Apr 2023 00:43:45 +0300 Subject: [PATCH 1/3] Bump geth and minor testnet changes (#439) * set cache-control to no-cache * set cache-control to no-cache on test * set cache-control to no-cache on prod * Redeploy testnet (#438) * Use PRIVATEKEY_OWNER_ETH account on test/eth * PrimaryTokensDeploy should skip NOT primary tokens * Remove upgrade code * Redeploy testnet * Update testnet addresses in relay * Write a little documentation for contracts * Update provider urls in relay cfg; Delete unused cfgs * Add more info to error * Temporary print to investigate weird bug * Update ambFaucet address on bsc-test * Temporary print to investigate weird bug * Temporary print to investigate weird bug * add decimals value for bsc network in USDT * Bump geth version to properly calc sepolia block hash --------- Co-authored-by: november-pain <53942656+november-pain@users.noreply.github.com> Co-authored-by: Igor Kishko <31137740+kishkoigor@users.noreply.github.com> --- .github/workflows/upload_config_dev.yml | 2 +- .github/workflows/upload_config_prod.yml | 2 +- .github/workflows/upload_config_test.yml | 2 +- contracts/configs/test.json | 48 +- contracts/contracts/contracts.md | 36 + contracts/deploy/00_PrimaryTokensTestnets.ts | 2 +- contracts/deploy/03_BSC_AmbBridge.ts | 18 +- contracts/deploy/03_ETH_AmbBridge.ts | 20 +- contracts/deploy/04_BSC_BscBridge.ts | 21 +- .../deployments/test/amb/BSC_AmbBridge.json | 140 ++-- .../amb/BSC_AmbBridge_Implementation.json | 78 +- .../test/amb/BSC_AmbBridge_Proxy.json | 122 +-- contracts/deployments/test/amb/BUSD.json | 62 +- .../deployments/test/amb/ETH_AmbBridge.json | 169 ++-- .../amb/ETH_AmbBridge_Implementation.json | 98 ++- .../test/amb/ETH_AmbBridge_Proxy.json | 119 +-- contracts/deployments/test/amb/Faucet.json | 24 +- contracts/deployments/test/amb/SAMB.json | 24 +- contracts/deployments/test/amb/USDC.json | 52 +- contracts/deployments/test/amb/USDT.json | 62 +- contracts/deployments/test/amb/WBNB.json | 52 +- contracts/deployments/test/amb/WETH.json | 629 -------------- .../13963204c1e3ae6f33bd8024ced50cd9.json | 159 ---- .../14835e48c656ebed02c4fc9389a12566.json | 159 ---- .../3d9e02ffdf8a213afd0c4d189b503155.json | 159 ---- .../63b1c355e88e8fd19ebe2cd692a8475b.json | 162 ---- ... => af3862e0ddcca2861ee723b668139921.json} | 3 + .../b172f70b177dc34899af81f78eb14450.json | 156 ---- .../deployments/test/bsc/BSC_BscBridge.json | 154 ++-- .../bsc/BSC_BscBridge_Implementation.json | 80 +- .../test/bsc/BSC_BscBridge_Proxy.json | 138 ++-- contracts/deployments/test/bsc/BUSD.json | 30 +- contracts/deployments/test/bsc/SAMB.json | 79 +- contracts/deployments/test/bsc/USDC.json | 30 +- contracts/deployments/test/bsc/USDT.json | 472 +++++++++++ contracts/deployments/test/bsc/WBNB.json | 28 +- .../13963204c1e3ae6f33bd8024ced50cd9.json | 159 ---- .../14835e48c656ebed02c4fc9389a12566.json | 159 ---- .../54d2ddebdc6c37a1b4fd5c90d287707b.json | 51 ++ .../63b1c355e88e8fd19ebe2cd692a8475b.json | 162 ---- .../af3862e0ddcca2861ee723b668139921.json} | 5 +- .../deployments/test/eth/ETH_EthBridge.json | 157 ++-- .../eth/ETH_EthBridge_Implementation.json | 84 +- .../test/eth/ETH_EthBridge_Proxy.json | 122 +-- contracts/deployments/test/eth/SAMB.json | 81 +- contracts/deployments/test/eth/USDC.json | 32 +- contracts/deployments/test/eth/USDT.json | 32 +- contracts/deployments/test/eth/WETH.json | 30 +- .../13963204c1e3ae6f33bd8024ced50cd9.json | 159 ---- .../14835e48c656ebed02c4fc9389a12566.json | 159 ---- .../54d2ddebdc6c37a1b4fd5c90d287707b.json | 51 ++ .../63b1c355e88e8fd19ebe2cd692a8475b.json | 162 ---- .../af3862e0ddcca2861ee723b668139921.json} | 94 +-- contracts/hardhat.config.ts | 2 +- relay/configs/dev-eth-untrustless.json | 43 - relay/configs/test-bsc-untrustless.json | 83 -- relay/configs/test-bsc.json | 14 +- relay/configs/test-eth-untrustless.json | 83 -- relay/configs/test-eth.json | 14 +- relay/go.mod | 51 +- relay/go.sum | 770 ++---------------- relay/internal/networks/common/common.go | 6 +- 62 files changed, 1948 insertions(+), 4408 deletions(-) create mode 100644 contracts/contracts/contracts.md delete mode 100644 contracts/deployments/test/amb/WETH.json delete mode 100644 contracts/deployments/test/amb/solcInputs/13963204c1e3ae6f33bd8024ced50cd9.json delete mode 100644 contracts/deployments/test/amb/solcInputs/14835e48c656ebed02c4fc9389a12566.json delete mode 100644 contracts/deployments/test/amb/solcInputs/3d9e02ffdf8a213afd0c4d189b503155.json delete mode 100644 contracts/deployments/test/amb/solcInputs/63b1c355e88e8fd19ebe2cd692a8475b.json rename contracts/deployments/test/amb/solcInputs/{d93bc3aa6701c2d134a7738294111712.json => af3862e0ddcca2861ee723b668139921.json} (99%) delete mode 100644 contracts/deployments/test/amb/solcInputs/b172f70b177dc34899af81f78eb14450.json create mode 100644 contracts/deployments/test/bsc/USDT.json delete mode 100644 contracts/deployments/test/bsc/solcInputs/13963204c1e3ae6f33bd8024ced50cd9.json delete mode 100644 contracts/deployments/test/bsc/solcInputs/14835e48c656ebed02c4fc9389a12566.json create mode 100644 contracts/deployments/test/bsc/solcInputs/54d2ddebdc6c37a1b4fd5c90d287707b.json delete mode 100644 contracts/deployments/test/bsc/solcInputs/63b1c355e88e8fd19ebe2cd692a8475b.json rename contracts/deployments/test/{amb/solcInputs/82f48662a243d1786232fd2873dea3c2.json => bsc/solcInputs/af3862e0ddcca2861ee723b668139921.json} (98%) delete mode 100644 contracts/deployments/test/eth/solcInputs/13963204c1e3ae6f33bd8024ced50cd9.json delete mode 100644 contracts/deployments/test/eth/solcInputs/14835e48c656ebed02c4fc9389a12566.json create mode 100644 contracts/deployments/test/eth/solcInputs/54d2ddebdc6c37a1b4fd5c90d287707b.json delete mode 100644 contracts/deployments/test/eth/solcInputs/63b1c355e88e8fd19ebe2cd692a8475b.json rename contracts/deployments/test/{amb/solcInputs/b5a0243e5a7a5c6045b818e3d2d0a636.json => eth/solcInputs/af3862e0ddcca2861ee723b668139921.json} (64%) delete mode 100644 relay/configs/dev-eth-untrustless.json delete mode 100644 relay/configs/test-bsc-untrustless.json delete mode 100644 relay/configs/test-eth-untrustless.json diff --git a/.github/workflows/upload_config_dev.yml b/.github/workflows/upload_config_dev.yml index f4a26b3a..69d1c37a 100644 --- a/.github/workflows/upload_config_dev.yml +++ b/.github/workflows/upload_config_dev.yml @@ -28,4 +28,4 @@ jobs: - name: Upload config run: | - aws s3 cp contracts/configs/dev.json s3://bridge-config.ambrosus-dev.io/index.html --content-type application/json + aws s3 cp contracts/configs/dev.json s3://bridge-config.ambrosus-dev.io/index.html --content-type application/json --cache-control no-cache diff --git a/.github/workflows/upload_config_prod.yml b/.github/workflows/upload_config_prod.yml index f939600e..4d6e3370 100644 --- a/.github/workflows/upload_config_prod.yml +++ b/.github/workflows/upload_config_prod.yml @@ -27,4 +27,4 @@ jobs: - name: Upload config run: | - aws s3 cp contracts/configs/main.json s3://bridge-config.ambrosus.io/index.html --content-type application/json + aws s3 cp contracts/configs/main.json s3://bridge-config.ambrosus.io/index.html --content-type application/json --cache-control no-cache diff --git a/.github/workflows/upload_config_test.yml b/.github/workflows/upload_config_test.yml index abbdd2a8..015da58c 100644 --- a/.github/workflows/upload_config_test.yml +++ b/.github/workflows/upload_config_test.yml @@ -28,4 +28,4 @@ jobs: - name: Upload config run: | - aws s3 cp contracts/configs/test.json s3://bridge-config.ambrosus-test.io/index.html --content-type application/json + aws s3 cp contracts/configs/test.json s3://bridge-config.ambrosus-test.io/index.html --content-type application/json --cache-control no-cache diff --git a/contracts/configs/test.json b/contracts/configs/test.json index 1b4e129a..f8cfa2e6 100644 --- a/contracts/configs/test.json +++ b/contracts/configs/test.json @@ -1,15 +1,15 @@ { "bridges": { "eth": { - "amb": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", - "side": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf" + "amb": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", + "side": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b" }, "bsc": { - "amb": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", - "side": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248" + "amb": "0xdC103bf9a3789f78958f365321F3BA07e369667A", + "side": "0x8619f5E8315aff3E7Eba238492906329414084Da" } }, - "ambFaucetAddress": "0x7b8A17Fc98711db0870c7F37A45d069f2B750637", + "ambFaucetAddress": "0xE2Fb2d9014B4c7b2705F81D21a6693219Cc518Ba", "tokens": { "SAMB": { "isActive": true, @@ -25,9 +25,9 @@ "amb" ], "addresses": { - "amb": "0xDA9BB33F9E3334781f3e4fce310288D7dB3eD29a", - "eth": "0xfc277855999cF6452F9027BbdC1B56264A736E3A", - "bsc": "0xDAA9Ee2aB371E31a75Faf93D0b859561a5D8a58f" + "amb": "0x7cee2ae3042D2C646Aa24FACfA92dfeE589046f0", + "eth": "0x9Ba7ef7E1C6C5EF4fe7e2A32d4527497D6B12Ff2", + "bsc": "0xC61D0CfaDc9bE2EF05288D04EbCC8ec8035D7aC6" }, "nativeAnalog": "AMB" }, @@ -44,8 +44,8 @@ "eth" ], "addresses": { - "amb": "0x075dE66D19CA867387c75C880CffddBA9A3E9763", - "eth": "0xd67A7CE611C1b33A549712c0FcbFE8436A917b71", + "amb": "", + "eth": "0x5ECfeaD3d77F6814D189F6209ea27eCD1c00D45a", "bsc": "" }, "nativeAnalog": "ETH" @@ -63,9 +63,9 @@ "bsc" ], "addresses": { - "amb": "0xD52F6e6aD16904a23E5cA0309098652502CA97E8", + "amb": "", "eth": "", - "bsc": "0x8601876F8A6DCcAE5Ce8Cf154f710E09c3f0f2c8" + "bsc": "0x3050A5cBe1ec89917933476a99962A40e802B89C" }, "nativeAnalog": "BNB" }, @@ -84,9 +84,9 @@ "bsc" ], "addresses": { - "amb": "0x56a79d39fc414Ff11EbB30d6a5367ea5da8c6fE9", - "eth": "0x1D335E8B7787fB6c51F98713df5BCb56884FD023", - "bsc": "0x3a5633bAE0243bB360e25624DC6dFd241333B575" + "amb": "0x952b98DBDa3319BF0e339cC9CC574fF768F80f3c", + "eth": "0xB841C5707DA4B43eD915B707158010bd2FaF3B46", + "bsc": "0x9CE86a22E9a89a4d716Ee23d057389c3df3E26A5" }, "nativeAnalog": "" }, @@ -96,16 +96,18 @@ "symbol": "USDT", "denomination": 18, "decimals": { - "eth": 6 + "eth": 6, + "bsc": 18 }, "logo": "https://etherscan.io/token/images/tether_32.png", "primaryNets": [ - "eth" + "eth", + "bsc" ], "addresses": { - "amb": "0xa945ec3B3227731f8df905424041D9ab23778D8E", - "eth": "0xd3c82866DD68CBDD292db2A82cd6f41B5c93A9C6", - "bsc": "" + "amb": "0x1bB13b68DbA3571415B4092802777B5cA15de897", + "eth": "0x05875578a63C7E26245c7CBa3cF460fF6a613c6B", + "bsc": "0x62c6e4534594aD39307FE654D5260f12010A297E" }, "nativeAnalog": "" }, @@ -122,11 +124,11 @@ "bsc" ], "addresses": { - "amb": "0x9F9B96F8d33B58c85f0E5bB4BE53164c0Fe77cD9", + "amb": "0xfB069aFFe6e75674FaBf67108e9094fb988A31D9", "eth": "", - "bsc": "0x7E0F09c8c2aAf4743B57355edb051F5E5ED6F73d" + "bsc": "0x446c2daE148049E53D0489A8cc0D7E55CF3Da5df" }, "nativeAnalog": "" } } -} \ No newline at end of file +} diff --git a/contracts/contracts/contracts.md b/contracts/contracts/contracts.md new file mode 100644 index 00000000..94325386 --- /dev/null +++ b/contracts/contracts/contracts.md @@ -0,0 +1,36 @@ +## Contracts + +### Networks +**Entry point for bridge contracts** +Contains a pair of 2 contracts for each bridge. +These contracts are inherited from `common/CommonBridge.sol` and some check from `checks` (currently all contracts are `CheckUntrustless2`) + +### Common +Common structs and code for bridges + +### Checks +Functions that validate information submitted in bridge. +- `CheckUntrustless` - is like onchain multisig for relays - relays push their data into `checkUntrustless_` method and +when all relays signs are collected - this function return `true` and the data is considered valid. +Currently not used in favor of `CheckUntrustless2` +- `CheckUntrustless2` - just empty contract. There is no checks, coz relays must create MPC signature +which will indicate their consensus and will be accepted by the contract (coz it address has RELAY role) +- `SignatureCheck` - utility function to check ECDSA sign. + +### Tokens +- `IWrapper` - interface for wrapper contracts for native coins (like WETH in ethereum network and SAMB in ambrosus) +- `sAMB` - ERC20 wrapper for native amb coin +- `BridgeERC20` - contract for **synthetic tokens** (i.e. bridge can mint and burn them) for network != AMB +- `BridgeERC20_Amb` - contract for **synthetic tokens** (i.e. bridge can mint and burn them) for AMB network. +It different from the `BridgeERC20` in that **it can have different decimals** depending on which bridge +(ex: ETH or BSC) are using for transferring him. +For example, if USDT has 6 decimals in ETH network and 18 decimals in BSC and AMB networks, it will works like this: + - `ETH -> AMB: 1 USDT (1e6 ) -> 1 USDT (1e18)` + - `AMB -> BSC: 1 USDT (1e18) -> 1 USDT (1e18)` + - `ETH -> ETH: 1 USDT (1e6 ) -> 1 USDT (1e6 )` +- `BridgeERC20_Amb_OLD` - like previous one, but has unpleasant feature: allowance need to be set with +ANOTHER token denomination and user will see counterintuitive amount in increaseAllowance() function + +## Contracts_For_Test +Wrappers for contracts with some methods has their public `Test`-suffixed version. +- `MintableERC20` - deployed in testnets instead of primary (i.e. not synthetics) tokens. Has `mint()` method diff --git a/contracts/deploy/00_PrimaryTokensTestnets.ts b/contracts/deploy/00_PrimaryTokensTestnets.ts index 75de62aa..1e576097 100644 --- a/contracts/deploy/00_PrimaryTokensTestnets.ts +++ b/contracts/deploy/00_PrimaryTokensTestnets.ts @@ -18,7 +18,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(token.symbol, "already or should not be deployed."); continue; } - if (isTokenPrimary(token, netName)) { + if (!isTokenPrimary(token, netName)) { console.log(token.symbol, "is synthetic token, skip it."); continue; } diff --git a/contracts/deploy/03_BSC_AmbBridge.ts b/contracts/deploy/03_BSC_AmbBridge.ts index d8c8ea63..577d3722 100644 --- a/contracts/deploy/03_BSC_AmbBridge.ts +++ b/contracts/deploy/03_BSC_AmbBridge.ts @@ -19,24 +19,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { timeframeSeconds: isMainNet ? 60 * 60 * 4 : 60, lockTime: isMainNet ? 60 * 10 : 60, minSafetyBlocks: 10, - }, [], + }, [] ); - // upgrade to untrustless-mpc; set watchdogs and fee_provider roles; remove DEFAULT_ADMIN_ROLE from deployer; remove RELAY_ROLE from old relay - let {owner} = await hre.getNamedAccounts(); - const prod_addresses = getAddresses(BRIDGE_NAME); - deployOptions.proxy.execute.onUpgrade = { - methodName: "upgrade", - args: [ - prod_addresses.watchdogsAddresses, // grand WATCHDOG_ROLEs - isMainNet ? prod_addresses.feeProviderAddress : owner, // grand FEE_PROVIDER_ROLE - isMainNet ? prod_addresses.relayAddress : owner, // grand RELAY_ROLE to new mpc relay - - isMainNet ? prod_addresses.adminAddress : owner, // remove DEFAULT_ADMIN_ROLE from this address - isMainNet ? prod_addresses.feeProviderAddress : owner // remove RELAY_ROLE from this address (it's old relay address) - ] - }; - if (isMainNet) { console.log("To update prod contract remove this if statement :)"); @@ -54,7 +39,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('Call this cmd second time to set sideBridgeAddress or update tokens') return; } - } // set sideBridgeAddress diff --git a/contracts/deploy/03_ETH_AmbBridge.ts b/contracts/deploy/03_ETH_AmbBridge.ts index 2b9f17e3..7c7187e4 100644 --- a/contracts/deploy/03_ETH_AmbBridge.ts +++ b/contracts/deploy/03_ETH_AmbBridge.ts @@ -20,27 +20,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { lockTime: isMainNet ? 60 * 10 : 60, minSafetyBlocks: 10, }, [] - ) - - // upgrade to untrustless-mpc; set watchdogs and fee_provider roles; remove DEFAULT_ADMIN_ROLE from deployer; remove RELAY_ROLE from old relay - let {owner} = await hre.getNamedAccounts(); - const prod_addresses = getAddresses(BRIDGE_NAME); - deployOptions.proxy.execute.onUpgrade = { - methodName: "upgrade", - args: [ - prod_addresses.watchdogsAddresses, // grand WATCHDOG_ROLEs - isMainNet ? prod_addresses.feeProviderAddress: owner, // grand FEE_PROVIDER_ROLE - isMainNet ? prod_addresses.relayAddress : owner, // grand RELAY_ROLE to new mpc relay - - isMainNet ? prod_addresses.adminAddress : owner, // remove DEFAULT_ADMIN_ROLE from this address - isMainNet ? prod_addresses.feeProviderAddress: owner // remove RELAY_ROLE from this address (it's old relay address) - ] - }; + ); if (isMainNet) { console.log("To update prod contract remove this if statement :)"); - } else { + } else { const deployResult = await hre.deployments.deploy(BRIDGE_NAME, { contract: BRIDGE_NAME, @@ -54,7 +39,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('Call this cmd second time to set sideBridgeAddress or update tokens') return; } - } // set sideBridgeAddress diff --git a/contracts/deploy/04_BSC_BscBridge.ts b/contracts/deploy/04_BSC_BscBridge.ts index cbec6c2f..c7bca84f 100644 --- a/contracts/deploy/04_BSC_BscBridge.ts +++ b/contracts/deploy/04_BSC_BscBridge.ts @@ -14,7 +14,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const ambNet = hre.companionNetworks['amb'] const ambBridge = await ambNet.deployments.get('BSC_AmbBridge'); - const deployOptions = await options(hre, BRIDGE_NAME, tokenPairs, + const deployOptions: any = await options(hre, BRIDGE_NAME, tokenPairs, { sideBridgeAddress: ambBridge.address, wrappingTokenAddress: configFile.tokens.WBNB.addresses.bsc, @@ -24,26 +24,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }, [] ); - // upgrade to untrustless-mpc; set watchdogs and fee_provider roles; remove DEFAULT_ADMIN_ROLE from deployer; remove RELAY_ROLE from old relay - let {owner} = await hre.getNamedAccounts(); - const prod_addresses = getAddresses(BRIDGE_NAME); - // @ts-ignore - deployOptions.proxy.execute.onUpgrade = { - methodName: "upgrade", - args: [ - prod_addresses.watchdogsAddresses, // grand WATCHDOG_ROLEs - isMainNet ? prod_addresses.feeProviderAddress: owner, // grand FEE_PROVIDER_ROLE - isMainNet ? prod_addresses.relayAddress : owner, // grand RELAY_ROLE to new mpc relay - - isMainNet ? prod_addresses.adminAddress : owner, // remove DEFAULT_ADMIN_ROLE from this address - isMainNet ? prod_addresses.feeProviderAddress: owner // remove RELAY_ROLE from this address (it's old relay address) - ] - }; - - if (isMainNet) { console.log("To update prod contract remove this if statement :)"); - } else { + } else { const deployResult = await hre.deployments.deploy(BRIDGE_NAME, { contract: BRIDGE_NAME, diff --git a/contracts/deployments/test/amb/BSC_AmbBridge.json b/contracts/deployments/test/amb/BSC_AmbBridge.json index 539c99c1..2091fa17 100644 --- a/contracts/deployments/test/amb/BSC_AmbBridge.json +++ b/contracts/deployments/test/amb/BSC_AmbBridge.json @@ -1,5 +1,5 @@ { - "address": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", "abi": [ { "anonymous": false, @@ -1733,112 +1733,160 @@ "type": "constructor" } ], - "transactionHash": "0x22f8e5b5fef2fab6b64e00cbef35cc6e86291f2db7677158893a7bc6fd904887", + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", + "contractAddress": "0xdC103bf9a3789f78958f365321F3BA07e369667A", "transactionIndex": 0, - "gasUsed": "3092018", - "logsBloom": "0x20000004000000000000002000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000020000000000000000000000000000010020000000000000000000800000000000000000800000000000020000000002000000000000000000000004000000000000000020000000000000000000020000000000000040000000200000000000000000000001000000000000000000020400000000000000000080000000000000000000100000000000020000000000000000000000000000000000080000000000000000000000000000000", - "blockHash": "0xb5a00b550559cc506d6bbeb3356db67282e079594841c9e69693d19f1f12cb88", - "transactionHash": "0x22f8e5b5fef2fab6b64e00cbef35cc6e86291f2db7677158893a7bc6fd904887", + "gasUsed": "2968580", + "logsBloom": "0x000000040000000c000000200000000040000080000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000200000000002000000000000000100000000000000402000000000000400000080000010000000000080000000000000000000000a000000000000000000000004000000000000000020000000800000000000020000000000000041000000000000000040000000000001000000000000000000020400000000000000000000000000000000000000100000000000020000000020000000000000000000000000000000000800000000000000000000000", + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c", + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", "logs": [ { "transactionIndex": 0, - "blockNumber": 1406833, - "transactionHash": "0x22f8e5b5fef2fab6b64e00cbef35cc6e86291f2db7677158893a7bc6fd904887", - "address": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", + "blockNumber": 33949, + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000e9a768790acb511763d5222ec83d3cd41a12d399" + "0x0000000000000000000000005f0ea6276d40a3529e060ea5acb9bf963f5c430a" ], "data": "0x", "logIndex": 0, - "blockHash": "0xb5a00b550559cc506d6bbeb3356db67282e079594841c9e69693d19f1f12cb88" + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c" }, { "transactionIndex": 0, - "blockNumber": 1406833, - "transactionHash": "0x22f8e5b5fef2fab6b64e00cbef35cc6e86291f2db7677158893a7bc6fd904887", - "address": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", + "blockNumber": 33949, + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000dc103bf9a3789f78958f365321f3ba07e369667a", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 1, - "blockHash": "0xb5a00b550559cc506d6bbeb3356db67282e079594841c9e69693d19f1f12cb88" + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c" }, { "transactionIndex": 0, - "blockNumber": 1406833, - "transactionHash": "0x22f8e5b5fef2fab6b64e00cbef35cc6e86291f2db7677158893a7bc6fd904887", - "address": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", + "blockNumber": 33949, + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 2, - "blockHash": "0xb5a00b550559cc506d6bbeb3356db67282e079594841c9e69693d19f1f12cb88" + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c" }, { "transactionIndex": 0, - "blockNumber": 1406833, - "transactionHash": "0x22f8e5b5fef2fab6b64e00cbef35cc6e86291f2db7677158893a7bc6fd904887", - "address": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", + "blockNumber": 33949, + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 3, - "blockHash": "0xb5a00b550559cc506d6bbeb3356db67282e079594841c9e69693d19f1f12cb88" + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c" + }, + { + "transactionIndex": 0, + "blockNumber": 33949, + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c" + }, + { + "transactionIndex": 0, + "blockNumber": 33949, + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c" } ], - "blockNumber": 1406833, - "cumulativeGasUsed": "3092018", + "blockNumber": 33949, + "cumulativeGasUsed": "2968580", "status": 1, "byzantium": true }, "args": [ - "0xE9A768790acb511763d5222Ec83D3CD41A12d399", - "0x29a9659d00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000001cdab61000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000da9bb33f9e3334781f3e4fce310288d7db3ed29a00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000da9bb33f9e3334781f3e4fce310288d7db3ed29a000000000000000000000000d52f6e6ad16904a23e5ca0309098652502ca97e8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056a79d39fc414ff11ebb30d6a5367ea5da8c6fe90000000000000000000000000000000000000000000000000000000000000004000000000000000000000000daa9ee2ab371e31a75faf93d0b859561a5d8a58f0000000000000000000000008601876f8a6dccae5ce8cf154f710e09c3f0f2c8000000000000000000000000d52f6e6ad16904a23e5ca0309098652502ca97e80000000000000000000000003a5633bae0243bb360e25624dc6dfd241333b57500000000000000000000000000000000000000000000000000000000000000070000000000000000000000001284214b9b9c85549ab3d2b972df0deef66ac2c9000000000000000000000000a2959d3f95eae5dc7d70144ce1b73b403b7eb6e0000000000000000000000000980a75ecd1309ea12fa2ed87a8744fbfc9b863d500000000000000000000000035552c16704d214347f29fa77f77da6d75d7c752000000000000000000000000f474cf03cceff28abc65c9cbae594f725c80e12d0000000000000000000000006d6247501b822fd4eaa76fcb64baea360279497f000000000000000000000000049153b8dae0a232ac90d20c78f1a5d1de7b7dc5", + "0x5f0EA6276D40A3529E060EA5Acb9bf963f5c430a", + "0x5a5f55bf00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000000000000000000000000000000000000000000180000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000007cee2ae3042d2c646aa24facfa92dfee589046f000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e00000000000000000000000000000000000000000000000000000000000000060000000000000000000000007cee2ae3042d2c646aa24facfa92dfee589046f0000000000000000000000000871c1f199bd17f1cbed559de974a7f1568b6e1ea0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000952b98dbda3319bf0e339cc9cc574ff768f80f3c0000000000000000000000001bb13b68dba3571415b4092802777b5ca15de897000000000000000000000000fb069affe6e75674fabf67108e9094fb988a31d90000000000000000000000000000000000000000000000000000000000000006000000000000000000000000c61d0cfadc9be2ef05288d04ebcc8ec8035d7ac60000000000000000000000003050a5cbe1ec89917933476a99962a40e802b89c000000000000000000000000871c1f199bd17f1cbed559de974a7f1568b6e1ea0000000000000000000000009ce86a22e9a89a4d716ee23d057389c3df3e26a500000000000000000000000062c6e4534594ad39307fe654d5260f12010a297e000000000000000000000000446c2dae148049e53d0489a8cc0d7e55cf3da5df", [ "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" ], 1 ], - "numDeployments": 5, + "numDeployments": 1, "solcInputHash": "54d2ddebdc6c37a1b4fd5c90d287707b", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Confirmation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Execution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"ExecutionFailure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerAddition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerRemoval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"required\",\"type\":\"uint256\"}],\"name\":\"RequirementChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Revocation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Submission\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"MAX_OWNER_COUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"_upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"name\":\"changeRequirement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"confirmTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"confirmations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmationCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmations\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"_confirmations\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"to\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_transactionIds\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"isConfirmed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"owners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"replaceOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"required\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"revokeConfirmation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"submitTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addOwner(address)\":{\"details\":\"Allows to add a new owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of new owner.\"}},\"changeRequirement(uint256)\":{\"details\":\"Allows to change the number of required confirmations. Transaction has to be sent by wallet.\",\"params\":{\"_required\":\"Number of required confirmations.\"}},\"confirmTransaction(uint256)\":{\"details\":\"Allows an owner to confirm a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"executeTransaction(uint256)\":{\"details\":\"Allows anyone to execute a confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"getConfirmationCount(uint256)\":{\"details\":\"Returns number of confirmations of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"count\":\"Number of confirmations.\"}},\"getConfirmations(uint256)\":{\"details\":\"Returns array with owner addresses, which confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_confirmations\":\"Returns array of owner addresses.\"}},\"getOwners()\":{\"details\":\"Returns list of owners.\",\"returns\":{\"_0\":\"List of owner addresses.\"}},\"getTransactionCount(bool,bool)\":{\"details\":\"Returns total number of transactions after filers are applied.\",\"params\":{\"executed\":\"Include executed transactions.\",\"pending\":\"Include pending transactions.\"},\"returns\":{\"count\":\"Total number of transactions after filters are applied.\"}},\"getTransactionIds(uint256,uint256,bool,bool)\":{\"details\":\"Returns list of transaction IDs in defined range.\",\"params\":{\"executed\":\"Include executed transactions.\",\"from\":\"Index start position of transaction array.\",\"pending\":\"Include pending transactions.\",\"to\":\"Index end position of transaction array.\"},\"returns\":{\"_transactionIds\":\"Returns array of transaction IDs.\"}},\"isConfirmed(uint256)\":{\"details\":\"Returns the confirmation status of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_0\":\"Confirmation status.\"}},\"removeOwner(address)\":{\"details\":\"Allows to remove an owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of owner.\"}},\"replaceOwner(address,address)\":{\"details\":\"Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\",\"params\":{\"newOwner\":\"Address of new owner.\",\"owner\":\"Address of owner to be replaced.\"}},\"revokeConfirmation(uint256)\":{\"details\":\"Allows an owner to revoke a confirmation for a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"submitTransaction(address,uint256,bytes)\":{\"details\":\"Allows an owner to submit and confirm a transaction.\",\"params\":{\"data\":\"Transaction data payload.\",\"destination\":\"Transaction target address.\",\"value\":\"Transaction ether value.\"},\"returns\":{\"transactionId\":\"Returns transaction ID.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/utils/Proxy.sol\":\"ProxyMultiSig\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \\\"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(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) 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 require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/utils/MultiSigWallet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\n\\ncontract MultiSigWallet {\\n\\n /*\\n * Events\\n */\\n event Confirmation(address indexed sender, uint indexed transactionId);\\n event Revocation(address indexed sender, uint indexed transactionId);\\n event Submission(uint indexed transactionId);\\n event Execution(uint indexed transactionId);\\n event ExecutionFailure(uint indexed transactionId);\\n event OwnerAddition(address indexed owner);\\n event OwnerRemoval(address indexed owner);\\n event RequirementChange(uint required);\\n\\n /*\\n * Constants\\n */\\n uint constant public MAX_OWNER_COUNT = 50;\\n\\n /*\\n * Storage\\n */\\n mapping(uint => Transaction) public transactions;\\n mapping(uint => mapping(address => bool)) public confirmations;\\n mapping(address => bool) public isOwner;\\n address[] public owners;\\n uint public required;\\n uint public transactionCount;\\n\\n struct Transaction {\\n address destination;\\n uint value;\\n bytes data;\\n bool executed;\\n }\\n\\n /*\\n * Modifiers\\n */\\n modifier onlyWallet() {\\n require(msg.sender == address(this));\\n _;\\n }\\n\\n modifier ownerDoesNotExist(address owner) {\\n require(!isOwner[owner]);\\n _;\\n }\\n\\n modifier ownerExists(address owner) {\\n require(isOwner[owner]);\\n _;\\n }\\n\\n modifier transactionExists(uint transactionId) {\\n require(transactions[transactionId].destination != address(0));\\n _;\\n }\\n\\n modifier confirmed(uint transactionId, address owner) {\\n require(confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notConfirmed(uint transactionId, address owner) {\\n require(!confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notExecuted(uint transactionId) {\\n require(!transactions[transactionId].executed);\\n _;\\n }\\n\\n modifier notNull(address _address) {\\n require(_address != address(0));\\n _;\\n }\\n\\n modifier validRequirement(uint ownerCount, uint _required) {\\n require(ownerCount <= MAX_OWNER_COUNT\\n && _required <= ownerCount\\n && _required != 0\\n && ownerCount != 0);\\n _;\\n }\\n\\n /*\\n * Public functions\\n */\\n /// @dev Contract constructor sets initial owners and required number of confirmations.\\n /// @param _owners List of initial owners.\\n /// @param _required Number of required confirmations.\\n constructor(address[] memory _owners, uint _required)\\n validRequirement(_owners.length, _required)\\n {\\n for (uint i = 0; i < _owners.length; i++) {\\n require(!isOwner[_owners[i]] && _owners[i] != address(0));\\n isOwner[_owners[i]] = true;\\n }\\n owners = _owners;\\n required = _required;\\n }\\n\\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of new owner.\\n function addOwner(address owner)\\n public\\n onlyWallet\\n ownerDoesNotExist(owner)\\n notNull(owner)\\n validRequirement(owners.length + 1, required)\\n {\\n isOwner[owner] = true;\\n owners.push(owner);\\n emit OwnerAddition(owner);\\n }\\n\\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner.\\n function removeOwner(address owner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n {\\n isOwner[owner] = false;\\n for (uint i = 0; i < owners.length - 1; i++)\\n if (owners[i] == owner) {\\n owners[i] = owners[owners.length - 1];\\n break;\\n }\\n owners.pop();\\n if (required > owners.length)\\n changeRequirement(owners.length);\\n emit OwnerRemoval(owner);\\n }\\n\\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner to be replaced.\\n /// @param newOwner Address of new owner.\\n function replaceOwner(address owner, address newOwner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n ownerDoesNotExist(newOwner)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (owners[i] == owner) {\\n owners[i] = newOwner;\\n break;\\n }\\n isOwner[owner] = false;\\n isOwner[newOwner] = true;\\n emit OwnerRemoval(owner);\\n emit OwnerAddition(newOwner);\\n }\\n\\n /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\\n /// @param _required Number of required confirmations.\\n function changeRequirement(uint _required)\\n public\\n onlyWallet\\n validRequirement(owners.length, _required)\\n {\\n required = _required;\\n emit RequirementChange(_required);\\n }\\n\\n /// @dev Allows an owner to submit and confirm a transaction.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function submitTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) public returns (uint transactionId)\\n {\\n transactionId = addTransaction(destination, value, data);\\n confirmTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to confirm a transaction.\\n /// @param transactionId Transaction ID.\\n function confirmTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n transactionExists(transactionId)\\n notConfirmed(transactionId, msg.sender)\\n {\\n confirmations[transactionId][msg.sender] = true;\\n emit Confirmation(msg.sender, transactionId);\\n executeTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to revoke a confirmation for a transaction.\\n /// @param transactionId Transaction ID.\\n function revokeConfirmation(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n confirmations[transactionId][msg.sender] = false;\\n emit Revocation(msg.sender, transactionId);\\n }\\n\\n /// @dev Allows anyone to execute a confirmed transaction.\\n /// @param transactionId Transaction ID.\\n function executeTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n if (isConfirmed(transactionId)) {\\n Transaction storage txn = transactions[transactionId];\\n txn.executed = true;\\n if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\\n emit Execution(transactionId);\\n else {\\n emit ExecutionFailure(transactionId);\\n txn.executed = false;\\n }\\n }\\n }\\n\\n // call has been separated into its own function in order to take advantage\\n // of the Solidity's code generator to produce a loop that copies tx.data into memory.\\n function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) {\\n bool result;\\n assembly {\\n let x := mload(0x40) // \\\"Allocate\\\" memory for output (0x40 is where \\\"free memory\\\" pointer is stored by convention)\\n let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\\n result := call(\\n sub(gas(), 36810), // 34710 is the value that solidity is currently emitting // todo\\n // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\\n // callNewAccountGas (25000, in case the destination address does not exist and needs creating) +\\n // gasSLoadEIP2929 (2100)\\n\\n destination,\\n value,\\n d,\\n dataLength, // Size of the input (in bytes) - this is what fixes the padding problem\\n x,\\n 0 // Output is ignored, therefore the output size is zero\\n )\\n }\\n return result;\\n }\\n\\n /// @dev Returns the confirmation status of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return Confirmation status.\\n function isConfirmed(uint transactionId) public view returns (bool)\\n {\\n uint count = 0;\\n for (uint i = 0; i < owners.length; i++) {\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n if (count == required)\\n return true;\\n }\\n return false;\\n }\\n\\n /*\\n * Internal functions\\n */\\n /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function addTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) internal\\n notNull(destination) returns (uint transactionId)\\n {\\n transactionId = transactionCount;\\n transactions[transactionId] = Transaction({\\n destination : destination,\\n value : value,\\n data : data,\\n executed : false\\n });\\n transactionCount += 1;\\n emit Submission(transactionId);\\n }\\n\\n /*\\n * Web3 call functions\\n */\\n /// @dev Returns number of confirmations of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return count Number of confirmations.\\n function getConfirmationCount(uint transactionId)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n }\\n\\n /// @dev Returns total number of transactions after filers are applied.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return count Total number of transactions after filters are applied.\\n function getTransactionCount(bool pending, bool executed)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n count += 1;\\n }\\n\\n /// @dev Returns list of owners.\\n /// @return List of owner addresses.\\n function getOwners() public view returns (address[] memory)\\n {\\n return owners;\\n }\\n\\n /// @dev Returns array with owner addresses, which confirmed transaction.\\n /// @param transactionId Transaction ID.\\n /// @return _confirmations Returns array of owner addresses.\\n function getConfirmations(uint transactionId) public view\\n returns (address[] memory _confirmations)\\n {\\n address[] memory confirmationsTemp = new address[](owners.length);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]]) {\\n confirmationsTemp[count] = owners[i];\\n count += 1;\\n }\\n _confirmations = new address[](count);\\n for (i = 0; i < count; i++)\\n _confirmations[i] = confirmationsTemp[i];\\n }\\n\\n /// @dev Returns list of transaction IDs in defined range.\\n /// @param from Index start position of transaction array.\\n /// @param to Index end position of transaction array.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return _transactionIds Returns array of transaction IDs.\\n function getTransactionIds(uint from, uint to, bool pending, bool executed)\\n public\\n view\\n returns (uint[] memory _transactionIds)\\n {\\n uint[] memory transactionIdsTemp = new uint[](transactionCount);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n {\\n transactionIdsTemp[count] = i;\\n count += 1;\\n }\\n _transactionIds = new uint[](to - from);\\n for (i = from; i < to; i++)\\n _transactionIds[i - from] = transactionIdsTemp[i];\\n }\\n}\\n\",\"keccak256\":\"0x1630487b4e9acd29e4c4ea04eff94b838660e39d009c0668c5213c209fb2f883\",\"license\":\"MIT\"},\"contracts/utils/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/proxy/Proxy.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport \\\"./MultiSigWallet.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\n\\ncontract ProxyMultiSig is Proxy, MultiSigWallet {\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n bytes32 private constant ADMIN_STORAGE_LOCATION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n bytes4 private constant _UPGRADE_TO_AND_CALL_SIGNATURE = bytes4(keccak256(\\\"_upgradeToAndCall(address,bytes)\\\"));\\n\\n event Upgraded(address indexed implementation);\\n\\n\\n constructor(\\n address _logic,\\n bytes memory _data,\\n address[] memory owners,\\n uint _required\\n\\n ) MultiSigWallet(owners, _required) {\\n // Cannot use _upgradeToAndCall because of onlyWallet modifier\\n _upgradeTo(_logic);\\n if (_data.length > 0) {\\n Address.functionDelegateCall(_logic, _data);\\n }\\n\\n StorageSlot.getAddressSlot(ADMIN_STORAGE_LOCATION).value = msg.sender; // trick the hardhat-deploy\\n }\\n\\n\\n function implementation() external view returns (address) {\\n return _implementation();\\n }\\n\\n function upgradeTo(address newImplementation) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, bytes(\\\"\\\"))\\n );\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, data)\\n );\\n }\\n\\n function _upgradeToAndCall(address newImplementation, bytes memory data) external onlyWallet payable {\\n _upgradeTo(newImplementation);\\n if (data.length > 0) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n function _upgradeTo(address newImplementation) internal {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n emit Upgraded(newImplementation);\\n }\\n\\n function _implementation() internal view override returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n}\\n\",\"keccak256\":\"0x9e2738f9167ae4a747ac4e8622c443ad735a257630293dee633535dae02863d5\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200285f3803806200285f833981016040819052620000349162000645565b8181815181603282111580156200004b5750818111155b80156200005757508015155b80156200006357508115155b6200006d57600080fd5b60005b845181101562000163576002600086838151811062000093576200009362000821565b602090810291909101810151600160a060020a031682528101919091526040016000205460ff16158015620000f757506000600160a060020a0316858281518110620000e357620000e362000821565b6020026020010151600160a060020a031614155b6200010157600080fd5b6001600260008784815181106200011c576200011c62000821565b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055806200015a81620007de565b91505062000070565b5083516200017990600390602087019062000511565b5050506004555062000194846401000000006200021b810204565b825115620001b857620001b68484640100000000620015686200034a82021704565b505b33620001f27fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a0392909216919091179055506200087f92505050565b6200023481640100000000620015906200038582021704565b620002c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b80620003007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a03928316179055604051908216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200037b838360405180606001604052806027815260200162002838602791396401000000006200038b810204565b9392505050565b90565b3b151590565b6060620003a18464010000000062000385810204565b6200042f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401620002bd565b60008085600160a060020a0316856040516200044c919062000725565b600060405180830381855af49150503d806000811462000489576040519150601f19603f3d011682016040523d82523d6000602084013e6200048e565b606091505b5091509150620004af828286620004b9640100000000026401000000009004565b9695505050505050565b60608315620004ca5750816200037b565b825115620004db5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002bd919062000743565b82805482825590600052602060002090810192821562000569579160200282015b82811115620005695782518254600160a060020a031916600160a060020a0390911617825560209092019160019091019062000532565b50620005779291506200057b565b5090565b5b808211156200057757600081556001016200057c565b8051600160a060020a0381168114620005aa57600080fd5b919050565b600082601f830112620005c157600080fd5b815160206001604060020a03821115620005df57620005df62000850565b808202620005ef82820162000778565b8381528281019086840183880185018910156200060b57600080fd5b600093505b858410156200063957620006248162000592565b83526001939093019291840191840162000610565b50979650505050505050565b600080600080608085870312156200065c57600080fd5b620006678562000592565b935060208501516001604060020a03808211156200068457600080fd5b818701915087601f8301126200069957600080fd5b815181811115620006ae57620006ae62000850565b620006c3601f8201601f191660200162000778565b818152896020838601011115620006d957600080fd5b620006ec826020830160208701620007ab565b6040890151909650925050808211156200070557600080fd5b506200071487828801620005af565b606096909601519497939650505050565b6000825162000739818460208701620007ab565b9190910192915050565b602081526000825180602084015262000764816040850160208701620007ab565b601f01601f19169190910160400192915050565b604051601f8201601f191681016001604060020a0381118282101715620007a357620007a362000850565b604052919050565b60005b83811015620007c8578181015183820152602001620007ae565b83811115620007d8576000848401525b50505050565b60006000198214156200081a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611fa9806200088f6000396000f3fe608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033", "execute": { - "methodName": "upgrade", + "methodName": "initialize", "args": [ - [ - "0x260cfE305cA40CaE1a32Ba7611137eF4d7146233", - "0xEB1c6a8a84063B1cef8B9a23AB87Bf926035A21a", - "0x40B7d71E70fA6311cB0b300c1Ba6926A2A9000b8", - "0xb017DcCC473499C83f1b553bE564f3CeAf002254", - "0x0f071e1785e3E115360E04c9C8D53e958E6f85FE", - "0x203F8dCBce61d9BFa48A95F588152Da073d9c693" - ], - "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" + { + "relayAddress": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "feeProviderAddress": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "watchdogsAddresses": [ + "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" + ], + "transferFeeRecipient": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "bridgeFeeRecipient": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "tokenThisAddresses": [ + "0x7cee2ae3042D2C646Aa24FACfA92dfeE589046f0", + "0x871c1F199bD17F1cbed559DE974a7F1568b6E1Ea", + "0x0000000000000000000000000000000000000000", + "0x952b98DBDa3319BF0e339cC9CC574fF768F80f3c", + "0x1bB13b68DbA3571415B4092802777B5cA15de897", + "0xfB069aFFe6e75674FaBf67108e9094fb988A31D9" + ], + "tokenSideAddresses": [ + "0xC61D0CfaDc9bE2EF05288D04EbCC8ec8035D7aC6", + "0x3050A5cBe1ec89917933476a99962A40e802B89C", + "0x871c1F199bD17F1cbed559DE974a7F1568b6E1Ea", + "0x9CE86a22E9a89a4d716Ee23d057389c3df3E26A5", + "0x62c6e4534594aD39307FE654D5260f12010A297E", + "0x446c2daE148049E53D0489A8cc0D7E55CF3Da5df" + ], + "sideBridgeAddress": "0x0000000000000000000000000000000000000000", + "wrappingTokenAddress": "0x7cee2ae3042D2C646Aa24FACfA92dfeE589046f0", + "timeframeSeconds": 60, + "lockTime": 60, + "minSafetyBlocks": 10 + } ] }, - "implementation": "0x1DfC043f8eEEFa2C922313784e1565F54ece6386", + "implementation": "0x5f0EA6276D40A3529E060EA5Acb9bf963f5c430a", "devdoc": { "kind": "dev", "methods": { diff --git a/contracts/deployments/test/amb/BSC_AmbBridge_Implementation.json b/contracts/deployments/test/amb/BSC_AmbBridge_Implementation.json index 70b4d31b..1be978b6 100644 --- a/contracts/deployments/test/amb/BSC_AmbBridge_Implementation.json +++ b/contracts/deployments/test/amb/BSC_AmbBridge_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x1DfC043f8eEEFa2C922313784e1565F54ece6386", + "address": "0x5f0EA6276D40A3529E060EA5Acb9bf963f5c430a", "abi": [ { "anonymous": false, @@ -1124,25 +1124,25 @@ "type": "receive" } ], - "transactionHash": "0x0647fc64210d35a04a66b7421c2d9763fcee711e5ace5882f2237ae351d7acc6", + "transactionHash": "0x6979d21e2959fcadbab4a06b529d4fc360e0acb8b86a483d1d85ae825b04e79c", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x1DfC043f8eEEFa2C922313784e1565F54ece6386", + "contractAddress": "0x5f0EA6276D40A3529E060EA5Acb9bf963f5c430a", "transactionIndex": 0, "gasUsed": "3784932", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe496b8f169f4114f2c8edba275dc37873d3d88d2dc7bec09e9efbb450044fd78", - "transactionHash": "0x0647fc64210d35a04a66b7421c2d9763fcee711e5ace5882f2237ae351d7acc6", + "blockHash": "0x3ce40ed23efc23b7413a0ab6aae4432b55387620d26c80d098e3f4e21824c131", + "transactionHash": "0x6979d21e2959fcadbab4a06b529d4fc360e0acb8b86a483d1d85ae825b04e79c", "logs": [], - "blockNumber": 2390576, + "blockNumber": 33948, "cumulativeGasUsed": "3784932", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 5, - "solcInputHash": "b5a0243e5a7a5c6045b818e3d2d0a636", + "numDeployments": 1, + "solcInputHash": "af3862e0ddcca2861ee723b668139921", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"queue\",\"type\":\"tuple[]\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"TransferFinish\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"TransferSubmit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenFrom\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenTo\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"transferFeeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bridgeFeeAmount\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FEE_PROVIDER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RELAY_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WATCHDOG_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeFeeRecipient\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"feeRecipient_\",\"type\":\"address\"}],\"name\":\"changeBridgeFeeRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lockTime_\",\"type\":\"uint256\"}],\"name\":\"changeLockTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minSafetyBlocks_\",\"type\":\"uint256\"}],\"name\":\"changeMinSafetyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"signatureFeeCheckNumber_\",\"type\":\"uint256\"}],\"name\":\"changeSignatureFeeCheckNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timeframeSeconds_\",\"type\":\"uint256\"}],\"name\":\"changeTimeframeSeconds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"feeRecipient_\",\"type\":\"address\"}],\"name\":\"changeTransferFeeRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"getLockedTransfers\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"transfers\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"endTimestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.LockedTransfers\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"grantRoles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sideBridgeAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"watchdogsAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"feeProviderAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"wrappingTokenAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokenSideAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address payable\",\"name\":\"transferFeeRecipient\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"bridgeFeeRecipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timeframeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minSafetyBlocks\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.ConstructorArgs\",\"name\":\"args\",\"type\":\"tuple\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inputEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isQueueEmpty\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastTimeframe\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lockTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lockedTransfers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"endTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minSafetyBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldestLockedEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"outputEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"removeLockedTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"revokeRoles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sideBridgeAddress\",\"type\":\"address\"}],\"name\":\"setSideBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sideBridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"skipTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"transfers\",\"type\":\"tuple[]\"}],\"name\":\"submitTransferUntrustless\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeframeSeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenSideAddress\",\"type\":\"address\"}],\"name\":\"tokensAdd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokenSideAddresses\",\"type\":\"address[]\"}],\"name\":\"tokensAddBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"}],\"name\":\"tokensRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"}],\"name\":\"tokensRemoveBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transferFeeRecipient\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"unlockTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unlockTransfersBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_watchdogs\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"_fee_provider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"mpcRelay\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oldDefaultAdmin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oldRelay\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"unwrapSide\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"feeSignature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"transferFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bridgeFee\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"feeSignature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"transferFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bridgeFee\",\"type\":\"uint256\"}],\"name\":\"wrapWithdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrapperAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"withdraw(address,address,uint256,bool,bytes,uint256,uint256)\":{\"params\":{\"bridgeFee\":\"Amount (in native coins), payed as bridge earnings\",\"feeSignature\":\"Signature signed by relay that confirms that the fee values are valid\",\"transferFee\":\"Amount (in native coins), payed to compensate gas fees in side network\"}},\"wrapWithdraw(address,bytes,uint256,uint256)\":{\"params\":{\"bridgeFee\":\"Amount (in native coins), payed as bridge earnings\",\"feeSignature\":\"Signature signed by relay that confirms that the fee values are valid\",\"toAddress\":\"Address in side network that will receive the tokens\",\"transferFee\":\"Amount (in native coins), payed to compensate gas fees in side network\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/networks/BSC_AmbBridge.sol\":\"BSC_AmbBridge\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 * ```\\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 * ```\\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.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\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, _msgSender());\\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(IAccessControlUpgradeable).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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\\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 function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\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 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 require(!paused(), \\\"Pausable: paused\\\");\\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 require(paused(), \\\"Pausable: not paused\\\");\\n _;\\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 uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x742c0fbab73bf595ca40025f6e81cb48dbd5e133950717f7befd062a925c0148\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 IERC165Upgradeable {\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"contracts/checks/CheckUntrustless2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"../common/CommonStructs.sol\\\";\\n\\n\\ncontract CheckUntrustless2 {\\n // this contract do nothing, but i think it's required to inheritance from it\\n // todo check this\\n uint256[15] private ___gap;\\n}\\n\",\"keccak256\":\"0xff7351b4e6b3628cd20511c65aa12dfb19b76472ee18ee06397879c1000d562d\",\"license\":\"MIT\"},\"contracts/checks/SignatureCheck.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n assembly {\\n r := mload(add(signature, 32))\\n s := mload(add(signature, 64))\\n v := byte(0, mload(add(signature, 96)))\\n if lt(v, 27) {v := add(v, 27)}\\n }\\n return ecrecover(messageHash, v, r, s);\\n}\\n\",\"keccak256\":\"0x16e553d27ac4c9c49f8487c5df1fd51b3afbffa9557be22ca031f05d82739ba7\",\"license\":\"MIT\"},\"contracts/common/CommonBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./CommonStructs.sol\\\";\\nimport \\\"../tokens/IWrapper.sol\\\";\\nimport \\\"../checks/SignatureCheck.sol\\\";\\n\\n\\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\\n // DEFAULT_ADMIN_ROLE can grants and revokes all roles below; Set to multisig (proxy contract address)\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\\n bytes32 public constant RELAY_ROLE = keccak256(\\\"RELAY_ROLE\\\"); // can submit transfers\\n bytes32 public constant WATCHDOG_ROLE = keccak256(\\\"WATCHDOG_ROLE\\\"); // can pause contract\\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\\\"FEE_PROVIDER_ROLE\\\"); // fee signatures must be signed by this role\\n\\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\\n uint internal signatureFeeCheckNumber;\\n\\n\\n // queue of Transfers to be pushed in another network\\n CommonStructs.Transfer[] queue;\\n\\n // locked transfers from another network\\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\\n // head index of lockedTransfers 'queue' mapping\\n uint public oldestLockedEventId;\\n\\n\\n // this network to side network token addresses mapping\\n mapping(address => address) public tokenAddresses;\\n // token that implement `IWrapper` interface and used to wrap native coin\\n address public wrapperAddress;\\n\\n // addresses that will receive fees\\n address payable public transferFeeRecipient;\\n address payable public bridgeFeeRecipient;\\n\\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\\n\\n uint public inputEventId; // last processed event from side network\\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\\n\\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\\n\\n\\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\\n uint transferFeeAmount, uint bridgeFeeAmount);\\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\\n event TransferSubmit(uint indexed eventId);\\n event TransferFinish(uint indexed eventId);\\n\\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, address(this));\\n _setupRole(ADMIN_ROLE, msg.sender);\\n _setupRole(RELAY_ROLE, args.relayAddress);\\n _setupRoles(WATCHDOG_ROLE, args.watchdogsAddresses);\\n _setupRole(FEE_PROVIDER_ROLE, args.feeProviderAddress);\\n\\n // initialise tokenAddresses with start values\\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\\n wrapperAddress = args.wrappingTokenAddress;\\n\\n sideBridgeAddress = args.sideBridgeAddress;\\n transferFeeRecipient = args.transferFeeRecipient;\\n bridgeFeeRecipient = args.bridgeFeeRecipient;\\n minSafetyBlocks = args.minSafetyBlocks;\\n timeframeSeconds = args.timeframeSeconds;\\n lockTime = args.lockTime;\\n\\n // 1, coz eventId 0 considered already processed\\n oldestLockedEventId = 1;\\n outputEventId = 1;\\n\\n signatureFeeCheckNumber = 3;\\n\\n lastTimeframe = block.timestamp / timeframeSeconds;\\n }\\n\\n\\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\\n\\n /// @param toAddress Address in side network that will receive the tokens\\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\\n function wrapWithdraw(address toAddress,\\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\\n ) public payable {\\n address tokenSideAddress = tokenAddresses[wrapperAddress];\\n require(tokenSideAddress != address(0), \\\"Unknown token address\\\");\\n\\n require(msg.value > transferFee + bridgeFee, \\\"Sent value <= fee\\\");\\n\\n uint amount = msg.value - transferFee - bridgeFee;\\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\\n transferFeeRecipient.transfer(transferFee);\\n bridgeFeeRecipient.transfer(bridgeFee);\\n\\n IWrapper(wrapperAddress).deposit{value : amount}();\\n\\n //\\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\\n\\n withdrawFinish();\\n }\\n\\n // `withdraw` function used for sending tokens from this network to side network;\\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\\n /// @param toAddress Address in side network that will receive the tokens\\n /// @param amount Amount of tokens to be sent\\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\\n */\\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\\n function withdraw(\\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\\n ) payable public {\\n address tokenSideAddress;\\n if (unwrapSide) {\\n require(tokenAddresses[address(0)] == tokenThisAddress, \\\"Token not point to native token\\\");\\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\\n } else {\\n tokenSideAddress = tokenAddresses[tokenThisAddress];\\n require(tokenSideAddress != address(0), \\\"Unknown token address\\\");\\n }\\n\\n require(msg.value == transferFee + bridgeFee, \\\"Sent value != fee\\\");\\n\\n require(amount > 0, \\\"Cannot withdraw 0\\\");\\n\\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\\n transferFeeRecipient.transfer(transferFee);\\n bridgeFeeRecipient.transfer(bridgeFee);\\n\\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \\\"Fail transfer coins\\\");\\n\\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\\n\\n withdrawFinish();\\n }\\n\\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\\n function triggerTransfers() public {\\n require(queue.length != 0, \\\"Queue is empty\\\");\\n\\n emit Transfer(outputEventId++, queue);\\n delete queue;\\n }\\n\\n\\n // after `lockTime` period, transfers can be unlocked\\n function unlockTransfers(uint eventId) public whenNotPaused {\\n require(eventId == oldestLockedEventId, \\\"can unlock only oldest event\\\");\\n\\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\\n require(transfersLocked.endTimestamp > 0, \\\"no locked transfers with this id\\\");\\n require(transfersLocked.endTimestamp < block.timestamp, \\\"lockTime has not yet passed\\\");\\n\\n proceedTransfers(transfersLocked.transfers);\\n\\n delete lockedTransfers[eventId];\\n emit TransferFinish(eventId);\\n\\n oldestLockedEventId = eventId + 1;\\n }\\n\\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\\n function unlockTransfersBatch() public whenNotPaused {\\n uint eventId = oldestLockedEventId;\\n for (;; eventId++) {\\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\\n\\n proceedTransfers(transfersLocked.transfers);\\n\\n delete lockedTransfers[eventId];\\n emit TransferFinish(eventId);\\n }\\n oldestLockedEventId = eventId;\\n }\\n\\n // delete transfers with passed eventId **and all after it**\\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\\n require(eventId >= oldestLockedEventId, \\\"eventId must be >= oldestLockedEventId\\\"); // can't undo unlocked :(\\n require(eventId <= inputEventId, \\\"eventId must be <= inputEventId\\\");\\n\\n // now waiting for submitting a new transfer with `eventId` id\\n inputEventId = eventId - 1;\\n\\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\\n delete lockedTransfers[eventId];\\n\\n }\\n\\n // pretend like bridge already receive and process all transfers up to `eventId` id\\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\\n require(eventId >= oldestLockedEventId, \\\"eventId must be >= oldestLockedEventId\\\"); // can't undo unlocked :(\\n\\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\\n }\\n\\n\\n // views\\n\\n // returns locked transfers from another network\\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\\n return lockedTransfers[eventId];\\n }\\n\\n\\n function isQueueEmpty() public view returns (bool) {\\n return queue.length == 0;\\n }\\n\\n\\n // admin setters\\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\\n minSafetyBlocks = minSafetyBlocks_;\\n }\\n\\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\\n transferFeeRecipient = feeRecipient_;\\n }\\n\\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\\n bridgeFeeRecipient = feeRecipient_;\\n }\\n\\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\\n timeframeSeconds = timeframeSeconds_;\\n }\\n\\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\\n lockTime = lockTime_;\\n }\\n\\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\\n }\\n\\n // token addressed mapping\\n\\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\\n }\\n\\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\\n delete tokenAddresses[tokenThisAddress];\\n }\\n\\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\\n }\\n\\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\\n require(tokenThisAddresses.length == tokenSideAddresses.length, \\\"sizes of tokenThisAddresses and tokenSideAddresses must be same\\\");\\n uint arrayLength = tokenThisAddresses.length;\\n for (uint i = 0; i < arrayLength; i++)\\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\\n }\\n\\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\\n uint arrayLength = tokenThisAddresses.length;\\n for (uint i = 0; i < arrayLength; i++)\\n delete tokenAddresses[tokenThisAddresses[i]];\\n }\\n\\n // pause\\n\\n function pause() public onlyRole(WATCHDOG_ROLE) {\\n _pause();\\n }\\n\\n function unpause() public onlyRole(ADMIN_ROLE) {\\n _unpause();\\n }\\n\\n // roles\\n\\n function grantRoles(bytes32 role, address[] calldata accounts) public onlyRole(getRoleAdmin(role)) {\\n // check permission to grant role via onlyRole(getRoleAdmin(role))\\n _setupRoles(role, accounts);\\n }\\n function revokeRoles(bytes32 role, address[] calldata accounts) public {\\n // revokeRole will check for permissions\\n for (uint i = 0; i < accounts.length; i++)\\n revokeRole(role, accounts[i]);\\n }\\n function _setupRoles(bytes32 role, address[] calldata accounts) internal {\\n // no permissions check at all\\n for (uint i = 0; i < accounts.length; i++)\\n _setupRole(role, accounts[i]);\\n }\\n\\n // internal\\n\\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\\n for (uint i = 0; i < events.length; i++)\\n lockedTransfers[eventId].transfers.push(events[i]);\\n }\\n\\n\\n // sends money according to the information in the Transfer structure\\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\\n for (uint i = 0; i < transfers.length; i++) {\\n\\n if (transfers[i].tokenAddress == address(0)) {// native token\\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\\n } else {// ERC20 token\\n require(\\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\\n \\\"Fail transfer coins\\\");\\n }\\n\\n }\\n }\\n\\n // used by `withdraw` and `wrapWithdraw` functions;\\n // emit `Transfer` event with current queue if timeframe was changed;\\n function withdrawFinish() internal {\\n uint nowTimeframe = block.timestamp / timeframeSeconds;\\n if (nowTimeframe != lastTimeframe) {\\n emit Transfer(outputEventId++, queue);\\n delete queue;\\n\\n lastTimeframe = nowTimeframe;\\n }\\n }\\n\\n // encode message with received values and current timestamp;\\n // check that signature is same message signed by address with RELAY_ROLE;\\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\\n bytes32 messageHash;\\n address signer;\\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\\n\\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\\n messageHash = keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\\n ));\\n\\n signer = ecdsaRecover(messageHash, signature);\\n if (hasRole(FEE_PROVIDER_ROLE, signer))\\n return;\\n timestampEpoch--;\\n }\\n revert(\\\"Signature check failed\\\");\\n }\\n\\n function checkEventId(uint eventId) internal {\\n require(eventId == ++inputEventId, \\\"EventId out of order\\\");\\n }\\n\\n receive() external payable {} // need to receive native token from wrapper contract\\n\\n uint256[15] private __gap;\\n}\\n\",\"keccak256\":\"0x74846658822e44c4fc71b2764a31d90bad77af3b492a2a4a5a512f7a41d9b489\",\"license\":\"MIT\"},\"contracts/common/CommonStructs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.6;\\n\\nlibrary CommonStructs {\\n struct Transfer {\\n address tokenAddress;\\n address toAddress;\\n uint amount;\\n }\\n\\n struct TransferProof {\\n bytes[] receiptProof;\\n uint eventId;\\n Transfer[] transfers;\\n }\\n\\n struct LockedTransfers {\\n Transfer[] transfers;\\n uint endTimestamp;\\n }\\n\\n struct ConstructorArgs {\\n address sideBridgeAddress; address relayAddress;\\n address[] watchdogsAddresses; address feeProviderAddress;\\n address wrappingTokenAddress;\\n address[] tokenThisAddresses; address[] tokenSideAddresses;\\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\\n }\\n}\\n\",\"keccak256\":\"0x0294bbc461102c4f4108d6f0163ce8158d5af7c5a6ff29971f01afdec7b38cf3\",\"license\":\"MIT\"},\"contracts/networks/BSC_AmbBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"../common/CommonBridge.sol\\\";\\nimport \\\"../checks/CheckUntrustless2.sol\\\";\\n\\n\\ncontract BSC_AmbBridge is CommonBridge, CheckUntrustless2 {\\n\\n function initialize(\\n CommonStructs.ConstructorArgs calldata args\\n ) public initializer {\\n __CommonBridge_init(args);\\n }\\n\\n function upgrade(\\n address[] calldata _watchdogs,\\n address _fee_provider,\\n address mpcRelay,\\n address oldDefaultAdmin,\\n address oldRelay\\n ) public {\\n require(msg.sender == address(this), \\\"This method require multisig\\\");\\n\\n // add DEFAULT_ADMIN_ROLE to multisig\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n // revoke RELAY_ROLE from old relay\\n revokeRole(RELAY_ROLE, oldRelay);\\n\\n // new roles for untrustless mpc\\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\\n _setupRole(RELAY_ROLE, mpcRelay);\\n\\n // revoke DEFAULT_ADMIN_ROLE from deployer\\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\\n }\\n\\n\\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\\n checkEventId(eventId);\\n emit TransferSubmit(eventId);\\n lockTransfers(transfers, eventId);\\n }\\n\\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\\n require(sideBridgeAddress == address(0), \\\"sideBridgeAddress already set\\\");\\n sideBridgeAddress = _sideBridgeAddress;\\n }\\n\\n\\n}\\n\",\"keccak256\":\"0x2b8717319289c5551dcb4daf227aff1b1ead71c328c119737fd2805079949306\",\"license\":\"MIT\"},\"contracts/tokens/IWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\ninterface IWrapper {\\n event Deposit(address indexed dst, uint amount);\\n event Withdrawal(address indexed src, uint amount);\\n\\n function deposit() external payable;\\n\\n function withdraw(uint amount) external;\\n}\\n\",\"keccak256\":\"0xbe5bc17241b9a14b78e18e4562e2a4c02e2b941fae0f1a896bbd795e49af136e\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50613712806100206000396000f3fe6080604052600436106103075760003560e060020a90048063853890ae11610194578063b87330e9116100e0578063deb9a3a211610099578063f700558711610073578063f7005587146108ff578063f862b7eb1461091f578063f8b744331461093f578063fd5d2ef31461095257600080fd5b8063deb9a3a214610892578063e31be087146108b2578063f33fe10f146108df57600080fd5b8063b87330e9146107e4578063ba8bbbe014610804578063baeebe751461081a578063cf3317d314610830578063d3b89f4914610850578063d547741f1461087257600080fd5b806391d148541161014d57806399b5bb641161012757806399b5bb6414610761578063a217fddf14610777578063a9b1cf0b1461078c578063b6d3385e146107ae57600080fd5b806391d148541461070b578063924cf6e01461072b57806396cf52271461074157600080fd5b8063853890ae1461066d57806386d7679e1461068d5780638ac1f86f146106a35780638e5df9c7146106b85780638ff550e8146106d857806391c5bc0a146106f857600080fd5b8063390d5388116102535780635249a7051161020c578063746b5c42116101e6578063746b5c421461060157806375b238fc146106165780637df8b802146106385780638456cb591461065857600080fd5b80635249a705146105a95780635a5f55bf146105c95780635c975abb146105e957600080fd5b8063390d5388146104e45780633928b296146105045780633f4ba83a1461052457806342180fb8146105395780634a1856de146105595780635119b0ef1461058957600080fd5b8063248a9ca3116102c05780632f2ff15d1161029a5780632f2ff15d1461044c578063304561bb1461046c578063331a891a146104a457806336568abe146104c457600080fd5b8063248a9ca3146103f0578063297c2677146104205780632bbba8471461043657600080fd5b806301ffc9a714610313578063044218231461034857806309fce356146103785780630d6680871461039a578063196f0f62146103b057806321d3d536146103d057600080fd5b3661030e57005b600080fd5b34801561031f57600080fd5b5061033361032e3660046130b1565b610972565b60405190151581526020015b60405180910390f35b34801561035457600080fd5b5061036a60008051602061367d83398151915281565b60405190815260200161033f565b34801561038457600080fd5b50610398610393366004612f9e565b610a05565b005b3480156103a657600080fd5b5061036a60d45481565b3480156103bc57600080fd5b506103986103cb366004613065565b610a31565b3480156103dc57600080fd5b506103986103eb366004612d7d565b610a7f565b3480156103fc57600080fd5b5061036a61040b366004613027565b60009081526065602052604090206001015490565b34801561042c57600080fd5b5061036a60d65481565b34801561044257600080fd5b5060ca5415610333565b34801561045857600080fd5b50610398610467366004613040565b610b1c565b34801561047857600080fd5b5060cf5461048c90600160a060020a031681565b604051600160a060020a03909116815260200161033f565b3480156104b057600080fd5b506103986104bf366004613027565b610b47565b3480156104d057600080fd5b506103986104df366004613040565b610c5e565b3480156104f057600080fd5b5060d05461048c90600160a060020a031681565b34801561051057600080fd5b5061039861051f366004612d7d565b610ce9565b34801561053057600080fd5b50610398610d25565b34801561054557600080fd5b50610398610554366004613027565b610d49565b34801561056557600080fd5b5061036a610574366004613027565b60cb6020526000908152604090206001015481565b34801561059557600080fd5b506103986105a436600461312c565b610d86565b3480156105b557600080fd5b506103986105c4366004612ece565b610e04565b3480156105d557600080fd5b506103986105e43660046130f0565b610e8d565b3480156105f557600080fd5b5060975460ff16610333565b34801561060d57600080fd5b50610398610f05565b34801561062257600080fd5b5061036a6000805160206136bd83398151915281565b34801561064457600080fd5b5060ce5461048c90600160a060020a031681565b34801561066457600080fd5b50610398610fb1565b34801561067957600080fd5b50610398610688366004612d9a565b610fd2565b34801561069957600080fd5b5061036a60d75481565b3480156106af57600080fd5b5061039861101a565b3480156106c457600080fd5b506103986106d3366004612d7d565b611172565b3480156106e457600080fd5b506103986106f3366004612f10565b6111b3565b610398610706366004612e67565b611284565b34801561071757600080fd5b50610333610726366004613040565b6115b4565b34801561073757600080fd5b5061036a60d25481565b34801561074d57600080fd5b5061039861075c366004613027565b6115df565b34801561076d57600080fd5b5061036a60d55481565b34801561078357600080fd5b5061036a600081565b34801561079857600080fd5b5061036a60008051602061365d83398151915281565b3480156107ba57600080fd5b5061048c6107c9366004612d7d565b60cd60205260009081526040902054600160a060020a031681565b3480156107f057600080fd5b506103986107ff366004612d7d565b6115fe565b34801561081057600080fd5b5061036a60cc5481565b34801561082657600080fd5b5061036a60d35481565b34801561083c57600080fd5b5061039861084b366004613027565b61163a565b34801561085c57600080fd5b5061036a60008051602061369d83398151915281565b34801561087e57600080fd5b5061039861088d366004613040565b6116b1565b34801561089e57600080fd5b506103986108ad366004613065565b6116d7565b3480156108be57600080fd5b506108d26108cd366004613027565b6116fe565b60405161033f91906133f7565b3480156108eb57600080fd5b5060d15461048c90600160a060020a031681565b34801561090b57600080fd5b5061039861091a366004613027565b6117ba565b34801561092b57600080fd5b5061039861093a366004613027565b6117d9565b61039861094d366004612dd3565b611a0c565b34801561095e57600080fd5b5061039861096d366004613027565b611e6c565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b0000000000000000000000000000000000000000000000000000000014806109ff57507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b6000805160206136bd833981519152610a1e8133611e8b565b610a2a85858585611ef2565b5050505050565b60005b81811015610a7957610a6784848484818110610a5257610a526135a8565b905060200201602081019061088d9190612d7d565b80610a7181613574565b915050610a34565b50505050565b6000805160206136bd833981519152610a988133611e8b565b60d154600160a060020a031615610af95760405160e560020a62461bcd02815260206004820152601d60248201527f736964654272696467654164647265737320616c72656164792073657400000060448201526064015b60405180910390fd5b5060d18054600160a060020a031916600160a060020a0392909216919091179055565b600082815260656020526040902060010154610b388133611e8b565b610b42838361200b565b505050565b6000805160206136bd833981519152610b608133611e8b565b60975460ff16610b855760405160e560020a62461bcd028152600401610af0906132cf565b60cc54821015610baa5760405160e560020a62461bcd028152600401610af09061339a565b60d554821115610bff5760405160e560020a62461bcd02815260206004820152601f60248201527f6576656e744964206d757374206265203c3d20696e7075744576656e744964006044820152606401610af0565b610c0a60018361351a565b60d5555b600082815260cb602052604090206001015415610c5a57600082815260cb6020526040812090610c3e8282612c9d565b5060006001919091015581610c5281613574565b925050610c0e565b5050565b600160a060020a0381163314610cdf5760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610af0565b610c5a8282612091565b6000805160206136bd833981519152610d028133611e8b565b5060d08054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206136bd833981519152610d3e8133611e8b565b610d466120f8565b50565b6000805160206136bd833981519152610d628133611e8b565b8160d35460d754610d7391906134fb565b610d7d91906134d6565b60d7555060d355565b60008051602061367d833981519152610d9f8133611e8b565b60975460ff1615610dc55760405160e560020a62461bcd028152600401610af090613306565b610dce84612167565b60405184907f196c47048e38df7a4fe6e581c8f4f2e2ba67ac0dd45b90da756e97bd61d9dd3b90600090a2610a798383866121cc565b6000805160206136bd833981519152610e1d8133611e8b565b8160005b81811015610a2a5760cd6000868684818110610e3f57610e3f6135a8565b9050602002016020810190610e549190612d7d565b600160a060020a0316815260208101919091526040016000208054600160a060020a031916905580610e8581613574565b915050610e21565b600054610100900460ff1680610ea6575060005460ff16155b610ec55760405160e560020a62461bcd028152600401610af09061333d565b600054610100900460ff16158015610ee7576000805461ffff19166101011790555b610ef08261225a565b8015610c5a576000805461ff00191690555050565b60ca54610f575760405160e560020a62461bcd02815260206004820152600e60248201527f517565756520697320656d7074790000000000000000000000000000000000006044820152606401610af0565b60d68054906000610f6783613574565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca604051610f9b919061322c565b60405180910390a2610faf60ca6000612c9d565b565b60008051602061365d833981519152610fca8133611e8b565b610d46612474565b6000805160206136bd833981519152610feb8133611e8b565b50600160a060020a03918216600090815260cd602052604090208054600160a060020a03191691909216179055565b60975460ff16156110405760405160e560020a62461bcd028152600401610af090613306565b60cc545b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156110d257600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611078565b50505050815260200160018201548152505090508060200151600014806110fc5750428160200151115b15611107575060cc55565b8051611112906124cf565b600082815260cb602052604081209061112b8282612c9d565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a2508061116a81613574565b915050611044565b6000805160206136bd83398151915261118b8133611e8b565b50600160a060020a0316600090815260cd602052604090208054600160a060020a0319169055565b3330146112055760405160e560020a62461bcd02815260206004820152601c60248201527f54686973206d6574686f642072657175697265206d756c7469736967000000006044820152606401610af0565b611210600033612763565b61122860008051602061367d833981519152826116b1565b61124160008051602061365d833981519152878761276d565b61125960008051602061369d83398151915285612763565b61127160008051602061367d83398151915284612763565b61127c6000836116b1565b505050505050565b60ce54600160a060020a03908116600090815260cd602052604090205416806112f25760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610af0565b6112fc82846134be565b341161134d5760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c7565203c3d206665650000000000000000000000000000006044820152606401610af0565b60008261135a853461351a565b611364919061351a565b60ce5490915061138190600160a060020a031687878787866127b5565b60cf54604051600160a060020a039091169085156108fc029086906000818181858888f193505050501580156113bb573d6000803e3d6000fd5b5060d054604051600160a060020a039091169084156108fc029085906000818181858888f193505050501580156113f6573d6000803e3d6000fd5b5060ce60009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0826040518263ffffffff1660e060020a0281526004016000604051808303818588803b15801561144a57600080fd5b505af115801561145e573d6000803e3d6000fd5b505060408051606081018252600160a060020a0380881682528c81166020830190815282840188815260ca80546001810182556000918252945160039095027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054968616600160a060020a031997881617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee2840180549190951695169490941790925590517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d65491513395507f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f444945061159b9350879087908b908b90958652600160a060020a0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b60405180910390a26115ab612949565b50505050505050565b6000918252606560209081526040808420600160a060020a0393909316845291905290205460ff1690565b6000805160206136bd8339815191526115f88133611e8b565b5060d455565b6000805160206136bd8339815191526116178133611e8b565b5060cf8054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206136bd8339815191526116538133611e8b565b60975460ff166116785760405160e560020a62461bcd028152600401610af0906132cf565b60cc5482101561169d5760405160e560020a62461bcd028152600401610af09061339a565b6116a860018361351a565b60d5555060cc55565b6000828152606560205260409020600101546116cd8133611e8b565b610b428383612091565b6000838152606560205260409020600101546116f38133611e8b565b610a7984848461276d565b604080518082019091526060815260006020820152600082815260cb60209081526040808320815181546060948102820185018452928101838152909491938593919285929185015b828210156117a157600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611747565b5050505081526020016001820154815250509050919050565b6000805160206136bd8339815191526117d38133611e8b565b5060c955565b60975460ff16156117ff5760405160e560020a62461bcd028152600401610af090613306565b60cc5481146118535760405160e560020a62461bcd02815260206004820152601c60248201527f63616e20756e6c6f636b206f6e6c79206f6c64657374206576656e74000000006044820152606401610af0565b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156118e157600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611887565b5050505081526020016001820154815250509050600081602001511161194c5760405160e560020a62461bcd02815260206004820181905260248201527f6e6f206c6f636b6564207472616e7366657273207769746820746869732069646044820152606401610af0565b428160200151106119a25760405160e560020a62461bcd02815260206004820152601b60248201527f6c6f636b54696d6520686173206e6f74207965742070617373656400000000006044820152606401610af0565b80516119ad906124cf565b600082815260cb60205260408120906119c68282612c9d565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a2611a058260016134be565b60cc555050565b60008515611aa1576000805260cd6020527fcd565b10a72538d86f6d352f37ebc5dff31587960b12c0afe00fd03947a6932a54600160a060020a038a8116911614611a9c5760405160e560020a62461bcd02815260206004820152601f60248201527f546f6b656e206e6f7420706f696e7420746f206e617469766520746f6b656e006044820152606401610af0565b611b0d565b50600160a060020a03808916600090815260cd60205260409020541680611b0d5760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610af0565b611b1782846134be565b3414611b685760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c756520213d206665650000000000000000000000000000006044820152606401610af0565b60008711611bbb5760405160e560020a62461bcd02815260206004820152601160248201527f43616e6e6f7420776974686472617720300000000000000000000000000000006044820152606401610af0565b611bc989868686868c6127b5565b60cf54604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611c03573d6000803e3d6000fd5b5060d054604051600160a060020a039091169083156108fc029084906000818181858888f19350505050158015611c3e573d6000803e3d6000fd5b506040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101889052600160a060020a038a16906323b872dd90606401602060405180830381600087803b158015611ca657600080fd5b505af1158015611cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cde919061300a565b611d2d5760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610af0565b6040805160608082018352600160a060020a038481168084528c821660208086019182528587018e815260ca8054600181018255600091909152965160039097027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054988716600160a060020a0319998a1617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee284018054918716919098161790965594517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d6548551908152918e16938201939093529283019190915281018890526080810184905260a0810183905233907f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f4449060c00160405180910390a2611e61612949565b505050505050505050565b6000805160206136bd833981519152611e858133611e8b565b5060d255565b611e9582826115b4565b610c5a57611ead81600160a060020a031660146129c1565b611eb88360206129c1565b604051602001611ec99291906131ab565b60408051601f198184030181529082905260e560020a62461bcd028252610af09160040161329c565b828114611f6a5760405160e560020a62461bcd02815260206004820152603f60248201527f73697a6573206f6620746f6b656e5468697341646472657373657320616e642060448201527f746f6b656e53696465416464726573736573206d7573742062652073616d65006064820152608401610af0565b8260005b8181101561127c57838382818110611f8857611f886135a8565b9050602002016020810190611f9d9190612d7d565b60cd6000888885818110611fb357611fb36135a8565b9050602002016020810190611fc89190612d7d565b600160a060020a03908116825260208201929092526040016000208054600160a060020a031916929091169190911790558061200381613574565b915050611f6e565b61201582826115b4565b610c5a576000828152606560209081526040808320600160a060020a03851684529091529020805460ff1916600117905561204d3390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61209b82826115b4565b15610c5a576000828152606560209081526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60975460ff1661211d5760405160e560020a62461bcd028152600401610af0906132cf565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051600160a060020a03909116815260200160405180910390a1565b60d56000815461217690613574565b91829055508114610d465760405160e560020a62461bcd02815260206004820152601460248201527f4576656e744964206f7574206f66206f726465720000000000000000000000006044820152606401610af0565b60d4546121d990426134be565b600082815260cb60205260408120600101919091555b82811015610a7957600082815260cb60205260409020848483818110612217576122176135a8565b83546001810185556000948552602090942060609091029290920192600302909101905061224582826135da565b5050808061225290613574565b9150506121ef565b600054610100900460ff1680612273575060005460ff16155b6122925760405160e560020a62461bcd028152600401610af09061333d565b600054610100900460ff161580156122b4576000805461ffff19166101011790555b6122bf600030612763565b6122d76000805160206136bd83398151915233612763565b6122fe60008051602061367d8339815191526122f96040850160208601612d7d565b612763565b61232260008051602061365d83398151915261231d6040850185613475565b61276d565b61234460008051602061369d8339815191526122f96080850160608601612d7d565b61236661235460a0840184613475565b61236160c0860186613475565b611ef2565b61237660a0830160808401612d7d565b60ce8054600160a060020a031916600160a060020a03929092169190911790556123a36020830183612d7d565b60d18054600160a060020a031916600160a060020a03929092169190911790556123d4610100830160e08401612d7d565b60cf8054600160a060020a031916600160a060020a039290921691909117905561240661012083016101008401612d7d565b60d08054600160a060020a031916600160a060020a039290921691909117905561016082013560d25561012082013560d381905561014083013560d455600160cc81905560d655600360c95561245c90426134d6565b60d7558015610c5a576000805461ff00191690555050565b60975460ff161561249a5760405160e560020a62461bcd028152600401610af090613306565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861214a3390565b60005b8151811015610c5a576000600160a060020a03168282815181106124f8576124f86135a8565b602002602001015160000151600160a060020a031614156126145760ce548251600160a060020a0390911690632e1a7d4d9084908490811061253c5761253c6135a8565b6020026020010151604001516040518263ffffffff1660e060020a02815260040161256991815260200190565b600060405180830381600087803b15801561258357600080fd5b505af1158015612597573d6000803e3d6000fd5b505050508181815181106125ad576125ad6135a8565b602002602001015160200151600160a060020a03166108fc8383815181106125d7576125d76135a8565b6020026020010151604001519081150290604051600060405180830381858888f1935050505015801561260e573d6000803e3d6000fd5b50612751565b818181518110612626576126266135a8565b602002602001015160000151600160a060020a031663a9059cbb838381518110612652576126526135a8565b602002602001015160200151848481518110612670576126706135a8565b6020026020010151604001516040518363ffffffff1660e060020a0281526004016126b0929190600160a060020a03929092168252602082015260400190565b602060405180830381600087803b1580156126ca57600080fd5b505af11580156126de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612702919061300a565b6127515760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610af0565b8061275b81613574565b9150506124d2565b610c5a828261200b565b60005b81811015610a79576127a38484848481811061278e5761278e6135a8565b90506020020160208101906122f99190612d7d565b806127ad81613574565b915050612770565b600080806127c5610708426134d6565b905060005b60c9548110156128fd576040516c01000000000000000000000000600160a060020a038c160260208201526034810183905260548101889052607481018790526094810186905260b40160408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c016040516020818303038152906040528051906020012093506128b5848a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c1292505050565b92506128cf60008051602061369d833981519152846115b4565b156128dd575050505061127c565b816128e78161355d565b92505080806128f590613574565b9150506127ca565b5060405160e560020a62461bcd02815260206004820152601660248201527f5369676e617475726520636865636b206661696c6564000000000000000000006044820152606401610af0565b600060d3544261295991906134d6565b905060d7548114610d465760d6805490600061297483613574565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca6040516129a8919061322c565b60405180910390a26129bc60ca6000612c9d565b60d755565b606060006129d08360026134fb565b6129db9060026134be565b67ffffffffffffffff8111156129f3576129f36135c1565b6040519080825280601f01601f191660200182016040528015612a1d576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612a5457612a546135a8565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612ab757612ab76135a8565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612af38460026134fb565b612afe9060016134be565b90505b6001811115612bb9577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612b3f57612b3f6135a8565b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110612b7457612b746135a8565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350601090940493612bb28161355d565b9050612b01565b508315612c0b5760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610af0565b9392505050565b6020810151604082015160608301516000929190831a601b811015612c3557601b015b60408051600081526020810180835288905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa158015612c88573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b5080546000825560030290600052602060002090810190610d4691905b80821115612cec578054600160a060020a03199081168255600182018054909116905560006002820155600301612cba565b5090565b60008083601f840112612d0257600080fd5b50813567ffffffffffffffff811115612d1a57600080fd5b6020830191508360208083028501011115612d3457600080fd5b9250929050565b60008083601f840112612d4d57600080fd5b50813567ffffffffffffffff811115612d6557600080fd5b602083019150836020828501011115612d3457600080fd5b600060208284031215612d8f57600080fd5b8135612c0b81613639565b60008060408385031215612dad57600080fd5b8235612db881613639565b91506020830135612dc881613639565b809150509250929050565b60008060008060008060008060e0898b031215612def57600080fd5b8835612dfa81613639565b97506020890135612e0a81613639565b9650604089013595506060890135612e218161364e565b9450608089013567ffffffffffffffff811115612e3d57600080fd5b612e498b828c01612d3b565b999c989b5096999598969760a08701359660c0013595509350505050565b600080600080600060808688031215612e7f57600080fd5b8535612e8a81613639565b9450602086013567ffffffffffffffff811115612ea657600080fd5b612eb288828901612d3b565b9699909850959660408101359660609091013595509350505050565b60008060208385031215612ee157600080fd5b823567ffffffffffffffff811115612ef857600080fd5b612f0485828601612cf0565b90969095509350505050565b60008060008060008060a08789031215612f2957600080fd5b863567ffffffffffffffff811115612f4057600080fd5b612f4c89828a01612cf0565b9097509550506020870135612f6081613639565b93506040870135612f7081613639565b92506060870135612f8081613639565b91506080870135612f9081613639565b809150509295509295509295565b60008060008060408587031215612fb457600080fd5b843567ffffffffffffffff80821115612fcc57600080fd5b612fd888838901612cf0565b90965094506020870135915080821115612ff157600080fd5b50612ffe87828801612cf0565b95989497509550505050565b60006020828403121561301c57600080fd5b8151612c0b8161364e565b60006020828403121561303957600080fd5b5035919050565b6000806040838503121561305357600080fd5b823591506020830135612dc881613639565b60008060006040848603121561307a57600080fd5b83359250602084013567ffffffffffffffff81111561309857600080fd5b6130a486828701612cf0565b9497909650939450505050565b6000602082840312156130c357600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1981168114612c0b57600080fd5b60006020828403121561310257600080fd5b813567ffffffffffffffff81111561311957600080fd5b82016101808185031215612c0b57600080fd5b60008060006040848603121561314157600080fd5b83359250602084013567ffffffffffffffff8082111561316057600080fd5b818601915086601f83011261317457600080fd5b81358181111561318357600080fd5b87602060608302850101111561319857600080fd5b6020830194508093505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516131e3816017850160208801613531565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613220816028840160208801613531565b01602801949350505050565b60006020808301818452808554808352604092508286019150866000528360002060005b8281101561328f578154600160a060020a0390811685526001808401549091168786015260028301548686015260609094019360039092019101613250565b5091979650505050505050565b60208152600082518060208401526132bb816040850160208701613531565b601f01601f19169190910160400192915050565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b60208082526026908201527f6576656e744964206d757374206265203e3d206f6c646573744c6f636b65644560408201527f76656e7449640000000000000000000000000000000000000000000000000000606082015260800190565b6000602080835260608084018551604080858801528282518085526080890191508684019450600093505b8084101561345f5784518051600160a060020a03908116845288820151168884015283015183830152938601936001939093019290850190613422565b5094909701519590960194909452509392505050565b6000808335601e1984360301811261348c57600080fd5b83018035915067ffffffffffffffff8211156134a757600080fd5b6020908101925081023603821315612d3457600080fd5b600082198211156134d1576134d161358f565b500190565b6000826134f65760e060020a634e487b7102600052601260045260246000fd5b500490565b60008160001904831182151516156135155761351561358f565b500290565b60008282101561352c5761352c61358f565b500390565b60005b8381101561354c578181015183820152602001613534565b83811115610a795750506000910152565b60008161356c5761356c61358f565b506000190190565b60006000198214156135885761358861358f565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fd5b81356135e581613639565b8154600160a060020a031916600160a060020a03821617825550602082013561360d81613639565b600182018054600160a060020a031916600160a060020a03831617905550604082013560028201555050565b600160a060020a0381168114610d4657600080fd5b8015158114610d4657600080fdfeb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887ea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220531bafd7165d631aa1a8bdce6b543ce59906abdbe9f84e01278140fa1f57340164736f6c63430008060033", "deployedBytecode": "0x6080604052600436106103075760003560e060020a90048063853890ae11610194578063b87330e9116100e0578063deb9a3a211610099578063f700558711610073578063f7005587146108ff578063f862b7eb1461091f578063f8b744331461093f578063fd5d2ef31461095257600080fd5b8063deb9a3a214610892578063e31be087146108b2578063f33fe10f146108df57600080fd5b8063b87330e9146107e4578063ba8bbbe014610804578063baeebe751461081a578063cf3317d314610830578063d3b89f4914610850578063d547741f1461087257600080fd5b806391d148541161014d57806399b5bb641161012757806399b5bb6414610761578063a217fddf14610777578063a9b1cf0b1461078c578063b6d3385e146107ae57600080fd5b806391d148541461070b578063924cf6e01461072b57806396cf52271461074157600080fd5b8063853890ae1461066d57806386d7679e1461068d5780638ac1f86f146106a35780638e5df9c7146106b85780638ff550e8146106d857806391c5bc0a146106f857600080fd5b8063390d5388116102535780635249a7051161020c578063746b5c42116101e6578063746b5c421461060157806375b238fc146106165780637df8b802146106385780638456cb591461065857600080fd5b80635249a705146105a95780635a5f55bf146105c95780635c975abb146105e957600080fd5b8063390d5388146104e45780633928b296146105045780633f4ba83a1461052457806342180fb8146105395780634a1856de146105595780635119b0ef1461058957600080fd5b8063248a9ca3116102c05780632f2ff15d1161029a5780632f2ff15d1461044c578063304561bb1461046c578063331a891a146104a457806336568abe146104c457600080fd5b8063248a9ca3146103f0578063297c2677146104205780632bbba8471461043657600080fd5b806301ffc9a714610313578063044218231461034857806309fce356146103785780630d6680871461039a578063196f0f62146103b057806321d3d536146103d057600080fd5b3661030e57005b600080fd5b34801561031f57600080fd5b5061033361032e3660046130b1565b610972565b60405190151581526020015b60405180910390f35b34801561035457600080fd5b5061036a60008051602061367d83398151915281565b60405190815260200161033f565b34801561038457600080fd5b50610398610393366004612f9e565b610a05565b005b3480156103a657600080fd5b5061036a60d45481565b3480156103bc57600080fd5b506103986103cb366004613065565b610a31565b3480156103dc57600080fd5b506103986103eb366004612d7d565b610a7f565b3480156103fc57600080fd5b5061036a61040b366004613027565b60009081526065602052604090206001015490565b34801561042c57600080fd5b5061036a60d65481565b34801561044257600080fd5b5060ca5415610333565b34801561045857600080fd5b50610398610467366004613040565b610b1c565b34801561047857600080fd5b5060cf5461048c90600160a060020a031681565b604051600160a060020a03909116815260200161033f565b3480156104b057600080fd5b506103986104bf366004613027565b610b47565b3480156104d057600080fd5b506103986104df366004613040565b610c5e565b3480156104f057600080fd5b5060d05461048c90600160a060020a031681565b34801561051057600080fd5b5061039861051f366004612d7d565b610ce9565b34801561053057600080fd5b50610398610d25565b34801561054557600080fd5b50610398610554366004613027565b610d49565b34801561056557600080fd5b5061036a610574366004613027565b60cb6020526000908152604090206001015481565b34801561059557600080fd5b506103986105a436600461312c565b610d86565b3480156105b557600080fd5b506103986105c4366004612ece565b610e04565b3480156105d557600080fd5b506103986105e43660046130f0565b610e8d565b3480156105f557600080fd5b5060975460ff16610333565b34801561060d57600080fd5b50610398610f05565b34801561062257600080fd5b5061036a6000805160206136bd83398151915281565b34801561064457600080fd5b5060ce5461048c90600160a060020a031681565b34801561066457600080fd5b50610398610fb1565b34801561067957600080fd5b50610398610688366004612d9a565b610fd2565b34801561069957600080fd5b5061036a60d75481565b3480156106af57600080fd5b5061039861101a565b3480156106c457600080fd5b506103986106d3366004612d7d565b611172565b3480156106e457600080fd5b506103986106f3366004612f10565b6111b3565b610398610706366004612e67565b611284565b34801561071757600080fd5b50610333610726366004613040565b6115b4565b34801561073757600080fd5b5061036a60d25481565b34801561074d57600080fd5b5061039861075c366004613027565b6115df565b34801561076d57600080fd5b5061036a60d55481565b34801561078357600080fd5b5061036a600081565b34801561079857600080fd5b5061036a60008051602061365d83398151915281565b3480156107ba57600080fd5b5061048c6107c9366004612d7d565b60cd60205260009081526040902054600160a060020a031681565b3480156107f057600080fd5b506103986107ff366004612d7d565b6115fe565b34801561081057600080fd5b5061036a60cc5481565b34801561082657600080fd5b5061036a60d35481565b34801561083c57600080fd5b5061039861084b366004613027565b61163a565b34801561085c57600080fd5b5061036a60008051602061369d83398151915281565b34801561087e57600080fd5b5061039861088d366004613040565b6116b1565b34801561089e57600080fd5b506103986108ad366004613065565b6116d7565b3480156108be57600080fd5b506108d26108cd366004613027565b6116fe565b60405161033f91906133f7565b3480156108eb57600080fd5b5060d15461048c90600160a060020a031681565b34801561090b57600080fd5b5061039861091a366004613027565b6117ba565b34801561092b57600080fd5b5061039861093a366004613027565b6117d9565b61039861094d366004612dd3565b611a0c565b34801561095e57600080fd5b5061039861096d366004613027565b611e6c565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b0000000000000000000000000000000000000000000000000000000014806109ff57507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b6000805160206136bd833981519152610a1e8133611e8b565b610a2a85858585611ef2565b5050505050565b60005b81811015610a7957610a6784848484818110610a5257610a526135a8565b905060200201602081019061088d9190612d7d565b80610a7181613574565b915050610a34565b50505050565b6000805160206136bd833981519152610a988133611e8b565b60d154600160a060020a031615610af95760405160e560020a62461bcd02815260206004820152601d60248201527f736964654272696467654164647265737320616c72656164792073657400000060448201526064015b60405180910390fd5b5060d18054600160a060020a031916600160a060020a0392909216919091179055565b600082815260656020526040902060010154610b388133611e8b565b610b42838361200b565b505050565b6000805160206136bd833981519152610b608133611e8b565b60975460ff16610b855760405160e560020a62461bcd028152600401610af0906132cf565b60cc54821015610baa5760405160e560020a62461bcd028152600401610af09061339a565b60d554821115610bff5760405160e560020a62461bcd02815260206004820152601f60248201527f6576656e744964206d757374206265203c3d20696e7075744576656e744964006044820152606401610af0565b610c0a60018361351a565b60d5555b600082815260cb602052604090206001015415610c5a57600082815260cb6020526040812090610c3e8282612c9d565b5060006001919091015581610c5281613574565b925050610c0e565b5050565b600160a060020a0381163314610cdf5760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610af0565b610c5a8282612091565b6000805160206136bd833981519152610d028133611e8b565b5060d08054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206136bd833981519152610d3e8133611e8b565b610d466120f8565b50565b6000805160206136bd833981519152610d628133611e8b565b8160d35460d754610d7391906134fb565b610d7d91906134d6565b60d7555060d355565b60008051602061367d833981519152610d9f8133611e8b565b60975460ff1615610dc55760405160e560020a62461bcd028152600401610af090613306565b610dce84612167565b60405184907f196c47048e38df7a4fe6e581c8f4f2e2ba67ac0dd45b90da756e97bd61d9dd3b90600090a2610a798383866121cc565b6000805160206136bd833981519152610e1d8133611e8b565b8160005b81811015610a2a5760cd6000868684818110610e3f57610e3f6135a8565b9050602002016020810190610e549190612d7d565b600160a060020a0316815260208101919091526040016000208054600160a060020a031916905580610e8581613574565b915050610e21565b600054610100900460ff1680610ea6575060005460ff16155b610ec55760405160e560020a62461bcd028152600401610af09061333d565b600054610100900460ff16158015610ee7576000805461ffff19166101011790555b610ef08261225a565b8015610c5a576000805461ff00191690555050565b60ca54610f575760405160e560020a62461bcd02815260206004820152600e60248201527f517565756520697320656d7074790000000000000000000000000000000000006044820152606401610af0565b60d68054906000610f6783613574565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca604051610f9b919061322c565b60405180910390a2610faf60ca6000612c9d565b565b60008051602061365d833981519152610fca8133611e8b565b610d46612474565b6000805160206136bd833981519152610feb8133611e8b565b50600160a060020a03918216600090815260cd602052604090208054600160a060020a03191691909216179055565b60975460ff16156110405760405160e560020a62461bcd028152600401610af090613306565b60cc545b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156110d257600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611078565b50505050815260200160018201548152505090508060200151600014806110fc5750428160200151115b15611107575060cc55565b8051611112906124cf565b600082815260cb602052604081209061112b8282612c9d565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a2508061116a81613574565b915050611044565b6000805160206136bd83398151915261118b8133611e8b565b50600160a060020a0316600090815260cd602052604090208054600160a060020a0319169055565b3330146112055760405160e560020a62461bcd02815260206004820152601c60248201527f54686973206d6574686f642072657175697265206d756c7469736967000000006044820152606401610af0565b611210600033612763565b61122860008051602061367d833981519152826116b1565b61124160008051602061365d833981519152878761276d565b61125960008051602061369d83398151915285612763565b61127160008051602061367d83398151915284612763565b61127c6000836116b1565b505050505050565b60ce54600160a060020a03908116600090815260cd602052604090205416806112f25760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610af0565b6112fc82846134be565b341161134d5760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c7565203c3d206665650000000000000000000000000000006044820152606401610af0565b60008261135a853461351a565b611364919061351a565b60ce5490915061138190600160a060020a031687878787866127b5565b60cf54604051600160a060020a039091169085156108fc029086906000818181858888f193505050501580156113bb573d6000803e3d6000fd5b5060d054604051600160a060020a039091169084156108fc029085906000818181858888f193505050501580156113f6573d6000803e3d6000fd5b5060ce60009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0826040518263ffffffff1660e060020a0281526004016000604051808303818588803b15801561144a57600080fd5b505af115801561145e573d6000803e3d6000fd5b505060408051606081018252600160a060020a0380881682528c81166020830190815282840188815260ca80546001810182556000918252945160039095027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054968616600160a060020a031997881617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee2840180549190951695169490941790925590517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d65491513395507f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f444945061159b9350879087908b908b90958652600160a060020a0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b60405180910390a26115ab612949565b50505050505050565b6000918252606560209081526040808420600160a060020a0393909316845291905290205460ff1690565b6000805160206136bd8339815191526115f88133611e8b565b5060d455565b6000805160206136bd8339815191526116178133611e8b565b5060cf8054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206136bd8339815191526116538133611e8b565b60975460ff166116785760405160e560020a62461bcd028152600401610af0906132cf565b60cc5482101561169d5760405160e560020a62461bcd028152600401610af09061339a565b6116a860018361351a565b60d5555060cc55565b6000828152606560205260409020600101546116cd8133611e8b565b610b428383612091565b6000838152606560205260409020600101546116f38133611e8b565b610a7984848461276d565b604080518082019091526060815260006020820152600082815260cb60209081526040808320815181546060948102820185018452928101838152909491938593919285929185015b828210156117a157600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611747565b5050505081526020016001820154815250509050919050565b6000805160206136bd8339815191526117d38133611e8b565b5060c955565b60975460ff16156117ff5760405160e560020a62461bcd028152600401610af090613306565b60cc5481146118535760405160e560020a62461bcd02815260206004820152601c60248201527f63616e20756e6c6f636b206f6e6c79206f6c64657374206576656e74000000006044820152606401610af0565b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156118e157600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611887565b5050505081526020016001820154815250509050600081602001511161194c5760405160e560020a62461bcd02815260206004820181905260248201527f6e6f206c6f636b6564207472616e7366657273207769746820746869732069646044820152606401610af0565b428160200151106119a25760405160e560020a62461bcd02815260206004820152601b60248201527f6c6f636b54696d6520686173206e6f74207965742070617373656400000000006044820152606401610af0565b80516119ad906124cf565b600082815260cb60205260408120906119c68282612c9d565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a2611a058260016134be565b60cc555050565b60008515611aa1576000805260cd6020527fcd565b10a72538d86f6d352f37ebc5dff31587960b12c0afe00fd03947a6932a54600160a060020a038a8116911614611a9c5760405160e560020a62461bcd02815260206004820152601f60248201527f546f6b656e206e6f7420706f696e7420746f206e617469766520746f6b656e006044820152606401610af0565b611b0d565b50600160a060020a03808916600090815260cd60205260409020541680611b0d5760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610af0565b611b1782846134be565b3414611b685760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c756520213d206665650000000000000000000000000000006044820152606401610af0565b60008711611bbb5760405160e560020a62461bcd02815260206004820152601160248201527f43616e6e6f7420776974686472617720300000000000000000000000000000006044820152606401610af0565b611bc989868686868c6127b5565b60cf54604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611c03573d6000803e3d6000fd5b5060d054604051600160a060020a039091169083156108fc029084906000818181858888f19350505050158015611c3e573d6000803e3d6000fd5b506040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101889052600160a060020a038a16906323b872dd90606401602060405180830381600087803b158015611ca657600080fd5b505af1158015611cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cde919061300a565b611d2d5760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610af0565b6040805160608082018352600160a060020a038481168084528c821660208086019182528587018e815260ca8054600181018255600091909152965160039097027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054988716600160a060020a0319998a1617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee284018054918716919098161790965594517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d6548551908152918e16938201939093529283019190915281018890526080810184905260a0810183905233907f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f4449060c00160405180910390a2611e61612949565b505050505050505050565b6000805160206136bd833981519152611e858133611e8b565b5060d255565b611e9582826115b4565b610c5a57611ead81600160a060020a031660146129c1565b611eb88360206129c1565b604051602001611ec99291906131ab565b60408051601f198184030181529082905260e560020a62461bcd028252610af09160040161329c565b828114611f6a5760405160e560020a62461bcd02815260206004820152603f60248201527f73697a6573206f6620746f6b656e5468697341646472657373657320616e642060448201527f746f6b656e53696465416464726573736573206d7573742062652073616d65006064820152608401610af0565b8260005b8181101561127c57838382818110611f8857611f886135a8565b9050602002016020810190611f9d9190612d7d565b60cd6000888885818110611fb357611fb36135a8565b9050602002016020810190611fc89190612d7d565b600160a060020a03908116825260208201929092526040016000208054600160a060020a031916929091169190911790558061200381613574565b915050611f6e565b61201582826115b4565b610c5a576000828152606560209081526040808320600160a060020a03851684529091529020805460ff1916600117905561204d3390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61209b82826115b4565b15610c5a576000828152606560209081526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60975460ff1661211d5760405160e560020a62461bcd028152600401610af0906132cf565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051600160a060020a03909116815260200160405180910390a1565b60d56000815461217690613574565b91829055508114610d465760405160e560020a62461bcd02815260206004820152601460248201527f4576656e744964206f7574206f66206f726465720000000000000000000000006044820152606401610af0565b60d4546121d990426134be565b600082815260cb60205260408120600101919091555b82811015610a7957600082815260cb60205260409020848483818110612217576122176135a8565b83546001810185556000948552602090942060609091029290920192600302909101905061224582826135da565b5050808061225290613574565b9150506121ef565b600054610100900460ff1680612273575060005460ff16155b6122925760405160e560020a62461bcd028152600401610af09061333d565b600054610100900460ff161580156122b4576000805461ffff19166101011790555b6122bf600030612763565b6122d76000805160206136bd83398151915233612763565b6122fe60008051602061367d8339815191526122f96040850160208601612d7d565b612763565b61232260008051602061365d83398151915261231d6040850185613475565b61276d565b61234460008051602061369d8339815191526122f96080850160608601612d7d565b61236661235460a0840184613475565b61236160c0860186613475565b611ef2565b61237660a0830160808401612d7d565b60ce8054600160a060020a031916600160a060020a03929092169190911790556123a36020830183612d7d565b60d18054600160a060020a031916600160a060020a03929092169190911790556123d4610100830160e08401612d7d565b60cf8054600160a060020a031916600160a060020a039290921691909117905561240661012083016101008401612d7d565b60d08054600160a060020a031916600160a060020a039290921691909117905561016082013560d25561012082013560d381905561014083013560d455600160cc81905560d655600360c95561245c90426134d6565b60d7558015610c5a576000805461ff00191690555050565b60975460ff161561249a5760405160e560020a62461bcd028152600401610af090613306565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861214a3390565b60005b8151811015610c5a576000600160a060020a03168282815181106124f8576124f86135a8565b602002602001015160000151600160a060020a031614156126145760ce548251600160a060020a0390911690632e1a7d4d9084908490811061253c5761253c6135a8565b6020026020010151604001516040518263ffffffff1660e060020a02815260040161256991815260200190565b600060405180830381600087803b15801561258357600080fd5b505af1158015612597573d6000803e3d6000fd5b505050508181815181106125ad576125ad6135a8565b602002602001015160200151600160a060020a03166108fc8383815181106125d7576125d76135a8565b6020026020010151604001519081150290604051600060405180830381858888f1935050505015801561260e573d6000803e3d6000fd5b50612751565b818181518110612626576126266135a8565b602002602001015160000151600160a060020a031663a9059cbb838381518110612652576126526135a8565b602002602001015160200151848481518110612670576126706135a8565b6020026020010151604001516040518363ffffffff1660e060020a0281526004016126b0929190600160a060020a03929092168252602082015260400190565b602060405180830381600087803b1580156126ca57600080fd5b505af11580156126de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612702919061300a565b6127515760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610af0565b8061275b81613574565b9150506124d2565b610c5a828261200b565b60005b81811015610a79576127a38484848481811061278e5761278e6135a8565b90506020020160208101906122f99190612d7d565b806127ad81613574565b915050612770565b600080806127c5610708426134d6565b905060005b60c9548110156128fd576040516c01000000000000000000000000600160a060020a038c160260208201526034810183905260548101889052607481018790526094810186905260b40160408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c016040516020818303038152906040528051906020012093506128b5848a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c1292505050565b92506128cf60008051602061369d833981519152846115b4565b156128dd575050505061127c565b816128e78161355d565b92505080806128f590613574565b9150506127ca565b5060405160e560020a62461bcd02815260206004820152601660248201527f5369676e617475726520636865636b206661696c6564000000000000000000006044820152606401610af0565b600060d3544261295991906134d6565b905060d7548114610d465760d6805490600061297483613574565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca6040516129a8919061322c565b60405180910390a26129bc60ca6000612c9d565b60d755565b606060006129d08360026134fb565b6129db9060026134be565b67ffffffffffffffff8111156129f3576129f36135c1565b6040519080825280601f01601f191660200182016040528015612a1d576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612a5457612a546135a8565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612ab757612ab76135a8565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612af38460026134fb565b612afe9060016134be565b90505b6001811115612bb9577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612b3f57612b3f6135a8565b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110612b7457612b746135a8565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350601090940493612bb28161355d565b9050612b01565b508315612c0b5760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610af0565b9392505050565b6020810151604082015160608301516000929190831a601b811015612c3557601b015b60408051600081526020810180835288905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa158015612c88573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b5080546000825560030290600052602060002090810190610d4691905b80821115612cec578054600160a060020a03199081168255600182018054909116905560006002820155600301612cba565b5090565b60008083601f840112612d0257600080fd5b50813567ffffffffffffffff811115612d1a57600080fd5b6020830191508360208083028501011115612d3457600080fd5b9250929050565b60008083601f840112612d4d57600080fd5b50813567ffffffffffffffff811115612d6557600080fd5b602083019150836020828501011115612d3457600080fd5b600060208284031215612d8f57600080fd5b8135612c0b81613639565b60008060408385031215612dad57600080fd5b8235612db881613639565b91506020830135612dc881613639565b809150509250929050565b60008060008060008060008060e0898b031215612def57600080fd5b8835612dfa81613639565b97506020890135612e0a81613639565b9650604089013595506060890135612e218161364e565b9450608089013567ffffffffffffffff811115612e3d57600080fd5b612e498b828c01612d3b565b999c989b5096999598969760a08701359660c0013595509350505050565b600080600080600060808688031215612e7f57600080fd5b8535612e8a81613639565b9450602086013567ffffffffffffffff811115612ea657600080fd5b612eb288828901612d3b565b9699909850959660408101359660609091013595509350505050565b60008060208385031215612ee157600080fd5b823567ffffffffffffffff811115612ef857600080fd5b612f0485828601612cf0565b90969095509350505050565b60008060008060008060a08789031215612f2957600080fd5b863567ffffffffffffffff811115612f4057600080fd5b612f4c89828a01612cf0565b9097509550506020870135612f6081613639565b93506040870135612f7081613639565b92506060870135612f8081613639565b91506080870135612f9081613639565b809150509295509295509295565b60008060008060408587031215612fb457600080fd5b843567ffffffffffffffff80821115612fcc57600080fd5b612fd888838901612cf0565b90965094506020870135915080821115612ff157600080fd5b50612ffe87828801612cf0565b95989497509550505050565b60006020828403121561301c57600080fd5b8151612c0b8161364e565b60006020828403121561303957600080fd5b5035919050565b6000806040838503121561305357600080fd5b823591506020830135612dc881613639565b60008060006040848603121561307a57600080fd5b83359250602084013567ffffffffffffffff81111561309857600080fd5b6130a486828701612cf0565b9497909650939450505050565b6000602082840312156130c357600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1981168114612c0b57600080fd5b60006020828403121561310257600080fd5b813567ffffffffffffffff81111561311957600080fd5b82016101808185031215612c0b57600080fd5b60008060006040848603121561314157600080fd5b83359250602084013567ffffffffffffffff8082111561316057600080fd5b818601915086601f83011261317457600080fd5b81358181111561318357600080fd5b87602060608302850101111561319857600080fd5b6020830194508093505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516131e3816017850160208801613531565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613220816028840160208801613531565b01602801949350505050565b60006020808301818452808554808352604092508286019150866000528360002060005b8281101561328f578154600160a060020a0390811685526001808401549091168786015260028301548686015260609094019360039092019101613250565b5091979650505050505050565b60208152600082518060208401526132bb816040850160208701613531565b601f01601f19169190910160400192915050565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b60208082526026908201527f6576656e744964206d757374206265203e3d206f6c646573744c6f636b65644560408201527f76656e7449640000000000000000000000000000000000000000000000000000606082015260800190565b6000602080835260608084018551604080858801528282518085526080890191508684019450600093505b8084101561345f5784518051600160a060020a03908116845288820151168884015283015183830152938601936001939093019290850190613422565b5094909701519590960194909452509392505050565b6000808335601e1984360301811261348c57600080fd5b83018035915067ffffffffffffffff8211156134a757600080fd5b6020908101925081023603821315612d3457600080fd5b600082198211156134d1576134d161358f565b500190565b6000826134f65760e060020a634e487b7102600052601260045260246000fd5b500490565b60008160001904831182151516156135155761351561358f565b500290565b60008282101561352c5761352c61358f565b500390565b60005b8381101561354c578181015183820152602001613534565b83811115610a795750506000910152565b60008161356c5761356c61358f565b506000190190565b60006000198214156135885761358861358f565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fd5b81356135e581613639565b8154600160a060020a031916600160a060020a03821617825550602082013561360d81613639565b600182018054600160a060020a031916600160a060020a03831617905550604082013560028201555050565b600160a060020a0381168114610d4657600080fd5b8015158114610d4657600080fdfeb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887ea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220531bafd7165d631aa1a8bdce6b543ce59906abdbe9f84e01278140fa1f57340164736f6c63430008060033", @@ -1260,7 +1260,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 6726, + "astId": 2748, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "signatureFeeCheckNumber", "offset": 0, @@ -1268,23 +1268,23 @@ "type": "t_uint256" }, { - "astId": 6730, + "astId": 2752, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "queue", "offset": 0, "slot": "202", - "type": "t_array(t_struct(Transfer)7932_storage)dyn_storage" + "type": "t_array(t_struct(Transfer)3954_storage)dyn_storage" }, { - "astId": 6735, + "astId": 2757, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "lockedTransfers", "offset": 0, "slot": "203", - "type": "t_mapping(t_uint256,t_struct(LockedTransfers)7949_storage)" + "type": "t_mapping(t_uint256,t_struct(LockedTransfers)3971_storage)" }, { - "astId": 6737, + "astId": 2759, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "oldestLockedEventId", "offset": 0, @@ -1292,7 +1292,7 @@ "type": "t_uint256" }, { - "astId": 6741, + "astId": 2763, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "tokenAddresses", "offset": 0, @@ -1300,7 +1300,7 @@ "type": "t_mapping(t_address,t_address)" }, { - "astId": 6743, + "astId": 2765, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "wrapperAddress", "offset": 0, @@ -1308,7 +1308,7 @@ "type": "t_address" }, { - "astId": 6745, + "astId": 2767, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "transferFeeRecipient", "offset": 0, @@ -1316,7 +1316,7 @@ "type": "t_address_payable" }, { - "astId": 6747, + "astId": 2769, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "bridgeFeeRecipient", "offset": 0, @@ -1324,7 +1324,7 @@ "type": "t_address_payable" }, { - "astId": 6749, + "astId": 2771, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "sideBridgeAddress", "offset": 0, @@ -1332,7 +1332,7 @@ "type": "t_address" }, { - "astId": 6751, + "astId": 2773, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "minSafetyBlocks", "offset": 0, @@ -1340,7 +1340,7 @@ "type": "t_uint256" }, { - "astId": 6753, + "astId": 2775, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "timeframeSeconds", "offset": 0, @@ -1348,7 +1348,7 @@ "type": "t_uint256" }, { - "astId": 6755, + "astId": 2777, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "lockTime", "offset": 0, @@ -1356,7 +1356,7 @@ "type": "t_uint256" }, { - "astId": 6757, + "astId": 2779, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "inputEventId", "offset": 0, @@ -1364,7 +1364,7 @@ "type": "t_uint256" }, { - "astId": 6759, + "astId": 2781, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "outputEventId", "offset": 0, @@ -1372,7 +1372,7 @@ "type": "t_uint256" }, { - "astId": 6761, + "astId": 2783, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "lastTimeframe", "offset": 0, @@ -1380,7 +1380,7 @@ "type": "t_uint256" }, { - "astId": 7922, + "astId": 3944, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "__gap", "offset": 0, @@ -1388,7 +1388,7 @@ "type": "t_array(t_uint256)15_storage" }, { - "astId": 6656, + "astId": 2678, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "___gap", "offset": 0, @@ -1407,8 +1407,8 @@ "label": "address payable", "numberOfBytes": "20" }, - "t_array(t_struct(Transfer)7932_storage)dyn_storage": { - "base": "t_struct(Transfer)7932_storage", + "t_array(t_struct(Transfer)3954_storage)dyn_storage": { + "base": "t_struct(Transfer)3954_storage", "encoding": "dynamic_array", "label": "struct CommonStructs.Transfer[]", "numberOfBytes": "32" @@ -1462,27 +1462,27 @@ "numberOfBytes": "32", "value": "t_struct(RoleData)43_storage" }, - "t_mapping(t_uint256,t_struct(LockedTransfers)7949_storage)": { + "t_mapping(t_uint256,t_struct(LockedTransfers)3971_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct CommonStructs.LockedTransfers)", "numberOfBytes": "32", - "value": "t_struct(LockedTransfers)7949_storage" + "value": "t_struct(LockedTransfers)3971_storage" }, - "t_struct(LockedTransfers)7949_storage": { + "t_struct(LockedTransfers)3971_storage": { "encoding": "inplace", "label": "struct CommonStructs.LockedTransfers", "members": [ { - "astId": 7946, + "astId": 3968, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "transfers", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Transfer)7932_storage)dyn_storage" + "type": "t_array(t_struct(Transfer)3954_storage)dyn_storage" }, { - "astId": 7948, + "astId": 3970, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "endTimestamp", "offset": 0, @@ -1515,12 +1515,12 @@ ], "numberOfBytes": "64" }, - "t_struct(Transfer)7932_storage": { + "t_struct(Transfer)3954_storage": { "encoding": "inplace", "label": "struct CommonStructs.Transfer", "members": [ { - "astId": 7927, + "astId": 3949, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "tokenAddress", "offset": 0, @@ -1528,7 +1528,7 @@ "type": "t_address" }, { - "astId": 7929, + "astId": 3951, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "toAddress", "offset": 0, @@ -1536,7 +1536,7 @@ "type": "t_address" }, { - "astId": 7931, + "astId": 3953, "contract": "contracts/networks/BSC_AmbBridge.sol:BSC_AmbBridge", "label": "amount", "offset": 0, diff --git a/contracts/deployments/test/amb/BSC_AmbBridge_Proxy.json b/contracts/deployments/test/amb/BSC_AmbBridge_Proxy.json index 157cb8e7..97a37404 100644 --- a/contracts/deployments/test/amb/BSC_AmbBridge_Proxy.json +++ b/contracts/deployments/test/amb/BSC_AmbBridge_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", "abi": [ { "inputs": [ @@ -615,91 +615,121 @@ "type": "receive" } ], - "transactionHash": "0x22f8e5b5fef2fab6b64e00cbef35cc6e86291f2db7677158893a7bc6fd904887", + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", + "contractAddress": "0xdC103bf9a3789f78958f365321F3BA07e369667A", "transactionIndex": 0, - "gasUsed": "3092018", - "logsBloom": "0x20000004000000000000002000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000020000000000000000000000000000010020000000000000000000800000000000000000800000000000020000000002000000000000000000000004000000000000000020000000000000000000020000000000000040000000200000000000000000000001000000000000000000020400000000000000000080000000000000000000100000000000020000000000000000000000000000000000080000000000000000000000000000000", - "blockHash": "0xb5a00b550559cc506d6bbeb3356db67282e079594841c9e69693d19f1f12cb88", - "transactionHash": "0x22f8e5b5fef2fab6b64e00cbef35cc6e86291f2db7677158893a7bc6fd904887", + "gasUsed": "2968580", + "logsBloom": "0x000000040000000c000000200000000040000080000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000200000000002000000000000000100000000000000402000000000000400000080000010000000000080000000000000000000000a000000000000000000000004000000000000000020000000800000000000020000000000000041000000000000000040000000000001000000000000000000020400000000000000000000000000000000000000100000000000020000000020000000000000000000000000000000000800000000000000000000000", + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c", + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", "logs": [ { "transactionIndex": 0, - "blockNumber": 1406833, - "transactionHash": "0x22f8e5b5fef2fab6b64e00cbef35cc6e86291f2db7677158893a7bc6fd904887", - "address": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", + "blockNumber": 33949, + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000e9a768790acb511763d5222ec83d3cd41a12d399" + "0x0000000000000000000000005f0ea6276d40a3529e060ea5acb9bf963f5c430a" ], "data": "0x", "logIndex": 0, - "blockHash": "0xb5a00b550559cc506d6bbeb3356db67282e079594841c9e69693d19f1f12cb88" + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c" }, { "transactionIndex": 0, - "blockNumber": 1406833, - "transactionHash": "0x22f8e5b5fef2fab6b64e00cbef35cc6e86291f2db7677158893a7bc6fd904887", - "address": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", + "blockNumber": 33949, + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000dc103bf9a3789f78958f365321f3ba07e369667a", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 1, - "blockHash": "0xb5a00b550559cc506d6bbeb3356db67282e079594841c9e69693d19f1f12cb88" + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c" }, { "transactionIndex": 0, - "blockNumber": 1406833, - "transactionHash": "0x22f8e5b5fef2fab6b64e00cbef35cc6e86291f2db7677158893a7bc6fd904887", - "address": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", + "blockNumber": 33949, + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 2, - "blockHash": "0xb5a00b550559cc506d6bbeb3356db67282e079594841c9e69693d19f1f12cb88" + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c" }, { "transactionIndex": 0, - "blockNumber": 1406833, - "transactionHash": "0x22f8e5b5fef2fab6b64e00cbef35cc6e86291f2db7677158893a7bc6fd904887", - "address": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", + "blockNumber": 33949, + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 3, - "blockHash": "0xb5a00b550559cc506d6bbeb3356db67282e079594841c9e69693d19f1f12cb88" + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c" + }, + { + "transactionIndex": 0, + "blockNumber": 33949, + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c" + }, + { + "transactionIndex": 0, + "blockNumber": 33949, + "transactionHash": "0xdf69c66a837731275a2a2fba3814f121c0399c30a33c3f04319c8ac6bee3dd8b", + "address": "0xdC103bf9a3789f78958f365321F3BA07e369667A", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0x0647d4a81f36f2b0228f041ec90b3d6e4e211b896a83856ee033bfa866ac098c" } ], - "blockNumber": 1406833, - "cumulativeGasUsed": "3092018", + "blockNumber": 33949, + "cumulativeGasUsed": "2968580", "status": 1, "byzantium": true }, "args": [ - "0xE9A768790acb511763d5222Ec83D3CD41A12d399", - "0x29a9659d00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000001cdab61000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000da9bb33f9e3334781f3e4fce310288d7db3ed29a00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000da9bb33f9e3334781f3e4fce310288d7db3ed29a000000000000000000000000d52f6e6ad16904a23e5ca0309098652502ca97e8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056a79d39fc414ff11ebb30d6a5367ea5da8c6fe90000000000000000000000000000000000000000000000000000000000000004000000000000000000000000daa9ee2ab371e31a75faf93d0b859561a5d8a58f0000000000000000000000008601876f8a6dccae5ce8cf154f710e09c3f0f2c8000000000000000000000000d52f6e6ad16904a23e5ca0309098652502ca97e80000000000000000000000003a5633bae0243bb360e25624dc6dfd241333b57500000000000000000000000000000000000000000000000000000000000000070000000000000000000000001284214b9b9c85549ab3d2b972df0deef66ac2c9000000000000000000000000a2959d3f95eae5dc7d70144ce1b73b403b7eb6e0000000000000000000000000980a75ecd1309ea12fa2ed87a8744fbfc9b863d500000000000000000000000035552c16704d214347f29fa77f77da6d75d7c752000000000000000000000000f474cf03cceff28abc65c9cbae594f725c80e12d0000000000000000000000006d6247501b822fd4eaa76fcb64baea360279497f000000000000000000000000049153b8dae0a232ac90d20c78f1a5d1de7b7dc5", + "0x5f0EA6276D40A3529E060EA5Acb9bf963f5c430a", + "0x5a5f55bf00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000000000000000000000000000000000000000000180000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000007cee2ae3042d2c646aa24facfa92dfee589046f000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e00000000000000000000000000000000000000000000000000000000000000060000000000000000000000007cee2ae3042d2c646aa24facfa92dfee589046f0000000000000000000000000871c1f199bd17f1cbed559de974a7f1568b6e1ea0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000952b98dbda3319bf0e339cc9cc574ff768f80f3c0000000000000000000000001bb13b68dba3571415b4092802777b5ca15de897000000000000000000000000fb069affe6e75674fabf67108e9094fb988a31d90000000000000000000000000000000000000000000000000000000000000006000000000000000000000000c61d0cfadc9be2ef05288d04ebcc8ec8035d7ac60000000000000000000000003050a5cbe1ec89917933476a99962a40e802b89c000000000000000000000000871c1f199bd17f1cbed559de974a7f1568b6e1ea0000000000000000000000009ce86a22e9a89a4d716ee23d057389c3df3e26a500000000000000000000000062c6e4534594ad39307fe654d5260f12010a297e000000000000000000000000446c2dae148049e53d0489a8cc0d7e55cf3da5df", [ "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" ], 1 ], "numDeployments": 1, - "solcInputHash": "63b1c355e88e8fd19ebe2cd692a8475b", + "solcInputHash": "54d2ddebdc6c37a1b4fd5c90d287707b", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Confirmation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Execution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"ExecutionFailure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerAddition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerRemoval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"required\",\"type\":\"uint256\"}],\"name\":\"RequirementChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Revocation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Submission\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"MAX_OWNER_COUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"_upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"name\":\"changeRequirement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"confirmTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"confirmations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmationCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmations\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"_confirmations\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"to\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_transactionIds\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"isConfirmed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"owners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"replaceOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"required\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"revokeConfirmation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"submitTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addOwner(address)\":{\"details\":\"Allows to add a new owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of new owner.\"}},\"changeRequirement(uint256)\":{\"details\":\"Allows to change the number of required confirmations. Transaction has to be sent by wallet.\",\"params\":{\"_required\":\"Number of required confirmations.\"}},\"confirmTransaction(uint256)\":{\"details\":\"Allows an owner to confirm a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"executeTransaction(uint256)\":{\"details\":\"Allows anyone to execute a confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"getConfirmationCount(uint256)\":{\"details\":\"Returns number of confirmations of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"count\":\"Number of confirmations.\"}},\"getConfirmations(uint256)\":{\"details\":\"Returns array with owner addresses, which confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_confirmations\":\"Returns array of owner addresses.\"}},\"getOwners()\":{\"details\":\"Returns list of owners.\",\"returns\":{\"_0\":\"List of owner addresses.\"}},\"getTransactionCount(bool,bool)\":{\"details\":\"Returns total number of transactions after filers are applied.\",\"params\":{\"executed\":\"Include executed transactions.\",\"pending\":\"Include pending transactions.\"},\"returns\":{\"count\":\"Total number of transactions after filters are applied.\"}},\"getTransactionIds(uint256,uint256,bool,bool)\":{\"details\":\"Returns list of transaction IDs in defined range.\",\"params\":{\"executed\":\"Include executed transactions.\",\"from\":\"Index start position of transaction array.\",\"pending\":\"Include pending transactions.\",\"to\":\"Index end position of transaction array.\"},\"returns\":{\"_transactionIds\":\"Returns array of transaction IDs.\"}},\"isConfirmed(uint256)\":{\"details\":\"Returns the confirmation status of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_0\":\"Confirmation status.\"}},\"removeOwner(address)\":{\"details\":\"Allows to remove an owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of owner.\"}},\"replaceOwner(address,address)\":{\"details\":\"Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\",\"params\":{\"newOwner\":\"Address of new owner.\",\"owner\":\"Address of owner to be replaced.\"}},\"revokeConfirmation(uint256)\":{\"details\":\"Allows an owner to revoke a confirmation for a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"submitTransaction(address,uint256,bytes)\":{\"details\":\"Allows an owner to submit and confirm a transaction.\",\"params\":{\"data\":\"Transaction data payload.\",\"destination\":\"Transaction target address.\",\"value\":\"Transaction ether value.\"},\"returns\":{\"transactionId\":\"Returns transaction ID.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/utils/Proxy.sol\":\"ProxyMultiSig\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \\\"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(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) 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 require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/utils/MultiSigWallet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\n\\ncontract MultiSigWallet {\\n\\n /*\\n * Events\\n */\\n event Confirmation(address indexed sender, uint indexed transactionId);\\n event Revocation(address indexed sender, uint indexed transactionId);\\n event Submission(uint indexed transactionId);\\n event Execution(uint indexed transactionId);\\n event ExecutionFailure(uint indexed transactionId);\\n event OwnerAddition(address indexed owner);\\n event OwnerRemoval(address indexed owner);\\n event RequirementChange(uint required);\\n\\n /*\\n * Constants\\n */\\n uint constant public MAX_OWNER_COUNT = 50;\\n\\n /*\\n * Storage\\n */\\n mapping(uint => Transaction) public transactions;\\n mapping(uint => mapping(address => bool)) public confirmations;\\n mapping(address => bool) public isOwner;\\n address[] public owners;\\n uint public required;\\n uint public transactionCount;\\n\\n struct Transaction {\\n address destination;\\n uint value;\\n bytes data;\\n bool executed;\\n }\\n\\n /*\\n * Modifiers\\n */\\n modifier onlyWallet() {\\n require(msg.sender == address(this));\\n _;\\n }\\n\\n modifier ownerDoesNotExist(address owner) {\\n require(!isOwner[owner]);\\n _;\\n }\\n\\n modifier ownerExists(address owner) {\\n require(isOwner[owner]);\\n _;\\n }\\n\\n modifier transactionExists(uint transactionId) {\\n require(transactions[transactionId].destination != address(0));\\n _;\\n }\\n\\n modifier confirmed(uint transactionId, address owner) {\\n require(confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notConfirmed(uint transactionId, address owner) {\\n require(!confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notExecuted(uint transactionId) {\\n require(!transactions[transactionId].executed);\\n _;\\n }\\n\\n modifier notNull(address _address) {\\n require(_address != address(0));\\n _;\\n }\\n\\n modifier validRequirement(uint ownerCount, uint _required) {\\n require(ownerCount <= MAX_OWNER_COUNT\\n && _required <= ownerCount\\n && _required != 0\\n && ownerCount != 0);\\n _;\\n }\\n\\n /*\\n * Public functions\\n */\\n /// @dev Contract constructor sets initial owners and required number of confirmations.\\n /// @param _owners List of initial owners.\\n /// @param _required Number of required confirmations.\\n constructor(address[] memory _owners, uint _required)\\n validRequirement(_owners.length, _required)\\n {\\n for (uint i = 0; i < _owners.length; i++) {\\n require(!isOwner[_owners[i]] && _owners[i] != address(0));\\n isOwner[_owners[i]] = true;\\n }\\n owners = _owners;\\n required = _required;\\n }\\n\\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of new owner.\\n function addOwner(address owner)\\n public\\n onlyWallet\\n ownerDoesNotExist(owner)\\n notNull(owner)\\n validRequirement(owners.length + 1, required)\\n {\\n isOwner[owner] = true;\\n owners.push(owner);\\n emit OwnerAddition(owner);\\n }\\n\\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner.\\n function removeOwner(address owner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n {\\n isOwner[owner] = false;\\n for (uint i = 0; i < owners.length - 1; i++)\\n if (owners[i] == owner) {\\n owners[i] = owners[owners.length - 1];\\n break;\\n }\\n owners.pop();\\n if (required > owners.length)\\n changeRequirement(owners.length);\\n emit OwnerRemoval(owner);\\n }\\n\\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner to be replaced.\\n /// @param newOwner Address of new owner.\\n function replaceOwner(address owner, address newOwner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n ownerDoesNotExist(newOwner)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (owners[i] == owner) {\\n owners[i] = newOwner;\\n break;\\n }\\n isOwner[owner] = false;\\n isOwner[newOwner] = true;\\n emit OwnerRemoval(owner);\\n emit OwnerAddition(newOwner);\\n }\\n\\n /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\\n /// @param _required Number of required confirmations.\\n function changeRequirement(uint _required)\\n public\\n onlyWallet\\n validRequirement(owners.length, _required)\\n {\\n required = _required;\\n emit RequirementChange(_required);\\n }\\n\\n /// @dev Allows an owner to submit and confirm a transaction.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function submitTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) public returns (uint transactionId)\\n {\\n transactionId = addTransaction(destination, value, data);\\n confirmTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to confirm a transaction.\\n /// @param transactionId Transaction ID.\\n function confirmTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n transactionExists(transactionId)\\n notConfirmed(transactionId, msg.sender)\\n {\\n confirmations[transactionId][msg.sender] = true;\\n emit Confirmation(msg.sender, transactionId);\\n executeTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to revoke a confirmation for a transaction.\\n /// @param transactionId Transaction ID.\\n function revokeConfirmation(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n confirmations[transactionId][msg.sender] = false;\\n emit Revocation(msg.sender, transactionId);\\n }\\n\\n /// @dev Allows anyone to execute a confirmed transaction.\\n /// @param transactionId Transaction ID.\\n function executeTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n if (isConfirmed(transactionId)) {\\n Transaction storage txn = transactions[transactionId];\\n txn.executed = true;\\n if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\\n emit Execution(transactionId);\\n else {\\n emit ExecutionFailure(transactionId);\\n txn.executed = false;\\n }\\n }\\n }\\n\\n // call has been separated into its own function in order to take advantage\\n // of the Solidity's code generator to produce a loop that copies tx.data into memory.\\n function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) {\\n bool result;\\n assembly {\\n let x := mload(0x40) // \\\"Allocate\\\" memory for output (0x40 is where \\\"free memory\\\" pointer is stored by convention)\\n let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\\n result := call(\\n sub(gas(), 36810), // 34710 is the value that solidity is currently emitting // todo\\n // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\\n // callNewAccountGas (25000, in case the destination address does not exist and needs creating) +\\n // gasSLoadEIP2929 (2100)\\n\\n destination,\\n value,\\n d,\\n dataLength, // Size of the input (in bytes) - this is what fixes the padding problem\\n x,\\n 0 // Output is ignored, therefore the output size is zero\\n )\\n }\\n return result;\\n }\\n\\n /// @dev Returns the confirmation status of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return Confirmation status.\\n function isConfirmed(uint transactionId) public view returns (bool)\\n {\\n uint count = 0;\\n for (uint i = 0; i < owners.length; i++) {\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n if (count == required)\\n return true;\\n }\\n return false;\\n }\\n\\n /*\\n * Internal functions\\n */\\n /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function addTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) internal\\n notNull(destination) returns (uint transactionId)\\n {\\n transactionId = transactionCount;\\n transactions[transactionId] = Transaction({\\n destination : destination,\\n value : value,\\n data : data,\\n executed : false\\n });\\n transactionCount += 1;\\n emit Submission(transactionId);\\n }\\n\\n /*\\n * Web3 call functions\\n */\\n /// @dev Returns number of confirmations of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return count Number of confirmations.\\n function getConfirmationCount(uint transactionId)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n }\\n\\n /// @dev Returns total number of transactions after filers are applied.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return count Total number of transactions after filters are applied.\\n function getTransactionCount(bool pending, bool executed)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n count += 1;\\n }\\n\\n /// @dev Returns list of owners.\\n /// @return List of owner addresses.\\n function getOwners() public view returns (address[] memory)\\n {\\n return owners;\\n }\\n\\n /// @dev Returns array with owner addresses, which confirmed transaction.\\n /// @param transactionId Transaction ID.\\n /// @return _confirmations Returns array of owner addresses.\\n function getConfirmations(uint transactionId) public view\\n returns (address[] memory _confirmations)\\n {\\n address[] memory confirmationsTemp = new address[](owners.length);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]]) {\\n confirmationsTemp[count] = owners[i];\\n count += 1;\\n }\\n _confirmations = new address[](count);\\n for (i = 0; i < count; i++)\\n _confirmations[i] = confirmationsTemp[i];\\n }\\n\\n /// @dev Returns list of transaction IDs in defined range.\\n /// @param from Index start position of transaction array.\\n /// @param to Index end position of transaction array.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return _transactionIds Returns array of transaction IDs.\\n function getTransactionIds(uint from, uint to, bool pending, bool executed)\\n public\\n view\\n returns (uint[] memory _transactionIds)\\n {\\n uint[] memory transactionIdsTemp = new uint[](transactionCount);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n {\\n transactionIdsTemp[count] = i;\\n count += 1;\\n }\\n _transactionIds = new uint[](to - from);\\n for (i = from; i < to; i++)\\n _transactionIds[i - from] = transactionIdsTemp[i];\\n }\\n}\\n\",\"keccak256\":\"0x1630487b4e9acd29e4c4ea04eff94b838660e39d009c0668c5213c209fb2f883\",\"license\":\"MIT\"},\"contracts/utils/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/proxy/Proxy.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport \\\"./MultiSigWallet.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\n\\ncontract ProxyMultiSig is Proxy, MultiSigWallet {\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n bytes32 private constant ADMIN_STORAGE_LOCATION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n bytes4 private constant _UPGRADE_TO_AND_CALL_SIGNATURE = bytes4(keccak256(\\\"_upgradeToAndCall(address,bytes)\\\"));\\n\\n event Upgraded(address indexed implementation);\\n\\n\\n constructor(\\n address _logic,\\n bytes memory _data,\\n address[] memory owners,\\n uint _required\\n\\n ) MultiSigWallet(owners, _required) {\\n // Cannot use _upgradeToAndCall because of onlyWallet modifier\\n _upgradeTo(_logic);\\n if (_data.length > 0) {\\n Address.functionDelegateCall(_logic, _data);\\n }\\n\\n StorageSlot.getAddressSlot(ADMIN_STORAGE_LOCATION).value = msg.sender; // trick the hardhat-deploy\\n }\\n\\n\\n function implementation() external view returns (address) {\\n return _implementation();\\n }\\n\\n function upgradeTo(address newImplementation) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, bytes(\\\"\\\"))\\n );\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, data)\\n );\\n }\\n\\n function _upgradeToAndCall(address newImplementation, bytes memory data) external onlyWallet payable {\\n _upgradeTo(newImplementation);\\n if (data.length > 0) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n function _upgradeTo(address newImplementation) internal {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n emit Upgraded(newImplementation);\\n }\\n\\n function _implementation() internal view override returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n}\\n\",\"keccak256\":\"0x9e2738f9167ae4a747ac4e8622c443ad735a257630293dee633535dae02863d5\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200285f3803806200285f833981016040819052620000349162000645565b8181815181603282111580156200004b5750818111155b80156200005757508015155b80156200006357508115155b6200006d57600080fd5b60005b845181101562000163576002600086838151811062000093576200009362000821565b602090810291909101810151600160a060020a031682528101919091526040016000205460ff16158015620000f757506000600160a060020a0316858281518110620000e357620000e362000821565b6020026020010151600160a060020a031614155b6200010157600080fd5b6001600260008784815181106200011c576200011c62000821565b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055806200015a81620007de565b91505062000070565b5083516200017990600390602087019062000511565b5050506004555062000194846401000000006200021b810204565b825115620001b857620001b68484640100000000620015686200034a82021704565b505b33620001f27fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a0392909216919091179055506200087f92505050565b6200023481640100000000620015906200038582021704565b620002c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b80620003007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a03928316179055604051908216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200037b838360405180606001604052806027815260200162002838602791396401000000006200038b810204565b9392505050565b90565b3b151590565b6060620003a18464010000000062000385810204565b6200042f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401620002bd565b60008085600160a060020a0316856040516200044c919062000725565b600060405180830381855af49150503d806000811462000489576040519150601f19603f3d011682016040523d82523d6000602084013e6200048e565b606091505b5091509150620004af828286620004b9640100000000026401000000009004565b9695505050505050565b60608315620004ca5750816200037b565b825115620004db5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002bd919062000743565b82805482825590600052602060002090810192821562000569579160200282015b82811115620005695782518254600160a060020a031916600160a060020a0390911617825560209092019160019091019062000532565b50620005779291506200057b565b5090565b5b808211156200057757600081556001016200057c565b8051600160a060020a0381168114620005aa57600080fd5b919050565b600082601f830112620005c157600080fd5b815160206001604060020a03821115620005df57620005df62000850565b808202620005ef82820162000778565b8381528281019086840183880185018910156200060b57600080fd5b600093505b858410156200063957620006248162000592565b83526001939093019291840191840162000610565b50979650505050505050565b600080600080608085870312156200065c57600080fd5b620006678562000592565b935060208501516001604060020a03808211156200068457600080fd5b818701915087601f8301126200069957600080fd5b815181811115620006ae57620006ae62000850565b620006c3601f8201601f191660200162000778565b818152896020838601011115620006d957600080fd5b620006ec826020830160208701620007ab565b6040890151909650925050808211156200070557600080fd5b506200071487828801620005af565b606096909601519497939650505050565b6000825162000739818460208701620007ab565b9190910192915050565b602081526000825180602084015262000764816040850160208701620007ab565b601f01601f19169190910160400192915050565b604051601f8201601f191681016001604060020a0381118282101715620007a357620007a362000850565b604052919050565b60005b83811015620007c8578181015183820152602001620007ae565b83811115620007d8576000848401525b50505050565b60006000198214156200081a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611fa9806200088f6000396000f3fe608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033", @@ -826,15 +856,15 @@ "storageLayout": { "storage": [ { - "astId": 9567, + "astId": 454, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "transactions", "offset": 0, "slot": "0", - "type": "t_mapping(t_uint256,t_struct(Transaction)9593_storage)" + "type": "t_mapping(t_uint256,t_struct(Transaction)480_storage)" }, { - "astId": 9573, + "astId": 460, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "confirmations", "offset": 0, @@ -842,7 +872,7 @@ "type": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" }, { - "astId": 9577, + "astId": 464, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "isOwner", "offset": 0, @@ -850,7 +880,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 9580, + "astId": 467, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "owners", "offset": 0, @@ -858,7 +888,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 9582, + "astId": 469, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "required", "offset": 0, @@ -866,7 +896,7 @@ "type": "t_uint256" }, { - "astId": 9584, + "astId": 471, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "transactionCount", "offset": 0, @@ -910,19 +940,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_bool)" }, - "t_mapping(t_uint256,t_struct(Transaction)9593_storage)": { + "t_mapping(t_uint256,t_struct(Transaction)480_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct MultiSigWallet.Transaction)", "numberOfBytes": "32", - "value": "t_struct(Transaction)9593_storage" + "value": "t_struct(Transaction)480_storage" }, - "t_struct(Transaction)9593_storage": { + "t_struct(Transaction)480_storage": { "encoding": "inplace", "label": "struct MultiSigWallet.Transaction", "members": [ { - "astId": 9586, + "astId": 473, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "destination", "offset": 0, @@ -930,7 +960,7 @@ "type": "t_address" }, { - "astId": 9588, + "astId": 475, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "value", "offset": 0, @@ -938,7 +968,7 @@ "type": "t_uint256" }, { - "astId": 9590, + "astId": 477, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "data", "offset": 0, @@ -946,7 +976,7 @@ "type": "t_bytes_storage" }, { - "astId": 9592, + "astId": 479, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "executed", "offset": 0, diff --git a/contracts/deployments/test/amb/BUSD.json b/contracts/deployments/test/amb/BUSD.json index 8553e9c2..2e30ae29 100644 --- a/contracts/deployments/test/amb/BUSD.json +++ b/contracts/deployments/test/amb/BUSD.json @@ -1,5 +1,5 @@ { - "address": "0x9F9B96F8d33B58c85f0E5bB4BE53164c0Fe77cD9", + "address": "0xfB069aFFe6e75674FaBf67108e9094fb988A31D9", "abi": [ { "inputs": [ @@ -411,22 +411,22 @@ "type": "function" } ], - "transactionHash": "0x91f50c99047bf90cbf7a26d55c955203b065349a5b92e157296fe744a4d547d9", + "transactionHash": "0x1d81abb01c8cf4d49d63c81e6c203b50bc0e6981724d11d0941cf5a206be6e86", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x9F9B96F8d33B58c85f0E5bB4BE53164c0Fe77cD9", + "contractAddress": "0xfB069aFFe6e75674FaBf67108e9094fb988A31D9", "transactionIndex": 0, - "gasUsed": "1709233", - "logsBloom": "0x00000000000000000000002000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000002000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000020000000000000000000000000008000000000000000000000000000000000000000", - "blockHash": "0x3e0c56b9f1383140f5fa8c6d4518f713c311cbd1dbcea14356ee6df1be3db163", - "transactionHash": "0x91f50c99047bf90cbf7a26d55c955203b065349a5b92e157296fe744a4d547d9", + "gasUsed": "1702714", + "logsBloom": "0x00000000000000000000002000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000002000000000000000000000000000000000000040000000000000000000000020000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa4108ac004ce0d28e0fbe72440a163bd6a568f3155e08f1f03254f31a9848980", + "transactionHash": "0x1d81abb01c8cf4d49d63c81e6c203b50bc0e6981724d11d0941cf5a206be6e86", "logs": [ { "transactionIndex": 0, - "blockNumber": 1771062, - "transactionHash": "0x91f50c99047bf90cbf7a26d55c955203b065349a5b92e157296fe744a4d547d9", - "address": "0x9F9B96F8d33B58c85f0E5bB4BE53164c0Fe77cD9", + "blockNumber": 33943, + "transactionHash": "0x1d81abb01c8cf4d49d63c81e6c203b50bc0e6981724d11d0941cf5a206be6e86", + "address": "0xfB069aFFe6e75674FaBf67108e9094fb988A31D9", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -434,11 +434,11 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x3e0c56b9f1383140f5fa8c6d4518f713c311cbd1dbcea14356ee6df1be3db163" + "blockHash": "0xa4108ac004ce0d28e0fbe72440a163bd6a568f3155e08f1f03254f31a9848980" } ], - "blockNumber": 1771062, - "cumulativeGasUsed": "1709233", + "blockNumber": 33943, + "cumulativeGasUsed": "1702714", "status": 1, "byzantium": true }, @@ -446,20 +446,14 @@ "BUSD Token", "BUSD", 18, - [ - "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", - "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0" - ], - [ - 18, - 18 - ] + [], + [] ], "numDeployments": 1, - "solcInputHash": "14835e48c656ebed02c4fc9389a12566", - "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgeBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"name\":\"setSideTokenDecimals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"sideTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20_Amb.sol\":\"BridgeERC20_Amb\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20_Amb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20_Amb is ERC20, Ownable {\\n\\n // decimals of token in side network\\n // example:\\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\\n mapping(address => uint8) public sideTokenDecimals;\\n\\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\\n\\n uint8 _decimals;\\n\\n constructor(\\n string memory name_, string memory symbol_, uint8 decimals_,\\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\\n ) ERC20(name_, symbol_) Ownable() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n }\\n\\n // todo check if we need this func\\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \\\"wrong array lengths\\\");\\n for (uint i = 0; i < bridgeAddresses_.length; i++)\\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n // todo events\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n // user transfer tokens to ambrosus => need to mint it\\n\\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n\\n\\n // bridge mint money to user; same amount locked on side bridge\\n bridgeBalances[sender] += amount_this;\\n\\n _mint(recipient, amount_this);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n // user withdraw tokens from ambrosus => need to burn it\\n\\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n\\n\\n // user burn tokens; side bridge must have enough tokens to send\\n require(bridgeBalances[recipient] >= amount_this, \\\"not enough locked tokens on bridge\\\");\\n bridgeBalances[recipient] -= amount_this;\\n\\n _burn(sender, amount_this);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n\\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\\n if (dTo == dFrom)\\n return amount;\\n if (dTo > dFrom)\\n return amount * (10 ** (dTo - dFrom));\\n else\\n return amount / (10 ** (dFrom - dTo));\\n }\\n\\n}\\n\",\"keccak256\":\"0xd4ef121631f7a651ebe5f73c8565f862fa43cae907804e7876b29e87ce36a1cf\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001bce38038062001bce8339810160408190526200003491620003fc565b8451859085906200004d9060039060208501906200022a565b508051620000639060049060208401906200022a565b5050506200009262000083620000c6640100000000026401000000009004565b640100000000620000ca810204565b620000a782826401000000006200011c810204565b50506008805460ff191660ff92909216919091179055506200068b9050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80518251146200018c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e6774687300000000000000000000000000604482015260640160405180910390fd5b60005b82518110156200022557818181518110620001ae57620001ae6200062d565b602002602001015160066000858481518110620001cf57620001cf6200062d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff16021790555080806200021c90620005ea565b9150506200018f565b505050565b828054620002389062000594565b90600052602060002090601f0160209004810192826200025c5760008555620002a7565b82601f106200027757805160ff1916838001178555620002a7565b82800160010185558215620002a7579182015b82811115620002a75782518255916020019190600101906200028a565b50620002b5929150620002b9565b5090565b5b80821115620002b55760008155600101620002ba565b600082601f830112620002e257600080fd5b81516020620002fb620002f5836200056e565b6200053b565b82815281810190858301838502870184018810156200031957600080fd5b60005b8581101562000343576200033082620003e5565b845292840192908401906001016200031c565b5090979650505050505050565b600082601f8301126200036257600080fd5b81516001604060020a038111156200037e576200037e6200065c565b602062000394601f8301601f191682016200053b565b8281528582848701011115620003a957600080fd5b60005b83811015620003c9578581018301518282018401528201620003ac565b83811115620003db5760008385840101525b5095945050505050565b805160ff81168114620003f757600080fd5b919050565b600080600080600060a086880312156200041557600080fd5b85516001604060020a03808211156200042d57600080fd5b6200043b89838a0162000350565b96506020915081880151818111156200045357600080fd5b620004618a828b0162000350565b9650506200047260408901620003e5565b94506060880151818111156200048757600080fd5b8801601f81018a136200049957600080fd5b8051620004aa620002f5826200056e565b81815284810190838601868402850187018e1015620004c857600080fd5b600094505b8385101562000503578051600160a060020a0381168114620004ee57600080fd5b835260019490940193918601918601620004cd565b5060808c01519097509450505050808211156200051f57600080fd5b506200052e88828901620002d0565b9150509295509295909350565b604051601f8201601f191681016001604060020a03811182821017156200056657620005666200065c565b604052919050565b60006001604060020a038211156200058a576200058a6200065c565b5060209081020190565b600281046001821680620005a957607f821691505b60208210811415620005e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060001982141562000626577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611533806200069b6000396000f3fe608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b60405161014291906111f3565b60405180910390f35b61015e610159366004611105565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461107b565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c33660046110c9565b61038a565b60085460ff166101a3565b61015e6101e1366004611105565b610453565b6101726101f436600461107b565b600160a060020a031660009081526020819052604090205490565b61021761048f565b005b600554604051600160a060020a039091168152602001610142565b6101356104c8565b61015e61024a366004611105565b6104d7565b61015e61025d366004611105565b61058b565b61017261027036600461107b565b60076020526000908152604090205481565b610172610290366004611096565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461107b565b610598565b6102176102dc36600461112f565b610650565b6060600380546102f090611459565b80601f016020809104026020016040519081016040528092919081815260200182805461031c90611459565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461068b565b5060015b92915050565b60006103978484846107e9565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104395760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446853385840361068b565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061048a9086906112d2565b61068b565b600554600160a060020a031633146104bc5760405160e560020a62461bcd02815260040161043090611248565b6104c660006109a6565b565b6060600480546102f090611459565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105745760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610430565b610581338585840361068b565b5060019392505050565b60006103803384846107e9565b600554600160a060020a031633146105c55760405160e560020a62461bcd02815260040161043090611248565b600160a060020a0381166106445760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610430565b61064d816109a6565b50565b600554600160a060020a0316331461067d5760405160e560020a62461bcd02815260040161043090611248565b6106878282610a05565b5050565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561087b57600160a060020a03831660009081526006602052604081205460085461083891849160ff9182169116610ae8565b600160a060020a0385166000908152600760205260408120805492935083929091906108659084906112d2565b9091555061087590508382610b52565b50505050565b600160a060020a03821660009081526006602052604090205460ff161561099657600160a060020a0382166000908152600660205260408120546008546108ca91849160ff9182169116610ae8565b600160a060020a03841660009081526007602052604090205490915081111561095e5760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f67650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152600760205260408120805483929061098690849061141f565b9091555061087590508482610c34565b6109a1838383610dbf565b505050565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610a595760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e67746873000000000000000000000000006044820152606401610430565b60005b82518110156109a157818181518110610a7757610a776114cb565b602002602001015160066000858481518110610a9557610a956114cb565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610ae090611497565b915050610a5c565b60008260ff168260ff161415610aff57508261044c565b8260ff168260ff161115610b3357610b178383611436565b610b2290600a611354565b610b2c9085611400565b905061044c565b610b3d8284611436565b610b4890600a611354565b610b2c90856112ea565b600160a060020a038216610bab5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610430565b8060026000828254610bbd91906112d2565b9091555050600160a060020a03821660009081526020819052604081208054839290610bea9084906112d2565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610cb35760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03821660009081526020819052604090205481811015610d455760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152602081905260408120838303905560028054849290610d7490849061141f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610e3e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a038216610ebd5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03831660009081526020819052604090205481811015610f4f5760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610f869084906112d2565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fd291815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610ff757600080fd5b919050565b600082601f83011261100d57600080fd5b8135602061102261101d836112ae565b61127d565b828152818101908583018385028701840188101561103f57600080fd5b6000805b8681101561106d57823560ff8116811461105b578283fd5b85529385019391850191600101611043565b509198975050505050505050565b60006020828403121561108d57600080fd5b61044c82610fe0565b600080604083850312156110a957600080fd5b6110b283610fe0565b91506110c060208401610fe0565b90509250929050565b6000806000606084860312156110de57600080fd5b6110e784610fe0565b92506110f560208501610fe0565b9150604084013590509250925092565b6000806040838503121561111857600080fd5b61112183610fe0565b946020939093013593505050565b6000806040838503121561114257600080fd5b823567ffffffffffffffff8082111561115a57600080fd5b818501915085601f83011261116e57600080fd5b8135602061117e61101d836112ae565b82815281810190858301838502870184018b101561119b57600080fd5b600096505b848710156111c5576111b181610fe0565b8352600196909601959183019183016111a0565b50965050860135925050808211156111dc57600080fd5b506111e985828601610ffc565b9150509250929050565b600060208083528351808285015260005b8181101561122057858101830151858201604001528201611204565b81811115611232576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156112a6576112a66114e4565b604052919050565b600067ffffffffffffffff8211156112c8576112c86114e4565b5060209081020190565b600082198211156112e5576112e56114b2565b500190565b60008261130a5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b8085111561134c578160001904821115611330576113306114b2565b8085161561133d57918102915b60029094049390800290611314565b509250929050565b600061044c60ff84168360008261136d57506001610384565b8161137a57506000610384565b8160018114611390576002811461139a576113b7565b6001915050610384565b60ff8411156113ab576113ab6114b2565b8360020a915050610384565b5060208310610133831016604e8410600b84101617156113da575081810a610384565b6113e4838361130f565b80600019048211156113f8576113f86114b2565b029392505050565b600081600019048311821515161561141a5761141a6114b2565b500290565b600082821015611431576114316114b2565b500390565b600060ff821660ff841680821015611450576114506114b2565b90039392505050565b60028104600182168061146d57607f821691505b602082108114156114915760e060020a634e487b7102600052602260045260246000fd5b50919050565b60006000198214156114ab576114ab6114b2565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212206b2785398fb5d85e9f4e501b73aeebdf28671c2de2180c0a2e1996c5a262966364736f6c63430008060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b60405161014291906111f3565b60405180910390f35b61015e610159366004611105565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461107b565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c33660046110c9565b61038a565b60085460ff166101a3565b61015e6101e1366004611105565b610453565b6101726101f436600461107b565b600160a060020a031660009081526020819052604090205490565b61021761048f565b005b600554604051600160a060020a039091168152602001610142565b6101356104c8565b61015e61024a366004611105565b6104d7565b61015e61025d366004611105565b61058b565b61017261027036600461107b565b60076020526000908152604090205481565b610172610290366004611096565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461107b565b610598565b6102176102dc36600461112f565b610650565b6060600380546102f090611459565b80601f016020809104026020016040519081016040528092919081815260200182805461031c90611459565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461068b565b5060015b92915050565b60006103978484846107e9565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104395760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446853385840361068b565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061048a9086906112d2565b61068b565b600554600160a060020a031633146104bc5760405160e560020a62461bcd02815260040161043090611248565b6104c660006109a6565b565b6060600480546102f090611459565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105745760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610430565b610581338585840361068b565b5060019392505050565b60006103803384846107e9565b600554600160a060020a031633146105c55760405160e560020a62461bcd02815260040161043090611248565b600160a060020a0381166106445760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610430565b61064d816109a6565b50565b600554600160a060020a0316331461067d5760405160e560020a62461bcd02815260040161043090611248565b6106878282610a05565b5050565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561087b57600160a060020a03831660009081526006602052604081205460085461083891849160ff9182169116610ae8565b600160a060020a0385166000908152600760205260408120805492935083929091906108659084906112d2565b9091555061087590508382610b52565b50505050565b600160a060020a03821660009081526006602052604090205460ff161561099657600160a060020a0382166000908152600660205260408120546008546108ca91849160ff9182169116610ae8565b600160a060020a03841660009081526007602052604090205490915081111561095e5760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f67650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152600760205260408120805483929061098690849061141f565b9091555061087590508482610c34565b6109a1838383610dbf565b505050565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610a595760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e67746873000000000000000000000000006044820152606401610430565b60005b82518110156109a157818181518110610a7757610a776114cb565b602002602001015160066000858481518110610a9557610a956114cb565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610ae090611497565b915050610a5c565b60008260ff168260ff161415610aff57508261044c565b8260ff168260ff161115610b3357610b178383611436565b610b2290600a611354565b610b2c9085611400565b905061044c565b610b3d8284611436565b610b4890600a611354565b610b2c90856112ea565b600160a060020a038216610bab5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610430565b8060026000828254610bbd91906112d2565b9091555050600160a060020a03821660009081526020819052604081208054839290610bea9084906112d2565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610cb35760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03821660009081526020819052604090205481811015610d455760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152602081905260408120838303905560028054849290610d7490849061141f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610e3e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a038216610ebd5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03831660009081526020819052604090205481811015610f4f5760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610f869084906112d2565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fd291815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610ff757600080fd5b919050565b600082601f83011261100d57600080fd5b8135602061102261101d836112ae565b61127d565b828152818101908583018385028701840188101561103f57600080fd5b6000805b8681101561106d57823560ff8116811461105b578283fd5b85529385019391850191600101611043565b509198975050505050505050565b60006020828403121561108d57600080fd5b61044c82610fe0565b600080604083850312156110a957600080fd5b6110b283610fe0565b91506110c060208401610fe0565b90509250929050565b6000806000606084860312156110de57600080fd5b6110e784610fe0565b92506110f560208501610fe0565b9150604084013590509250925092565b6000806040838503121561111857600080fd5b61112183610fe0565b946020939093013593505050565b6000806040838503121561114257600080fd5b823567ffffffffffffffff8082111561115a57600080fd5b818501915085601f83011261116e57600080fd5b8135602061117e61101d836112ae565b82815281810190858301838502870184018b101561119b57600080fd5b600096505b848710156111c5576111b181610fe0565b8352600196909601959183019183016111a0565b50965050860135925050808211156111dc57600080fd5b506111e985828601610ffc565b9150509250929050565b600060208083528351808285015260005b8181101561122057858101830151858201604001528201611204565b81811115611232576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156112a6576112a66114e4565b604052919050565b600067ffffffffffffffff8211156112c8576112c86114e4565b5060209081020190565b600082198211156112e5576112e56114b2565b500190565b60008261130a5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b8085111561134c578160001904821115611330576113306114b2565b8085161561133d57918102915b60029094049390800290611314565b509250929050565b600061044c60ff84168360008261136d57506001610384565b8161137a57506000610384565b8160018114611390576002811461139a576113b7565b6001915050610384565b60ff8411156113ab576113ab6114b2565b8360020a915050610384565b5060208310610133831016604e8410600b84101617156113da575081810a610384565b6113e4838361130f565b80600019048211156113f8576113f86114b2565b029392505050565b600081600019048311821515161561141a5761141a6114b2565b500290565b600082821015611431576114316114b2565b500390565b600060ff821660ff841680821015611450576114506114b2565b90039392505050565b60028104600182168061146d57607f821691505b602082108114156114915760e060020a634e487b7102600052602260045260246000fd5b50919050565b60006000198214156114ab576114ab6114b2565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212206b2785398fb5d85e9f4e501b73aeebdf28671c2de2180c0a2e1996c5a262966364736f6c63430008060033", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", + "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgeBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"name\":\"setSideTokenDecimals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"sideTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20_Amb.sol\":\"BridgeERC20_Amb\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20_Amb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20_Amb is ERC20, Ownable {\\n\\n // decimals of token in side network\\n // example:\\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\\n mapping(address => uint8) public sideTokenDecimals;\\n\\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\\n\\n uint8 _decimals;\\n\\n constructor(\\n string memory name_, string memory symbol_, uint8 decimals_,\\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\\n ) ERC20(name_, symbol_) Ownable() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n }\\n\\n // todo check if we need this func\\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \\\"wrong array lengths\\\");\\n for (uint i = 0; i < bridgeAddresses_.length; i++)\\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\\n }\\n\\n\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n // convert decimals just like in _transfer function\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n amount = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n amount = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n }\\n\\n uint256 currentAllowance = allowance(sender,_msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n // user transfer tokens to ambrosus => need to mint it\\n\\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n\\n\\n // bridge mint money to user; same amount locked on side bridge\\n bridgeBalances[sender] += amount_this;\\n\\n _mint(recipient, amount_this);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n // user withdraw tokens from ambrosus => need to burn it\\n\\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n\\n\\n // user burn tokens; side bridge must have enough tokens to send\\n require(bridgeBalances[recipient] >= amount_this, \\\"not enough locked tokens on bridge\\\");\\n bridgeBalances[recipient] -= amount_this;\\n\\n _burn(sender, amount_this);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n\\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\\n if (dTo == dFrom)\\n return amount;\\n if (dTo > dFrom)\\n return amount * (10 ** (dTo - dFrom));\\n else\\n return amount / (10 ** (dFrom - dTo));\\n }\\n\\n}\\n\",\"keccak256\":\"0xf2f414a753c0e2046491b76a7e7898f5f6820f62f2d6187d3fd061add6a17feb\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162001c6038038062001c608339810160408190526200003491620003fc565b8451859085906200004d9060039060208501906200022a565b508051620000639060049060208401906200022a565b5050506200009262000083620000c6640100000000026401000000009004565b640100000000620000ca810204565b620000a782826401000000006200011c810204565b50506008805460ff191660ff92909216919091179055506200068b9050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80518251146200018c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e6774687300000000000000000000000000604482015260640160405180910390fd5b60005b82518110156200022557818181518110620001ae57620001ae6200062d565b602002602001015160066000858481518110620001cf57620001cf6200062d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff16021790555080806200021c90620005ea565b9150506200018f565b505050565b828054620002389062000594565b90600052602060002090601f0160209004810192826200025c5760008555620002a7565b82601f106200027757805160ff1916838001178555620002a7565b82800160010185558215620002a7579182015b82811115620002a75782518255916020019190600101906200028a565b50620002b5929150620002b9565b5090565b5b80821115620002b55760008155600101620002ba565b600082601f830112620002e257600080fd5b81516020620002fb620002f5836200056e565b6200053b565b82815281810190858301838502870184018810156200031957600080fd5b60005b8581101562000343576200033082620003e5565b845292840192908401906001016200031c565b5090979650505050505050565b600082601f8301126200036257600080fd5b81516001604060020a038111156200037e576200037e6200065c565b602062000394601f8301601f191682016200053b565b8281528582848701011115620003a957600080fd5b60005b83811015620003c9578581018301518282018401528201620003ac565b83811115620003db5760008385840101525b5095945050505050565b805160ff81168114620003f757600080fd5b919050565b600080600080600060a086880312156200041557600080fd5b85516001604060020a03808211156200042d57600080fd5b6200043b89838a0162000350565b96506020915081880151818111156200045357600080fd5b620004618a828b0162000350565b9650506200047260408901620003e5565b94506060880151818111156200048757600080fd5b8801601f81018a136200049957600080fd5b8051620004aa620002f5826200056e565b81815284810190838601868402850187018e1015620004c857600080fd5b600094505b8385101562000503578051600160a060020a0381168114620004ee57600080fd5b835260019490940193918601918601620004cd565b5060808c01519097509450505050808211156200051f57600080fd5b506200052e88828901620002d0565b9150509295509295909350565b604051601f8201601f191681016001604060020a03811182821017156200056657620005666200065c565b604052919050565b60006001604060020a038211156200058a576200058a6200065c565b5060209081020190565b600281046001821680620005a957607f821691505b60208210811415620005e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060001982141562000626577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6115c5806200069b6000396000f3fe608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b6040516101429190611285565b60405180910390f35b61015e610159366004611197565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461110d565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c336600461115b565b61038a565b60085460ff166101a3565b61015e6101e1366004611197565b6104e5565b6101726101f436600461110d565b600160a060020a031660009081526020819052604090205490565b610217610521565b005b600554604051600160a060020a039091168152602001610142565b61013561055a565b61015e61024a366004611197565b610569565b61015e61025d366004611197565b61061d565b61017261027036600461110d565b60076020526000908152604090205481565b610172610290366004611128565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461110d565b61062a565b6102176102dc3660046111c1565b6106e2565b6060600380546102f0906114eb565b80601f016020809104026020016040519081016040528092919081815260200182805461031c906114eb565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461071d565b5060015b92915050565b600061039784848461087b565b600160a060020a03841660009081526006602052604090205460ff16156103ed57600160a060020a0384166000908152600660205260409020546008546103e691849160ff9182169116610a38565b915061043f565b600160a060020a03831660009081526006602052604090205460ff161561043f57600160a060020a03831660009081526006602052604090205460085461043c91849160ff9182169116610a38565b91505b600061044b8533610290565b9050828110156104cb5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104d8853385840361071d565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061051c908690611364565b61071d565b600554600160a060020a0316331461054e5760405160e560020a62461bcd0281526004016104c2906112da565b6105586000610aa2565b565b6060600480546102f0906114eb565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156106065760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016104c2565b610613338585840361071d565b5060019392505050565b600061038033848461087b565b600554600160a060020a031633146106575760405160e560020a62461bcd0281526004016104c2906112da565b600160a060020a0381166106d65760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104c2565b6106df81610aa2565b50565b600554600160a060020a0316331461070f5760405160e560020a62461bcd0281526004016104c2906112da565b6107198282610b01565b5050565b600160a060020a03831661079b5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821661081a5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561090d57600160a060020a0383166000908152600660205260408120546008546108ca91849160ff9182169116610a38565b600160a060020a0385166000908152600760205260408120805492935083929091906108f7908490611364565b9091555061090790508382610be4565b50505050565b600160a060020a03821660009081526006602052604090205460ff1615610a2857600160a060020a03821660009081526006602052604081205460085461095c91849160ff9182169116610a38565b600160a060020a0384166000908152600760205260409020549091508111156109f05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f676500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526007602052604081208054839290610a189084906114b1565b9091555061090790508482610cc6565b610a33838383610e51565b505050565b60008260ff168260ff161415610a4f5750826104de565b8260ff168260ff161115610a8357610a6783836114c8565b610a7290600a6113e6565b610a7c9085611492565b90506104de565b610a8d82846114c8565b610a9890600a6113e6565b610a7c908561137c565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610b555760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064016104c2565b60005b8251811015610a3357818181518110610b7357610b7361155d565b602002602001015160066000858481518110610b9157610b9161155d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610bdc90611529565b915050610b58565b600160a060020a038216610c3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104c2565b8060026000828254610c4f9190611364565b9091555050600160a060020a03821660009081526020819052604081208054839290610c7c908490611364565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610d455760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821660009081526020819052604090205481811015610dd75760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383166000908152602081905260408120838303905560028054849290610e069084906114b1565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610ed05760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a038216610f4f5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526020819052604090205481811015610fe15760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290611018908490611364565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161106491815260200190565b60405180910390a350505050565b8035600160a060020a038116811461108957600080fd5b919050565b600082601f83011261109f57600080fd5b813560206110b46110af83611340565b61130f565b82815281810190858301838502870184018810156110d157600080fd5b6000805b868110156110ff57823560ff811681146110ed578283fd5b855293850193918501916001016110d5565b509198975050505050505050565b60006020828403121561111f57600080fd5b6104de82611072565b6000806040838503121561113b57600080fd5b61114483611072565b915061115260208401611072565b90509250929050565b60008060006060848603121561117057600080fd5b61117984611072565b925061118760208501611072565b9150604084013590509250925092565b600080604083850312156111aa57600080fd5b6111b383611072565b946020939093013593505050565b600080604083850312156111d457600080fd5b823567ffffffffffffffff808211156111ec57600080fd5b818501915085601f83011261120057600080fd5b813560206112106110af83611340565b82815281810190858301838502870184018b101561122d57600080fd5b600096505b848710156112575761124381611072565b835260019690960195918301918301611232565b509650508601359250508082111561126e57600080fd5b5061127b8582860161108e565b9150509250929050565b600060208083528351808285015260005b818110156112b257858101830151858201604001528201611296565b818111156112c4576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561133857611338611576565b604052919050565b600067ffffffffffffffff82111561135a5761135a611576565b5060209081020190565b6000821982111561137757611377611544565b500190565b60008261139c5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b808511156113de5781600019048211156113c2576113c2611544565b808516156113cf57918102915b600290940493908002906113a6565b509250929050565b60006104de60ff8416836000826113ff57506001610384565b8161140c57506000610384565b8160018114611422576002811461142c57611449565b6001915050610384565b60ff84111561143d5761143d611544565b8360020a915050610384565b5060208310610133831016604e8410600b841016171561146c575081810a610384565b61147683836113a1565b806000190482111561148a5761148a611544565b029392505050565b60008160001904831182151516156114ac576114ac611544565b500290565b6000828210156114c3576114c3611544565b500390565b600060ff821660ff8416808210156114e2576114e2611544565b90039392505050565b6002810460018216806114ff57607f821691505b602082108114156115235760e060020a634e487b7102600052602260045260246000fd5b50919050565b600060001982141561153d5761153d611544565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212208c84ff84563dca0a3e128ed404345f130db0415ba23e7368c16a212b29455baf64736f6c63430008060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b6040516101429190611285565b60405180910390f35b61015e610159366004611197565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461110d565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c336600461115b565b61038a565b60085460ff166101a3565b61015e6101e1366004611197565b6104e5565b6101726101f436600461110d565b600160a060020a031660009081526020819052604090205490565b610217610521565b005b600554604051600160a060020a039091168152602001610142565b61013561055a565b61015e61024a366004611197565b610569565b61015e61025d366004611197565b61061d565b61017261027036600461110d565b60076020526000908152604090205481565b610172610290366004611128565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461110d565b61062a565b6102176102dc3660046111c1565b6106e2565b6060600380546102f0906114eb565b80601f016020809104026020016040519081016040528092919081815260200182805461031c906114eb565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461071d565b5060015b92915050565b600061039784848461087b565b600160a060020a03841660009081526006602052604090205460ff16156103ed57600160a060020a0384166000908152600660205260409020546008546103e691849160ff9182169116610a38565b915061043f565b600160a060020a03831660009081526006602052604090205460ff161561043f57600160a060020a03831660009081526006602052604090205460085461043c91849160ff9182169116610a38565b91505b600061044b8533610290565b9050828110156104cb5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104d8853385840361071d565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061051c908690611364565b61071d565b600554600160a060020a0316331461054e5760405160e560020a62461bcd0281526004016104c2906112da565b6105586000610aa2565b565b6060600480546102f0906114eb565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156106065760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016104c2565b610613338585840361071d565b5060019392505050565b600061038033848461087b565b600554600160a060020a031633146106575760405160e560020a62461bcd0281526004016104c2906112da565b600160a060020a0381166106d65760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104c2565b6106df81610aa2565b50565b600554600160a060020a0316331461070f5760405160e560020a62461bcd0281526004016104c2906112da565b6107198282610b01565b5050565b600160a060020a03831661079b5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821661081a5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561090d57600160a060020a0383166000908152600660205260408120546008546108ca91849160ff9182169116610a38565b600160a060020a0385166000908152600760205260408120805492935083929091906108f7908490611364565b9091555061090790508382610be4565b50505050565b600160a060020a03821660009081526006602052604090205460ff1615610a2857600160a060020a03821660009081526006602052604081205460085461095c91849160ff9182169116610a38565b600160a060020a0384166000908152600760205260409020549091508111156109f05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f676500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526007602052604081208054839290610a189084906114b1565b9091555061090790508482610cc6565b610a33838383610e51565b505050565b60008260ff168260ff161415610a4f5750826104de565b8260ff168260ff161115610a8357610a6783836114c8565b610a7290600a6113e6565b610a7c9085611492565b90506104de565b610a8d82846114c8565b610a9890600a6113e6565b610a7c908561137c565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610b555760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064016104c2565b60005b8251811015610a3357818181518110610b7357610b7361155d565b602002602001015160066000858481518110610b9157610b9161155d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610bdc90611529565b915050610b58565b600160a060020a038216610c3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104c2565b8060026000828254610c4f9190611364565b9091555050600160a060020a03821660009081526020819052604081208054839290610c7c908490611364565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610d455760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821660009081526020819052604090205481811015610dd75760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383166000908152602081905260408120838303905560028054849290610e069084906114b1565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610ed05760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a038216610f4f5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526020819052604090205481811015610fe15760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290611018908490611364565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161106491815260200190565b60405180910390a350505050565b8035600160a060020a038116811461108957600080fd5b919050565b600082601f83011261109f57600080fd5b813560206110b46110af83611340565b61130f565b82815281810190858301838502870184018810156110d157600080fd5b6000805b868110156110ff57823560ff811681146110ed578283fd5b855293850193918501916001016110d5565b509198975050505050505050565b60006020828403121561111f57600080fd5b6104de82611072565b6000806040838503121561113b57600080fd5b61114483611072565b915061115260208401611072565b90509250929050565b60008060006060848603121561117057600080fd5b61117984611072565b925061118760208501611072565b9150604084013590509250925092565b600080604083850312156111aa57600080fd5b6111b383611072565b946020939093013593505050565b600080604083850312156111d457600080fd5b823567ffffffffffffffff808211156111ec57600080fd5b818501915085601f83011261120057600080fd5b813560206112106110af83611340565b82815281810190858301838502870184018b101561122d57600080fd5b600096505b848710156112575761124381611072565b835260019690960195918301918301611232565b509650508601359250508082111561126e57600080fd5b5061127b8582860161108e565b9150509250929050565b600060208083528351808285015260005b818110156112b257858101830151858201604001528201611296565b818111156112c4576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561133857611338611576565b604052919050565b600067ffffffffffffffff82111561135a5761135a611576565b5060209081020190565b6000821982111561137757611377611544565b500190565b60008261139c5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b808511156113de5781600019048211156113c2576113c2611544565b808516156113cf57918102915b600290940493908002906113a6565b509250929050565b60006104de60ff8416836000826113ff57506001610384565b8161140c57506000610384565b8160018114611422576002811461142c57611449565b6001915050610384565b60ff84111561143d5761143d611544565b8360020a915050610384565b5060208310610133831016604e8410600b841016171561146c575081810a610384565b61147683836113a1565b806000190482111561148a5761148a611544565b029392505050565b60008160001904831182151516156114ac576114ac611544565b500290565b6000828210156114c3576114c3611544565b500390565b600060ff821660ff8416808210156114e2576114e2611544565b90039392505050565b6002810460018216806114ff57607f821691505b602082108114156115235760e060020a634e487b7102600052602260045260246000fd5b50919050565b600060001982141561153d5761153d611544565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212208c84ff84563dca0a3e128ed404345f130db0415ba23e7368c16a212b29455baf64736f6c63430008060033", "devdoc": { "kind": "dev", "methods": { @@ -516,7 +510,7 @@ "storageLayout": { "storage": [ { - "astId": 991, + "astId": 1371, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_balances", "offset": 0, @@ -524,7 +518,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 997, + "astId": 1377, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_allowances", "offset": 0, @@ -532,7 +526,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 999, + "astId": 1379, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_totalSupply", "offset": 0, @@ -540,7 +534,7 @@ "type": "t_uint256" }, { - "astId": 1001, + "astId": 1381, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_name", "offset": 0, @@ -548,7 +542,7 @@ "type": "t_string_storage" }, { - "astId": 1003, + "astId": 1383, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_symbol", "offset": 0, @@ -556,7 +550,7 @@ "type": "t_string_storage" }, { - "astId": 879, + "astId": 1259, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_owner", "offset": 0, @@ -564,7 +558,7 @@ "type": "t_address" }, { - "astId": 9229, + "astId": 4869, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "sideTokenDecimals", "offset": 0, @@ -572,7 +566,7 @@ "type": "t_mapping(t_address,t_uint8)" }, { - "astId": 9233, + "astId": 4873, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "bridgeBalances", "offset": 0, @@ -580,7 +574,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 9235, + "astId": 4875, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_decimals", "offset": 0, diff --git a/contracts/deployments/test/amb/ETH_AmbBridge.json b/contracts/deployments/test/amb/ETH_AmbBridge.json index c068283f..9fde3db8 100644 --- a/contracts/deployments/test/amb/ETH_AmbBridge.json +++ b/contracts/deployments/test/amb/ETH_AmbBridge.json @@ -1,5 +1,5 @@ { - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "abi": [ { "anonymous": false, @@ -1601,10 +1601,20 @@ "name": "_fee_provider", "type": "address" }, + { + "internalType": "address", + "name": "mpcRelay", + "type": "address" + }, { "internalType": "address", "name": "oldDefaultAdmin", "type": "address" + }, + { + "internalType": "address", + "name": "oldRelay", + "type": "address" } ], "name": "upgrade", @@ -1723,135 +1733,154 @@ "type": "constructor" } ], - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "contractAddress": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "transactionIndex": 0, - "gasUsed": "2937560", - "logsBloom": "0x00000004000000000000002000000000400000000000000000000000000000000000000000000000800000000000000000000000000800000000000000000000000000000000000000000002000002000000000160000000000000000000000000000040020000000000000000000800000000000000000800000000000000000000002000000000000000000000004000000000000000020000000000000000000620000000000000040000000000000000000000000000001000000000000000000020400000000400000000000000000000000000000300000000000020000000000000000000000000000000004000000000000000004000000000000000", - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de", - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", + "gasUsed": "2897200", + "logsBloom": "0x00000004000000040000002000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000200000000000002000000100020000000000000001000000000000004020000400000000000000800000000000000000800001000000000000000002000000000000000000000004000000000000000020000000800000000000120000000000000041000000000000000000000000000001000000000000000000020400000000200000000000000000000000000000100000000000020000000000000000000000000000000000000000080800000000000000020000000", + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837", + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", "logs": [ { "transactionIndex": 0, - "blockNumber": 1406757, - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "blockNumber": 34019, + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000002de5fc9ff4ad9ccf10fab6ddcb9672c1f87210fb" + "0x000000000000000000000000689020fd1aa4e064bdf9c6d1d19f0cf378b19753" ], "data": "0x", "logIndex": 0, - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de" + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837" }, { "transactionIndex": 0, - "blockNumber": 1406757, - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "blockNumber": 34019, + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000b08cfc95eea0f1d9bb79002d23fa204b8836a536", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 1, - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de" + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837" }, { "transactionIndex": 0, - "blockNumber": 1406757, - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "blockNumber": 34019, + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 2, - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de" + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837" }, { "transactionIndex": 0, - "blockNumber": 1406757, - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "blockNumber": 34019, + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 3, - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de" + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837" }, { "transactionIndex": 0, - "blockNumber": 1406757, - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "blockNumber": 34019, + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "topics": [ - "0x7b73cb1bdb35a4aa024a40092050eb3e988b8591cc448e46634cf380f8f1255d", + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 4, - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de" + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837" }, { "transactionIndex": 0, - "blockNumber": 1406757, - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "blockNumber": 34019, + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "topics": [ - "0x6d209fce46041fa384c715150b59ebd0bf9e74509fc58c21b73b490f4ff2bbec" + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "data": "0x", "logIndex": 5, - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de" + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837" } ], - "blockNumber": 1406757, - "cumulativeGasUsed": "2937560", + "blockNumber": 34019, + "cumulativeGasUsed": "2897200", "status": 1, "byzantium": true }, "args": [ - "0x2de5fC9fF4AD9ccf10fAb6dDCb9672c1F87210Fb", - "0xf3ee20800000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000da9bb33f9e3334781f3e4fce310288d7db3ed29a00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000da9bb33f9e3334781f3e4fce310288d7db3ed29a000000000000000000000000075de66d19ca867387c75c880cffddba9a3e9763000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056a79d39fc414ff11ebb30d6a5367ea5da8c6fe90000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fc277855999cf6452f9027bbdc1b56264a736e3a000000000000000000000000d67a7ce611c1b33a549712c0fcbfe8436a917b71000000000000000000000000075de66d19ca867387c75c880cffddba9a3e97630000000000000000000000001d335e8b7787fb6c51f98713df5bcb56884fd0230000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x689020fd1aa4e064bdf9c6D1d19F0Cf378b19753", + "0x5a5f55bf00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000000000000000000000000000000000000000000180000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000007cee2ae3042d2c646aa24facfa92dfee589046f000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000240000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e00000000000000000000000000000000000000000000000000000000000000030000000000000000000000007cee2ae3042d2c646aa24facfa92dfee589046f0000000000000000000000000952b98dbda3319bf0e339cc9cc574ff768f80f3c0000000000000000000000001bb13b68dba3571415b4092802777b5ca15de89700000000000000000000000000000000000000000000000000000000000000030000000000000000000000009ba7ef7e1c6c5ef4fe7e2a32d4527497d6b12ff2000000000000000000000000b841c5707da4b43ed915b707158010bd2faf3b4600000000000000000000000005875578a63c7e26245c7cba3cf460ff6a613c6b", [ "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" ], 1 ], - "numDeployments": 9, - "solcInputHash": "63b1c355e88e8fd19ebe2cd692a8475b", + "numDeployments": 1, + "solcInputHash": "54d2ddebdc6c37a1b4fd5c90d287707b", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Confirmation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Execution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"ExecutionFailure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerAddition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerRemoval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"required\",\"type\":\"uint256\"}],\"name\":\"RequirementChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Revocation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Submission\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"MAX_OWNER_COUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"_upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"name\":\"changeRequirement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"confirmTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"confirmations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmationCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmations\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"_confirmations\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"to\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_transactionIds\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"isConfirmed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"owners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"replaceOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"required\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"revokeConfirmation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"submitTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addOwner(address)\":{\"details\":\"Allows to add a new owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of new owner.\"}},\"changeRequirement(uint256)\":{\"details\":\"Allows to change the number of required confirmations. Transaction has to be sent by wallet.\",\"params\":{\"_required\":\"Number of required confirmations.\"}},\"confirmTransaction(uint256)\":{\"details\":\"Allows an owner to confirm a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"executeTransaction(uint256)\":{\"details\":\"Allows anyone to execute a confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"getConfirmationCount(uint256)\":{\"details\":\"Returns number of confirmations of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"count\":\"Number of confirmations.\"}},\"getConfirmations(uint256)\":{\"details\":\"Returns array with owner addresses, which confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_confirmations\":\"Returns array of owner addresses.\"}},\"getOwners()\":{\"details\":\"Returns list of owners.\",\"returns\":{\"_0\":\"List of owner addresses.\"}},\"getTransactionCount(bool,bool)\":{\"details\":\"Returns total number of transactions after filers are applied.\",\"params\":{\"executed\":\"Include executed transactions.\",\"pending\":\"Include pending transactions.\"},\"returns\":{\"count\":\"Total number of transactions after filters are applied.\"}},\"getTransactionIds(uint256,uint256,bool,bool)\":{\"details\":\"Returns list of transaction IDs in defined range.\",\"params\":{\"executed\":\"Include executed transactions.\",\"from\":\"Index start position of transaction array.\",\"pending\":\"Include pending transactions.\",\"to\":\"Index end position of transaction array.\"},\"returns\":{\"_transactionIds\":\"Returns array of transaction IDs.\"}},\"isConfirmed(uint256)\":{\"details\":\"Returns the confirmation status of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_0\":\"Confirmation status.\"}},\"removeOwner(address)\":{\"details\":\"Allows to remove an owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of owner.\"}},\"replaceOwner(address,address)\":{\"details\":\"Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\",\"params\":{\"newOwner\":\"Address of new owner.\",\"owner\":\"Address of owner to be replaced.\"}},\"revokeConfirmation(uint256)\":{\"details\":\"Allows an owner to revoke a confirmation for a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"submitTransaction(address,uint256,bytes)\":{\"details\":\"Allows an owner to submit and confirm a transaction.\",\"params\":{\"data\":\"Transaction data payload.\",\"destination\":\"Transaction target address.\",\"value\":\"Transaction ether value.\"},\"returns\":{\"transactionId\":\"Returns transaction ID.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/utils/Proxy.sol\":\"ProxyMultiSig\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \\\"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(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) 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 require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/utils/MultiSigWallet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\n\\ncontract MultiSigWallet {\\n\\n /*\\n * Events\\n */\\n event Confirmation(address indexed sender, uint indexed transactionId);\\n event Revocation(address indexed sender, uint indexed transactionId);\\n event Submission(uint indexed transactionId);\\n event Execution(uint indexed transactionId);\\n event ExecutionFailure(uint indexed transactionId);\\n event OwnerAddition(address indexed owner);\\n event OwnerRemoval(address indexed owner);\\n event RequirementChange(uint required);\\n\\n /*\\n * Constants\\n */\\n uint constant public MAX_OWNER_COUNT = 50;\\n\\n /*\\n * Storage\\n */\\n mapping(uint => Transaction) public transactions;\\n mapping(uint => mapping(address => bool)) public confirmations;\\n mapping(address => bool) public isOwner;\\n address[] public owners;\\n uint public required;\\n uint public transactionCount;\\n\\n struct Transaction {\\n address destination;\\n uint value;\\n bytes data;\\n bool executed;\\n }\\n\\n /*\\n * Modifiers\\n */\\n modifier onlyWallet() {\\n require(msg.sender == address(this));\\n _;\\n }\\n\\n modifier ownerDoesNotExist(address owner) {\\n require(!isOwner[owner]);\\n _;\\n }\\n\\n modifier ownerExists(address owner) {\\n require(isOwner[owner]);\\n _;\\n }\\n\\n modifier transactionExists(uint transactionId) {\\n require(transactions[transactionId].destination != address(0));\\n _;\\n }\\n\\n modifier confirmed(uint transactionId, address owner) {\\n require(confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notConfirmed(uint transactionId, address owner) {\\n require(!confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notExecuted(uint transactionId) {\\n require(!transactions[transactionId].executed);\\n _;\\n }\\n\\n modifier notNull(address _address) {\\n require(_address != address(0));\\n _;\\n }\\n\\n modifier validRequirement(uint ownerCount, uint _required) {\\n require(ownerCount <= MAX_OWNER_COUNT\\n && _required <= ownerCount\\n && _required != 0\\n && ownerCount != 0);\\n _;\\n }\\n\\n /*\\n * Public functions\\n */\\n /// @dev Contract constructor sets initial owners and required number of confirmations.\\n /// @param _owners List of initial owners.\\n /// @param _required Number of required confirmations.\\n constructor(address[] memory _owners, uint _required)\\n validRequirement(_owners.length, _required)\\n {\\n for (uint i = 0; i < _owners.length; i++) {\\n require(!isOwner[_owners[i]] && _owners[i] != address(0));\\n isOwner[_owners[i]] = true;\\n }\\n owners = _owners;\\n required = _required;\\n }\\n\\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of new owner.\\n function addOwner(address owner)\\n public\\n onlyWallet\\n ownerDoesNotExist(owner)\\n notNull(owner)\\n validRequirement(owners.length + 1, required)\\n {\\n isOwner[owner] = true;\\n owners.push(owner);\\n emit OwnerAddition(owner);\\n }\\n\\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner.\\n function removeOwner(address owner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n {\\n isOwner[owner] = false;\\n for (uint i = 0; i < owners.length - 1; i++)\\n if (owners[i] == owner) {\\n owners[i] = owners[owners.length - 1];\\n break;\\n }\\n owners.pop();\\n if (required > owners.length)\\n changeRequirement(owners.length);\\n emit OwnerRemoval(owner);\\n }\\n\\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner to be replaced.\\n /// @param newOwner Address of new owner.\\n function replaceOwner(address owner, address newOwner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n ownerDoesNotExist(newOwner)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (owners[i] == owner) {\\n owners[i] = newOwner;\\n break;\\n }\\n isOwner[owner] = false;\\n isOwner[newOwner] = true;\\n emit OwnerRemoval(owner);\\n emit OwnerAddition(newOwner);\\n }\\n\\n /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\\n /// @param _required Number of required confirmations.\\n function changeRequirement(uint _required)\\n public\\n onlyWallet\\n validRequirement(owners.length, _required)\\n {\\n required = _required;\\n emit RequirementChange(_required);\\n }\\n\\n /// @dev Allows an owner to submit and confirm a transaction.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function submitTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) public returns (uint transactionId)\\n {\\n transactionId = addTransaction(destination, value, data);\\n confirmTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to confirm a transaction.\\n /// @param transactionId Transaction ID.\\n function confirmTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n transactionExists(transactionId)\\n notConfirmed(transactionId, msg.sender)\\n {\\n confirmations[transactionId][msg.sender] = true;\\n emit Confirmation(msg.sender, transactionId);\\n executeTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to revoke a confirmation for a transaction.\\n /// @param transactionId Transaction ID.\\n function revokeConfirmation(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n confirmations[transactionId][msg.sender] = false;\\n emit Revocation(msg.sender, transactionId);\\n }\\n\\n /// @dev Allows anyone to execute a confirmed transaction.\\n /// @param transactionId Transaction ID.\\n function executeTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n if (isConfirmed(transactionId)) {\\n Transaction storage txn = transactions[transactionId];\\n txn.executed = true;\\n if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\\n emit Execution(transactionId);\\n else {\\n emit ExecutionFailure(transactionId);\\n txn.executed = false;\\n }\\n }\\n }\\n\\n // call has been separated into its own function in order to take advantage\\n // of the Solidity's code generator to produce a loop that copies tx.data into memory.\\n function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) {\\n bool result;\\n assembly {\\n let x := mload(0x40) // \\\"Allocate\\\" memory for output (0x40 is where \\\"free memory\\\" pointer is stored by convention)\\n let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\\n result := call(\\n sub(gas(), 36810), // 34710 is the value that solidity is currently emitting // todo\\n // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\\n // callNewAccountGas (25000, in case the destination address does not exist and needs creating) +\\n // gasSLoadEIP2929 (2100)\\n\\n destination,\\n value,\\n d,\\n dataLength, // Size of the input (in bytes) - this is what fixes the padding problem\\n x,\\n 0 // Output is ignored, therefore the output size is zero\\n )\\n }\\n return result;\\n }\\n\\n /// @dev Returns the confirmation status of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return Confirmation status.\\n function isConfirmed(uint transactionId) public view returns (bool)\\n {\\n uint count = 0;\\n for (uint i = 0; i < owners.length; i++) {\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n if (count == required)\\n return true;\\n }\\n return false;\\n }\\n\\n /*\\n * Internal functions\\n */\\n /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function addTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) internal\\n notNull(destination) returns (uint transactionId)\\n {\\n transactionId = transactionCount;\\n transactions[transactionId] = Transaction({\\n destination : destination,\\n value : value,\\n data : data,\\n executed : false\\n });\\n transactionCount += 1;\\n emit Submission(transactionId);\\n }\\n\\n /*\\n * Web3 call functions\\n */\\n /// @dev Returns number of confirmations of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return count Number of confirmations.\\n function getConfirmationCount(uint transactionId)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n }\\n\\n /// @dev Returns total number of transactions after filers are applied.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return count Total number of transactions after filters are applied.\\n function getTransactionCount(bool pending, bool executed)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n count += 1;\\n }\\n\\n /// @dev Returns list of owners.\\n /// @return List of owner addresses.\\n function getOwners() public view returns (address[] memory)\\n {\\n return owners;\\n }\\n\\n /// @dev Returns array with owner addresses, which confirmed transaction.\\n /// @param transactionId Transaction ID.\\n /// @return _confirmations Returns array of owner addresses.\\n function getConfirmations(uint transactionId) public view\\n returns (address[] memory _confirmations)\\n {\\n address[] memory confirmationsTemp = new address[](owners.length);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]]) {\\n confirmationsTemp[count] = owners[i];\\n count += 1;\\n }\\n _confirmations = new address[](count);\\n for (i = 0; i < count; i++)\\n _confirmations[i] = confirmationsTemp[i];\\n }\\n\\n /// @dev Returns list of transaction IDs in defined range.\\n /// @param from Index start position of transaction array.\\n /// @param to Index end position of transaction array.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return _transactionIds Returns array of transaction IDs.\\n function getTransactionIds(uint from, uint to, bool pending, bool executed)\\n public\\n view\\n returns (uint[] memory _transactionIds)\\n {\\n uint[] memory transactionIdsTemp = new uint[](transactionCount);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n {\\n transactionIdsTemp[count] = i;\\n count += 1;\\n }\\n _transactionIds = new uint[](to - from);\\n for (i = from; i < to; i++)\\n _transactionIds[i - from] = transactionIdsTemp[i];\\n }\\n}\\n\",\"keccak256\":\"0x1630487b4e9acd29e4c4ea04eff94b838660e39d009c0668c5213c209fb2f883\",\"license\":\"MIT\"},\"contracts/utils/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/proxy/Proxy.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport \\\"./MultiSigWallet.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\n\\ncontract ProxyMultiSig is Proxy, MultiSigWallet {\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n bytes32 private constant ADMIN_STORAGE_LOCATION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n bytes4 private constant _UPGRADE_TO_AND_CALL_SIGNATURE = bytes4(keccak256(\\\"_upgradeToAndCall(address,bytes)\\\"));\\n\\n event Upgraded(address indexed implementation);\\n\\n\\n constructor(\\n address _logic,\\n bytes memory _data,\\n address[] memory owners,\\n uint _required\\n\\n ) MultiSigWallet(owners, _required) {\\n // Cannot use _upgradeToAndCall because of onlyWallet modifier\\n _upgradeTo(_logic);\\n if (_data.length > 0) {\\n Address.functionDelegateCall(_logic, _data);\\n }\\n\\n StorageSlot.getAddressSlot(ADMIN_STORAGE_LOCATION).value = msg.sender; // trick the hardhat-deploy\\n }\\n\\n\\n function implementation() external view returns (address) {\\n return _implementation();\\n }\\n\\n function upgradeTo(address newImplementation) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, bytes(\\\"\\\"))\\n );\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, data)\\n );\\n }\\n\\n function _upgradeToAndCall(address newImplementation, bytes memory data) external onlyWallet payable {\\n _upgradeTo(newImplementation);\\n if (data.length > 0) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n function _upgradeTo(address newImplementation) internal {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n emit Upgraded(newImplementation);\\n }\\n\\n function _implementation() internal view override returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n}\\n\",\"keccak256\":\"0x9e2738f9167ae4a747ac4e8622c443ad735a257630293dee633535dae02863d5\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200285f3803806200285f833981016040819052620000349162000645565b8181815181603282111580156200004b5750818111155b80156200005757508015155b80156200006357508115155b6200006d57600080fd5b60005b845181101562000163576002600086838151811062000093576200009362000821565b602090810291909101810151600160a060020a031682528101919091526040016000205460ff16158015620000f757506000600160a060020a0316858281518110620000e357620000e362000821565b6020026020010151600160a060020a031614155b6200010157600080fd5b6001600260008784815181106200011c576200011c62000821565b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055806200015a81620007de565b91505062000070565b5083516200017990600390602087019062000511565b5050506004555062000194846401000000006200021b810204565b825115620001b857620001b68484640100000000620015686200034a82021704565b505b33620001f27fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a0392909216919091179055506200087f92505050565b6200023481640100000000620015906200038582021704565b620002c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b80620003007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a03928316179055604051908216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200037b838360405180606001604052806027815260200162002838602791396401000000006200038b810204565b9392505050565b90565b3b151590565b6060620003a18464010000000062000385810204565b6200042f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401620002bd565b60008085600160a060020a0316856040516200044c919062000725565b600060405180830381855af49150503d806000811462000489576040519150601f19603f3d011682016040523d82523d6000602084013e6200048e565b606091505b5091509150620004af828286620004b9640100000000026401000000009004565b9695505050505050565b60608315620004ca5750816200037b565b825115620004db5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002bd919062000743565b82805482825590600052602060002090810192821562000569579160200282015b82811115620005695782518254600160a060020a031916600160a060020a0390911617825560209092019160019091019062000532565b50620005779291506200057b565b5090565b5b808211156200057757600081556001016200057c565b8051600160a060020a0381168114620005aa57600080fd5b919050565b600082601f830112620005c157600080fd5b815160206001604060020a03821115620005df57620005df62000850565b808202620005ef82820162000778565b8381528281019086840183880185018910156200060b57600080fd5b600093505b858410156200063957620006248162000592565b83526001939093019291840191840162000610565b50979650505050505050565b600080600080608085870312156200065c57600080fd5b620006678562000592565b935060208501516001604060020a03808211156200068457600080fd5b818701915087601f8301126200069957600080fd5b815181811115620006ae57620006ae62000850565b620006c3601f8201601f191660200162000778565b818152896020838601011115620006d957600080fd5b620006ec826020830160208701620007ab565b6040890151909650925050808211156200070557600080fd5b506200071487828801620005af565b606096909601519497939650505050565b6000825162000739818460208701620007ab565b9190910192915050565b602081526000825180602084015262000764816040850160208701620007ab565b601f01601f19169190910160400192915050565b604051601f8201601f191681016001604060020a0381118282101715620007a357620007a362000850565b604052919050565b60005b83811015620007c8578181015183820152602001620007ae565b83811115620007d8576000848401525b50505050565b60006000198214156200081a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611fa9806200088f6000396000f3fe608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033", "execute": { - "methodName": "upgrade", + "methodName": "initialize", "args": [ - [ - "0x260cfE305cA40CaE1a32Ba7611137eF4d7146233", - "0xEB1c6a8a84063B1cef8B9a23AB87Bf926035A21a", - "0x40B7d71E70fA6311cB0b300c1Ba6926A2A9000b8", - "0xb017DcCC473499C83f1b553bE564f3CeAf002254", - "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" - ], - "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" + { + "relayAddress": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "feeProviderAddress": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "watchdogsAddresses": [ + "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" + ], + "transferFeeRecipient": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "bridgeFeeRecipient": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "tokenThisAddresses": [ + "0x7cee2ae3042D2C646Aa24FACfA92dfeE589046f0", + "0x952b98DBDa3319BF0e339cC9CC574fF768F80f3c", + "0x1bB13b68DbA3571415B4092802777B5cA15de897" + ], + "tokenSideAddresses": [ + "0x9Ba7ef7E1C6C5EF4fe7e2A32d4527497D6B12Ff2", + "0xB841C5707DA4B43eD915B707158010bd2FaF3B46", + "0x05875578a63C7E26245c7CBa3cF460fF6a613c6B" + ], + "sideBridgeAddress": "0x0000000000000000000000000000000000000000", + "wrappingTokenAddress": "0x7cee2ae3042D2C646Aa24FACfA92dfeE589046f0", + "timeframeSeconds": 60, + "lockTime": 60, + "minSafetyBlocks": 10 + } ] }, - "implementation": "0x203683EC0094b90df39422716F15AAb6B112b292", + "implementation": "0x689020fd1aa4e064bdf9c6D1d19F0Cf378b19753", "devdoc": { "kind": "dev", "methods": { @@ -1975,15 +2004,15 @@ "storageLayout": { "storage": [ { - "astId": 9567, + "astId": 454, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "transactions", "offset": 0, "slot": "0", - "type": "t_mapping(t_uint256,t_struct(Transaction)9593_storage)" + "type": "t_mapping(t_uint256,t_struct(Transaction)480_storage)" }, { - "astId": 9573, + "astId": 460, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "confirmations", "offset": 0, @@ -1991,7 +2020,7 @@ "type": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" }, { - "astId": 9577, + "astId": 464, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "isOwner", "offset": 0, @@ -1999,7 +2028,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 9580, + "astId": 467, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "owners", "offset": 0, @@ -2007,7 +2036,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 9582, + "astId": 469, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "required", "offset": 0, @@ -2015,7 +2044,7 @@ "type": "t_uint256" }, { - "astId": 9584, + "astId": 471, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "transactionCount", "offset": 0, @@ -2059,19 +2088,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_bool)" }, - "t_mapping(t_uint256,t_struct(Transaction)9593_storage)": { + "t_mapping(t_uint256,t_struct(Transaction)480_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct MultiSigWallet.Transaction)", "numberOfBytes": "32", - "value": "t_struct(Transaction)9593_storage" + "value": "t_struct(Transaction)480_storage" }, - "t_struct(Transaction)9593_storage": { + "t_struct(Transaction)480_storage": { "encoding": "inplace", "label": "struct MultiSigWallet.Transaction", "members": [ { - "astId": 9586, + "astId": 473, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "destination", "offset": 0, @@ -2079,7 +2108,7 @@ "type": "t_address" }, { - "astId": 9588, + "astId": 475, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "value", "offset": 0, @@ -2087,7 +2116,7 @@ "type": "t_uint256" }, { - "astId": 9590, + "astId": 477, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "data", "offset": 0, @@ -2095,7 +2124,7 @@ "type": "t_bytes_storage" }, { - "astId": 9592, + "astId": 479, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "executed", "offset": 0, diff --git a/contracts/deployments/test/amb/ETH_AmbBridge_Implementation.json b/contracts/deployments/test/amb/ETH_AmbBridge_Implementation.json index 2ca3abdc..2478a915 100644 --- a/contracts/deployments/test/amb/ETH_AmbBridge_Implementation.json +++ b/contracts/deployments/test/amb/ETH_AmbBridge_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x203683EC0094b90df39422716F15AAb6B112b292", + "address": "0x689020fd1aa4e064bdf9c6D1d19F0Cf378b19753", "abi": [ { "anonymous": false, @@ -1014,10 +1014,20 @@ "name": "_fee_provider", "type": "address" }, + { + "internalType": "address", + "name": "mpcRelay", + "type": "address" + }, { "internalType": "address", "name": "oldDefaultAdmin", "type": "address" + }, + { + "internalType": "address", + "name": "oldRelay", + "type": "address" } ], "name": "upgrade", @@ -1114,28 +1124,28 @@ "type": "receive" } ], - "transactionHash": "0x500fd41461a3ef4d66189b9dca7932fa962f654109b48ccffcd5613e59d47a94", + "transactionHash": "0xa9bc7218d3cb5bc1afb9b1c2a9eae26ac89f8c632ebd582a962cf7a348d301ae", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x203683EC0094b90df39422716F15AAb6B112b292", + "contractAddress": "0x689020fd1aa4e064bdf9c6D1d19F0Cf378b19753", "transactionIndex": 0, - "gasUsed": "3768021", + "gasUsed": "3784932", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x30e708d5fff4578a71df6ec36392085a65fbd2babd1a6eb1c7d46d5aff9d1112", - "transactionHash": "0x500fd41461a3ef4d66189b9dca7932fa962f654109b48ccffcd5613e59d47a94", + "blockHash": "0x8ad154570d54161d3850bdd889508b02000012b7ebefcaaa8ea073e8602188a6", + "transactionHash": "0xa9bc7218d3cb5bc1afb9b1c2a9eae26ac89f8c632ebd582a962cf7a348d301ae", "logs": [], - "blockNumber": 2049193, - "cumulativeGasUsed": "3768021", + "blockNumber": 34018, + "cumulativeGasUsed": "3784932", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 9, - "solcInputHash": "3d9e02ffdf8a213afd0c4d189b503155", - "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"queue\",\"type\":\"tuple[]\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"TransferFinish\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"TransferSubmit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenFrom\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenTo\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"transferFeeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bridgeFeeAmount\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FEE_PROVIDER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RELAY_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WATCHDOG_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeFeeRecipient\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"feeRecipient_\",\"type\":\"address\"}],\"name\":\"changeBridgeFeeRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lockTime_\",\"type\":\"uint256\"}],\"name\":\"changeLockTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minSafetyBlocks_\",\"type\":\"uint256\"}],\"name\":\"changeMinSafetyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"signatureFeeCheckNumber_\",\"type\":\"uint256\"}],\"name\":\"changeSignatureFeeCheckNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timeframeSeconds_\",\"type\":\"uint256\"}],\"name\":\"changeTimeframeSeconds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"feeRecipient_\",\"type\":\"address\"}],\"name\":\"changeTransferFeeRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"getLockedTransfers\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"transfers\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"endTimestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.LockedTransfers\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"grantRoles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sideBridgeAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"watchdogsAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"feeProviderAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"wrappingTokenAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokenSideAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address payable\",\"name\":\"transferFeeRecipient\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"bridgeFeeRecipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timeframeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minSafetyBlocks\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.ConstructorArgs\",\"name\":\"args\",\"type\":\"tuple\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inputEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isQueueEmpty\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastTimeframe\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lockTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lockedTransfers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"endTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minSafetyBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldestLockedEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"outputEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"removeLockedTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"revokeRoles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sideBridgeAddress\",\"type\":\"address\"}],\"name\":\"setSideBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sideBridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"skipTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"transfers\",\"type\":\"tuple[]\"}],\"name\":\"submitTransferUntrustless\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeframeSeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenSideAddress\",\"type\":\"address\"}],\"name\":\"tokensAdd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokenSideAddresses\",\"type\":\"address[]\"}],\"name\":\"tokensAddBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"}],\"name\":\"tokensRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"}],\"name\":\"tokensRemoveBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transferFeeRecipient\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"unlockTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unlockTransfersBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_watchdogs\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"_fee_provider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oldDefaultAdmin\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"unwrapSide\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"feeSignature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"transferFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bridgeFee\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"feeSignature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"transferFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bridgeFee\",\"type\":\"uint256\"}],\"name\":\"wrapWithdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrapperAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"withdraw(address,address,uint256,bool,bytes,uint256,uint256)\":{\"params\":{\"bridgeFee\":\"Amount (in native coins), payed as bridge earnings\",\"feeSignature\":\"Signature signed by relay that confirms that the fee values are valid\",\"transferFee\":\"Amount (in native coins), payed to compensate gas fees in side network\"}},\"wrapWithdraw(address,bytes,uint256,uint256)\":{\"params\":{\"bridgeFee\":\"Amount (in native coins), payed as bridge earnings\",\"feeSignature\":\"Signature signed by relay that confirms that the fee values are valid\",\"toAddress\":\"Address in side network that will receive the tokens\",\"transferFee\":\"Amount (in native coins), payed to compensate gas fees in side network\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/networks/ETH_AmbBridge.sol\":\"ETH_AmbBridge\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 * ```\\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 * ```\\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.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\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, _msgSender());\\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(IAccessControlUpgradeable).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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\\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 function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\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 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 require(!paused(), \\\"Pausable: paused\\\");\\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 require(paused(), \\\"Pausable: not paused\\\");\\n _;\\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 uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x742c0fbab73bf595ca40025f6e81cb48dbd5e133950717f7befd062a925c0148\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 IERC165Upgradeable {\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"contracts/checks/CheckUntrustless2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"../common/CommonStructs.sol\\\";\\n\\n\\ncontract CheckUntrustless2 {\\n // this contract do nothing, but i think it's required to inheritance from it\\n // todo check this\\n uint256[15] private ___gap;\\n}\\n\",\"keccak256\":\"0xff7351b4e6b3628cd20511c65aa12dfb19b76472ee18ee06397879c1000d562d\",\"license\":\"MIT\"},\"contracts/checks/SignatureCheck.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n assembly {\\n r := mload(add(signature, 32))\\n s := mload(add(signature, 64))\\n v := byte(0, mload(add(signature, 96)))\\n if lt(v, 27) {v := add(v, 27)}\\n }\\n return ecrecover(messageHash, v, r, s);\\n}\\n\",\"keccak256\":\"0x16e553d27ac4c9c49f8487c5df1fd51b3afbffa9557be22ca031f05d82739ba7\",\"license\":\"MIT\"},\"contracts/common/CommonBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./CommonStructs.sol\\\";\\nimport \\\"../tokens/IWrapper.sol\\\";\\nimport \\\"../checks/SignatureCheck.sol\\\";\\n\\n\\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\\n // DEFAULT_ADMIN_ROLE can grants and revokes all roles below; Set to multisig (proxy contract address)\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\\n bytes32 public constant RELAY_ROLE = keccak256(\\\"RELAY_ROLE\\\"); // can submit transfers\\n bytes32 public constant WATCHDOG_ROLE = keccak256(\\\"WATCHDOG_ROLE\\\"); // can pause contract\\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\\\"FEE_PROVIDER_ROLE\\\"); // fee signatures must be signed by this role\\n\\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\\n uint internal signatureFeeCheckNumber;\\n\\n\\n // queue of Transfers to be pushed in another network\\n CommonStructs.Transfer[] queue;\\n\\n // locked transfers from another network\\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\\n // head index of lockedTransfers 'queue' mapping\\n uint public oldestLockedEventId;\\n\\n\\n // this network to side network token addresses mapping\\n mapping(address => address) public tokenAddresses;\\n // token that implement `IWrapper` interface and used to wrap native coin\\n address public wrapperAddress;\\n\\n // addresses that will receive fees\\n address payable public transferFeeRecipient;\\n address payable public bridgeFeeRecipient;\\n\\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\\n\\n uint public inputEventId; // last processed event from side network\\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\\n\\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\\n\\n\\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\\n uint transferFeeAmount, uint bridgeFeeAmount);\\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\\n event TransferSubmit(uint indexed eventId);\\n event TransferFinish(uint indexed eventId);\\n\\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, address(this));\\n _setupRole(ADMIN_ROLE, msg.sender);\\n _setupRole(RELAY_ROLE, args.relayAddress);\\n _setupRoles(WATCHDOG_ROLE, args.watchdogsAddresses);\\n _setupRole(FEE_PROVIDER_ROLE, args.feeProviderAddress);\\n\\n // initialise tokenAddresses with start values\\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\\n wrapperAddress = args.wrappingTokenAddress;\\n\\n sideBridgeAddress = args.sideBridgeAddress;\\n transferFeeRecipient = args.transferFeeRecipient;\\n bridgeFeeRecipient = args.bridgeFeeRecipient;\\n minSafetyBlocks = args.minSafetyBlocks;\\n timeframeSeconds = args.timeframeSeconds;\\n lockTime = args.lockTime;\\n\\n // 1, coz eventId 0 considered already processed\\n oldestLockedEventId = 1;\\n outputEventId = 1;\\n\\n signatureFeeCheckNumber = 3;\\n\\n lastTimeframe = block.timestamp / timeframeSeconds;\\n }\\n\\n\\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\\n\\n /// @param toAddress Address in side network that will receive the tokens\\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\\n function wrapWithdraw(address toAddress,\\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\\n ) public payable {\\n address tokenSideAddress = tokenAddresses[wrapperAddress];\\n require(tokenSideAddress != address(0), \\\"Unknown token address\\\");\\n\\n require(msg.value > transferFee + bridgeFee, \\\"Sent value <= fee\\\");\\n\\n uint amount = msg.value - transferFee - bridgeFee;\\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\\n transferFeeRecipient.transfer(transferFee);\\n bridgeFeeRecipient.transfer(bridgeFee);\\n\\n IWrapper(wrapperAddress).deposit{value : amount}();\\n\\n //\\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\\n\\n withdrawFinish();\\n }\\n\\n // `withdraw` function used for sending tokens from this network to side network;\\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\\n /// @param toAddress Address in side network that will receive the tokens\\n /// @param amount Amount of tokens to be sent\\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\\n */\\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\\n function withdraw(\\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\\n ) payable public {\\n address tokenSideAddress;\\n if (unwrapSide) {\\n require(tokenAddresses[address(0)] == tokenThisAddress, \\\"Token not point to native token\\\");\\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\\n } else {\\n tokenSideAddress = tokenAddresses[tokenThisAddress];\\n require(tokenSideAddress != address(0), \\\"Unknown token address\\\");\\n }\\n\\n require(msg.value == transferFee + bridgeFee, \\\"Sent value != fee\\\");\\n\\n require(amount > 0, \\\"Cannot withdraw 0\\\");\\n\\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\\n transferFeeRecipient.transfer(transferFee);\\n bridgeFeeRecipient.transfer(bridgeFee);\\n\\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \\\"Fail transfer coins\\\");\\n\\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\\n\\n withdrawFinish();\\n }\\n\\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\\n function triggerTransfers() public {\\n require(queue.length != 0, \\\"Queue is empty\\\");\\n\\n emit Transfer(outputEventId++, queue);\\n delete queue;\\n }\\n\\n\\n // after `lockTime` period, transfers can be unlocked\\n function unlockTransfers(uint eventId) public whenNotPaused {\\n require(eventId == oldestLockedEventId, \\\"can unlock only oldest event\\\");\\n\\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\\n require(transfersLocked.endTimestamp > 0, \\\"no locked transfers with this id\\\");\\n require(transfersLocked.endTimestamp < block.timestamp, \\\"lockTime has not yet passed\\\");\\n\\n proceedTransfers(transfersLocked.transfers);\\n\\n delete lockedTransfers[eventId];\\n emit TransferFinish(eventId);\\n\\n oldestLockedEventId = eventId + 1;\\n }\\n\\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\\n function unlockTransfersBatch() public whenNotPaused {\\n uint eventId = oldestLockedEventId;\\n for (;; eventId++) {\\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\\n\\n proceedTransfers(transfersLocked.transfers);\\n\\n delete lockedTransfers[eventId];\\n emit TransferFinish(eventId);\\n }\\n oldestLockedEventId = eventId;\\n }\\n\\n // delete transfers with passed eventId **and all after it**\\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\\n require(eventId >= oldestLockedEventId, \\\"eventId must be >= oldestLockedEventId\\\"); // can't undo unlocked :(\\n require(eventId <= inputEventId, \\\"eventId must be <= inputEventId\\\");\\n\\n // now waiting for submitting a new transfer with `eventId` id\\n inputEventId = eventId - 1;\\n\\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\\n delete lockedTransfers[eventId];\\n\\n }\\n\\n // pretend like bridge already receive and process all transfers up to `eventId` id\\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\\n require(eventId >= oldestLockedEventId, \\\"eventId must be >= oldestLockedEventId\\\"); // can't undo unlocked :(\\n\\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\\n }\\n\\n\\n // views\\n\\n // returns locked transfers from another network\\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\\n return lockedTransfers[eventId];\\n }\\n\\n\\n function isQueueEmpty() public view returns (bool) {\\n return queue.length == 0;\\n }\\n\\n\\n // admin setters\\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\\n minSafetyBlocks = minSafetyBlocks_;\\n }\\n\\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\\n transferFeeRecipient = feeRecipient_;\\n }\\n\\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\\n bridgeFeeRecipient = feeRecipient_;\\n }\\n\\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\\n timeframeSeconds = timeframeSeconds_;\\n }\\n\\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\\n lockTime = lockTime_;\\n }\\n\\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\\n }\\n\\n // token addressed mapping\\n\\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\\n }\\n\\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\\n delete tokenAddresses[tokenThisAddress];\\n }\\n\\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\\n }\\n\\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\\n require(tokenThisAddresses.length == tokenSideAddresses.length, \\\"sizes of tokenThisAddresses and tokenSideAddresses must be same\\\");\\n uint arrayLength = tokenThisAddresses.length;\\n for (uint i = 0; i < arrayLength; i++)\\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\\n }\\n\\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\\n uint arrayLength = tokenThisAddresses.length;\\n for (uint i = 0; i < arrayLength; i++)\\n delete tokenAddresses[tokenThisAddresses[i]];\\n }\\n\\n // pause\\n\\n function pause() public onlyRole(WATCHDOG_ROLE) {\\n _pause();\\n }\\n\\n function unpause() public onlyRole(ADMIN_ROLE) {\\n _unpause();\\n }\\n\\n // roles\\n\\n function grantRoles(bytes32 role, address[] calldata accounts) public onlyRole(getRoleAdmin(role)) {\\n // check permission to grant role via onlyRole(getRoleAdmin(role))\\n _setupRoles(role, accounts);\\n }\\n function revokeRoles(bytes32 role, address[] calldata accounts) public {\\n // revokeRole will check for permissions\\n for (uint i = 0; i < accounts.length; i++)\\n revokeRole(role, accounts[i]);\\n }\\n function _setupRoles(bytes32 role, address[] calldata accounts) internal {\\n // no permissions check at all\\n for (uint i = 0; i < accounts.length; i++)\\n _setupRole(role, accounts[i]);\\n }\\n\\n // internal\\n\\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\\n for (uint i = 0; i < events.length; i++)\\n lockedTransfers[eventId].transfers.push(events[i]);\\n }\\n\\n\\n // sends money according to the information in the Transfer structure\\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\\n for (uint i = 0; i < transfers.length; i++) {\\n\\n if (transfers[i].tokenAddress == address(0)) {// native token\\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\\n } else {// ERC20 token\\n require(\\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\\n \\\"Fail transfer coins\\\");\\n }\\n\\n }\\n }\\n\\n // used by `withdraw` and `wrapWithdraw` functions;\\n // emit `Transfer` event with current queue if timeframe was changed;\\n function withdrawFinish() internal {\\n uint nowTimeframe = block.timestamp / timeframeSeconds;\\n if (nowTimeframe != lastTimeframe) {\\n emit Transfer(outputEventId++, queue);\\n delete queue;\\n\\n lastTimeframe = nowTimeframe;\\n }\\n }\\n\\n // encode message with received values and current timestamp;\\n // check that signature is same message signed by address with RELAY_ROLE;\\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\\n bytes32 messageHash;\\n address signer;\\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\\n\\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\\n messageHash = keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\\n ));\\n\\n signer = ecdsaRecover(messageHash, signature);\\n if (hasRole(FEE_PROVIDER_ROLE, signer))\\n return;\\n timestampEpoch--;\\n }\\n revert(\\\"Signature check failed\\\");\\n }\\n\\n function checkEventId(uint eventId) internal {\\n require(eventId == ++inputEventId, \\\"EventId out of order\\\");\\n }\\n\\n receive() external payable {} // need to receive native token from wrapper contract\\n\\n uint256[15] private __gap;\\n}\\n\",\"keccak256\":\"0x74846658822e44c4fc71b2764a31d90bad77af3b492a2a4a5a512f7a41d9b489\",\"license\":\"MIT\"},\"contracts/common/CommonStructs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.6;\\n\\nlibrary CommonStructs {\\n struct Transfer {\\n address tokenAddress;\\n address toAddress;\\n uint amount;\\n }\\n\\n struct TransferProof {\\n bytes[] receiptProof;\\n uint eventId;\\n Transfer[] transfers;\\n }\\n\\n struct LockedTransfers {\\n Transfer[] transfers;\\n uint endTimestamp;\\n }\\n\\n struct ConstructorArgs {\\n address sideBridgeAddress; address relayAddress;\\n address[] watchdogsAddresses; address feeProviderAddress;\\n address wrappingTokenAddress;\\n address[] tokenThisAddresses; address[] tokenSideAddresses;\\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\\n }\\n}\\n\",\"keccak256\":\"0x0294bbc461102c4f4108d6f0163ce8158d5af7c5a6ff29971f01afdec7b38cf3\",\"license\":\"MIT\"},\"contracts/networks/ETH_AmbBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"../common/CommonBridge.sol\\\";\\nimport \\\"../checks/CheckUntrustless2.sol\\\";\\n\\n\\ncontract ETH_AmbBridge is CommonBridge, CheckUntrustless2 {\\n\\n function initialize(\\n CommonStructs.ConstructorArgs calldata args\\n ) public initializer {\\n __CommonBridge_init(args);\\n }\\n\\n function upgrade(\\n address[] calldata _watchdogs,\\n address _fee_provider,\\n address oldDefaultAdmin\\n ) public {\\n require(msg.sender == address(this), \\\"This method require multisig\\\");\\n\\n // new roles for untrustless mpc\\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\\n\\n // add DEFAULT_ADMIN_ROLE to multisig\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n // revoke DEFAULT_ADMIN_ROLE from deployer\\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\\n }\\n\\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\\n checkEventId(eventId);\\n emit TransferSubmit(eventId);\\n lockTransfers(transfers, eventId);\\n }\\n\\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\\n require(sideBridgeAddress == address(0), \\\"sideBridgeAddress already set\\\");\\n sideBridgeAddress = _sideBridgeAddress;\\n }\\n\\n}\\n\",\"keccak256\":\"0x8659f8e792e10e69c980d40bb6702442ffe0180712d47efd446d704d44d46e3c\",\"license\":\"MIT\"},\"contracts/tokens/IWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\ninterface IWrapper {\\n event Deposit(address indexed dst, uint amount);\\n event Withdrawal(address indexed src, uint amount);\\n\\n function deposit() external payable;\\n\\n function withdraw(uint amount) external;\\n}\\n\",\"keccak256\":\"0xbe5bc17241b9a14b78e18e4562e2a4c02e2b941fae0f1a896bbd795e49af136e\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506136d2806100206000396000f3fe6080604052600436106103075760003560e060020a90048063853890ae11610194578063ba8bbbe0116100e0578063e31be08711610099578063f700558711610073578063f700558714610911578063f862b7eb14610931578063f8b7443314610951578063fd5d2ef31461096457600080fd5b8063e31be087146108a4578063ec9d4d3c146108d1578063f33fe10f146108f157600080fd5b8063ba8bbbe0146107f6578063baeebe751461080c578063cf3317d314610822578063d3b89f4914610842578063d547741f14610864578063deb9a3a21461088457600080fd5b8063924cf6e01161014d578063a217fddf11610127578063a217fddf14610769578063a9b1cf0b1461077e578063b6d3385e146107a0578063b87330e9146107d657600080fd5b8063924cf6e01461071d57806396cf52271461073357806399b5bb641461075357600080fd5b8063853890ae1461067f57806386d7679e1461069f5780638ac1f86f146106b55780638e5df9c7146106ca57806391c5bc0a146106ea57806391d14854146106fd57600080fd5b8063390d5388116102535780635249a7051161020c578063746b5c42116101e6578063746b5c421461061357806375b238fc146106285780637df8b8021461064a5780638456cb591461066a57600080fd5b80635249a705146105bb5780635a5f55bf146105db5780635c975abb146105fb57600080fd5b8063390d5388146104f65780633928b296146105165780633f4ba83a1461053657806342180fb81461054b5780634a1856de1461056b5780635119b0ef1461059b57600080fd5b8063248a9ca3116102c05780632f2ff15d1161029a5780632f2ff15d1461045e578063304561bb1461047e578063331a891a146104b657806336568abe146104d657600080fd5b8063248a9ca314610402578063297c2677146104325780632bbba8471461044857600080fd5b806301ffc9a714610313578063044218231461034857806309fce3561461038a5780630d668087146103ac578063196f0f62146103c257806321d3d536146103e257600080fd5b3661030e57005b600080fd5b34801561031f57600080fd5b5061033361032e366004613091565b610984565b60405190151581526020015b60405180910390f35b34801561035457600080fd5b5061037c7f077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d781565b60405190815260200161033f565b34801561039657600080fd5b506103aa6103a5366004612f7e565b610a17565b005b3480156103b857600080fd5b5061037c60d45481565b3480156103ce57600080fd5b506103aa6103dd366004613045565b610a43565b3480156103ee57600080fd5b506103aa6103fd366004612d83565b610a91565b34801561040e57600080fd5b5061037c61041d366004613007565b60009081526065602052604090206001015490565b34801561043e57600080fd5b5061037c60d65481565b34801561045457600080fd5b5060ca5415610333565b34801561046a57600080fd5b506103aa610479366004613020565b610b2e565b34801561048a57600080fd5b5060cf5461049e90600160a060020a031681565b604051600160a060020a03909116815260200161033f565b3480156104c257600080fd5b506103aa6104d1366004613007565b610b59565b3480156104e257600080fd5b506103aa6104f1366004613020565b610c70565b34801561050257600080fd5b5060d05461049e90600160a060020a031681565b34801561052257600080fd5b506103aa610531366004612d83565b610cfb565b34801561054257600080fd5b506103aa610d37565b34801561055757600080fd5b506103aa610566366004613007565b610d5b565b34801561057757600080fd5b5061037c610586366004613007565b60cb6020526000908152604090206001015481565b3480156105a757600080fd5b506103aa6105b636600461310c565b610d98565b3480156105c757600080fd5b506103aa6105d6366004612ed4565b610e28565b3480156105e757600080fd5b506103aa6105f63660046130d0565b610eb1565b34801561060757600080fd5b5060975460ff16610333565b34801561061f57600080fd5b506103aa610f29565b34801561063457600080fd5b5061037c60008051602061367d83398151915281565b34801561065657600080fd5b5060ce5461049e90600160a060020a031681565b34801561067657600080fd5b506103aa610fd5565b34801561068b57600080fd5b506103aa61069a366004612da0565b610ff6565b3480156106ab57600080fd5b5061037c60d75481565b3480156106c157600080fd5b506103aa61103e565b3480156106d657600080fd5b506103aa6106e5366004612d83565b611196565b6103aa6106f8366004612e6d565b6111d7565b34801561070957600080fd5b50610333610718366004613020565b611507565b34801561072957600080fd5b5061037c60d25481565b34801561073f57600080fd5b506103aa61074e366004613007565b611532565b34801561075f57600080fd5b5061037c60d55481565b34801561077557600080fd5b5061037c600081565b34801561078a57600080fd5b5061037c60008051602061363d83398151915281565b3480156107ac57600080fd5b5061049e6107bb366004612d83565b60cd60205260009081526040902054600160a060020a031681565b3480156107e257600080fd5b506103aa6107f1366004612d83565b611551565b34801561080257600080fd5b5061037c60cc5481565b34801561081857600080fd5b5061037c60d35481565b34801561082e57600080fd5b506103aa61083d366004613007565b61158d565b34801561084e57600080fd5b5061037c60008051602061365d83398151915281565b34801561087057600080fd5b506103aa61087f366004613020565b611604565b34801561089057600080fd5b506103aa61089f366004613045565b61162a565b3480156108b057600080fd5b506108c46108bf366004613007565b611651565b60405161033f91906133d7565b3480156108dd57600080fd5b506103aa6108ec366004612f16565b61170d565b3480156108fd57600080fd5b5060d15461049e90600160a060020a031681565b34801561091d57600080fd5b506103aa61092c366004613007565b6117a6565b34801561093d57600080fd5b506103aa61094c366004613007565b6117c5565b6103aa61095f366004612dd9565b6119f8565b34801561097057600080fd5b506103aa61097f366004613007565b611e58565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b000000000000000000000000000000000000000000000000000000001480610a1157507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b60008051602061367d833981519152610a308133611e77565b610a3c85858585611ede565b5050505050565b60005b81811015610a8b57610a7984848484818110610a6457610a64613588565b905060200201602081019061087f9190612d83565b80610a8381613554565b915050610a46565b50505050565b60008051602061367d833981519152610aaa8133611e77565b60d154600160a060020a031615610b0b5760405160e560020a62461bcd02815260206004820152601d60248201527f736964654272696467654164647265737320616c72656164792073657400000060448201526064015b60405180910390fd5b5060d18054600160a060020a031916600160a060020a0392909216919091179055565b600082815260656020526040902060010154610b4a8133611e77565b610b548383611fff565b505050565b60008051602061367d833981519152610b728133611e77565b60975460ff16610b975760405160e560020a62461bcd028152600401610b02906132af565b60cc54821015610bbc5760405160e560020a62461bcd028152600401610b029061337a565b60d554821115610c115760405160e560020a62461bcd02815260206004820152601f60248201527f6576656e744964206d757374206265203c3d20696e7075744576656e744964006044820152606401610b02565b610c1c6001836134fa565b60d5555b600082815260cb602052604090206001015415610c6c57600082815260cb6020526040812090610c508282612ca3565b5060006001919091015581610c6481613554565b925050610c20565b5050565b600160a060020a0381163314610cf15760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610b02565b610c6c8282612085565b60008051602061367d833981519152610d148133611e77565b5060d08054600160a060020a031916600160a060020a0392909216919091179055565b60008051602061367d833981519152610d508133611e77565b610d586120ec565b50565b60008051602061367d833981519152610d748133611e77565b8160d35460d754610d8591906134db565b610d8f91906134b6565b60d7555060d355565b7f077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7610dc38133611e77565b60975460ff1615610de95760405160e560020a62461bcd028152600401610b02906132e6565b610df28461215b565b60405184907f196c47048e38df7a4fe6e581c8f4f2e2ba67ac0dd45b90da756e97bd61d9dd3b90600090a2610a8b8383866121c0565b60008051602061367d833981519152610e418133611e77565b8160005b81811015610a3c5760cd6000868684818110610e6357610e63613588565b9050602002016020810190610e789190612d83565b600160a060020a0316815260208101919091526040016000208054600160a060020a031916905580610ea981613554565b915050610e45565b600054610100900460ff1680610eca575060005460ff16155b610ee95760405160e560020a62461bcd028152600401610b029061331d565b600054610100900460ff16158015610f0b576000805461ffff19166101011790555b610f148261224e565b8015610c6c576000805461ff00191690555050565b60ca54610f7b5760405160e560020a62461bcd02815260206004820152600e60248201527f517565756520697320656d7074790000000000000000000000000000000000006044820152606401610b02565b60d68054906000610f8b83613554565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca604051610fbf919061320c565b60405180910390a2610fd360ca6000612ca3565b565b60008051602061363d833981519152610fee8133611e77565b610d5861247a565b60008051602061367d83398151915261100f8133611e77565b50600160a060020a03918216600090815260cd602052604090208054600160a060020a03191691909216179055565b60975460ff16156110645760405160e560020a62461bcd028152600401610b02906132e6565b60cc545b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156110f657600084815260209081902060408051606081018252600386029092018054600160a060020a0390811684526001808301549091168486015260029091015491830191909152908352909201910161109c565b50505050815260200160018201548152505090508060200151600014806111205750428160200151115b1561112b575060cc55565b8051611136906124d5565b600082815260cb602052604081209061114f8282612ca3565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a2508061118e81613554565b915050611068565b60008051602061367d8339815191526111af8133611e77565b50600160a060020a0316600090815260cd602052604090208054600160a060020a0319169055565b60ce54600160a060020a03908116600090815260cd602052604090205416806112455760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610b02565b61124f828461349e565b34116112a05760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c7565203c3d206665650000000000000000000000000000006044820152606401610b02565b6000826112ad85346134fa565b6112b791906134fa565b60ce549091506112d490600160a060020a03168787878786612769565b60cf54604051600160a060020a039091169085156108fc029086906000818181858888f1935050505015801561130e573d6000803e3d6000fd5b5060d054604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611349573d6000803e3d6000fd5b5060ce60009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0826040518263ffffffff1660e060020a0281526004016000604051808303818588803b15801561139d57600080fd5b505af11580156113b1573d6000803e3d6000fd5b505060408051606081018252600160a060020a0380881682528c81166020830190815282840188815260ca80546001810182556000918252945160039095027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054968616600160a060020a031997881617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee2840180549190951695169490941790925590517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d65491513395507f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f44494506114ee9350879087908b908b90958652600160a060020a0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b60405180910390a26114fe6128fd565b50505050505050565b6000918252606560209081526040808420600160a060020a0393909316845291905290205460ff1690565b60008051602061367d83398151915261154b8133611e77565b5060d455565b60008051602061367d83398151915261156a8133611e77565b5060cf8054600160a060020a031916600160a060020a0392909216919091179055565b60008051602061367d8339815191526115a68133611e77565b60975460ff166115cb5760405160e560020a62461bcd028152600401610b02906132af565b60cc548210156115f05760405160e560020a62461bcd028152600401610b029061337a565b6115fb6001836134fa565b60d5555060cc55565b6000828152606560205260409020600101546116208133611e77565b610b548383612085565b6000838152606560205260409020600101546116468133611e77565b610a8b848484612975565b604080518082019091526060815260006020820152600082815260cb60209081526040808320815181546060948102820185018452928101838152909491938593919285929185015b828210156116f457600084815260209081902060408051606081018252600386029092018054600160a060020a0390811684526001808301549091168486015260029091015491830191909152908352909201910161169a565b5050505081526020016001820154815250509050919050565b33301461175f5760405160e560020a62461bcd02815260206004820152601c60248201527f54686973206d6574686f642072657175697265206d756c7469736967000000006044820152606401610b02565b61177860008051602061363d8339815191528585612975565b61179060008051602061365d833981519152836129bd565b61179b6000336129bd565b610a8b600082611604565b60008051602061367d8339815191526117bf8133611e77565b5060c955565b60975460ff16156117eb5760405160e560020a62461bcd028152600401610b02906132e6565b60cc54811461183f5760405160e560020a62461bcd02815260206004820152601c60248201527f63616e20756e6c6f636b206f6e6c79206f6c64657374206576656e74000000006044820152606401610b02565b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156118cd57600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611873565b505050508152602001600182015481525050905060008160200151116119385760405160e560020a62461bcd02815260206004820181905260248201527f6e6f206c6f636b6564207472616e7366657273207769746820746869732069646044820152606401610b02565b4281602001511061198e5760405160e560020a62461bcd02815260206004820152601b60248201527f6c6f636b54696d6520686173206e6f74207965742070617373656400000000006044820152606401610b02565b8051611999906124d5565b600082815260cb60205260408120906119b28282612ca3565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a26119f182600161349e565b60cc555050565b60008515611a8d576000805260cd6020527fcd565b10a72538d86f6d352f37ebc5dff31587960b12c0afe00fd03947a6932a54600160a060020a038a8116911614611a885760405160e560020a62461bcd02815260206004820152601f60248201527f546f6b656e206e6f7420706f696e7420746f206e617469766520746f6b656e006044820152606401610b02565b611af9565b50600160a060020a03808916600090815260cd60205260409020541680611af95760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610b02565b611b03828461349e565b3414611b545760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c756520213d206665650000000000000000000000000000006044820152606401610b02565b60008711611ba75760405160e560020a62461bcd02815260206004820152601160248201527f43616e6e6f7420776974686472617720300000000000000000000000000000006044820152606401610b02565b611bb589868686868c612769565b60cf54604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611bef573d6000803e3d6000fd5b5060d054604051600160a060020a039091169083156108fc029084906000818181858888f19350505050158015611c2a573d6000803e3d6000fd5b506040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101889052600160a060020a038a16906323b872dd90606401602060405180830381600087803b158015611c9257600080fd5b505af1158015611ca6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cca9190612fea565b611d195760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610b02565b6040805160608082018352600160a060020a038481168084528c821660208086019182528587018e815260ca8054600181018255600091909152965160039097027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054988716600160a060020a0319998a1617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee284018054918716919098161790965594517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d6548551908152918e16938201939093529283019190915281018890526080810184905260a0810183905233907f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f4449060c00160405180910390a2611e4d6128fd565b505050505050505050565b60008051602061367d833981519152611e718133611e77565b5060d255565b611e818282611507565b610c6c57611e9981600160a060020a031660146129c7565b611ea48360206129c7565b604051602001611eb592919061318b565b60408051601f198184030181529082905260e560020a62461bcd028252610b029160040161327c565b828114611f565760405160e560020a62461bcd02815260206004820152603f60248201527f73697a6573206f6620746f6b656e5468697341646472657373657320616e642060448201527f746f6b656e53696465416464726573736573206d7573742062652073616d65006064820152608401610b02565b8260005b81811015611ff757838382818110611f7457611f74613588565b9050602002016020810190611f899190612d83565b60cd6000888885818110611f9f57611f9f613588565b9050602002016020810190611fb49190612d83565b600160a060020a03908116825260208201929092526040016000208054600160a060020a0319169290911691909117905580611fef81613554565b915050611f5a565b505050505050565b6120098282611507565b610c6c576000828152606560209081526040808320600160a060020a03851684529091529020805460ff191660011790556120413390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61208f8282611507565b15610c6c576000828152606560209081526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60975460ff166121115760405160e560020a62461bcd028152600401610b02906132af565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051600160a060020a03909116815260200160405180910390a1565b60d56000815461216a90613554565b91829055508114610d585760405160e560020a62461bcd02815260206004820152601460248201527f4576656e744964206f7574206f66206f726465720000000000000000000000006044820152606401610b02565b60d4546121cd904261349e565b600082815260cb60205260408120600101919091555b82811015610a8b57600082815260cb6020526040902084848381811061220b5761220b613588565b83546001810185556000948552602090942060609091029290920192600302909101905061223982826135ba565b5050808061224690613554565b9150506121e3565b600054610100900460ff1680612267575060005460ff16155b6122865760405160e560020a62461bcd028152600401610b029061331d565b600054610100900460ff161580156122a8576000805461ffff19166101011790555b6122b36000306129bd565b6122cb60008051602061367d833981519152336129bd565b6123047f077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d76122ff6040850160208601612d83565b6129bd565b61232860008051602061363d8339815191526123236040850185613455565b612975565b61234a60008051602061365d8339815191526122ff6080850160608601612d83565b61236c61235a60a0840184613455565b61236760c0860186613455565b611ede565b61237c60a0830160808401612d83565b60ce8054600160a060020a031916600160a060020a03929092169190911790556123a96020830183612d83565b60d18054600160a060020a031916600160a060020a03929092169190911790556123da610100830160e08401612d83565b60cf8054600160a060020a031916600160a060020a039290921691909117905561240c61012083016101008401612d83565b60d08054600160a060020a031916600160a060020a039290921691909117905561016082013560d25561012082013560d381905561014083013560d455600160cc81905560d655600360c95561246290426134b6565b60d7558015610c6c576000805461ff00191690555050565b60975460ff16156124a05760405160e560020a62461bcd028152600401610b02906132e6565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861213e3390565b60005b8151811015610c6c576000600160a060020a03168282815181106124fe576124fe613588565b602002602001015160000151600160a060020a0316141561261a5760ce548251600160a060020a0390911690632e1a7d4d9084908490811061254257612542613588565b6020026020010151604001516040518263ffffffff1660e060020a02815260040161256f91815260200190565b600060405180830381600087803b15801561258957600080fd5b505af115801561259d573d6000803e3d6000fd5b505050508181815181106125b3576125b3613588565b602002602001015160200151600160a060020a03166108fc8383815181106125dd576125dd613588565b6020026020010151604001519081150290604051600060405180830381858888f19350505050158015612614573d6000803e3d6000fd5b50612757565b81818151811061262c5761262c613588565b602002602001015160000151600160a060020a031663a9059cbb83838151811061265857612658613588565b60200260200101516020015184848151811061267657612676613588565b6020026020010151604001516040518363ffffffff1660e060020a0281526004016126b6929190600160a060020a03929092168252602082015260400190565b602060405180830381600087803b1580156126d057600080fd5b505af11580156126e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127089190612fea565b6127575760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610b02565b8061276181613554565b9150506124d8565b60008080612779610708426134b6565b905060005b60c9548110156128b1576040516c01000000000000000000000000600160a060020a038c160260208201526034810183905260548101889052607481018790526094810186905260b40160408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c01604051602081830303815290604052805190602001209350612869848a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c1892505050565b925061288360008051602061365d83398151915284611507565b156128915750505050611ff7565b8161289b8161353d565b92505080806128a990613554565b91505061277e565b5060405160e560020a62461bcd02815260206004820152601660248201527f5369676e617475726520636865636b206661696c6564000000000000000000006044820152606401610b02565b600060d3544261290d91906134b6565b905060d7548114610d585760d6805490600061292883613554565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca60405161295c919061320c565b60405180910390a261297060ca6000612ca3565b60d755565b60005b81811015610a8b576129ab8484848481811061299657612996613588565b90506020020160208101906122ff9190612d83565b806129b581613554565b915050612978565b610c6c8282611fff565b606060006129d68360026134db565b6129e190600261349e565b67ffffffffffffffff8111156129f9576129f96135a1565b6040519080825280601f01601f191660200182016040528015612a23576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612a5a57612a5a613588565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612abd57612abd613588565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612af98460026134db565b612b0490600161349e565b90505b6001811115612bbf577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612b4557612b45613588565b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110612b7a57612b7a613588565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350601090940493612bb88161353d565b9050612b07565b508315612c115760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b02565b9392505050565b6020810151604082015160608301516000929190831a601b811015612c3b57601b015b60408051600081526020810180835288905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa158015612c8e573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b5080546000825560030290600052602060002090810190610d5891905b80821115612cf2578054600160a060020a03199081168255600182018054909116905560006002820155600301612cc0565b5090565b60008083601f840112612d0857600080fd5b50813567ffffffffffffffff811115612d2057600080fd5b6020830191508360208083028501011115612d3a57600080fd5b9250929050565b60008083601f840112612d5357600080fd5b50813567ffffffffffffffff811115612d6b57600080fd5b602083019150836020828501011115612d3a57600080fd5b600060208284031215612d9557600080fd5b8135612c1181613619565b60008060408385031215612db357600080fd5b8235612dbe81613619565b91506020830135612dce81613619565b809150509250929050565b60008060008060008060008060e0898b031215612df557600080fd5b8835612e0081613619565b97506020890135612e1081613619565b9650604089013595506060890135612e278161362e565b9450608089013567ffffffffffffffff811115612e4357600080fd5b612e4f8b828c01612d41565b999c989b5096999598969760a08701359660c0013595509350505050565b600080600080600060808688031215612e8557600080fd5b8535612e9081613619565b9450602086013567ffffffffffffffff811115612eac57600080fd5b612eb888828901612d41565b9699909850959660408101359660609091013595509350505050565b60008060208385031215612ee757600080fd5b823567ffffffffffffffff811115612efe57600080fd5b612f0a85828601612cf6565b90969095509350505050565b60008060008060608587031215612f2c57600080fd5b843567ffffffffffffffff811115612f4357600080fd5b612f4f87828801612cf6565b9095509350506020850135612f6381613619565b91506040850135612f7381613619565b939692955090935050565b60008060008060408587031215612f9457600080fd5b843567ffffffffffffffff80821115612fac57600080fd5b612fb888838901612cf6565b90965094506020870135915080821115612fd157600080fd5b50612fde87828801612cf6565b95989497509550505050565b600060208284031215612ffc57600080fd5b8151612c118161362e565b60006020828403121561301957600080fd5b5035919050565b6000806040838503121561303357600080fd5b823591506020830135612dce81613619565b60008060006040848603121561305a57600080fd5b83359250602084013567ffffffffffffffff81111561307857600080fd5b61308486828701612cf6565b9497909650939450505050565b6000602082840312156130a357600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1981168114612c1157600080fd5b6000602082840312156130e257600080fd5b813567ffffffffffffffff8111156130f957600080fd5b82016101808185031215612c1157600080fd5b60008060006040848603121561312157600080fd5b83359250602084013567ffffffffffffffff8082111561314057600080fd5b818601915086601f83011261315457600080fd5b81358181111561316357600080fd5b87602060608302850101111561317857600080fd5b6020830194508093505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516131c3816017850160208801613511565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613200816028840160208801613511565b01602801949350505050565b60006020808301818452808554808352604092508286019150866000528360002060005b8281101561326f578154600160a060020a0390811685526001808401549091168786015260028301548686015260609094019360039092019101613230565b5091979650505050505050565b602081526000825180602084015261329b816040850160208701613511565b601f01601f19169190910160400192915050565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b60208082526026908201527f6576656e744964206d757374206265203e3d206f6c646573744c6f636b65644560408201527f76656e7449640000000000000000000000000000000000000000000000000000606082015260800190565b6000602080835260608084018551604080858801528282518085526080890191508684019450600093505b8084101561343f5784518051600160a060020a03908116845288820151168884015283015183830152938601936001939093019290850190613402565b5094909701519590960194909452509392505050565b6000808335601e1984360301811261346c57600080fd5b83018035915067ffffffffffffffff82111561348757600080fd5b6020908101925081023603821315612d3a57600080fd5b600082198211156134b1576134b161356f565b500190565b6000826134d65760e060020a634e487b7102600052601260045260246000fd5b500490565b60008160001904831182151516156134f5576134f561356f565b500290565b60008282101561350c5761350c61356f565b500390565b60005b8381101561352c578181015183820152602001613514565b83811115610a8b5750506000910152565b60008161354c5761354c61356f565b506000190190565b60006000198214156135685761356861356f565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fd5b81356135c581613619565b8154600160a060020a031916600160a060020a0382161782555060208201356135ed81613619565b600182018054600160a060020a031916600160a060020a03831617905550604082013560028201555050565b600160a060020a0381168114610d5857600080fd5b8015158114610d5857600080fdfeb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887ea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220d403a35614bf8afc872185c0f08f7f5f10cbab36c101408d4fe041a9be7e30fa64736f6c63430008060033", - "deployedBytecode": "0x6080604052600436106103075760003560e060020a90048063853890ae11610194578063ba8bbbe0116100e0578063e31be08711610099578063f700558711610073578063f700558714610911578063f862b7eb14610931578063f8b7443314610951578063fd5d2ef31461096457600080fd5b8063e31be087146108a4578063ec9d4d3c146108d1578063f33fe10f146108f157600080fd5b8063ba8bbbe0146107f6578063baeebe751461080c578063cf3317d314610822578063d3b89f4914610842578063d547741f14610864578063deb9a3a21461088457600080fd5b8063924cf6e01161014d578063a217fddf11610127578063a217fddf14610769578063a9b1cf0b1461077e578063b6d3385e146107a0578063b87330e9146107d657600080fd5b8063924cf6e01461071d57806396cf52271461073357806399b5bb641461075357600080fd5b8063853890ae1461067f57806386d7679e1461069f5780638ac1f86f146106b55780638e5df9c7146106ca57806391c5bc0a146106ea57806391d14854146106fd57600080fd5b8063390d5388116102535780635249a7051161020c578063746b5c42116101e6578063746b5c421461061357806375b238fc146106285780637df8b8021461064a5780638456cb591461066a57600080fd5b80635249a705146105bb5780635a5f55bf146105db5780635c975abb146105fb57600080fd5b8063390d5388146104f65780633928b296146105165780633f4ba83a1461053657806342180fb81461054b5780634a1856de1461056b5780635119b0ef1461059b57600080fd5b8063248a9ca3116102c05780632f2ff15d1161029a5780632f2ff15d1461045e578063304561bb1461047e578063331a891a146104b657806336568abe146104d657600080fd5b8063248a9ca314610402578063297c2677146104325780632bbba8471461044857600080fd5b806301ffc9a714610313578063044218231461034857806309fce3561461038a5780630d668087146103ac578063196f0f62146103c257806321d3d536146103e257600080fd5b3661030e57005b600080fd5b34801561031f57600080fd5b5061033361032e366004613091565b610984565b60405190151581526020015b60405180910390f35b34801561035457600080fd5b5061037c7f077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d781565b60405190815260200161033f565b34801561039657600080fd5b506103aa6103a5366004612f7e565b610a17565b005b3480156103b857600080fd5b5061037c60d45481565b3480156103ce57600080fd5b506103aa6103dd366004613045565b610a43565b3480156103ee57600080fd5b506103aa6103fd366004612d83565b610a91565b34801561040e57600080fd5b5061037c61041d366004613007565b60009081526065602052604090206001015490565b34801561043e57600080fd5b5061037c60d65481565b34801561045457600080fd5b5060ca5415610333565b34801561046a57600080fd5b506103aa610479366004613020565b610b2e565b34801561048a57600080fd5b5060cf5461049e90600160a060020a031681565b604051600160a060020a03909116815260200161033f565b3480156104c257600080fd5b506103aa6104d1366004613007565b610b59565b3480156104e257600080fd5b506103aa6104f1366004613020565b610c70565b34801561050257600080fd5b5060d05461049e90600160a060020a031681565b34801561052257600080fd5b506103aa610531366004612d83565b610cfb565b34801561054257600080fd5b506103aa610d37565b34801561055757600080fd5b506103aa610566366004613007565b610d5b565b34801561057757600080fd5b5061037c610586366004613007565b60cb6020526000908152604090206001015481565b3480156105a757600080fd5b506103aa6105b636600461310c565b610d98565b3480156105c757600080fd5b506103aa6105d6366004612ed4565b610e28565b3480156105e757600080fd5b506103aa6105f63660046130d0565b610eb1565b34801561060757600080fd5b5060975460ff16610333565b34801561061f57600080fd5b506103aa610f29565b34801561063457600080fd5b5061037c60008051602061367d83398151915281565b34801561065657600080fd5b5060ce5461049e90600160a060020a031681565b34801561067657600080fd5b506103aa610fd5565b34801561068b57600080fd5b506103aa61069a366004612da0565b610ff6565b3480156106ab57600080fd5b5061037c60d75481565b3480156106c157600080fd5b506103aa61103e565b3480156106d657600080fd5b506103aa6106e5366004612d83565b611196565b6103aa6106f8366004612e6d565b6111d7565b34801561070957600080fd5b50610333610718366004613020565b611507565b34801561072957600080fd5b5061037c60d25481565b34801561073f57600080fd5b506103aa61074e366004613007565b611532565b34801561075f57600080fd5b5061037c60d55481565b34801561077557600080fd5b5061037c600081565b34801561078a57600080fd5b5061037c60008051602061363d83398151915281565b3480156107ac57600080fd5b5061049e6107bb366004612d83565b60cd60205260009081526040902054600160a060020a031681565b3480156107e257600080fd5b506103aa6107f1366004612d83565b611551565b34801561080257600080fd5b5061037c60cc5481565b34801561081857600080fd5b5061037c60d35481565b34801561082e57600080fd5b506103aa61083d366004613007565b61158d565b34801561084e57600080fd5b5061037c60008051602061365d83398151915281565b34801561087057600080fd5b506103aa61087f366004613020565b611604565b34801561089057600080fd5b506103aa61089f366004613045565b61162a565b3480156108b057600080fd5b506108c46108bf366004613007565b611651565b60405161033f91906133d7565b3480156108dd57600080fd5b506103aa6108ec366004612f16565b61170d565b3480156108fd57600080fd5b5060d15461049e90600160a060020a031681565b34801561091d57600080fd5b506103aa61092c366004613007565b6117a6565b34801561093d57600080fd5b506103aa61094c366004613007565b6117c5565b6103aa61095f366004612dd9565b6119f8565b34801561097057600080fd5b506103aa61097f366004613007565b611e58565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b000000000000000000000000000000000000000000000000000000001480610a1157507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b60008051602061367d833981519152610a308133611e77565b610a3c85858585611ede565b5050505050565b60005b81811015610a8b57610a7984848484818110610a6457610a64613588565b905060200201602081019061087f9190612d83565b80610a8381613554565b915050610a46565b50505050565b60008051602061367d833981519152610aaa8133611e77565b60d154600160a060020a031615610b0b5760405160e560020a62461bcd02815260206004820152601d60248201527f736964654272696467654164647265737320616c72656164792073657400000060448201526064015b60405180910390fd5b5060d18054600160a060020a031916600160a060020a0392909216919091179055565b600082815260656020526040902060010154610b4a8133611e77565b610b548383611fff565b505050565b60008051602061367d833981519152610b728133611e77565b60975460ff16610b975760405160e560020a62461bcd028152600401610b02906132af565b60cc54821015610bbc5760405160e560020a62461bcd028152600401610b029061337a565b60d554821115610c115760405160e560020a62461bcd02815260206004820152601f60248201527f6576656e744964206d757374206265203c3d20696e7075744576656e744964006044820152606401610b02565b610c1c6001836134fa565b60d5555b600082815260cb602052604090206001015415610c6c57600082815260cb6020526040812090610c508282612ca3565b5060006001919091015581610c6481613554565b925050610c20565b5050565b600160a060020a0381163314610cf15760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610b02565b610c6c8282612085565b60008051602061367d833981519152610d148133611e77565b5060d08054600160a060020a031916600160a060020a0392909216919091179055565b60008051602061367d833981519152610d508133611e77565b610d586120ec565b50565b60008051602061367d833981519152610d748133611e77565b8160d35460d754610d8591906134db565b610d8f91906134b6565b60d7555060d355565b7f077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7610dc38133611e77565b60975460ff1615610de95760405160e560020a62461bcd028152600401610b02906132e6565b610df28461215b565b60405184907f196c47048e38df7a4fe6e581c8f4f2e2ba67ac0dd45b90da756e97bd61d9dd3b90600090a2610a8b8383866121c0565b60008051602061367d833981519152610e418133611e77565b8160005b81811015610a3c5760cd6000868684818110610e6357610e63613588565b9050602002016020810190610e789190612d83565b600160a060020a0316815260208101919091526040016000208054600160a060020a031916905580610ea981613554565b915050610e45565b600054610100900460ff1680610eca575060005460ff16155b610ee95760405160e560020a62461bcd028152600401610b029061331d565b600054610100900460ff16158015610f0b576000805461ffff19166101011790555b610f148261224e565b8015610c6c576000805461ff00191690555050565b60ca54610f7b5760405160e560020a62461bcd02815260206004820152600e60248201527f517565756520697320656d7074790000000000000000000000000000000000006044820152606401610b02565b60d68054906000610f8b83613554565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca604051610fbf919061320c565b60405180910390a2610fd360ca6000612ca3565b565b60008051602061363d833981519152610fee8133611e77565b610d5861247a565b60008051602061367d83398151915261100f8133611e77565b50600160a060020a03918216600090815260cd602052604090208054600160a060020a03191691909216179055565b60975460ff16156110645760405160e560020a62461bcd028152600401610b02906132e6565b60cc545b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156110f657600084815260209081902060408051606081018252600386029092018054600160a060020a0390811684526001808301549091168486015260029091015491830191909152908352909201910161109c565b50505050815260200160018201548152505090508060200151600014806111205750428160200151115b1561112b575060cc55565b8051611136906124d5565b600082815260cb602052604081209061114f8282612ca3565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a2508061118e81613554565b915050611068565b60008051602061367d8339815191526111af8133611e77565b50600160a060020a0316600090815260cd602052604090208054600160a060020a0319169055565b60ce54600160a060020a03908116600090815260cd602052604090205416806112455760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610b02565b61124f828461349e565b34116112a05760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c7565203c3d206665650000000000000000000000000000006044820152606401610b02565b6000826112ad85346134fa565b6112b791906134fa565b60ce549091506112d490600160a060020a03168787878786612769565b60cf54604051600160a060020a039091169085156108fc029086906000818181858888f1935050505015801561130e573d6000803e3d6000fd5b5060d054604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611349573d6000803e3d6000fd5b5060ce60009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0826040518263ffffffff1660e060020a0281526004016000604051808303818588803b15801561139d57600080fd5b505af11580156113b1573d6000803e3d6000fd5b505060408051606081018252600160a060020a0380881682528c81166020830190815282840188815260ca80546001810182556000918252945160039095027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054968616600160a060020a031997881617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee2840180549190951695169490941790925590517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d65491513395507f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f44494506114ee9350879087908b908b90958652600160a060020a0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b60405180910390a26114fe6128fd565b50505050505050565b6000918252606560209081526040808420600160a060020a0393909316845291905290205460ff1690565b60008051602061367d83398151915261154b8133611e77565b5060d455565b60008051602061367d83398151915261156a8133611e77565b5060cf8054600160a060020a031916600160a060020a0392909216919091179055565b60008051602061367d8339815191526115a68133611e77565b60975460ff166115cb5760405160e560020a62461bcd028152600401610b02906132af565b60cc548210156115f05760405160e560020a62461bcd028152600401610b029061337a565b6115fb6001836134fa565b60d5555060cc55565b6000828152606560205260409020600101546116208133611e77565b610b548383612085565b6000838152606560205260409020600101546116468133611e77565b610a8b848484612975565b604080518082019091526060815260006020820152600082815260cb60209081526040808320815181546060948102820185018452928101838152909491938593919285929185015b828210156116f457600084815260209081902060408051606081018252600386029092018054600160a060020a0390811684526001808301549091168486015260029091015491830191909152908352909201910161169a565b5050505081526020016001820154815250509050919050565b33301461175f5760405160e560020a62461bcd02815260206004820152601c60248201527f54686973206d6574686f642072657175697265206d756c7469736967000000006044820152606401610b02565b61177860008051602061363d8339815191528585612975565b61179060008051602061365d833981519152836129bd565b61179b6000336129bd565b610a8b600082611604565b60008051602061367d8339815191526117bf8133611e77565b5060c955565b60975460ff16156117eb5760405160e560020a62461bcd028152600401610b02906132e6565b60cc54811461183f5760405160e560020a62461bcd02815260206004820152601c60248201527f63616e20756e6c6f636b206f6e6c79206f6c64657374206576656e74000000006044820152606401610b02565b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156118cd57600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611873565b505050508152602001600182015481525050905060008160200151116119385760405160e560020a62461bcd02815260206004820181905260248201527f6e6f206c6f636b6564207472616e7366657273207769746820746869732069646044820152606401610b02565b4281602001511061198e5760405160e560020a62461bcd02815260206004820152601b60248201527f6c6f636b54696d6520686173206e6f74207965742070617373656400000000006044820152606401610b02565b8051611999906124d5565b600082815260cb60205260408120906119b28282612ca3565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a26119f182600161349e565b60cc555050565b60008515611a8d576000805260cd6020527fcd565b10a72538d86f6d352f37ebc5dff31587960b12c0afe00fd03947a6932a54600160a060020a038a8116911614611a885760405160e560020a62461bcd02815260206004820152601f60248201527f546f6b656e206e6f7420706f696e7420746f206e617469766520746f6b656e006044820152606401610b02565b611af9565b50600160a060020a03808916600090815260cd60205260409020541680611af95760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610b02565b611b03828461349e565b3414611b545760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c756520213d206665650000000000000000000000000000006044820152606401610b02565b60008711611ba75760405160e560020a62461bcd02815260206004820152601160248201527f43616e6e6f7420776974686472617720300000000000000000000000000000006044820152606401610b02565b611bb589868686868c612769565b60cf54604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611bef573d6000803e3d6000fd5b5060d054604051600160a060020a039091169083156108fc029084906000818181858888f19350505050158015611c2a573d6000803e3d6000fd5b506040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101889052600160a060020a038a16906323b872dd90606401602060405180830381600087803b158015611c9257600080fd5b505af1158015611ca6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cca9190612fea565b611d195760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610b02565b6040805160608082018352600160a060020a038481168084528c821660208086019182528587018e815260ca8054600181018255600091909152965160039097027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054988716600160a060020a0319998a1617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee284018054918716919098161790965594517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d6548551908152918e16938201939093529283019190915281018890526080810184905260a0810183905233907f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f4449060c00160405180910390a2611e4d6128fd565b505050505050505050565b60008051602061367d833981519152611e718133611e77565b5060d255565b611e818282611507565b610c6c57611e9981600160a060020a031660146129c7565b611ea48360206129c7565b604051602001611eb592919061318b565b60408051601f198184030181529082905260e560020a62461bcd028252610b029160040161327c565b828114611f565760405160e560020a62461bcd02815260206004820152603f60248201527f73697a6573206f6620746f6b656e5468697341646472657373657320616e642060448201527f746f6b656e53696465416464726573736573206d7573742062652073616d65006064820152608401610b02565b8260005b81811015611ff757838382818110611f7457611f74613588565b9050602002016020810190611f899190612d83565b60cd6000888885818110611f9f57611f9f613588565b9050602002016020810190611fb49190612d83565b600160a060020a03908116825260208201929092526040016000208054600160a060020a0319169290911691909117905580611fef81613554565b915050611f5a565b505050505050565b6120098282611507565b610c6c576000828152606560209081526040808320600160a060020a03851684529091529020805460ff191660011790556120413390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61208f8282611507565b15610c6c576000828152606560209081526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60975460ff166121115760405160e560020a62461bcd028152600401610b02906132af565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051600160a060020a03909116815260200160405180910390a1565b60d56000815461216a90613554565b91829055508114610d585760405160e560020a62461bcd02815260206004820152601460248201527f4576656e744964206f7574206f66206f726465720000000000000000000000006044820152606401610b02565b60d4546121cd904261349e565b600082815260cb60205260408120600101919091555b82811015610a8b57600082815260cb6020526040902084848381811061220b5761220b613588565b83546001810185556000948552602090942060609091029290920192600302909101905061223982826135ba565b5050808061224690613554565b9150506121e3565b600054610100900460ff1680612267575060005460ff16155b6122865760405160e560020a62461bcd028152600401610b029061331d565b600054610100900460ff161580156122a8576000805461ffff19166101011790555b6122b36000306129bd565b6122cb60008051602061367d833981519152336129bd565b6123047f077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d76122ff6040850160208601612d83565b6129bd565b61232860008051602061363d8339815191526123236040850185613455565b612975565b61234a60008051602061365d8339815191526122ff6080850160608601612d83565b61236c61235a60a0840184613455565b61236760c0860186613455565b611ede565b61237c60a0830160808401612d83565b60ce8054600160a060020a031916600160a060020a03929092169190911790556123a96020830183612d83565b60d18054600160a060020a031916600160a060020a03929092169190911790556123da610100830160e08401612d83565b60cf8054600160a060020a031916600160a060020a039290921691909117905561240c61012083016101008401612d83565b60d08054600160a060020a031916600160a060020a039290921691909117905561016082013560d25561012082013560d381905561014083013560d455600160cc81905560d655600360c95561246290426134b6565b60d7558015610c6c576000805461ff00191690555050565b60975460ff16156124a05760405160e560020a62461bcd028152600401610b02906132e6565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861213e3390565b60005b8151811015610c6c576000600160a060020a03168282815181106124fe576124fe613588565b602002602001015160000151600160a060020a0316141561261a5760ce548251600160a060020a0390911690632e1a7d4d9084908490811061254257612542613588565b6020026020010151604001516040518263ffffffff1660e060020a02815260040161256f91815260200190565b600060405180830381600087803b15801561258957600080fd5b505af115801561259d573d6000803e3d6000fd5b505050508181815181106125b3576125b3613588565b602002602001015160200151600160a060020a03166108fc8383815181106125dd576125dd613588565b6020026020010151604001519081150290604051600060405180830381858888f19350505050158015612614573d6000803e3d6000fd5b50612757565b81818151811061262c5761262c613588565b602002602001015160000151600160a060020a031663a9059cbb83838151811061265857612658613588565b60200260200101516020015184848151811061267657612676613588565b6020026020010151604001516040518363ffffffff1660e060020a0281526004016126b6929190600160a060020a03929092168252602082015260400190565b602060405180830381600087803b1580156126d057600080fd5b505af11580156126e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127089190612fea565b6127575760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610b02565b8061276181613554565b9150506124d8565b60008080612779610708426134b6565b905060005b60c9548110156128b1576040516c01000000000000000000000000600160a060020a038c160260208201526034810183905260548101889052607481018790526094810186905260b40160408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c01604051602081830303815290604052805190602001209350612869848a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c1892505050565b925061288360008051602061365d83398151915284611507565b156128915750505050611ff7565b8161289b8161353d565b92505080806128a990613554565b91505061277e565b5060405160e560020a62461bcd02815260206004820152601660248201527f5369676e617475726520636865636b206661696c6564000000000000000000006044820152606401610b02565b600060d3544261290d91906134b6565b905060d7548114610d585760d6805490600061292883613554565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca60405161295c919061320c565b60405180910390a261297060ca6000612ca3565b60d755565b60005b81811015610a8b576129ab8484848481811061299657612996613588565b90506020020160208101906122ff9190612d83565b806129b581613554565b915050612978565b610c6c8282611fff565b606060006129d68360026134db565b6129e190600261349e565b67ffffffffffffffff8111156129f9576129f96135a1565b6040519080825280601f01601f191660200182016040528015612a23576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612a5a57612a5a613588565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612abd57612abd613588565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612af98460026134db565b612b0490600161349e565b90505b6001811115612bbf577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612b4557612b45613588565b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110612b7a57612b7a613588565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350601090940493612bb88161353d565b9050612b07565b508315612c115760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b02565b9392505050565b6020810151604082015160608301516000929190831a601b811015612c3b57601b015b60408051600081526020810180835288905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa158015612c8e573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b5080546000825560030290600052602060002090810190610d5891905b80821115612cf2578054600160a060020a03199081168255600182018054909116905560006002820155600301612cc0565b5090565b60008083601f840112612d0857600080fd5b50813567ffffffffffffffff811115612d2057600080fd5b6020830191508360208083028501011115612d3a57600080fd5b9250929050565b60008083601f840112612d5357600080fd5b50813567ffffffffffffffff811115612d6b57600080fd5b602083019150836020828501011115612d3a57600080fd5b600060208284031215612d9557600080fd5b8135612c1181613619565b60008060408385031215612db357600080fd5b8235612dbe81613619565b91506020830135612dce81613619565b809150509250929050565b60008060008060008060008060e0898b031215612df557600080fd5b8835612e0081613619565b97506020890135612e1081613619565b9650604089013595506060890135612e278161362e565b9450608089013567ffffffffffffffff811115612e4357600080fd5b612e4f8b828c01612d41565b999c989b5096999598969760a08701359660c0013595509350505050565b600080600080600060808688031215612e8557600080fd5b8535612e9081613619565b9450602086013567ffffffffffffffff811115612eac57600080fd5b612eb888828901612d41565b9699909850959660408101359660609091013595509350505050565b60008060208385031215612ee757600080fd5b823567ffffffffffffffff811115612efe57600080fd5b612f0a85828601612cf6565b90969095509350505050565b60008060008060608587031215612f2c57600080fd5b843567ffffffffffffffff811115612f4357600080fd5b612f4f87828801612cf6565b9095509350506020850135612f6381613619565b91506040850135612f7381613619565b939692955090935050565b60008060008060408587031215612f9457600080fd5b843567ffffffffffffffff80821115612fac57600080fd5b612fb888838901612cf6565b90965094506020870135915080821115612fd157600080fd5b50612fde87828801612cf6565b95989497509550505050565b600060208284031215612ffc57600080fd5b8151612c118161362e565b60006020828403121561301957600080fd5b5035919050565b6000806040838503121561303357600080fd5b823591506020830135612dce81613619565b60008060006040848603121561305a57600080fd5b83359250602084013567ffffffffffffffff81111561307857600080fd5b61308486828701612cf6565b9497909650939450505050565b6000602082840312156130a357600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1981168114612c1157600080fd5b6000602082840312156130e257600080fd5b813567ffffffffffffffff8111156130f957600080fd5b82016101808185031215612c1157600080fd5b60008060006040848603121561312157600080fd5b83359250602084013567ffffffffffffffff8082111561314057600080fd5b818601915086601f83011261315457600080fd5b81358181111561316357600080fd5b87602060608302850101111561317857600080fd5b6020830194508093505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516131c3816017850160208801613511565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613200816028840160208801613511565b01602801949350505050565b60006020808301818452808554808352604092508286019150866000528360002060005b8281101561326f578154600160a060020a0390811685526001808401549091168786015260028301548686015260609094019360039092019101613230565b5091979650505050505050565b602081526000825180602084015261329b816040850160208701613511565b601f01601f19169190910160400192915050565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b60208082526026908201527f6576656e744964206d757374206265203e3d206f6c646573744c6f636b65644560408201527f76656e7449640000000000000000000000000000000000000000000000000000606082015260800190565b6000602080835260608084018551604080858801528282518085526080890191508684019450600093505b8084101561343f5784518051600160a060020a03908116845288820151168884015283015183830152938601936001939093019290850190613402565b5094909701519590960194909452509392505050565b6000808335601e1984360301811261346c57600080fd5b83018035915067ffffffffffffffff82111561348757600080fd5b6020908101925081023603821315612d3a57600080fd5b600082198211156134b1576134b161356f565b500190565b6000826134d65760e060020a634e487b7102600052601260045260246000fd5b500490565b60008160001904831182151516156134f5576134f561356f565b500290565b60008282101561350c5761350c61356f565b500390565b60005b8381101561352c578181015183820152602001613514565b83811115610a8b5750506000910152565b60008161354c5761354c61356f565b506000190190565b60006000198214156135685761356861356f565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fd5b81356135c581613619565b8154600160a060020a031916600160a060020a0382161782555060208201356135ed81613619565b600182018054600160a060020a031916600160a060020a03831617905550604082013560028201555050565b600160a060020a0381168114610d5857600080fd5b8015158114610d5857600080fdfeb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887ea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220d403a35614bf8afc872185c0f08f7f5f10cbab36c101408d4fe041a9be7e30fa64736f6c63430008060033", + "numDeployments": 1, + "solcInputHash": "af3862e0ddcca2861ee723b668139921", + "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"queue\",\"type\":\"tuple[]\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"TransferFinish\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"TransferSubmit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenFrom\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenTo\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"transferFeeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bridgeFeeAmount\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FEE_PROVIDER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RELAY_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WATCHDOG_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeFeeRecipient\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"feeRecipient_\",\"type\":\"address\"}],\"name\":\"changeBridgeFeeRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lockTime_\",\"type\":\"uint256\"}],\"name\":\"changeLockTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minSafetyBlocks_\",\"type\":\"uint256\"}],\"name\":\"changeMinSafetyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"signatureFeeCheckNumber_\",\"type\":\"uint256\"}],\"name\":\"changeSignatureFeeCheckNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timeframeSeconds_\",\"type\":\"uint256\"}],\"name\":\"changeTimeframeSeconds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"feeRecipient_\",\"type\":\"address\"}],\"name\":\"changeTransferFeeRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"getLockedTransfers\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"transfers\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"endTimestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.LockedTransfers\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"grantRoles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sideBridgeAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"watchdogsAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"feeProviderAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"wrappingTokenAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokenSideAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address payable\",\"name\":\"transferFeeRecipient\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"bridgeFeeRecipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timeframeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minSafetyBlocks\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.ConstructorArgs\",\"name\":\"args\",\"type\":\"tuple\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inputEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isQueueEmpty\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastTimeframe\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lockTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lockedTransfers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"endTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minSafetyBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldestLockedEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"outputEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"removeLockedTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"revokeRoles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sideBridgeAddress\",\"type\":\"address\"}],\"name\":\"setSideBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sideBridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"skipTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"transfers\",\"type\":\"tuple[]\"}],\"name\":\"submitTransferUntrustless\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeframeSeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenSideAddress\",\"type\":\"address\"}],\"name\":\"tokensAdd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokenSideAddresses\",\"type\":\"address[]\"}],\"name\":\"tokensAddBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"}],\"name\":\"tokensRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"}],\"name\":\"tokensRemoveBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transferFeeRecipient\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"unlockTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unlockTransfersBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_watchdogs\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"_fee_provider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"mpcRelay\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oldDefaultAdmin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oldRelay\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"unwrapSide\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"feeSignature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"transferFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bridgeFee\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"feeSignature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"transferFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bridgeFee\",\"type\":\"uint256\"}],\"name\":\"wrapWithdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrapperAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"withdraw(address,address,uint256,bool,bytes,uint256,uint256)\":{\"params\":{\"bridgeFee\":\"Amount (in native coins), payed as bridge earnings\",\"feeSignature\":\"Signature signed by relay that confirms that the fee values are valid\",\"transferFee\":\"Amount (in native coins), payed to compensate gas fees in side network\"}},\"wrapWithdraw(address,bytes,uint256,uint256)\":{\"params\":{\"bridgeFee\":\"Amount (in native coins), payed as bridge earnings\",\"feeSignature\":\"Signature signed by relay that confirms that the fee values are valid\",\"toAddress\":\"Address in side network that will receive the tokens\",\"transferFee\":\"Amount (in native coins), payed to compensate gas fees in side network\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/networks/ETH_AmbBridge.sol\":\"ETH_AmbBridge\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 * ```\\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 * ```\\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.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\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, _msgSender());\\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(IAccessControlUpgradeable).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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\\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 function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\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 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 require(!paused(), \\\"Pausable: paused\\\");\\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 require(paused(), \\\"Pausable: not paused\\\");\\n _;\\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 uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x742c0fbab73bf595ca40025f6e81cb48dbd5e133950717f7befd062a925c0148\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 IERC165Upgradeable {\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"contracts/checks/CheckUntrustless2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"../common/CommonStructs.sol\\\";\\n\\n\\ncontract CheckUntrustless2 {\\n // this contract do nothing, but i think it's required to inheritance from it\\n // todo check this\\n uint256[15] private ___gap;\\n}\\n\",\"keccak256\":\"0xff7351b4e6b3628cd20511c65aa12dfb19b76472ee18ee06397879c1000d562d\",\"license\":\"MIT\"},\"contracts/checks/SignatureCheck.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n assembly {\\n r := mload(add(signature, 32))\\n s := mload(add(signature, 64))\\n v := byte(0, mload(add(signature, 96)))\\n if lt(v, 27) {v := add(v, 27)}\\n }\\n return ecrecover(messageHash, v, r, s);\\n}\\n\",\"keccak256\":\"0x16e553d27ac4c9c49f8487c5df1fd51b3afbffa9557be22ca031f05d82739ba7\",\"license\":\"MIT\"},\"contracts/common/CommonBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./CommonStructs.sol\\\";\\nimport \\\"../tokens/IWrapper.sol\\\";\\nimport \\\"../checks/SignatureCheck.sol\\\";\\n\\n\\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\\n // DEFAULT_ADMIN_ROLE can grants and revokes all roles below; Set to multisig (proxy contract address)\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\\n bytes32 public constant RELAY_ROLE = keccak256(\\\"RELAY_ROLE\\\"); // can submit transfers\\n bytes32 public constant WATCHDOG_ROLE = keccak256(\\\"WATCHDOG_ROLE\\\"); // can pause contract\\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\\\"FEE_PROVIDER_ROLE\\\"); // fee signatures must be signed by this role\\n\\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\\n uint internal signatureFeeCheckNumber;\\n\\n\\n // queue of Transfers to be pushed in another network\\n CommonStructs.Transfer[] queue;\\n\\n // locked transfers from another network\\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\\n // head index of lockedTransfers 'queue' mapping\\n uint public oldestLockedEventId;\\n\\n\\n // this network to side network token addresses mapping\\n mapping(address => address) public tokenAddresses;\\n // token that implement `IWrapper` interface and used to wrap native coin\\n address public wrapperAddress;\\n\\n // addresses that will receive fees\\n address payable public transferFeeRecipient;\\n address payable public bridgeFeeRecipient;\\n\\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\\n\\n uint public inputEventId; // last processed event from side network\\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\\n\\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\\n\\n\\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\\n uint transferFeeAmount, uint bridgeFeeAmount);\\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\\n event TransferSubmit(uint indexed eventId);\\n event TransferFinish(uint indexed eventId);\\n\\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, address(this));\\n _setupRole(ADMIN_ROLE, msg.sender);\\n _setupRole(RELAY_ROLE, args.relayAddress);\\n _setupRoles(WATCHDOG_ROLE, args.watchdogsAddresses);\\n _setupRole(FEE_PROVIDER_ROLE, args.feeProviderAddress);\\n\\n // initialise tokenAddresses with start values\\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\\n wrapperAddress = args.wrappingTokenAddress;\\n\\n sideBridgeAddress = args.sideBridgeAddress;\\n transferFeeRecipient = args.transferFeeRecipient;\\n bridgeFeeRecipient = args.bridgeFeeRecipient;\\n minSafetyBlocks = args.minSafetyBlocks;\\n timeframeSeconds = args.timeframeSeconds;\\n lockTime = args.lockTime;\\n\\n // 1, coz eventId 0 considered already processed\\n oldestLockedEventId = 1;\\n outputEventId = 1;\\n\\n signatureFeeCheckNumber = 3;\\n\\n lastTimeframe = block.timestamp / timeframeSeconds;\\n }\\n\\n\\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\\n\\n /// @param toAddress Address in side network that will receive the tokens\\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\\n function wrapWithdraw(address toAddress,\\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\\n ) public payable {\\n address tokenSideAddress = tokenAddresses[wrapperAddress];\\n require(tokenSideAddress != address(0), \\\"Unknown token address\\\");\\n\\n require(msg.value > transferFee + bridgeFee, \\\"Sent value <= fee\\\");\\n\\n uint amount = msg.value - transferFee - bridgeFee;\\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\\n transferFeeRecipient.transfer(transferFee);\\n bridgeFeeRecipient.transfer(bridgeFee);\\n\\n IWrapper(wrapperAddress).deposit{value : amount}();\\n\\n //\\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\\n\\n withdrawFinish();\\n }\\n\\n // `withdraw` function used for sending tokens from this network to side network;\\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\\n /// @param toAddress Address in side network that will receive the tokens\\n /// @param amount Amount of tokens to be sent\\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\\n */\\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\\n function withdraw(\\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\\n ) payable public {\\n address tokenSideAddress;\\n if (unwrapSide) {\\n require(tokenAddresses[address(0)] == tokenThisAddress, \\\"Token not point to native token\\\");\\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\\n } else {\\n tokenSideAddress = tokenAddresses[tokenThisAddress];\\n require(tokenSideAddress != address(0), \\\"Unknown token address\\\");\\n }\\n\\n require(msg.value == transferFee + bridgeFee, \\\"Sent value != fee\\\");\\n\\n require(amount > 0, \\\"Cannot withdraw 0\\\");\\n\\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\\n transferFeeRecipient.transfer(transferFee);\\n bridgeFeeRecipient.transfer(bridgeFee);\\n\\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \\\"Fail transfer coins\\\");\\n\\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\\n\\n withdrawFinish();\\n }\\n\\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\\n function triggerTransfers() public {\\n require(queue.length != 0, \\\"Queue is empty\\\");\\n\\n emit Transfer(outputEventId++, queue);\\n delete queue;\\n }\\n\\n\\n // after `lockTime` period, transfers can be unlocked\\n function unlockTransfers(uint eventId) public whenNotPaused {\\n require(eventId == oldestLockedEventId, \\\"can unlock only oldest event\\\");\\n\\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\\n require(transfersLocked.endTimestamp > 0, \\\"no locked transfers with this id\\\");\\n require(transfersLocked.endTimestamp < block.timestamp, \\\"lockTime has not yet passed\\\");\\n\\n proceedTransfers(transfersLocked.transfers);\\n\\n delete lockedTransfers[eventId];\\n emit TransferFinish(eventId);\\n\\n oldestLockedEventId = eventId + 1;\\n }\\n\\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\\n function unlockTransfersBatch() public whenNotPaused {\\n uint eventId = oldestLockedEventId;\\n for (;; eventId++) {\\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\\n\\n proceedTransfers(transfersLocked.transfers);\\n\\n delete lockedTransfers[eventId];\\n emit TransferFinish(eventId);\\n }\\n oldestLockedEventId = eventId;\\n }\\n\\n // delete transfers with passed eventId **and all after it**\\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\\n require(eventId >= oldestLockedEventId, \\\"eventId must be >= oldestLockedEventId\\\"); // can't undo unlocked :(\\n require(eventId <= inputEventId, \\\"eventId must be <= inputEventId\\\");\\n\\n // now waiting for submitting a new transfer with `eventId` id\\n inputEventId = eventId - 1;\\n\\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\\n delete lockedTransfers[eventId];\\n\\n }\\n\\n // pretend like bridge already receive and process all transfers up to `eventId` id\\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\\n require(eventId >= oldestLockedEventId, \\\"eventId must be >= oldestLockedEventId\\\"); // can't undo unlocked :(\\n\\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\\n }\\n\\n\\n // views\\n\\n // returns locked transfers from another network\\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\\n return lockedTransfers[eventId];\\n }\\n\\n\\n function isQueueEmpty() public view returns (bool) {\\n return queue.length == 0;\\n }\\n\\n\\n // admin setters\\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\\n minSafetyBlocks = minSafetyBlocks_;\\n }\\n\\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\\n transferFeeRecipient = feeRecipient_;\\n }\\n\\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\\n bridgeFeeRecipient = feeRecipient_;\\n }\\n\\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\\n timeframeSeconds = timeframeSeconds_;\\n }\\n\\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\\n lockTime = lockTime_;\\n }\\n\\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\\n }\\n\\n // token addressed mapping\\n\\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\\n }\\n\\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\\n delete tokenAddresses[tokenThisAddress];\\n }\\n\\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\\n }\\n\\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\\n require(tokenThisAddresses.length == tokenSideAddresses.length, \\\"sizes of tokenThisAddresses and tokenSideAddresses must be same\\\");\\n uint arrayLength = tokenThisAddresses.length;\\n for (uint i = 0; i < arrayLength; i++)\\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\\n }\\n\\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\\n uint arrayLength = tokenThisAddresses.length;\\n for (uint i = 0; i < arrayLength; i++)\\n delete tokenAddresses[tokenThisAddresses[i]];\\n }\\n\\n // pause\\n\\n function pause() public onlyRole(WATCHDOG_ROLE) {\\n _pause();\\n }\\n\\n function unpause() public onlyRole(ADMIN_ROLE) {\\n _unpause();\\n }\\n\\n // roles\\n\\n function grantRoles(bytes32 role, address[] calldata accounts) public onlyRole(getRoleAdmin(role)) {\\n // check permission to grant role via onlyRole(getRoleAdmin(role))\\n _setupRoles(role, accounts);\\n }\\n function revokeRoles(bytes32 role, address[] calldata accounts) public {\\n // revokeRole will check for permissions\\n for (uint i = 0; i < accounts.length; i++)\\n revokeRole(role, accounts[i]);\\n }\\n function _setupRoles(bytes32 role, address[] calldata accounts) internal {\\n // no permissions check at all\\n for (uint i = 0; i < accounts.length; i++)\\n _setupRole(role, accounts[i]);\\n }\\n\\n // internal\\n\\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\\n for (uint i = 0; i < events.length; i++)\\n lockedTransfers[eventId].transfers.push(events[i]);\\n }\\n\\n\\n // sends money according to the information in the Transfer structure\\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\\n for (uint i = 0; i < transfers.length; i++) {\\n\\n if (transfers[i].tokenAddress == address(0)) {// native token\\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\\n } else {// ERC20 token\\n require(\\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\\n \\\"Fail transfer coins\\\");\\n }\\n\\n }\\n }\\n\\n // used by `withdraw` and `wrapWithdraw` functions;\\n // emit `Transfer` event with current queue if timeframe was changed;\\n function withdrawFinish() internal {\\n uint nowTimeframe = block.timestamp / timeframeSeconds;\\n if (nowTimeframe != lastTimeframe) {\\n emit Transfer(outputEventId++, queue);\\n delete queue;\\n\\n lastTimeframe = nowTimeframe;\\n }\\n }\\n\\n // encode message with received values and current timestamp;\\n // check that signature is same message signed by address with RELAY_ROLE;\\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\\n bytes32 messageHash;\\n address signer;\\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\\n\\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\\n messageHash = keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\\n ));\\n\\n signer = ecdsaRecover(messageHash, signature);\\n if (hasRole(FEE_PROVIDER_ROLE, signer))\\n return;\\n timestampEpoch--;\\n }\\n revert(\\\"Signature check failed\\\");\\n }\\n\\n function checkEventId(uint eventId) internal {\\n require(eventId == ++inputEventId, \\\"EventId out of order\\\");\\n }\\n\\n receive() external payable {} // need to receive native token from wrapper contract\\n\\n uint256[15] private __gap;\\n}\\n\",\"keccak256\":\"0x74846658822e44c4fc71b2764a31d90bad77af3b492a2a4a5a512f7a41d9b489\",\"license\":\"MIT\"},\"contracts/common/CommonStructs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.6;\\n\\nlibrary CommonStructs {\\n struct Transfer {\\n address tokenAddress;\\n address toAddress;\\n uint amount;\\n }\\n\\n struct TransferProof {\\n bytes[] receiptProof;\\n uint eventId;\\n Transfer[] transfers;\\n }\\n\\n struct LockedTransfers {\\n Transfer[] transfers;\\n uint endTimestamp;\\n }\\n\\n struct ConstructorArgs {\\n address sideBridgeAddress; address relayAddress;\\n address[] watchdogsAddresses; address feeProviderAddress;\\n address wrappingTokenAddress;\\n address[] tokenThisAddresses; address[] tokenSideAddresses;\\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\\n }\\n}\\n\",\"keccak256\":\"0x0294bbc461102c4f4108d6f0163ce8158d5af7c5a6ff29971f01afdec7b38cf3\",\"license\":\"MIT\"},\"contracts/networks/ETH_AmbBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"../common/CommonBridge.sol\\\";\\nimport \\\"../checks/CheckUntrustless2.sol\\\";\\n\\n\\ncontract ETH_AmbBridge is CommonBridge, CheckUntrustless2 {\\n\\n function initialize(\\n CommonStructs.ConstructorArgs calldata args\\n ) public initializer {\\n __CommonBridge_init(args);\\n }\\n\\n function upgrade(\\n address[] calldata _watchdogs,\\n address _fee_provider,\\n address mpcRelay,\\n address oldDefaultAdmin,\\n address oldRelay\\n ) public {\\n require(msg.sender == address(this), \\\"This method require multisig\\\");\\n\\n // add DEFAULT_ADMIN_ROLE to multisig\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n // revoke RELAY_ROLE from old relay\\n revokeRole(RELAY_ROLE, oldRelay);\\n\\n // new roles for untrustless mpc\\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\\n _setupRole(RELAY_ROLE, mpcRelay);\\n\\n // revoke DEFAULT_ADMIN_ROLE from deployer\\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\\n }\\n\\n\\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\\n checkEventId(eventId);\\n emit TransferSubmit(eventId);\\n lockTransfers(transfers, eventId);\\n }\\n\\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\\n require(sideBridgeAddress == address(0), \\\"sideBridgeAddress already set\\\");\\n sideBridgeAddress = _sideBridgeAddress;\\n }\\n\\n\\n}\\n\",\"keccak256\":\"0x9d38427be168cb6212b06158d2c1b685a79b91adc8448e6740f06e39d086f055\",\"license\":\"MIT\"},\"contracts/tokens/IWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\ninterface IWrapper {\\n event Deposit(address indexed dst, uint amount);\\n event Withdrawal(address indexed src, uint amount);\\n\\n function deposit() external payable;\\n\\n function withdraw(uint amount) external;\\n}\\n\",\"keccak256\":\"0xbe5bc17241b9a14b78e18e4562e2a4c02e2b941fae0f1a896bbd795e49af136e\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50613712806100206000396000f3fe6080604052600436106103075760003560e060020a90048063853890ae11610194578063b87330e9116100e0578063deb9a3a211610099578063f700558711610073578063f7005587146108ff578063f862b7eb1461091f578063f8b744331461093f578063fd5d2ef31461095257600080fd5b8063deb9a3a214610892578063e31be087146108b2578063f33fe10f146108df57600080fd5b8063b87330e9146107e4578063ba8bbbe014610804578063baeebe751461081a578063cf3317d314610830578063d3b89f4914610850578063d547741f1461087257600080fd5b806391d148541161014d57806399b5bb641161012757806399b5bb6414610761578063a217fddf14610777578063a9b1cf0b1461078c578063b6d3385e146107ae57600080fd5b806391d148541461070b578063924cf6e01461072b57806396cf52271461074157600080fd5b8063853890ae1461066d57806386d7679e1461068d5780638ac1f86f146106a35780638e5df9c7146106b85780638ff550e8146106d857806391c5bc0a146106f857600080fd5b8063390d5388116102535780635249a7051161020c578063746b5c42116101e6578063746b5c421461060157806375b238fc146106165780637df8b802146106385780638456cb591461065857600080fd5b80635249a705146105a95780635a5f55bf146105c95780635c975abb146105e957600080fd5b8063390d5388146104e45780633928b296146105045780633f4ba83a1461052457806342180fb8146105395780634a1856de146105595780635119b0ef1461058957600080fd5b8063248a9ca3116102c05780632f2ff15d1161029a5780632f2ff15d1461044c578063304561bb1461046c578063331a891a146104a457806336568abe146104c457600080fd5b8063248a9ca3146103f0578063297c2677146104205780632bbba8471461043657600080fd5b806301ffc9a714610313578063044218231461034857806309fce356146103785780630d6680871461039a578063196f0f62146103b057806321d3d536146103d057600080fd5b3661030e57005b600080fd5b34801561031f57600080fd5b5061033361032e3660046130b1565b610972565b60405190151581526020015b60405180910390f35b34801561035457600080fd5b5061036a60008051602061367d83398151915281565b60405190815260200161033f565b34801561038457600080fd5b50610398610393366004612f9e565b610a05565b005b3480156103a657600080fd5b5061036a60d45481565b3480156103bc57600080fd5b506103986103cb366004613065565b610a31565b3480156103dc57600080fd5b506103986103eb366004612d7d565b610a7f565b3480156103fc57600080fd5b5061036a61040b366004613027565b60009081526065602052604090206001015490565b34801561042c57600080fd5b5061036a60d65481565b34801561044257600080fd5b5060ca5415610333565b34801561045857600080fd5b50610398610467366004613040565b610b1c565b34801561047857600080fd5b5060cf5461048c90600160a060020a031681565b604051600160a060020a03909116815260200161033f565b3480156104b057600080fd5b506103986104bf366004613027565b610b47565b3480156104d057600080fd5b506103986104df366004613040565b610c5e565b3480156104f057600080fd5b5060d05461048c90600160a060020a031681565b34801561051057600080fd5b5061039861051f366004612d7d565b610ce9565b34801561053057600080fd5b50610398610d25565b34801561054557600080fd5b50610398610554366004613027565b610d49565b34801561056557600080fd5b5061036a610574366004613027565b60cb6020526000908152604090206001015481565b34801561059557600080fd5b506103986105a436600461312c565b610d86565b3480156105b557600080fd5b506103986105c4366004612ece565b610e04565b3480156105d557600080fd5b506103986105e43660046130f0565b610e8d565b3480156105f557600080fd5b5060975460ff16610333565b34801561060d57600080fd5b50610398610f05565b34801561062257600080fd5b5061036a6000805160206136bd83398151915281565b34801561064457600080fd5b5060ce5461048c90600160a060020a031681565b34801561066457600080fd5b50610398610fb1565b34801561067957600080fd5b50610398610688366004612d9a565b610fd2565b34801561069957600080fd5b5061036a60d75481565b3480156106af57600080fd5b5061039861101a565b3480156106c457600080fd5b506103986106d3366004612d7d565b611172565b3480156106e457600080fd5b506103986106f3366004612f10565b6111b3565b610398610706366004612e67565b611284565b34801561071757600080fd5b50610333610726366004613040565b6115b4565b34801561073757600080fd5b5061036a60d25481565b34801561074d57600080fd5b5061039861075c366004613027565b6115df565b34801561076d57600080fd5b5061036a60d55481565b34801561078357600080fd5b5061036a600081565b34801561079857600080fd5b5061036a60008051602061365d83398151915281565b3480156107ba57600080fd5b5061048c6107c9366004612d7d565b60cd60205260009081526040902054600160a060020a031681565b3480156107f057600080fd5b506103986107ff366004612d7d565b6115fe565b34801561081057600080fd5b5061036a60cc5481565b34801561082657600080fd5b5061036a60d35481565b34801561083c57600080fd5b5061039861084b366004613027565b61163a565b34801561085c57600080fd5b5061036a60008051602061369d83398151915281565b34801561087e57600080fd5b5061039861088d366004613040565b6116b1565b34801561089e57600080fd5b506103986108ad366004613065565b6116d7565b3480156108be57600080fd5b506108d26108cd366004613027565b6116fe565b60405161033f91906133f7565b3480156108eb57600080fd5b5060d15461048c90600160a060020a031681565b34801561090b57600080fd5b5061039861091a366004613027565b6117ba565b34801561092b57600080fd5b5061039861093a366004613027565b6117d9565b61039861094d366004612dd3565b611a0c565b34801561095e57600080fd5b5061039861096d366004613027565b611e6c565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b0000000000000000000000000000000000000000000000000000000014806109ff57507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b6000805160206136bd833981519152610a1e8133611e8b565b610a2a85858585611ef2565b5050505050565b60005b81811015610a7957610a6784848484818110610a5257610a526135a8565b905060200201602081019061088d9190612d7d565b80610a7181613574565b915050610a34565b50505050565b6000805160206136bd833981519152610a988133611e8b565b60d154600160a060020a031615610af95760405160e560020a62461bcd02815260206004820152601d60248201527f736964654272696467654164647265737320616c72656164792073657400000060448201526064015b60405180910390fd5b5060d18054600160a060020a031916600160a060020a0392909216919091179055565b600082815260656020526040902060010154610b388133611e8b565b610b42838361200b565b505050565b6000805160206136bd833981519152610b608133611e8b565b60975460ff16610b855760405160e560020a62461bcd028152600401610af0906132cf565b60cc54821015610baa5760405160e560020a62461bcd028152600401610af09061339a565b60d554821115610bff5760405160e560020a62461bcd02815260206004820152601f60248201527f6576656e744964206d757374206265203c3d20696e7075744576656e744964006044820152606401610af0565b610c0a60018361351a565b60d5555b600082815260cb602052604090206001015415610c5a57600082815260cb6020526040812090610c3e8282612c9d565b5060006001919091015581610c5281613574565b925050610c0e565b5050565b600160a060020a0381163314610cdf5760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610af0565b610c5a8282612091565b6000805160206136bd833981519152610d028133611e8b565b5060d08054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206136bd833981519152610d3e8133611e8b565b610d466120f8565b50565b6000805160206136bd833981519152610d628133611e8b565b8160d35460d754610d7391906134fb565b610d7d91906134d6565b60d7555060d355565b60008051602061367d833981519152610d9f8133611e8b565b60975460ff1615610dc55760405160e560020a62461bcd028152600401610af090613306565b610dce84612167565b60405184907f196c47048e38df7a4fe6e581c8f4f2e2ba67ac0dd45b90da756e97bd61d9dd3b90600090a2610a798383866121cc565b6000805160206136bd833981519152610e1d8133611e8b565b8160005b81811015610a2a5760cd6000868684818110610e3f57610e3f6135a8565b9050602002016020810190610e549190612d7d565b600160a060020a0316815260208101919091526040016000208054600160a060020a031916905580610e8581613574565b915050610e21565b600054610100900460ff1680610ea6575060005460ff16155b610ec55760405160e560020a62461bcd028152600401610af09061333d565b600054610100900460ff16158015610ee7576000805461ffff19166101011790555b610ef08261225a565b8015610c5a576000805461ff00191690555050565b60ca54610f575760405160e560020a62461bcd02815260206004820152600e60248201527f517565756520697320656d7074790000000000000000000000000000000000006044820152606401610af0565b60d68054906000610f6783613574565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca604051610f9b919061322c565b60405180910390a2610faf60ca6000612c9d565b565b60008051602061365d833981519152610fca8133611e8b565b610d46612474565b6000805160206136bd833981519152610feb8133611e8b565b50600160a060020a03918216600090815260cd602052604090208054600160a060020a03191691909216179055565b60975460ff16156110405760405160e560020a62461bcd028152600401610af090613306565b60cc545b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156110d257600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611078565b50505050815260200160018201548152505090508060200151600014806110fc5750428160200151115b15611107575060cc55565b8051611112906124cf565b600082815260cb602052604081209061112b8282612c9d565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a2508061116a81613574565b915050611044565b6000805160206136bd83398151915261118b8133611e8b565b50600160a060020a0316600090815260cd602052604090208054600160a060020a0319169055565b3330146112055760405160e560020a62461bcd02815260206004820152601c60248201527f54686973206d6574686f642072657175697265206d756c7469736967000000006044820152606401610af0565b611210600033612763565b61122860008051602061367d833981519152826116b1565b61124160008051602061365d833981519152878761276d565b61125960008051602061369d83398151915285612763565b61127160008051602061367d83398151915284612763565b61127c6000836116b1565b505050505050565b60ce54600160a060020a03908116600090815260cd602052604090205416806112f25760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610af0565b6112fc82846134be565b341161134d5760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c7565203c3d206665650000000000000000000000000000006044820152606401610af0565b60008261135a853461351a565b611364919061351a565b60ce5490915061138190600160a060020a031687878787866127b5565b60cf54604051600160a060020a039091169085156108fc029086906000818181858888f193505050501580156113bb573d6000803e3d6000fd5b5060d054604051600160a060020a039091169084156108fc029085906000818181858888f193505050501580156113f6573d6000803e3d6000fd5b5060ce60009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0826040518263ffffffff1660e060020a0281526004016000604051808303818588803b15801561144a57600080fd5b505af115801561145e573d6000803e3d6000fd5b505060408051606081018252600160a060020a0380881682528c81166020830190815282840188815260ca80546001810182556000918252945160039095027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054968616600160a060020a031997881617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee2840180549190951695169490941790925590517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d65491513395507f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f444945061159b9350879087908b908b90958652600160a060020a0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b60405180910390a26115ab612949565b50505050505050565b6000918252606560209081526040808420600160a060020a0393909316845291905290205460ff1690565b6000805160206136bd8339815191526115f88133611e8b565b5060d455565b6000805160206136bd8339815191526116178133611e8b565b5060cf8054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206136bd8339815191526116538133611e8b565b60975460ff166116785760405160e560020a62461bcd028152600401610af0906132cf565b60cc5482101561169d5760405160e560020a62461bcd028152600401610af09061339a565b6116a860018361351a565b60d5555060cc55565b6000828152606560205260409020600101546116cd8133611e8b565b610b428383612091565b6000838152606560205260409020600101546116f38133611e8b565b610a7984848461276d565b604080518082019091526060815260006020820152600082815260cb60209081526040808320815181546060948102820185018452928101838152909491938593919285929185015b828210156117a157600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611747565b5050505081526020016001820154815250509050919050565b6000805160206136bd8339815191526117d38133611e8b565b5060c955565b60975460ff16156117ff5760405160e560020a62461bcd028152600401610af090613306565b60cc5481146118535760405160e560020a62461bcd02815260206004820152601c60248201527f63616e20756e6c6f636b206f6e6c79206f6c64657374206576656e74000000006044820152606401610af0565b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156118e157600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611887565b5050505081526020016001820154815250509050600081602001511161194c5760405160e560020a62461bcd02815260206004820181905260248201527f6e6f206c6f636b6564207472616e7366657273207769746820746869732069646044820152606401610af0565b428160200151106119a25760405160e560020a62461bcd02815260206004820152601b60248201527f6c6f636b54696d6520686173206e6f74207965742070617373656400000000006044820152606401610af0565b80516119ad906124cf565b600082815260cb60205260408120906119c68282612c9d565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a2611a058260016134be565b60cc555050565b60008515611aa1576000805260cd6020527fcd565b10a72538d86f6d352f37ebc5dff31587960b12c0afe00fd03947a6932a54600160a060020a038a8116911614611a9c5760405160e560020a62461bcd02815260206004820152601f60248201527f546f6b656e206e6f7420706f696e7420746f206e617469766520746f6b656e006044820152606401610af0565b611b0d565b50600160a060020a03808916600090815260cd60205260409020541680611b0d5760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610af0565b611b1782846134be565b3414611b685760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c756520213d206665650000000000000000000000000000006044820152606401610af0565b60008711611bbb5760405160e560020a62461bcd02815260206004820152601160248201527f43616e6e6f7420776974686472617720300000000000000000000000000000006044820152606401610af0565b611bc989868686868c6127b5565b60cf54604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611c03573d6000803e3d6000fd5b5060d054604051600160a060020a039091169083156108fc029084906000818181858888f19350505050158015611c3e573d6000803e3d6000fd5b506040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101889052600160a060020a038a16906323b872dd90606401602060405180830381600087803b158015611ca657600080fd5b505af1158015611cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cde919061300a565b611d2d5760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610af0565b6040805160608082018352600160a060020a038481168084528c821660208086019182528587018e815260ca8054600181018255600091909152965160039097027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054988716600160a060020a0319998a1617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee284018054918716919098161790965594517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d6548551908152918e16938201939093529283019190915281018890526080810184905260a0810183905233907f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f4449060c00160405180910390a2611e61612949565b505050505050505050565b6000805160206136bd833981519152611e858133611e8b565b5060d255565b611e9582826115b4565b610c5a57611ead81600160a060020a031660146129c1565b611eb88360206129c1565b604051602001611ec99291906131ab565b60408051601f198184030181529082905260e560020a62461bcd028252610af09160040161329c565b828114611f6a5760405160e560020a62461bcd02815260206004820152603f60248201527f73697a6573206f6620746f6b656e5468697341646472657373657320616e642060448201527f746f6b656e53696465416464726573736573206d7573742062652073616d65006064820152608401610af0565b8260005b8181101561127c57838382818110611f8857611f886135a8565b9050602002016020810190611f9d9190612d7d565b60cd6000888885818110611fb357611fb36135a8565b9050602002016020810190611fc89190612d7d565b600160a060020a03908116825260208201929092526040016000208054600160a060020a031916929091169190911790558061200381613574565b915050611f6e565b61201582826115b4565b610c5a576000828152606560209081526040808320600160a060020a03851684529091529020805460ff1916600117905561204d3390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61209b82826115b4565b15610c5a576000828152606560209081526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60975460ff1661211d5760405160e560020a62461bcd028152600401610af0906132cf565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051600160a060020a03909116815260200160405180910390a1565b60d56000815461217690613574565b91829055508114610d465760405160e560020a62461bcd02815260206004820152601460248201527f4576656e744964206f7574206f66206f726465720000000000000000000000006044820152606401610af0565b60d4546121d990426134be565b600082815260cb60205260408120600101919091555b82811015610a7957600082815260cb60205260409020848483818110612217576122176135a8565b83546001810185556000948552602090942060609091029290920192600302909101905061224582826135da565b5050808061225290613574565b9150506121ef565b600054610100900460ff1680612273575060005460ff16155b6122925760405160e560020a62461bcd028152600401610af09061333d565b600054610100900460ff161580156122b4576000805461ffff19166101011790555b6122bf600030612763565b6122d76000805160206136bd83398151915233612763565b6122fe60008051602061367d8339815191526122f96040850160208601612d7d565b612763565b61232260008051602061365d83398151915261231d6040850185613475565b61276d565b61234460008051602061369d8339815191526122f96080850160608601612d7d565b61236661235460a0840184613475565b61236160c0860186613475565b611ef2565b61237660a0830160808401612d7d565b60ce8054600160a060020a031916600160a060020a03929092169190911790556123a36020830183612d7d565b60d18054600160a060020a031916600160a060020a03929092169190911790556123d4610100830160e08401612d7d565b60cf8054600160a060020a031916600160a060020a039290921691909117905561240661012083016101008401612d7d565b60d08054600160a060020a031916600160a060020a039290921691909117905561016082013560d25561012082013560d381905561014083013560d455600160cc81905560d655600360c95561245c90426134d6565b60d7558015610c5a576000805461ff00191690555050565b60975460ff161561249a5760405160e560020a62461bcd028152600401610af090613306565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861214a3390565b60005b8151811015610c5a576000600160a060020a03168282815181106124f8576124f86135a8565b602002602001015160000151600160a060020a031614156126145760ce548251600160a060020a0390911690632e1a7d4d9084908490811061253c5761253c6135a8565b6020026020010151604001516040518263ffffffff1660e060020a02815260040161256991815260200190565b600060405180830381600087803b15801561258357600080fd5b505af1158015612597573d6000803e3d6000fd5b505050508181815181106125ad576125ad6135a8565b602002602001015160200151600160a060020a03166108fc8383815181106125d7576125d76135a8565b6020026020010151604001519081150290604051600060405180830381858888f1935050505015801561260e573d6000803e3d6000fd5b50612751565b818181518110612626576126266135a8565b602002602001015160000151600160a060020a031663a9059cbb838381518110612652576126526135a8565b602002602001015160200151848481518110612670576126706135a8565b6020026020010151604001516040518363ffffffff1660e060020a0281526004016126b0929190600160a060020a03929092168252602082015260400190565b602060405180830381600087803b1580156126ca57600080fd5b505af11580156126de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612702919061300a565b6127515760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610af0565b8061275b81613574565b9150506124d2565b610c5a828261200b565b60005b81811015610a79576127a38484848481811061278e5761278e6135a8565b90506020020160208101906122f99190612d7d565b806127ad81613574565b915050612770565b600080806127c5610708426134d6565b905060005b60c9548110156128fd576040516c01000000000000000000000000600160a060020a038c160260208201526034810183905260548101889052607481018790526094810186905260b40160408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c016040516020818303038152906040528051906020012093506128b5848a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c1292505050565b92506128cf60008051602061369d833981519152846115b4565b156128dd575050505061127c565b816128e78161355d565b92505080806128f590613574565b9150506127ca565b5060405160e560020a62461bcd02815260206004820152601660248201527f5369676e617475726520636865636b206661696c6564000000000000000000006044820152606401610af0565b600060d3544261295991906134d6565b905060d7548114610d465760d6805490600061297483613574565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca6040516129a8919061322c565b60405180910390a26129bc60ca6000612c9d565b60d755565b606060006129d08360026134fb565b6129db9060026134be565b67ffffffffffffffff8111156129f3576129f36135c1565b6040519080825280601f01601f191660200182016040528015612a1d576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612a5457612a546135a8565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612ab757612ab76135a8565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612af38460026134fb565b612afe9060016134be565b90505b6001811115612bb9577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612b3f57612b3f6135a8565b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110612b7457612b746135a8565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350601090940493612bb28161355d565b9050612b01565b508315612c0b5760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610af0565b9392505050565b6020810151604082015160608301516000929190831a601b811015612c3557601b015b60408051600081526020810180835288905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa158015612c88573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b5080546000825560030290600052602060002090810190610d4691905b80821115612cec578054600160a060020a03199081168255600182018054909116905560006002820155600301612cba565b5090565b60008083601f840112612d0257600080fd5b50813567ffffffffffffffff811115612d1a57600080fd5b6020830191508360208083028501011115612d3457600080fd5b9250929050565b60008083601f840112612d4d57600080fd5b50813567ffffffffffffffff811115612d6557600080fd5b602083019150836020828501011115612d3457600080fd5b600060208284031215612d8f57600080fd5b8135612c0b81613639565b60008060408385031215612dad57600080fd5b8235612db881613639565b91506020830135612dc881613639565b809150509250929050565b60008060008060008060008060e0898b031215612def57600080fd5b8835612dfa81613639565b97506020890135612e0a81613639565b9650604089013595506060890135612e218161364e565b9450608089013567ffffffffffffffff811115612e3d57600080fd5b612e498b828c01612d3b565b999c989b5096999598969760a08701359660c0013595509350505050565b600080600080600060808688031215612e7f57600080fd5b8535612e8a81613639565b9450602086013567ffffffffffffffff811115612ea657600080fd5b612eb288828901612d3b565b9699909850959660408101359660609091013595509350505050565b60008060208385031215612ee157600080fd5b823567ffffffffffffffff811115612ef857600080fd5b612f0485828601612cf0565b90969095509350505050565b60008060008060008060a08789031215612f2957600080fd5b863567ffffffffffffffff811115612f4057600080fd5b612f4c89828a01612cf0565b9097509550506020870135612f6081613639565b93506040870135612f7081613639565b92506060870135612f8081613639565b91506080870135612f9081613639565b809150509295509295509295565b60008060008060408587031215612fb457600080fd5b843567ffffffffffffffff80821115612fcc57600080fd5b612fd888838901612cf0565b90965094506020870135915080821115612ff157600080fd5b50612ffe87828801612cf0565b95989497509550505050565b60006020828403121561301c57600080fd5b8151612c0b8161364e565b60006020828403121561303957600080fd5b5035919050565b6000806040838503121561305357600080fd5b823591506020830135612dc881613639565b60008060006040848603121561307a57600080fd5b83359250602084013567ffffffffffffffff81111561309857600080fd5b6130a486828701612cf0565b9497909650939450505050565b6000602082840312156130c357600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1981168114612c0b57600080fd5b60006020828403121561310257600080fd5b813567ffffffffffffffff81111561311957600080fd5b82016101808185031215612c0b57600080fd5b60008060006040848603121561314157600080fd5b83359250602084013567ffffffffffffffff8082111561316057600080fd5b818601915086601f83011261317457600080fd5b81358181111561318357600080fd5b87602060608302850101111561319857600080fd5b6020830194508093505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516131e3816017850160208801613531565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613220816028840160208801613531565b01602801949350505050565b60006020808301818452808554808352604092508286019150866000528360002060005b8281101561328f578154600160a060020a0390811685526001808401549091168786015260028301548686015260609094019360039092019101613250565b5091979650505050505050565b60208152600082518060208401526132bb816040850160208701613531565b601f01601f19169190910160400192915050565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b60208082526026908201527f6576656e744964206d757374206265203e3d206f6c646573744c6f636b65644560408201527f76656e7449640000000000000000000000000000000000000000000000000000606082015260800190565b6000602080835260608084018551604080858801528282518085526080890191508684019450600093505b8084101561345f5784518051600160a060020a03908116845288820151168884015283015183830152938601936001939093019290850190613422565b5094909701519590960194909452509392505050565b6000808335601e1984360301811261348c57600080fd5b83018035915067ffffffffffffffff8211156134a757600080fd5b6020908101925081023603821315612d3457600080fd5b600082198211156134d1576134d161358f565b500190565b6000826134f65760e060020a634e487b7102600052601260045260246000fd5b500490565b60008160001904831182151516156135155761351561358f565b500290565b60008282101561352c5761352c61358f565b500390565b60005b8381101561354c578181015183820152602001613534565b83811115610a795750506000910152565b60008161356c5761356c61358f565b506000190190565b60006000198214156135885761358861358f565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fd5b81356135e581613639565b8154600160a060020a031916600160a060020a03821617825550602082013561360d81613639565b600182018054600160a060020a031916600160a060020a03831617905550604082013560028201555050565b600160a060020a0381168114610d4657600080fd5b8015158114610d4657600080fdfeb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887ea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220a6ed38c0f5f686e1a5d7a6a1d8d3ba2e90e3b9c62dba5bcb7b6fda84ed53e7df64736f6c63430008060033", + "deployedBytecode": "0x6080604052600436106103075760003560e060020a90048063853890ae11610194578063b87330e9116100e0578063deb9a3a211610099578063f700558711610073578063f7005587146108ff578063f862b7eb1461091f578063f8b744331461093f578063fd5d2ef31461095257600080fd5b8063deb9a3a214610892578063e31be087146108b2578063f33fe10f146108df57600080fd5b8063b87330e9146107e4578063ba8bbbe014610804578063baeebe751461081a578063cf3317d314610830578063d3b89f4914610850578063d547741f1461087257600080fd5b806391d148541161014d57806399b5bb641161012757806399b5bb6414610761578063a217fddf14610777578063a9b1cf0b1461078c578063b6d3385e146107ae57600080fd5b806391d148541461070b578063924cf6e01461072b57806396cf52271461074157600080fd5b8063853890ae1461066d57806386d7679e1461068d5780638ac1f86f146106a35780638e5df9c7146106b85780638ff550e8146106d857806391c5bc0a146106f857600080fd5b8063390d5388116102535780635249a7051161020c578063746b5c42116101e6578063746b5c421461060157806375b238fc146106165780637df8b802146106385780638456cb591461065857600080fd5b80635249a705146105a95780635a5f55bf146105c95780635c975abb146105e957600080fd5b8063390d5388146104e45780633928b296146105045780633f4ba83a1461052457806342180fb8146105395780634a1856de146105595780635119b0ef1461058957600080fd5b8063248a9ca3116102c05780632f2ff15d1161029a5780632f2ff15d1461044c578063304561bb1461046c578063331a891a146104a457806336568abe146104c457600080fd5b8063248a9ca3146103f0578063297c2677146104205780632bbba8471461043657600080fd5b806301ffc9a714610313578063044218231461034857806309fce356146103785780630d6680871461039a578063196f0f62146103b057806321d3d536146103d057600080fd5b3661030e57005b600080fd5b34801561031f57600080fd5b5061033361032e3660046130b1565b610972565b60405190151581526020015b60405180910390f35b34801561035457600080fd5b5061036a60008051602061367d83398151915281565b60405190815260200161033f565b34801561038457600080fd5b50610398610393366004612f9e565b610a05565b005b3480156103a657600080fd5b5061036a60d45481565b3480156103bc57600080fd5b506103986103cb366004613065565b610a31565b3480156103dc57600080fd5b506103986103eb366004612d7d565b610a7f565b3480156103fc57600080fd5b5061036a61040b366004613027565b60009081526065602052604090206001015490565b34801561042c57600080fd5b5061036a60d65481565b34801561044257600080fd5b5060ca5415610333565b34801561045857600080fd5b50610398610467366004613040565b610b1c565b34801561047857600080fd5b5060cf5461048c90600160a060020a031681565b604051600160a060020a03909116815260200161033f565b3480156104b057600080fd5b506103986104bf366004613027565b610b47565b3480156104d057600080fd5b506103986104df366004613040565b610c5e565b3480156104f057600080fd5b5060d05461048c90600160a060020a031681565b34801561051057600080fd5b5061039861051f366004612d7d565b610ce9565b34801561053057600080fd5b50610398610d25565b34801561054557600080fd5b50610398610554366004613027565b610d49565b34801561056557600080fd5b5061036a610574366004613027565b60cb6020526000908152604090206001015481565b34801561059557600080fd5b506103986105a436600461312c565b610d86565b3480156105b557600080fd5b506103986105c4366004612ece565b610e04565b3480156105d557600080fd5b506103986105e43660046130f0565b610e8d565b3480156105f557600080fd5b5060975460ff16610333565b34801561060d57600080fd5b50610398610f05565b34801561062257600080fd5b5061036a6000805160206136bd83398151915281565b34801561064457600080fd5b5060ce5461048c90600160a060020a031681565b34801561066457600080fd5b50610398610fb1565b34801561067957600080fd5b50610398610688366004612d9a565b610fd2565b34801561069957600080fd5b5061036a60d75481565b3480156106af57600080fd5b5061039861101a565b3480156106c457600080fd5b506103986106d3366004612d7d565b611172565b3480156106e457600080fd5b506103986106f3366004612f10565b6111b3565b610398610706366004612e67565b611284565b34801561071757600080fd5b50610333610726366004613040565b6115b4565b34801561073757600080fd5b5061036a60d25481565b34801561074d57600080fd5b5061039861075c366004613027565b6115df565b34801561076d57600080fd5b5061036a60d55481565b34801561078357600080fd5b5061036a600081565b34801561079857600080fd5b5061036a60008051602061365d83398151915281565b3480156107ba57600080fd5b5061048c6107c9366004612d7d565b60cd60205260009081526040902054600160a060020a031681565b3480156107f057600080fd5b506103986107ff366004612d7d565b6115fe565b34801561081057600080fd5b5061036a60cc5481565b34801561082657600080fd5b5061036a60d35481565b34801561083c57600080fd5b5061039861084b366004613027565b61163a565b34801561085c57600080fd5b5061036a60008051602061369d83398151915281565b34801561087e57600080fd5b5061039861088d366004613040565b6116b1565b34801561089e57600080fd5b506103986108ad366004613065565b6116d7565b3480156108be57600080fd5b506108d26108cd366004613027565b6116fe565b60405161033f91906133f7565b3480156108eb57600080fd5b5060d15461048c90600160a060020a031681565b34801561090b57600080fd5b5061039861091a366004613027565b6117ba565b34801561092b57600080fd5b5061039861093a366004613027565b6117d9565b61039861094d366004612dd3565b611a0c565b34801561095e57600080fd5b5061039861096d366004613027565b611e6c565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b0000000000000000000000000000000000000000000000000000000014806109ff57507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b6000805160206136bd833981519152610a1e8133611e8b565b610a2a85858585611ef2565b5050505050565b60005b81811015610a7957610a6784848484818110610a5257610a526135a8565b905060200201602081019061088d9190612d7d565b80610a7181613574565b915050610a34565b50505050565b6000805160206136bd833981519152610a988133611e8b565b60d154600160a060020a031615610af95760405160e560020a62461bcd02815260206004820152601d60248201527f736964654272696467654164647265737320616c72656164792073657400000060448201526064015b60405180910390fd5b5060d18054600160a060020a031916600160a060020a0392909216919091179055565b600082815260656020526040902060010154610b388133611e8b565b610b42838361200b565b505050565b6000805160206136bd833981519152610b608133611e8b565b60975460ff16610b855760405160e560020a62461bcd028152600401610af0906132cf565b60cc54821015610baa5760405160e560020a62461bcd028152600401610af09061339a565b60d554821115610bff5760405160e560020a62461bcd02815260206004820152601f60248201527f6576656e744964206d757374206265203c3d20696e7075744576656e744964006044820152606401610af0565b610c0a60018361351a565b60d5555b600082815260cb602052604090206001015415610c5a57600082815260cb6020526040812090610c3e8282612c9d565b5060006001919091015581610c5281613574565b925050610c0e565b5050565b600160a060020a0381163314610cdf5760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610af0565b610c5a8282612091565b6000805160206136bd833981519152610d028133611e8b565b5060d08054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206136bd833981519152610d3e8133611e8b565b610d466120f8565b50565b6000805160206136bd833981519152610d628133611e8b565b8160d35460d754610d7391906134fb565b610d7d91906134d6565b60d7555060d355565b60008051602061367d833981519152610d9f8133611e8b565b60975460ff1615610dc55760405160e560020a62461bcd028152600401610af090613306565b610dce84612167565b60405184907f196c47048e38df7a4fe6e581c8f4f2e2ba67ac0dd45b90da756e97bd61d9dd3b90600090a2610a798383866121cc565b6000805160206136bd833981519152610e1d8133611e8b565b8160005b81811015610a2a5760cd6000868684818110610e3f57610e3f6135a8565b9050602002016020810190610e549190612d7d565b600160a060020a0316815260208101919091526040016000208054600160a060020a031916905580610e8581613574565b915050610e21565b600054610100900460ff1680610ea6575060005460ff16155b610ec55760405160e560020a62461bcd028152600401610af09061333d565b600054610100900460ff16158015610ee7576000805461ffff19166101011790555b610ef08261225a565b8015610c5a576000805461ff00191690555050565b60ca54610f575760405160e560020a62461bcd02815260206004820152600e60248201527f517565756520697320656d7074790000000000000000000000000000000000006044820152606401610af0565b60d68054906000610f6783613574565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca604051610f9b919061322c565b60405180910390a2610faf60ca6000612c9d565b565b60008051602061365d833981519152610fca8133611e8b565b610d46612474565b6000805160206136bd833981519152610feb8133611e8b565b50600160a060020a03918216600090815260cd602052604090208054600160a060020a03191691909216179055565b60975460ff16156110405760405160e560020a62461bcd028152600401610af090613306565b60cc545b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156110d257600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611078565b50505050815260200160018201548152505090508060200151600014806110fc5750428160200151115b15611107575060cc55565b8051611112906124cf565b600082815260cb602052604081209061112b8282612c9d565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a2508061116a81613574565b915050611044565b6000805160206136bd83398151915261118b8133611e8b565b50600160a060020a0316600090815260cd602052604090208054600160a060020a0319169055565b3330146112055760405160e560020a62461bcd02815260206004820152601c60248201527f54686973206d6574686f642072657175697265206d756c7469736967000000006044820152606401610af0565b611210600033612763565b61122860008051602061367d833981519152826116b1565b61124160008051602061365d833981519152878761276d565b61125960008051602061369d83398151915285612763565b61127160008051602061367d83398151915284612763565b61127c6000836116b1565b505050505050565b60ce54600160a060020a03908116600090815260cd602052604090205416806112f25760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610af0565b6112fc82846134be565b341161134d5760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c7565203c3d206665650000000000000000000000000000006044820152606401610af0565b60008261135a853461351a565b611364919061351a565b60ce5490915061138190600160a060020a031687878787866127b5565b60cf54604051600160a060020a039091169085156108fc029086906000818181858888f193505050501580156113bb573d6000803e3d6000fd5b5060d054604051600160a060020a039091169084156108fc029085906000818181858888f193505050501580156113f6573d6000803e3d6000fd5b5060ce60009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0826040518263ffffffff1660e060020a0281526004016000604051808303818588803b15801561144a57600080fd5b505af115801561145e573d6000803e3d6000fd5b505060408051606081018252600160a060020a0380881682528c81166020830190815282840188815260ca80546001810182556000918252945160039095027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054968616600160a060020a031997881617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee2840180549190951695169490941790925590517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d65491513395507f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f444945061159b9350879087908b908b90958652600160a060020a0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b60405180910390a26115ab612949565b50505050505050565b6000918252606560209081526040808420600160a060020a0393909316845291905290205460ff1690565b6000805160206136bd8339815191526115f88133611e8b565b5060d455565b6000805160206136bd8339815191526116178133611e8b565b5060cf8054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206136bd8339815191526116538133611e8b565b60975460ff166116785760405160e560020a62461bcd028152600401610af0906132cf565b60cc5482101561169d5760405160e560020a62461bcd028152600401610af09061339a565b6116a860018361351a565b60d5555060cc55565b6000828152606560205260409020600101546116cd8133611e8b565b610b428383612091565b6000838152606560205260409020600101546116f38133611e8b565b610a7984848461276d565b604080518082019091526060815260006020820152600082815260cb60209081526040808320815181546060948102820185018452928101838152909491938593919285929185015b828210156117a157600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611747565b5050505081526020016001820154815250509050919050565b6000805160206136bd8339815191526117d38133611e8b565b5060c955565b60975460ff16156117ff5760405160e560020a62461bcd028152600401610af090613306565b60cc5481146118535760405160e560020a62461bcd02815260206004820152601c60248201527f63616e20756e6c6f636b206f6e6c79206f6c64657374206576656e74000000006044820152606401610af0565b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156118e157600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611887565b5050505081526020016001820154815250509050600081602001511161194c5760405160e560020a62461bcd02815260206004820181905260248201527f6e6f206c6f636b6564207472616e7366657273207769746820746869732069646044820152606401610af0565b428160200151106119a25760405160e560020a62461bcd02815260206004820152601b60248201527f6c6f636b54696d6520686173206e6f74207965742070617373656400000000006044820152606401610af0565b80516119ad906124cf565b600082815260cb60205260408120906119c68282612c9d565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a2611a058260016134be565b60cc555050565b60008515611aa1576000805260cd6020527fcd565b10a72538d86f6d352f37ebc5dff31587960b12c0afe00fd03947a6932a54600160a060020a038a8116911614611a9c5760405160e560020a62461bcd02815260206004820152601f60248201527f546f6b656e206e6f7420706f696e7420746f206e617469766520746f6b656e006044820152606401610af0565b611b0d565b50600160a060020a03808916600090815260cd60205260409020541680611b0d5760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610af0565b611b1782846134be565b3414611b685760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c756520213d206665650000000000000000000000000000006044820152606401610af0565b60008711611bbb5760405160e560020a62461bcd02815260206004820152601160248201527f43616e6e6f7420776974686472617720300000000000000000000000000000006044820152606401610af0565b611bc989868686868c6127b5565b60cf54604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611c03573d6000803e3d6000fd5b5060d054604051600160a060020a039091169083156108fc029084906000818181858888f19350505050158015611c3e573d6000803e3d6000fd5b506040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101889052600160a060020a038a16906323b872dd90606401602060405180830381600087803b158015611ca657600080fd5b505af1158015611cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cde919061300a565b611d2d5760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610af0565b6040805160608082018352600160a060020a038481168084528c821660208086019182528587018e815260ca8054600181018255600091909152965160039097027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054988716600160a060020a0319998a1617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee284018054918716919098161790965594517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d6548551908152918e16938201939093529283019190915281018890526080810184905260a0810183905233907f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f4449060c00160405180910390a2611e61612949565b505050505050505050565b6000805160206136bd833981519152611e858133611e8b565b5060d255565b611e9582826115b4565b610c5a57611ead81600160a060020a031660146129c1565b611eb88360206129c1565b604051602001611ec99291906131ab565b60408051601f198184030181529082905260e560020a62461bcd028252610af09160040161329c565b828114611f6a5760405160e560020a62461bcd02815260206004820152603f60248201527f73697a6573206f6620746f6b656e5468697341646472657373657320616e642060448201527f746f6b656e53696465416464726573736573206d7573742062652073616d65006064820152608401610af0565b8260005b8181101561127c57838382818110611f8857611f886135a8565b9050602002016020810190611f9d9190612d7d565b60cd6000888885818110611fb357611fb36135a8565b9050602002016020810190611fc89190612d7d565b600160a060020a03908116825260208201929092526040016000208054600160a060020a031916929091169190911790558061200381613574565b915050611f6e565b61201582826115b4565b610c5a576000828152606560209081526040808320600160a060020a03851684529091529020805460ff1916600117905561204d3390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61209b82826115b4565b15610c5a576000828152606560209081526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60975460ff1661211d5760405160e560020a62461bcd028152600401610af0906132cf565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051600160a060020a03909116815260200160405180910390a1565b60d56000815461217690613574565b91829055508114610d465760405160e560020a62461bcd02815260206004820152601460248201527f4576656e744964206f7574206f66206f726465720000000000000000000000006044820152606401610af0565b60d4546121d990426134be565b600082815260cb60205260408120600101919091555b82811015610a7957600082815260cb60205260409020848483818110612217576122176135a8565b83546001810185556000948552602090942060609091029290920192600302909101905061224582826135da565b5050808061225290613574565b9150506121ef565b600054610100900460ff1680612273575060005460ff16155b6122925760405160e560020a62461bcd028152600401610af09061333d565b600054610100900460ff161580156122b4576000805461ffff19166101011790555b6122bf600030612763565b6122d76000805160206136bd83398151915233612763565b6122fe60008051602061367d8339815191526122f96040850160208601612d7d565b612763565b61232260008051602061365d83398151915261231d6040850185613475565b61276d565b61234460008051602061369d8339815191526122f96080850160608601612d7d565b61236661235460a0840184613475565b61236160c0860186613475565b611ef2565b61237660a0830160808401612d7d565b60ce8054600160a060020a031916600160a060020a03929092169190911790556123a36020830183612d7d565b60d18054600160a060020a031916600160a060020a03929092169190911790556123d4610100830160e08401612d7d565b60cf8054600160a060020a031916600160a060020a039290921691909117905561240661012083016101008401612d7d565b60d08054600160a060020a031916600160a060020a039290921691909117905561016082013560d25561012082013560d381905561014083013560d455600160cc81905560d655600360c95561245c90426134d6565b60d7558015610c5a576000805461ff00191690555050565b60975460ff161561249a5760405160e560020a62461bcd028152600401610af090613306565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861214a3390565b60005b8151811015610c5a576000600160a060020a03168282815181106124f8576124f86135a8565b602002602001015160000151600160a060020a031614156126145760ce548251600160a060020a0390911690632e1a7d4d9084908490811061253c5761253c6135a8565b6020026020010151604001516040518263ffffffff1660e060020a02815260040161256991815260200190565b600060405180830381600087803b15801561258357600080fd5b505af1158015612597573d6000803e3d6000fd5b505050508181815181106125ad576125ad6135a8565b602002602001015160200151600160a060020a03166108fc8383815181106125d7576125d76135a8565b6020026020010151604001519081150290604051600060405180830381858888f1935050505015801561260e573d6000803e3d6000fd5b50612751565b818181518110612626576126266135a8565b602002602001015160000151600160a060020a031663a9059cbb838381518110612652576126526135a8565b602002602001015160200151848481518110612670576126706135a8565b6020026020010151604001516040518363ffffffff1660e060020a0281526004016126b0929190600160a060020a03929092168252602082015260400190565b602060405180830381600087803b1580156126ca57600080fd5b505af11580156126de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612702919061300a565b6127515760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610af0565b8061275b81613574565b9150506124d2565b610c5a828261200b565b60005b81811015610a79576127a38484848481811061278e5761278e6135a8565b90506020020160208101906122f99190612d7d565b806127ad81613574565b915050612770565b600080806127c5610708426134d6565b905060005b60c9548110156128fd576040516c01000000000000000000000000600160a060020a038c160260208201526034810183905260548101889052607481018790526094810186905260b40160408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c016040516020818303038152906040528051906020012093506128b5848a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c1292505050565b92506128cf60008051602061369d833981519152846115b4565b156128dd575050505061127c565b816128e78161355d565b92505080806128f590613574565b9150506127ca565b5060405160e560020a62461bcd02815260206004820152601660248201527f5369676e617475726520636865636b206661696c6564000000000000000000006044820152606401610af0565b600060d3544261295991906134d6565b905060d7548114610d465760d6805490600061297483613574565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca6040516129a8919061322c565b60405180910390a26129bc60ca6000612c9d565b60d755565b606060006129d08360026134fb565b6129db9060026134be565b67ffffffffffffffff8111156129f3576129f36135c1565b6040519080825280601f01601f191660200182016040528015612a1d576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612a5457612a546135a8565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612ab757612ab76135a8565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612af38460026134fb565b612afe9060016134be565b90505b6001811115612bb9577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612b3f57612b3f6135a8565b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110612b7457612b746135a8565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350601090940493612bb28161355d565b9050612b01565b508315612c0b5760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610af0565b9392505050565b6020810151604082015160608301516000929190831a601b811015612c3557601b015b60408051600081526020810180835288905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa158015612c88573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b5080546000825560030290600052602060002090810190610d4691905b80821115612cec578054600160a060020a03199081168255600182018054909116905560006002820155600301612cba565b5090565b60008083601f840112612d0257600080fd5b50813567ffffffffffffffff811115612d1a57600080fd5b6020830191508360208083028501011115612d3457600080fd5b9250929050565b60008083601f840112612d4d57600080fd5b50813567ffffffffffffffff811115612d6557600080fd5b602083019150836020828501011115612d3457600080fd5b600060208284031215612d8f57600080fd5b8135612c0b81613639565b60008060408385031215612dad57600080fd5b8235612db881613639565b91506020830135612dc881613639565b809150509250929050565b60008060008060008060008060e0898b031215612def57600080fd5b8835612dfa81613639565b97506020890135612e0a81613639565b9650604089013595506060890135612e218161364e565b9450608089013567ffffffffffffffff811115612e3d57600080fd5b612e498b828c01612d3b565b999c989b5096999598969760a08701359660c0013595509350505050565b600080600080600060808688031215612e7f57600080fd5b8535612e8a81613639565b9450602086013567ffffffffffffffff811115612ea657600080fd5b612eb288828901612d3b565b9699909850959660408101359660609091013595509350505050565b60008060208385031215612ee157600080fd5b823567ffffffffffffffff811115612ef857600080fd5b612f0485828601612cf0565b90969095509350505050565b60008060008060008060a08789031215612f2957600080fd5b863567ffffffffffffffff811115612f4057600080fd5b612f4c89828a01612cf0565b9097509550506020870135612f6081613639565b93506040870135612f7081613639565b92506060870135612f8081613639565b91506080870135612f9081613639565b809150509295509295509295565b60008060008060408587031215612fb457600080fd5b843567ffffffffffffffff80821115612fcc57600080fd5b612fd888838901612cf0565b90965094506020870135915080821115612ff157600080fd5b50612ffe87828801612cf0565b95989497509550505050565b60006020828403121561301c57600080fd5b8151612c0b8161364e565b60006020828403121561303957600080fd5b5035919050565b6000806040838503121561305357600080fd5b823591506020830135612dc881613639565b60008060006040848603121561307a57600080fd5b83359250602084013567ffffffffffffffff81111561309857600080fd5b6130a486828701612cf0565b9497909650939450505050565b6000602082840312156130c357600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1981168114612c0b57600080fd5b60006020828403121561310257600080fd5b813567ffffffffffffffff81111561311957600080fd5b82016101808185031215612c0b57600080fd5b60008060006040848603121561314157600080fd5b83359250602084013567ffffffffffffffff8082111561316057600080fd5b818601915086601f83011261317457600080fd5b81358181111561318357600080fd5b87602060608302850101111561319857600080fd5b6020830194508093505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516131e3816017850160208801613531565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613220816028840160208801613531565b01602801949350505050565b60006020808301818452808554808352604092508286019150866000528360002060005b8281101561328f578154600160a060020a0390811685526001808401549091168786015260028301548686015260609094019360039092019101613250565b5091979650505050505050565b60208152600082518060208401526132bb816040850160208701613531565b601f01601f19169190910160400192915050565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b60208082526026908201527f6576656e744964206d757374206265203e3d206f6c646573744c6f636b65644560408201527f76656e7449640000000000000000000000000000000000000000000000000000606082015260800190565b6000602080835260608084018551604080858801528282518085526080890191508684019450600093505b8084101561345f5784518051600160a060020a03908116845288820151168884015283015183830152938601936001939093019290850190613422565b5094909701519590960194909452509392505050565b6000808335601e1984360301811261348c57600080fd5b83018035915067ffffffffffffffff8211156134a757600080fd5b6020908101925081023603821315612d3457600080fd5b600082198211156134d1576134d161358f565b500190565b6000826134f65760e060020a634e487b7102600052601260045260246000fd5b500490565b60008160001904831182151516156135155761351561358f565b500290565b60008282101561352c5761352c61358f565b500390565b60005b8381101561354c578181015183820152602001613534565b83811115610a795750506000910152565b60008161356c5761356c61358f565b506000190190565b60006000198214156135885761358861358f565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fd5b81356135e581613639565b8154600160a060020a031916600160a060020a03821617825550602082013561360d81613639565b600182018054600160a060020a031916600160a060020a03831617905550604082013560028201555050565b600160a060020a0381168114610d4657600080fd5b8015158114610d4657600080fdfeb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887ea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220a6ed38c0f5f686e1a5d7a6a1d8d3ba2e90e3b9c62dba5bcb7b6fda84ed53e7df64736f6c63430008060033", "devdoc": { "kind": "dev", "methods": { @@ -1250,7 +1260,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 6726, + "astId": 2748, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "signatureFeeCheckNumber", "offset": 0, @@ -1258,23 +1268,23 @@ "type": "t_uint256" }, { - "astId": 6730, + "astId": 2752, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "queue", "offset": 0, "slot": "202", - "type": "t_array(t_struct(Transfer)7932_storage)dyn_storage" + "type": "t_array(t_struct(Transfer)3954_storage)dyn_storage" }, { - "astId": 6735, + "astId": 2757, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "lockedTransfers", "offset": 0, "slot": "203", - "type": "t_mapping(t_uint256,t_struct(LockedTransfers)7949_storage)" + "type": "t_mapping(t_uint256,t_struct(LockedTransfers)3971_storage)" }, { - "astId": 6737, + "astId": 2759, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "oldestLockedEventId", "offset": 0, @@ -1282,7 +1292,7 @@ "type": "t_uint256" }, { - "astId": 6741, + "astId": 2763, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "tokenAddresses", "offset": 0, @@ -1290,7 +1300,7 @@ "type": "t_mapping(t_address,t_address)" }, { - "astId": 6743, + "astId": 2765, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "wrapperAddress", "offset": 0, @@ -1298,7 +1308,7 @@ "type": "t_address" }, { - "astId": 6745, + "astId": 2767, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "transferFeeRecipient", "offset": 0, @@ -1306,7 +1316,7 @@ "type": "t_address_payable" }, { - "astId": 6747, + "astId": 2769, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "bridgeFeeRecipient", "offset": 0, @@ -1314,7 +1324,7 @@ "type": "t_address_payable" }, { - "astId": 6749, + "astId": 2771, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "sideBridgeAddress", "offset": 0, @@ -1322,7 +1332,7 @@ "type": "t_address" }, { - "astId": 6751, + "astId": 2773, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "minSafetyBlocks", "offset": 0, @@ -1330,7 +1340,7 @@ "type": "t_uint256" }, { - "astId": 6753, + "astId": 2775, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "timeframeSeconds", "offset": 0, @@ -1338,7 +1348,7 @@ "type": "t_uint256" }, { - "astId": 6755, + "astId": 2777, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "lockTime", "offset": 0, @@ -1346,7 +1356,7 @@ "type": "t_uint256" }, { - "astId": 6757, + "astId": 2779, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "inputEventId", "offset": 0, @@ -1354,7 +1364,7 @@ "type": "t_uint256" }, { - "astId": 6759, + "astId": 2781, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "outputEventId", "offset": 0, @@ -1362,7 +1372,7 @@ "type": "t_uint256" }, { - "astId": 6761, + "astId": 2783, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "lastTimeframe", "offset": 0, @@ -1370,7 +1380,7 @@ "type": "t_uint256" }, { - "astId": 7922, + "astId": 3944, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "__gap", "offset": 0, @@ -1378,7 +1388,7 @@ "type": "t_array(t_uint256)15_storage" }, { - "astId": 6656, + "astId": 2678, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "___gap", "offset": 0, @@ -1397,8 +1407,8 @@ "label": "address payable", "numberOfBytes": "20" }, - "t_array(t_struct(Transfer)7932_storage)dyn_storage": { - "base": "t_struct(Transfer)7932_storage", + "t_array(t_struct(Transfer)3954_storage)dyn_storage": { + "base": "t_struct(Transfer)3954_storage", "encoding": "dynamic_array", "label": "struct CommonStructs.Transfer[]", "numberOfBytes": "32" @@ -1452,27 +1462,27 @@ "numberOfBytes": "32", "value": "t_struct(RoleData)43_storage" }, - "t_mapping(t_uint256,t_struct(LockedTransfers)7949_storage)": { + "t_mapping(t_uint256,t_struct(LockedTransfers)3971_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct CommonStructs.LockedTransfers)", "numberOfBytes": "32", - "value": "t_struct(LockedTransfers)7949_storage" + "value": "t_struct(LockedTransfers)3971_storage" }, - "t_struct(LockedTransfers)7949_storage": { + "t_struct(LockedTransfers)3971_storage": { "encoding": "inplace", "label": "struct CommonStructs.LockedTransfers", "members": [ { - "astId": 7946, + "astId": 3968, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "transfers", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Transfer)7932_storage)dyn_storage" + "type": "t_array(t_struct(Transfer)3954_storage)dyn_storage" }, { - "astId": 7948, + "astId": 3970, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "endTimestamp", "offset": 0, @@ -1505,12 +1515,12 @@ ], "numberOfBytes": "64" }, - "t_struct(Transfer)7932_storage": { + "t_struct(Transfer)3954_storage": { "encoding": "inplace", "label": "struct CommonStructs.Transfer", "members": [ { - "astId": 7927, + "astId": 3949, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "tokenAddress", "offset": 0, @@ -1518,7 +1528,7 @@ "type": "t_address" }, { - "astId": 7929, + "astId": 3951, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "toAddress", "offset": 0, @@ -1526,7 +1536,7 @@ "type": "t_address" }, { - "astId": 7931, + "astId": 3953, "contract": "contracts/networks/ETH_AmbBridge.sol:ETH_AmbBridge", "label": "amount", "offset": 0, diff --git a/contracts/deployments/test/amb/ETH_AmbBridge_Proxy.json b/contracts/deployments/test/amb/ETH_AmbBridge_Proxy.json index d62314e2..1c217212 100644 --- a/contracts/deployments/test/amb/ETH_AmbBridge_Proxy.json +++ b/contracts/deployments/test/amb/ETH_AmbBridge_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "abi": [ { "inputs": [ @@ -615,116 +615,121 @@ "type": "receive" } ], - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "contractAddress": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "transactionIndex": 0, - "gasUsed": "2937560", - "logsBloom": "0x00000004000000000000002000000000400000000000000000000000000000000000000000000000800000000000000000000000000800000000000000000000000000000000000000000002000002000000000160000000000000000000000000000040020000000000000000000800000000000000000800000000000000000000002000000000000000000000004000000000000000020000000000000000000620000000000000040000000000000000000000000000001000000000000000000020400000000400000000000000000000000000000300000000000020000000000000000000000000000000004000000000000000004000000000000000", - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de", - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", + "gasUsed": "2897200", + "logsBloom": "0x00000004000000040000002000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000200000000000002000000100020000000000000001000000000000004020000400000000000000800000000000000000800001000000000000000002000000000000000000000004000000000000000020000000800000000000120000000000000041000000000000000000000000000001000000000000000000020400000000200000000000000000000000000000100000000000020000000000000000000000000000000000000000080800000000000000020000000", + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837", + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", "logs": [ { "transactionIndex": 0, - "blockNumber": 1406757, - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "blockNumber": 34019, + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000002de5fc9ff4ad9ccf10fab6ddcb9672c1f87210fb" + "0x000000000000000000000000689020fd1aa4e064bdf9c6d1d19f0cf378b19753" ], "data": "0x", "logIndex": 0, - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de" + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837" }, { "transactionIndex": 0, - "blockNumber": 1406757, - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "blockNumber": 34019, + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000b08cfc95eea0f1d9bb79002d23fa204b8836a536", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 1, - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de" + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837" }, { "transactionIndex": 0, - "blockNumber": 1406757, - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "blockNumber": 34019, + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 2, - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de" + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837" }, { "transactionIndex": 0, - "blockNumber": 1406757, - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "blockNumber": 34019, + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 3, - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de" + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837" }, { "transactionIndex": 0, - "blockNumber": 1406757, - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "blockNumber": 34019, + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "topics": [ - "0x7b73cb1bdb35a4aa024a40092050eb3e988b8591cc448e46634cf380f8f1255d", + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 4, - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de" + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837" }, { "transactionIndex": 0, - "blockNumber": 1406757, - "transactionHash": "0xf178f6c68523b08d7cd88afe0ccc3d7c505cb755ee19c5a5a20f16cb42905b42", - "address": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "blockNumber": 34019, + "transactionHash": "0xd2f4c9c6d012b5853da1d48ff1e7aeec6554971e0da43b402891d8f3204f1c22", + "address": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "topics": [ - "0x6d209fce46041fa384c715150b59ebd0bf9e74509fc58c21b73b490f4ff2bbec" + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "data": "0x", "logIndex": 5, - "blockHash": "0x3b7376748b42abf555e4daaab67ed38e0a8bec7f35455e1de9d269b5804398de" + "blockHash": "0x548a2e26a1d96e3451803588678262724be03f8a92935f0f81f5a87623e6f837" } ], - "blockNumber": 1406757, - "cumulativeGasUsed": "2937560", + "blockNumber": 34019, + "cumulativeGasUsed": "2897200", "status": 1, "byzantium": true }, "args": [ - "0x2de5fC9fF4AD9ccf10fAb6dDCb9672c1F87210Fb", - "0xf3ee20800000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000da9bb33f9e3334781f3e4fce310288d7db3ed29a00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000da9bb33f9e3334781f3e4fce310288d7db3ed29a000000000000000000000000075de66d19ca867387c75c880cffddba9a3e9763000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056a79d39fc414ff11ebb30d6a5367ea5da8c6fe90000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fc277855999cf6452f9027bbdc1b56264a736e3a000000000000000000000000d67a7ce611c1b33a549712c0fcbfe8436a917b71000000000000000000000000075de66d19ca867387c75c880cffddba9a3e97630000000000000000000000001d335e8b7787fb6c51f98713df5bcb56884fd0230000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x689020fd1aa4e064bdf9c6D1d19F0Cf378b19753", + "0x5a5f55bf00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000000000000000000000000000000000000000000180000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000007cee2ae3042d2c646aa24facfa92dfee589046f000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000240000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e00000000000000000000000000000000000000000000000000000000000000030000000000000000000000007cee2ae3042d2c646aa24facfa92dfee589046f0000000000000000000000000952b98dbda3319bf0e339cc9cc574ff768f80f3c0000000000000000000000001bb13b68dba3571415b4092802777b5ca15de89700000000000000000000000000000000000000000000000000000000000000030000000000000000000000009ba7ef7e1c6c5ef4fe7e2a32d4527497d6b12ff2000000000000000000000000b841c5707da4b43ed915b707158010bd2faf3b4600000000000000000000000005875578a63c7e26245c7cba3cf460ff6a613c6b", [ "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" ], 1 ], "numDeployments": 1, - "solcInputHash": "63b1c355e88e8fd19ebe2cd692a8475b", + "solcInputHash": "54d2ddebdc6c37a1b4fd5c90d287707b", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Confirmation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Execution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"ExecutionFailure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerAddition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerRemoval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"required\",\"type\":\"uint256\"}],\"name\":\"RequirementChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Revocation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Submission\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"MAX_OWNER_COUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"_upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"name\":\"changeRequirement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"confirmTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"confirmations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmationCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmations\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"_confirmations\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"to\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_transactionIds\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"isConfirmed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"owners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"replaceOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"required\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"revokeConfirmation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"submitTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addOwner(address)\":{\"details\":\"Allows to add a new owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of new owner.\"}},\"changeRequirement(uint256)\":{\"details\":\"Allows to change the number of required confirmations. Transaction has to be sent by wallet.\",\"params\":{\"_required\":\"Number of required confirmations.\"}},\"confirmTransaction(uint256)\":{\"details\":\"Allows an owner to confirm a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"executeTransaction(uint256)\":{\"details\":\"Allows anyone to execute a confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"getConfirmationCount(uint256)\":{\"details\":\"Returns number of confirmations of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"count\":\"Number of confirmations.\"}},\"getConfirmations(uint256)\":{\"details\":\"Returns array with owner addresses, which confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_confirmations\":\"Returns array of owner addresses.\"}},\"getOwners()\":{\"details\":\"Returns list of owners.\",\"returns\":{\"_0\":\"List of owner addresses.\"}},\"getTransactionCount(bool,bool)\":{\"details\":\"Returns total number of transactions after filers are applied.\",\"params\":{\"executed\":\"Include executed transactions.\",\"pending\":\"Include pending transactions.\"},\"returns\":{\"count\":\"Total number of transactions after filters are applied.\"}},\"getTransactionIds(uint256,uint256,bool,bool)\":{\"details\":\"Returns list of transaction IDs in defined range.\",\"params\":{\"executed\":\"Include executed transactions.\",\"from\":\"Index start position of transaction array.\",\"pending\":\"Include pending transactions.\",\"to\":\"Index end position of transaction array.\"},\"returns\":{\"_transactionIds\":\"Returns array of transaction IDs.\"}},\"isConfirmed(uint256)\":{\"details\":\"Returns the confirmation status of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_0\":\"Confirmation status.\"}},\"removeOwner(address)\":{\"details\":\"Allows to remove an owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of owner.\"}},\"replaceOwner(address,address)\":{\"details\":\"Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\",\"params\":{\"newOwner\":\"Address of new owner.\",\"owner\":\"Address of owner to be replaced.\"}},\"revokeConfirmation(uint256)\":{\"details\":\"Allows an owner to revoke a confirmation for a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"submitTransaction(address,uint256,bytes)\":{\"details\":\"Allows an owner to submit and confirm a transaction.\",\"params\":{\"data\":\"Transaction data payload.\",\"destination\":\"Transaction target address.\",\"value\":\"Transaction ether value.\"},\"returns\":{\"transactionId\":\"Returns transaction ID.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/utils/Proxy.sol\":\"ProxyMultiSig\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \\\"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(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) 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 require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/utils/MultiSigWallet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\n\\ncontract MultiSigWallet {\\n\\n /*\\n * Events\\n */\\n event Confirmation(address indexed sender, uint indexed transactionId);\\n event Revocation(address indexed sender, uint indexed transactionId);\\n event Submission(uint indexed transactionId);\\n event Execution(uint indexed transactionId);\\n event ExecutionFailure(uint indexed transactionId);\\n event OwnerAddition(address indexed owner);\\n event OwnerRemoval(address indexed owner);\\n event RequirementChange(uint required);\\n\\n /*\\n * Constants\\n */\\n uint constant public MAX_OWNER_COUNT = 50;\\n\\n /*\\n * Storage\\n */\\n mapping(uint => Transaction) public transactions;\\n mapping(uint => mapping(address => bool)) public confirmations;\\n mapping(address => bool) public isOwner;\\n address[] public owners;\\n uint public required;\\n uint public transactionCount;\\n\\n struct Transaction {\\n address destination;\\n uint value;\\n bytes data;\\n bool executed;\\n }\\n\\n /*\\n * Modifiers\\n */\\n modifier onlyWallet() {\\n require(msg.sender == address(this));\\n _;\\n }\\n\\n modifier ownerDoesNotExist(address owner) {\\n require(!isOwner[owner]);\\n _;\\n }\\n\\n modifier ownerExists(address owner) {\\n require(isOwner[owner]);\\n _;\\n }\\n\\n modifier transactionExists(uint transactionId) {\\n require(transactions[transactionId].destination != address(0));\\n _;\\n }\\n\\n modifier confirmed(uint transactionId, address owner) {\\n require(confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notConfirmed(uint transactionId, address owner) {\\n require(!confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notExecuted(uint transactionId) {\\n require(!transactions[transactionId].executed);\\n _;\\n }\\n\\n modifier notNull(address _address) {\\n require(_address != address(0));\\n _;\\n }\\n\\n modifier validRequirement(uint ownerCount, uint _required) {\\n require(ownerCount <= MAX_OWNER_COUNT\\n && _required <= ownerCount\\n && _required != 0\\n && ownerCount != 0);\\n _;\\n }\\n\\n /*\\n * Public functions\\n */\\n /// @dev Contract constructor sets initial owners and required number of confirmations.\\n /// @param _owners List of initial owners.\\n /// @param _required Number of required confirmations.\\n constructor(address[] memory _owners, uint _required)\\n validRequirement(_owners.length, _required)\\n {\\n for (uint i = 0; i < _owners.length; i++) {\\n require(!isOwner[_owners[i]] && _owners[i] != address(0));\\n isOwner[_owners[i]] = true;\\n }\\n owners = _owners;\\n required = _required;\\n }\\n\\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of new owner.\\n function addOwner(address owner)\\n public\\n onlyWallet\\n ownerDoesNotExist(owner)\\n notNull(owner)\\n validRequirement(owners.length + 1, required)\\n {\\n isOwner[owner] = true;\\n owners.push(owner);\\n emit OwnerAddition(owner);\\n }\\n\\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner.\\n function removeOwner(address owner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n {\\n isOwner[owner] = false;\\n for (uint i = 0; i < owners.length - 1; i++)\\n if (owners[i] == owner) {\\n owners[i] = owners[owners.length - 1];\\n break;\\n }\\n owners.pop();\\n if (required > owners.length)\\n changeRequirement(owners.length);\\n emit OwnerRemoval(owner);\\n }\\n\\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner to be replaced.\\n /// @param newOwner Address of new owner.\\n function replaceOwner(address owner, address newOwner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n ownerDoesNotExist(newOwner)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (owners[i] == owner) {\\n owners[i] = newOwner;\\n break;\\n }\\n isOwner[owner] = false;\\n isOwner[newOwner] = true;\\n emit OwnerRemoval(owner);\\n emit OwnerAddition(newOwner);\\n }\\n\\n /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\\n /// @param _required Number of required confirmations.\\n function changeRequirement(uint _required)\\n public\\n onlyWallet\\n validRequirement(owners.length, _required)\\n {\\n required = _required;\\n emit RequirementChange(_required);\\n }\\n\\n /// @dev Allows an owner to submit and confirm a transaction.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function submitTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) public returns (uint transactionId)\\n {\\n transactionId = addTransaction(destination, value, data);\\n confirmTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to confirm a transaction.\\n /// @param transactionId Transaction ID.\\n function confirmTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n transactionExists(transactionId)\\n notConfirmed(transactionId, msg.sender)\\n {\\n confirmations[transactionId][msg.sender] = true;\\n emit Confirmation(msg.sender, transactionId);\\n executeTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to revoke a confirmation for a transaction.\\n /// @param transactionId Transaction ID.\\n function revokeConfirmation(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n confirmations[transactionId][msg.sender] = false;\\n emit Revocation(msg.sender, transactionId);\\n }\\n\\n /// @dev Allows anyone to execute a confirmed transaction.\\n /// @param transactionId Transaction ID.\\n function executeTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n if (isConfirmed(transactionId)) {\\n Transaction storage txn = transactions[transactionId];\\n txn.executed = true;\\n if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\\n emit Execution(transactionId);\\n else {\\n emit ExecutionFailure(transactionId);\\n txn.executed = false;\\n }\\n }\\n }\\n\\n // call has been separated into its own function in order to take advantage\\n // of the Solidity's code generator to produce a loop that copies tx.data into memory.\\n function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) {\\n bool result;\\n assembly {\\n let x := mload(0x40) // \\\"Allocate\\\" memory for output (0x40 is where \\\"free memory\\\" pointer is stored by convention)\\n let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\\n result := call(\\n sub(gas(), 36810), // 34710 is the value that solidity is currently emitting // todo\\n // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\\n // callNewAccountGas (25000, in case the destination address does not exist and needs creating) +\\n // gasSLoadEIP2929 (2100)\\n\\n destination,\\n value,\\n d,\\n dataLength, // Size of the input (in bytes) - this is what fixes the padding problem\\n x,\\n 0 // Output is ignored, therefore the output size is zero\\n )\\n }\\n return result;\\n }\\n\\n /// @dev Returns the confirmation status of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return Confirmation status.\\n function isConfirmed(uint transactionId) public view returns (bool)\\n {\\n uint count = 0;\\n for (uint i = 0; i < owners.length; i++) {\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n if (count == required)\\n return true;\\n }\\n return false;\\n }\\n\\n /*\\n * Internal functions\\n */\\n /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function addTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) internal\\n notNull(destination) returns (uint transactionId)\\n {\\n transactionId = transactionCount;\\n transactions[transactionId] = Transaction({\\n destination : destination,\\n value : value,\\n data : data,\\n executed : false\\n });\\n transactionCount += 1;\\n emit Submission(transactionId);\\n }\\n\\n /*\\n * Web3 call functions\\n */\\n /// @dev Returns number of confirmations of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return count Number of confirmations.\\n function getConfirmationCount(uint transactionId)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n }\\n\\n /// @dev Returns total number of transactions after filers are applied.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return count Total number of transactions after filters are applied.\\n function getTransactionCount(bool pending, bool executed)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n count += 1;\\n }\\n\\n /// @dev Returns list of owners.\\n /// @return List of owner addresses.\\n function getOwners() public view returns (address[] memory)\\n {\\n return owners;\\n }\\n\\n /// @dev Returns array with owner addresses, which confirmed transaction.\\n /// @param transactionId Transaction ID.\\n /// @return _confirmations Returns array of owner addresses.\\n function getConfirmations(uint transactionId) public view\\n returns (address[] memory _confirmations)\\n {\\n address[] memory confirmationsTemp = new address[](owners.length);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]]) {\\n confirmationsTemp[count] = owners[i];\\n count += 1;\\n }\\n _confirmations = new address[](count);\\n for (i = 0; i < count; i++)\\n _confirmations[i] = confirmationsTemp[i];\\n }\\n\\n /// @dev Returns list of transaction IDs in defined range.\\n /// @param from Index start position of transaction array.\\n /// @param to Index end position of transaction array.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return _transactionIds Returns array of transaction IDs.\\n function getTransactionIds(uint from, uint to, bool pending, bool executed)\\n public\\n view\\n returns (uint[] memory _transactionIds)\\n {\\n uint[] memory transactionIdsTemp = new uint[](transactionCount);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n {\\n transactionIdsTemp[count] = i;\\n count += 1;\\n }\\n _transactionIds = new uint[](to - from);\\n for (i = from; i < to; i++)\\n _transactionIds[i - from] = transactionIdsTemp[i];\\n }\\n}\\n\",\"keccak256\":\"0x1630487b4e9acd29e4c4ea04eff94b838660e39d009c0668c5213c209fb2f883\",\"license\":\"MIT\"},\"contracts/utils/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/proxy/Proxy.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport \\\"./MultiSigWallet.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\n\\ncontract ProxyMultiSig is Proxy, MultiSigWallet {\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n bytes32 private constant ADMIN_STORAGE_LOCATION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n bytes4 private constant _UPGRADE_TO_AND_CALL_SIGNATURE = bytes4(keccak256(\\\"_upgradeToAndCall(address,bytes)\\\"));\\n\\n event Upgraded(address indexed implementation);\\n\\n\\n constructor(\\n address _logic,\\n bytes memory _data,\\n address[] memory owners,\\n uint _required\\n\\n ) MultiSigWallet(owners, _required) {\\n // Cannot use _upgradeToAndCall because of onlyWallet modifier\\n _upgradeTo(_logic);\\n if (_data.length > 0) {\\n Address.functionDelegateCall(_logic, _data);\\n }\\n\\n StorageSlot.getAddressSlot(ADMIN_STORAGE_LOCATION).value = msg.sender; // trick the hardhat-deploy\\n }\\n\\n\\n function implementation() external view returns (address) {\\n return _implementation();\\n }\\n\\n function upgradeTo(address newImplementation) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, bytes(\\\"\\\"))\\n );\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, data)\\n );\\n }\\n\\n function _upgradeToAndCall(address newImplementation, bytes memory data) external onlyWallet payable {\\n _upgradeTo(newImplementation);\\n if (data.length > 0) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n function _upgradeTo(address newImplementation) internal {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n emit Upgraded(newImplementation);\\n }\\n\\n function _implementation() internal view override returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n}\\n\",\"keccak256\":\"0x9e2738f9167ae4a747ac4e8622c443ad735a257630293dee633535dae02863d5\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200285f3803806200285f833981016040819052620000349162000645565b8181815181603282111580156200004b5750818111155b80156200005757508015155b80156200006357508115155b6200006d57600080fd5b60005b845181101562000163576002600086838151811062000093576200009362000821565b602090810291909101810151600160a060020a031682528101919091526040016000205460ff16158015620000f757506000600160a060020a0316858281518110620000e357620000e362000821565b6020026020010151600160a060020a031614155b6200010157600080fd5b6001600260008784815181106200011c576200011c62000821565b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055806200015a81620007de565b91505062000070565b5083516200017990600390602087019062000511565b5050506004555062000194846401000000006200021b810204565b825115620001b857620001b68484640100000000620015686200034a82021704565b505b33620001f27fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a0392909216919091179055506200087f92505050565b6200023481640100000000620015906200038582021704565b620002c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b80620003007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a03928316179055604051908216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200037b838360405180606001604052806027815260200162002838602791396401000000006200038b810204565b9392505050565b90565b3b151590565b6060620003a18464010000000062000385810204565b6200042f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401620002bd565b60008085600160a060020a0316856040516200044c919062000725565b600060405180830381855af49150503d806000811462000489576040519150601f19603f3d011682016040523d82523d6000602084013e6200048e565b606091505b5091509150620004af828286620004b9640100000000026401000000009004565b9695505050505050565b60608315620004ca5750816200037b565b825115620004db5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002bd919062000743565b82805482825590600052602060002090810192821562000569579160200282015b82811115620005695782518254600160a060020a031916600160a060020a0390911617825560209092019160019091019062000532565b50620005779291506200057b565b5090565b5b808211156200057757600081556001016200057c565b8051600160a060020a0381168114620005aa57600080fd5b919050565b600082601f830112620005c157600080fd5b815160206001604060020a03821115620005df57620005df62000850565b808202620005ef82820162000778565b8381528281019086840183880185018910156200060b57600080fd5b600093505b858410156200063957620006248162000592565b83526001939093019291840191840162000610565b50979650505050505050565b600080600080608085870312156200065c57600080fd5b620006678562000592565b935060208501516001604060020a03808211156200068457600080fd5b818701915087601f8301126200069957600080fd5b815181811115620006ae57620006ae62000850565b620006c3601f8201601f191660200162000778565b818152896020838601011115620006d957600080fd5b620006ec826020830160208701620007ab565b6040890151909650925050808211156200070557600080fd5b506200071487828801620005af565b606096909601519497939650505050565b6000825162000739818460208701620007ab565b9190910192915050565b602081526000825180602084015262000764816040850160208701620007ab565b601f01601f19169190910160400192915050565b604051601f8201601f191681016001604060020a0381118282101715620007a357620007a362000850565b604052919050565b60005b83811015620007c8578181015183820152602001620007ae565b83811115620007d8576000848401525b50505050565b60006000198214156200081a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611fa9806200088f6000396000f3fe608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033", @@ -851,15 +856,15 @@ "storageLayout": { "storage": [ { - "astId": 9567, + "astId": 454, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "transactions", "offset": 0, "slot": "0", - "type": "t_mapping(t_uint256,t_struct(Transaction)9593_storage)" + "type": "t_mapping(t_uint256,t_struct(Transaction)480_storage)" }, { - "astId": 9573, + "astId": 460, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "confirmations", "offset": 0, @@ -867,7 +872,7 @@ "type": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" }, { - "astId": 9577, + "astId": 464, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "isOwner", "offset": 0, @@ -875,7 +880,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 9580, + "astId": 467, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "owners", "offset": 0, @@ -883,7 +888,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 9582, + "astId": 469, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "required", "offset": 0, @@ -891,7 +896,7 @@ "type": "t_uint256" }, { - "astId": 9584, + "astId": 471, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "transactionCount", "offset": 0, @@ -935,19 +940,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_bool)" }, - "t_mapping(t_uint256,t_struct(Transaction)9593_storage)": { + "t_mapping(t_uint256,t_struct(Transaction)480_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct MultiSigWallet.Transaction)", "numberOfBytes": "32", - "value": "t_struct(Transaction)9593_storage" + "value": "t_struct(Transaction)480_storage" }, - "t_struct(Transaction)9593_storage": { + "t_struct(Transaction)480_storage": { "encoding": "inplace", "label": "struct MultiSigWallet.Transaction", "members": [ { - "astId": 9586, + "astId": 473, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "destination", "offset": 0, @@ -955,7 +960,7 @@ "type": "t_address" }, { - "astId": 9588, + "astId": 475, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "value", "offset": 0, @@ -963,7 +968,7 @@ "type": "t_uint256" }, { - "astId": 9590, + "astId": 477, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "data", "offset": 0, @@ -971,7 +976,7 @@ "type": "t_bytes_storage" }, { - "astId": 9592, + "astId": 479, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "executed", "offset": 0, diff --git a/contracts/deployments/test/amb/Faucet.json b/contracts/deployments/test/amb/Faucet.json index 37cf0b86..82de5799 100644 --- a/contracts/deployments/test/amb/Faucet.json +++ b/contracts/deployments/test/amb/Faucet.json @@ -1,5 +1,5 @@ { - "address": "0x7b8A17Fc98711db0870c7F37A45d069f2B750637", + "address": "0xE2Fb2d9014B4c7b2705F81D21a6693219Cc518Ba", "abi": [ { "inputs": [ @@ -298,22 +298,22 @@ "type": "receive" } ], - "transactionHash": "0x19222c4e839d309e82c5e428637c12a4e62dbf1677ff24f7600ae5a8fbe921e3", + "transactionHash": "0x1583e3dbbedf0d68036899ff2b046dd9a0bb0db868ab1bb9838c3ebc0c481871", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x7b8A17Fc98711db0870c7F37A45d069f2B750637", + "contractAddress": "0xE2Fb2d9014B4c7b2705F81D21a6693219Cc518Ba", "transactionIndex": 0, "gasUsed": "863223", - "logsBloom": "0x00000004000000000000082000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000001004000000000000000000000000000000000000000000000000000000000100000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xbd61080b1f073e924d39af169f9391d8f9df7e3860b80b3905b5bf48991d2ae1", - "transactionHash": "0x19222c4e839d309e82c5e428637c12a4e62dbf1677ff24f7600ae5a8fbe921e3", + "logsBloom": "0x00000004000000000000402000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000100000000000020000000000000000000000000000000000000000000000000000000000080000000", + "blockHash": "0x009700546dbe1a2ed9936654e95a996f5f7afcc2a39f7858e7ae02eaff3dd73d", + "transactionHash": "0x1583e3dbbedf0d68036899ff2b046dd9a0bb0db868ab1bb9838c3ebc0c481871", "logs": [ { "transactionIndex": 0, - "blockNumber": 2920366, - "transactionHash": "0x19222c4e839d309e82c5e428637c12a4e62dbf1677ff24f7600ae5a8fbe921e3", - "address": "0x7b8A17Fc98711db0870c7F37A45d069f2B750637", + "blockNumber": 33966, + "transactionHash": "0x1583e3dbbedf0d68036899ff2b046dd9a0bb0db868ab1bb9838c3ebc0c481871", + "address": "0xE2Fb2d9014B4c7b2705F81D21a6693219Cc518Ba", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -322,10 +322,10 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0xbd61080b1f073e924d39af169f9391d8f9df7e3860b80b3905b5bf48991d2ae1" + "blockHash": "0x009700546dbe1a2ed9936654e95a996f5f7afcc2a39f7858e7ae02eaff3dd73d" } ], - "blockNumber": 2920366, + "blockNumber": 33966, "cumulativeGasUsed": "863223", "status": 1, "byzantium": true @@ -336,7 +336,7 @@ ] ], "numDeployments": 1, - "solcInputHash": "d93bc3aa6701c2d134a7738294111712", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"admins\",\"type\":\"address[]\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Faucet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"faucet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/utils/Faucet.sol\":\"Faucet\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 * ```\\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 * ```\\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.\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x183481af1c40d2efb26b86f63d6fe9e22f24c87e436d60a69f261b38500e7cd6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xfe0edb09653ed10e8a1bfe03eb9b0ff06775666eee817a95bd3d0799f1ee2b44\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x391d3ba97ab6856a16b225d6ee29617ad15ff00db70f3b4df1ab5ea33aa47c9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5718c5df9bd67ac68a796961df938821bb5dc0cd4c6118d77e9145afb187409b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xa28007762d9da9db878dd421960c8cb9a10471f47ab5c1b3309bfe48e9e79ff4\",\"license\":\"MIT\"},\"contracts/utils/Faucet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\n\\ncontract Faucet is AccessControl {\\n event Faucet(address indexed to, uint256 indexed eventId, uint256 indexed chainId, uint256 amount);\\n\\n constructor(address[] memory admins) payable {\\n for (uint i = 0; i < admins.length; i++)\\n _setupRole(DEFAULT_ADMIN_ROLE, admins[i]);\\n }\\n\\n function faucet(address toAddress, uint256 eventId, uint256 chainId, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n withdraw(toAddress, amount);\\n emit Faucet(toAddress, eventId, chainId, amount);\\n }\\n\\n function withdraw(address toAddress, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n require(address(this).balance >= amount, \\\"not enough funds\\\");\\n payable(toAddress).transfer(amount);\\n }\\n\\n receive() external payable {}\\n\\n\\n}\\n\",\"keccak256\":\"0x96d0a71f87664633b199ce61daf47233bf90540b92c677e886563b5176092a44\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405260405162000e4538038062000e4583398101604081905262000026916200018a565b60005b815181101562000083576200006e6000600102838381518110620000515762000051620002a6565b60200260200101516200008b640100000000026401000000009004565b806200007a8162000263565b91505062000029565b505062000304565b620000a08282640100000000620000a4810204565b5050565b620000b9828264010000000062000140810204565b620000a057600082815260208181526040808320600160a060020a03851684529091529020805460ff19166001179055620000fc64010000000062000169810204565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600091825260208281526040808420600160a060020a0393909316845291905290205460ff1690565b3390565b8051600160a060020a03811681146200018557600080fd5b919050565b600060208083850312156200019e57600080fd5b825167ffffffffffffffff80821115620001b757600080fd5b818501915085601f830112620001cc57600080fd5b815181811115620001e157620001e1620002d5565b838102604051601f19603f83011681018181108582111715620002085762000208620002d5565b604052828152858101935084860182860187018a10156200022857600080fd5b600095505b83861015620002565762000241816200016d565b8552600195909501949386019386016200022d565b5098975050505050505050565b60006000198214156200029f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610b3180620003146000396000f3fe6080604052600436106100a7576000357c01000000000000000000000000000000000000000000000000000000009004806336568abe1161007657806336568abe1461016857806391d1485414610188578063a217fddf146101a8578063d547741f146101bd578063f3fef3a3146101dd57600080fd5b806301ffc9a7146100b3578063248a9ca3146100e85780632a13b891146101265780632f2ff15d1461014857600080fd5b366100ae57005b600080fd5b3480156100bf57600080fd5b506100d36100ce366004610901565b6101fd565b60405190151581526020015b60405180910390f35b3480156100f457600080fd5b506101186101033660046108bc565b60009081526020819052604090206001015490565b6040519081526020016100df565b34801561013257600080fd5b50610146610141366004610883565b610290565b005b34801561015457600080fd5b506101466101633660046108d5565b6102f2565b34801561017457600080fd5b506101466101833660046108d5565b61031d565b34801561019457600080fd5b506100d36101a33660046108d5565b6103b1565b3480156101b457600080fd5b50610118600081565b3480156101c957600080fd5b506101466101d83660046108d5565b6103da565b3480156101e957600080fd5b506101466101f8366004610859565b610400565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b00000000000000000000000000000000000000000000000000000000148061028a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b600061029c813361049c565b6102a68583610400565b828486600160a060020a03167f4828ab435cca543539934276b7cad7900854b86fadd6284f6af7a8706161c698856040516102e391815260200190565b60405180910390a45050505050565b60008281526020819052604090206001015461030e813361049c565b6103188383610503565b505050565b600160a060020a03811633146103a35760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6103ad8282610587565b5050565b600091825260208281526040808420600160a060020a0393909316845291905290205460ff1690565b6000828152602081905260409020600101546103f6813361049c565b6103188383610587565b600061040c813361049c565b30318211156104605760405160e560020a62461bcd02815260206004820152601060248201527f6e6f7420656e6f7567682066756e647300000000000000000000000000000000604482015260640161039a565b604051600160a060020a0384169083156108fc029084906000818181858888f19350505050158015610496573d6000803e3d6000fd5b50505050565b6104a682826103b1565b6103ad576104be81600160a060020a031660146105ec565b6104c98360206105ec565b6040516020016104da929190610940565b60408051601f198184030181529082905260e560020a62461bcd02825261039a916004016109c1565b61050d82826103b1565b6103ad57600082815260208181526040808320600160a060020a03851684529091529020805460ff191660011790556105433390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61059182826103b1565b156103ad57600082815260208181526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606060006105fb836002610a0c565b6106069060026109f4565b67ffffffffffffffff81111561061e5761061e610acc565b6040519080825280601f01601f191660200182016040528015610648576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061067f5761067f610a9d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106106e2576106e2610a9d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061071e846002610a0c565b6107299060016109f4565b90505b60018111156107e4577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061076a5761076a610a9d565b1a7f01000000000000000000000000000000000000000000000000000000000000000282828151811061079f5761079f610a9d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506010909404936107dd81610a57565b905061072c565b5083156108365760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161039a565b9392505050565b8035600160a060020a038116811461085457600080fd5b919050565b6000806040838503121561086c57600080fd5b6108758361083d565b946020939093013593505050565b6000806000806080858703121561089957600080fd5b6108a28561083d565b966020860135965060408601359560600135945092505050565b6000602082840312156108ce57600080fd5b5035919050565b600080604083850312156108e857600080fd5b823591506108f86020840161083d565b90509250929050565b60006020828403121561091357600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198116811461083657600080fd5b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610978816017850160208801610a2b565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516109b5816028840160208801610a2b565b01602801949350505050565b60208152600082518060208401526109e0816040850160208701610a2b565b601f01601f19169190910160400192915050565b60008219821115610a0757610a07610a6e565b500190565b6000816000190483118215151615610a2657610a26610a6e565b500290565b60005b83811015610a46578181015183820152602001610a2e565b838111156104965750506000910152565b600081610a6657610a66610a6e565b506000190190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea264697066735822122090abbd268922dd22b983d6453d204ec1f62b3eeeb0a034d23af06082f7b0352f64736f6c63430008060033", "deployedBytecode": "0x6080604052600436106100a7576000357c01000000000000000000000000000000000000000000000000000000009004806336568abe1161007657806336568abe1461016857806391d1485414610188578063a217fddf146101a8578063d547741f146101bd578063f3fef3a3146101dd57600080fd5b806301ffc9a7146100b3578063248a9ca3146100e85780632a13b891146101265780632f2ff15d1461014857600080fd5b366100ae57005b600080fd5b3480156100bf57600080fd5b506100d36100ce366004610901565b6101fd565b60405190151581526020015b60405180910390f35b3480156100f457600080fd5b506101186101033660046108bc565b60009081526020819052604090206001015490565b6040519081526020016100df565b34801561013257600080fd5b50610146610141366004610883565b610290565b005b34801561015457600080fd5b506101466101633660046108d5565b6102f2565b34801561017457600080fd5b506101466101833660046108d5565b61031d565b34801561019457600080fd5b506100d36101a33660046108d5565b6103b1565b3480156101b457600080fd5b50610118600081565b3480156101c957600080fd5b506101466101d83660046108d5565b6103da565b3480156101e957600080fd5b506101466101f8366004610859565b610400565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b00000000000000000000000000000000000000000000000000000000148061028a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b600061029c813361049c565b6102a68583610400565b828486600160a060020a03167f4828ab435cca543539934276b7cad7900854b86fadd6284f6af7a8706161c698856040516102e391815260200190565b60405180910390a45050505050565b60008281526020819052604090206001015461030e813361049c565b6103188383610503565b505050565b600160a060020a03811633146103a35760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6103ad8282610587565b5050565b600091825260208281526040808420600160a060020a0393909316845291905290205460ff1690565b6000828152602081905260409020600101546103f6813361049c565b6103188383610587565b600061040c813361049c565b30318211156104605760405160e560020a62461bcd02815260206004820152601060248201527f6e6f7420656e6f7567682066756e647300000000000000000000000000000000604482015260640161039a565b604051600160a060020a0384169083156108fc029084906000818181858888f19350505050158015610496573d6000803e3d6000fd5b50505050565b6104a682826103b1565b6103ad576104be81600160a060020a031660146105ec565b6104c98360206105ec565b6040516020016104da929190610940565b60408051601f198184030181529082905260e560020a62461bcd02825261039a916004016109c1565b61050d82826103b1565b6103ad57600082815260208181526040808320600160a060020a03851684529091529020805460ff191660011790556105433390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61059182826103b1565b156103ad57600082815260208181526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606060006105fb836002610a0c565b6106069060026109f4565b67ffffffffffffffff81111561061e5761061e610acc565b6040519080825280601f01601f191660200182016040528015610648576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061067f5761067f610a9d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106106e2576106e2610a9d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061071e846002610a0c565b6107299060016109f4565b90505b60018111156107e4577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061076a5761076a610a9d565b1a7f01000000000000000000000000000000000000000000000000000000000000000282828151811061079f5761079f610a9d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506010909404936107dd81610a57565b905061072c565b5083156108365760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161039a565b9392505050565b8035600160a060020a038116811461085457600080fd5b919050565b6000806040838503121561086c57600080fd5b6108758361083d565b946020939093013593505050565b6000806000806080858703121561089957600080fd5b6108a28561083d565b966020860135965060408601359560600135945092505050565b6000602082840312156108ce57600080fd5b5035919050565b600080604083850312156108e857600080fd5b823591506108f86020840161083d565b90509250929050565b60006020828403121561091357600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198116811461083657600080fd5b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610978816017850160208801610a2b565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516109b5816028840160208801610a2b565b01602801949350505050565b60208152600082518060208401526109e0816040850160208701610a2b565b601f01601f19169190910160400192915050565b60008219821115610a0757610a07610a6e565b500190565b6000816000190483118215151615610a2657610a26610a6e565b500290565b60005b83811015610a46578181015183820152602001610a2e565b838111156104965750506000910152565b600081610a6657610a66610a6e565b506000190190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea264697066735822122090abbd268922dd22b983d6453d204ec1f62b3eeeb0a034d23af06082f7b0352f64736f6c63430008060033", diff --git a/contracts/deployments/test/amb/SAMB.json b/contracts/deployments/test/amb/SAMB.json index 12d58d08..38828f58 100644 --- a/contracts/deployments/test/amb/SAMB.json +++ b/contracts/deployments/test/amb/SAMB.json @@ -1,5 +1,5 @@ { - "address": "0xDA9BB33F9E3334781f3e4fce310288D7dB3eD29a", + "address": "0x7cee2ae3042D2C646Aa24FACfA92dfeE589046f0", "abi": [ { "inputs": [ @@ -346,18 +346,18 @@ "type": "function" } ], - "transactionHash": "0x7bc4ca6784d447617fd1d814663abd9c3b11909212a8a603329062d2eb533d2c", + "transactionHash": "0xa90859c190ad4f00c959a016a48a9eb36df135a222c6f24b9875fad361f14888", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0xDA9BB33F9E3334781f3e4fce310288D7dB3eD29a", + "contractAddress": "0x7cee2ae3042D2C646Aa24FACfA92dfeE589046f0", "transactionIndex": 0, "gasUsed": "1069256", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3774104ac1a92a4b0105f4b324064c8d35df9c0dc4874187a029c914fc868d59", - "transactionHash": "0x7bc4ca6784d447617fd1d814663abd9c3b11909212a8a603329062d2eb533d2c", + "blockHash": "0xa4b26b1fcd4ada76bebfaa797a96e04b238914eb0d4cb69acb4de87543a23a27", + "transactionHash": "0xa90859c190ad4f00c959a016a48a9eb36df135a222c6f24b9875fad361f14888", "logs": [], - "blockNumber": 1406692, + "blockNumber": 33930, "cumulativeGasUsed": "1069256", "status": 1, "byzantium": true @@ -367,7 +367,7 @@ "SAMB" ], "numDeployments": 1, - "solcInputHash": "13963204c1e3ae6f33bd8024ced50cd9", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/sAMB.sol\":\"sAMB\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/IWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\ninterface IWrapper {\\n event Deposit(address indexed dst, uint amount);\\n event Withdrawal(address indexed src, uint amount);\\n\\n function deposit() external payable;\\n\\n function withdraw(uint amount) external;\\n}\\n\",\"keccak256\":\"0xbe5bc17241b9a14b78e18e4562e2a4c02e2b941fae0f1a896bbd795e49af136e\",\"license\":\"MIT\"},\"contracts/tokens/sAMB.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"./IWrapper.sol\\\";\\n\\ncontract sAMB is IWrapper, ERC20 {\\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\\n\\n function deposit() public override payable {\\n _mint(msg.sender, msg.value);\\n\\n emit Deposit(msg.sender, msg.value);\\n }\\n\\n function withdraw(uint amount) public override {\\n _burn(msg.sender, amount);\\n payable(msg.sender).transfer(amount);\\n\\n emit Withdrawal(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x90133b5fc764016576f455329dda29434c23704c3102d2d83961f89ae65890d6\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b50604051620010bd380380620010bd8339810160408190526200003491620001cb565b8151829082906200004d9060039060208501906200006e565b508051620000639060049060208401906200006e565b5050505050620002ba565b8280546200007c9062000235565b90600052602060002090601f016020900481019282620000a05760008555620000eb565b82601f10620000bb57805160ff1916838001178555620000eb565b82800160010185558215620000eb579182015b82811115620000eb578251825591602001919060010190620000ce565b50620000f9929150620000fd565b5090565b5b80821115620000f95760008155600101620000fe565b600082601f8301126200012657600080fd5b81516001604060020a03808211156200014357620001436200028b565b604051601f8301601f19908116603f011681019082821181831017156200016e576200016e6200028b565b816040528381526020925086838588010111156200018b57600080fd5b600091505b83821015620001af578582018301518183018401529082019062000190565b83821115620001c15760008385830101525b9695505050505050565b60008060408385031215620001df57600080fd5b82516001604060020a0380821115620001f757600080fd5b620002058683870162000114565b935060208501519150808211156200021c57600080fd5b506200022b8582860162000114565b9150509250929050565b6002810460018216806200024a57607f821691505b6020821081141562000285577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610df380620002ca6000396000f3fe6080604052600436106100df576000357c010000000000000000000000000000000000000000000000000000000090048063395093511161009c578063a457c2d711610076578063a457c2d714610227578063a9059cbb14610247578063d0e30db014610267578063dd62ed3e1461026f57600080fd5b806339509351146101bc57806370a08231146101dc57806395d89b411461021257600080fd5b806306fdde03146100e4578063095ea7b31461010f57806318160ddd1461013f57806323b872dd1461015e5780632e1a7d4d1461017e578063313ce567146101a0575b600080fd5b3480156100f057600080fd5b506100f96102b5565b6040516101069190610cb6565b60405180910390f35b34801561011b57600080fd5b5061012f61012a366004610c73565b610347565b6040519015158152602001610106565b34801561014b57600080fd5b506002545b604051908152602001610106565b34801561016a57600080fd5b5061012f610179366004610c37565b61035d565b34801561018a57600080fd5b5061019e610199366004610c9d565b610424565b005b3480156101ac57600080fd5b5060405160128152602001610106565b3480156101c857600080fd5b5061012f6101d7366004610c73565b610494565b3480156101e857600080fd5b506101506101f7366004610be2565b600160a060020a031660009081526020819052604090205490565b34801561021e57600080fd5b506100f96104d0565b34801561023357600080fd5b5061012f610242366004610c73565b6104df565b34801561025357600080fd5b5061012f610262366004610c73565b610593565b61019e6105a0565b34801561027b57600080fd5b5061015061028a366004610c04565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546102c490610d3a565b80601f01602080910402602001604051908101604052809291908181526020018280546102f090610d3a565b801561033d5780601f106103125761010080835404028352916020019161033d565b820191906000526020600020905b81548152906001019060200180831161032057829003601f168201915b5050505050905090565b60006103543384846105e1565b50600192915050565b600061036a848484610740565b600160a060020a03841660009081526001602090815260408083203384529091529020548281101561040c5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61041985338584036105e1565b506001949350505050565b61042e3382610961565b604051339082156108fc029083906000818181858888f1935050505015801561045b573d6000803e3d6000fd5b5060405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a250565b336000818152600160209081526040808320600160a060020a038716845290915281205490916103549185906104cb908690610d0b565b6105e1565b6060600480546102c490610d3a565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561057c5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610403565b61058933858584036105e1565b5060019392505050565b6000610354338484610740565b6105aa3334610ae4565b60405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b600160a060020a03831661065f5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0382166106de5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600160a060020a0383166107bf5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03821661083e5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a038316600090815260208190526040902054818110156108d05760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610907908490610d0b565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161095391815260200190565b60405180910390a350505050565b600160a060020a0382166109e05760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03821660009081526020819052604090205481811015610a725760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0383166000908152602081905260408120838303905560028054849290610aa1908490610d23565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610733565b600160a060020a038216610b3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610403565b8060026000828254610b4f9190610d0b565b9091555050600160a060020a03821660009081526020819052604081208054839290610b7c908490610d0b565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a0381168114610bdd57600080fd5b919050565b600060208284031215610bf457600080fd5b610bfd82610bc6565b9392505050565b60008060408385031215610c1757600080fd5b610c2083610bc6565b9150610c2e60208401610bc6565b90509250929050565b600080600060608486031215610c4c57600080fd5b610c5584610bc6565b9250610c6360208501610bc6565b9150604084013590509250925092565b60008060408385031215610c8657600080fd5b610c8f83610bc6565b946020939093013593505050565b600060208284031215610caf57600080fd5b5035919050565b600060208083528351808285015260005b81811015610ce357858101830151858201604001528201610cc7565b81811115610cf5576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610d1e57610d1e610d8e565b500190565b600082821015610d3557610d35610d8e565b500390565b600281046001821680610d4e57607f821691505b60208210811415610d88577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220f75853fc2637d5ca8248502a85a7f949947d4ce8824b83a6ae12f18058d32b2c64736f6c63430008060033", "deployedBytecode": "0x6080604052600436106100df576000357c010000000000000000000000000000000000000000000000000000000090048063395093511161009c578063a457c2d711610076578063a457c2d714610227578063a9059cbb14610247578063d0e30db014610267578063dd62ed3e1461026f57600080fd5b806339509351146101bc57806370a08231146101dc57806395d89b411461021257600080fd5b806306fdde03146100e4578063095ea7b31461010f57806318160ddd1461013f57806323b872dd1461015e5780632e1a7d4d1461017e578063313ce567146101a0575b600080fd5b3480156100f057600080fd5b506100f96102b5565b6040516101069190610cb6565b60405180910390f35b34801561011b57600080fd5b5061012f61012a366004610c73565b610347565b6040519015158152602001610106565b34801561014b57600080fd5b506002545b604051908152602001610106565b34801561016a57600080fd5b5061012f610179366004610c37565b61035d565b34801561018a57600080fd5b5061019e610199366004610c9d565b610424565b005b3480156101ac57600080fd5b5060405160128152602001610106565b3480156101c857600080fd5b5061012f6101d7366004610c73565b610494565b3480156101e857600080fd5b506101506101f7366004610be2565b600160a060020a031660009081526020819052604090205490565b34801561021e57600080fd5b506100f96104d0565b34801561023357600080fd5b5061012f610242366004610c73565b6104df565b34801561025357600080fd5b5061012f610262366004610c73565b610593565b61019e6105a0565b34801561027b57600080fd5b5061015061028a366004610c04565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546102c490610d3a565b80601f01602080910402602001604051908101604052809291908181526020018280546102f090610d3a565b801561033d5780601f106103125761010080835404028352916020019161033d565b820191906000526020600020905b81548152906001019060200180831161032057829003601f168201915b5050505050905090565b60006103543384846105e1565b50600192915050565b600061036a848484610740565b600160a060020a03841660009081526001602090815260408083203384529091529020548281101561040c5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61041985338584036105e1565b506001949350505050565b61042e3382610961565b604051339082156108fc029083906000818181858888f1935050505015801561045b573d6000803e3d6000fd5b5060405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a250565b336000818152600160209081526040808320600160a060020a038716845290915281205490916103549185906104cb908690610d0b565b6105e1565b6060600480546102c490610d3a565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561057c5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610403565b61058933858584036105e1565b5060019392505050565b6000610354338484610740565b6105aa3334610ae4565b60405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b600160a060020a03831661065f5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0382166106de5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600160a060020a0383166107bf5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03821661083e5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a038316600090815260208190526040902054818110156108d05760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610907908490610d0b565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161095391815260200190565b60405180910390a350505050565b600160a060020a0382166109e05760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03821660009081526020819052604090205481811015610a725760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0383166000908152602081905260408120838303905560028054849290610aa1908490610d23565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610733565b600160a060020a038216610b3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610403565b8060026000828254610b4f9190610d0b565b9091555050600160a060020a03821660009081526020819052604081208054839290610b7c908490610d0b565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a0381168114610bdd57600080fd5b919050565b600060208284031215610bf457600080fd5b610bfd82610bc6565b9392505050565b60008060408385031215610c1757600080fd5b610c2083610bc6565b9150610c2e60208401610bc6565b90509250929050565b600080600060608486031215610c4c57600080fd5b610c5584610bc6565b9250610c6360208501610bc6565b9150604084013590509250925092565b60008060408385031215610c8657600080fd5b610c8f83610bc6565b946020939093013593505050565b600060208284031215610caf57600080fd5b5035919050565b600060208083528351808285015260005b81811015610ce357858101830151858201604001528201610cc7565b81811115610cf5576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610d1e57610d1e610d8e565b500190565b600082821015610d3557610d35610d8e565b500390565b600281046001821680610d4e57607f821691505b60208210811415610d88577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220f75853fc2637d5ca8248502a85a7f949947d4ce8824b83a6ae12f18058d32b2c64736f6c63430008060033", @@ -418,7 +418,7 @@ "storageLayout": { "storage": [ { - "astId": 991, + "astId": 1371, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_balances", "offset": 0, @@ -426,7 +426,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 997, + "astId": 1377, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_allowances", "offset": 0, @@ -434,7 +434,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 999, + "astId": 1379, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_totalSupply", "offset": 0, @@ -442,7 +442,7 @@ "type": "t_uint256" }, { - "astId": 1001, + "astId": 1381, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_name", "offset": 0, @@ -450,7 +450,7 @@ "type": "t_string_storage" }, { - "astId": 1003, + "astId": 1383, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_symbol", "offset": 0, diff --git a/contracts/deployments/test/amb/USDC.json b/contracts/deployments/test/amb/USDC.json index 936dc4d5..6314ccf9 100644 --- a/contracts/deployments/test/amb/USDC.json +++ b/contracts/deployments/test/amb/USDC.json @@ -1,5 +1,5 @@ { - "address": "0x56a79d39fc414Ff11EbB30d6a5367ea5da8c6fE9", + "address": "0x952b98DBDa3319BF0e339cC9CC574fF768F80f3c", "abi": [ { "inputs": [ @@ -411,22 +411,22 @@ "type": "function" } ], - "transactionHash": "0x66d7a2a84cb80d567bf512a9b78575e9786be8242e8ce76275931f6afca2a629", + "transactionHash": "0x9a0f182257777aa5a9b868cd8684bf356e30e6373a554198d9a98507de98e4be", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x56a79d39fc414Ff11EbB30d6a5367ea5da8c6fE9", + "contractAddress": "0x952b98DBDa3319BF0e339cC9CC574fF768F80f3c", "transactionIndex": 0, - "gasUsed": "1663681", - "logsBloom": "0x00000000000000000000002000000000000000000000000000800000000200000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000002000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5a509942e16ea035373c25831c1b0e698fae1a1689ca4388c9ac67f961a3bbbf", - "transactionHash": "0x66d7a2a84cb80d567bf512a9b78575e9786be8242e8ce76275931f6afca2a629", + "gasUsed": "1702586", + "logsBloom": "0x00000000000000000000002000000000000000000000000000800000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000002000000000000000000000000400000002000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x51a39cd56c6f5730029baaa42f72283c442cb7fcfcdf6486a9d653ccfe679a58", + "transactionHash": "0x9a0f182257777aa5a9b868cd8684bf356e30e6373a554198d9a98507de98e4be", "logs": [ { "transactionIndex": 0, - "blockNumber": 1406697, - "transactionHash": "0x66d7a2a84cb80d567bf512a9b78575e9786be8242e8ce76275931f6afca2a629", - "address": "0x56a79d39fc414Ff11EbB30d6a5367ea5da8c6fE9", + "blockNumber": 33941, + "transactionHash": "0x9a0f182257777aa5a9b868cd8684bf356e30e6373a554198d9a98507de98e4be", + "address": "0x952b98DBDa3319BF0e339cC9CC574fF768F80f3c", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -434,11 +434,11 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x5a509942e16ea035373c25831c1b0e698fae1a1689ca4388c9ac67f961a3bbbf" + "blockHash": "0x51a39cd56c6f5730029baaa42f72283c442cb7fcfcdf6486a9d653ccfe679a58" } ], - "blockNumber": 1406697, - "cumulativeGasUsed": "1663681", + "blockNumber": 33941, + "cumulativeGasUsed": "1702586", "status": 1, "byzantium": true }, @@ -450,10 +450,10 @@ [] ], "numDeployments": 1, - "solcInputHash": "13963204c1e3ae6f33bd8024ced50cd9", - "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgeBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"name\":\"setSideTokenDecimals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"sideTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20_Amb.sol\":\"BridgeERC20_Amb\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20_Amb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20_Amb is ERC20, Ownable {\\n\\n // decimals of token in side network\\n // example:\\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\\n mapping(address => uint8) public sideTokenDecimals;\\n\\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\\n\\n uint8 _decimals;\\n\\n constructor(\\n string memory name_, string memory symbol_, uint8 decimals_,\\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\\n ) ERC20(name_, symbol_) Ownable() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n }\\n\\n // todo check if we need this func\\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \\\"wrong array lengths\\\");\\n for (uint i = 0; i < bridgeAddresses_.length; i++)\\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n // todo events\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n // user transfer tokens to ambrosus => need to mint it\\n\\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n\\n\\n // bridge mint money to user; same amount locked on side bridge\\n bridgeBalances[sender] += amount_this;\\n\\n _mint(recipient, amount_this);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n // user withdraw tokens from ambrosus => need to burn it\\n\\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n\\n\\n // user burn tokens; side bridge must have enough tokens to send\\n require(bridgeBalances[recipient] >= amount_this, \\\"not enough locked tokens on bridge\\\");\\n bridgeBalances[recipient] -= amount_this;\\n\\n _burn(sender, amount_this);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n\\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\\n if (dTo == dFrom)\\n return amount;\\n if (dTo > dFrom)\\n return amount * (10 ** (dTo - dFrom));\\n else\\n return amount / (10 ** (dFrom - dTo));\\n }\\n\\n}\\n\",\"keccak256\":\"0xd4ef121631f7a651ebe5f73c8565f862fa43cae907804e7876b29e87ce36a1cf\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001bce38038062001bce8339810160408190526200003491620003fc565b8451859085906200004d9060039060208501906200022a565b508051620000639060049060208401906200022a565b5050506200009262000083620000c6640100000000026401000000009004565b640100000000620000ca810204565b620000a782826401000000006200011c810204565b50506008805460ff191660ff92909216919091179055506200068b9050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80518251146200018c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e6774687300000000000000000000000000604482015260640160405180910390fd5b60005b82518110156200022557818181518110620001ae57620001ae6200062d565b602002602001015160066000858481518110620001cf57620001cf6200062d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff16021790555080806200021c90620005ea565b9150506200018f565b505050565b828054620002389062000594565b90600052602060002090601f0160209004810192826200025c5760008555620002a7565b82601f106200027757805160ff1916838001178555620002a7565b82800160010185558215620002a7579182015b82811115620002a75782518255916020019190600101906200028a565b50620002b5929150620002b9565b5090565b5b80821115620002b55760008155600101620002ba565b600082601f830112620002e257600080fd5b81516020620002fb620002f5836200056e565b6200053b565b82815281810190858301838502870184018810156200031957600080fd5b60005b8581101562000343576200033082620003e5565b845292840192908401906001016200031c565b5090979650505050505050565b600082601f8301126200036257600080fd5b81516001604060020a038111156200037e576200037e6200065c565b602062000394601f8301601f191682016200053b565b8281528582848701011115620003a957600080fd5b60005b83811015620003c9578581018301518282018401528201620003ac565b83811115620003db5760008385840101525b5095945050505050565b805160ff81168114620003f757600080fd5b919050565b600080600080600060a086880312156200041557600080fd5b85516001604060020a03808211156200042d57600080fd5b6200043b89838a0162000350565b96506020915081880151818111156200045357600080fd5b620004618a828b0162000350565b9650506200047260408901620003e5565b94506060880151818111156200048757600080fd5b8801601f81018a136200049957600080fd5b8051620004aa620002f5826200056e565b81815284810190838601868402850187018e1015620004c857600080fd5b600094505b8385101562000503578051600160a060020a0381168114620004ee57600080fd5b835260019490940193918601918601620004cd565b5060808c01519097509450505050808211156200051f57600080fd5b506200052e88828901620002d0565b9150509295509295909350565b604051601f8201601f191681016001604060020a03811182821017156200056657620005666200065c565b604052919050565b60006001604060020a038211156200058a576200058a6200065c565b5060209081020190565b600281046001821680620005a957607f821691505b60208210811415620005e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060001982141562000626577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611533806200069b6000396000f3fe608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b60405161014291906111f3565b60405180910390f35b61015e610159366004611105565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461107b565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c33660046110c9565b61038a565b60085460ff166101a3565b61015e6101e1366004611105565b610453565b6101726101f436600461107b565b600160a060020a031660009081526020819052604090205490565b61021761048f565b005b600554604051600160a060020a039091168152602001610142565b6101356104c8565b61015e61024a366004611105565b6104d7565b61015e61025d366004611105565b61058b565b61017261027036600461107b565b60076020526000908152604090205481565b610172610290366004611096565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461107b565b610598565b6102176102dc36600461112f565b610650565b6060600380546102f090611459565b80601f016020809104026020016040519081016040528092919081815260200182805461031c90611459565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461068b565b5060015b92915050565b60006103978484846107e9565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104395760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446853385840361068b565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061048a9086906112d2565b61068b565b600554600160a060020a031633146104bc5760405160e560020a62461bcd02815260040161043090611248565b6104c660006109a6565b565b6060600480546102f090611459565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105745760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610430565b610581338585840361068b565b5060019392505050565b60006103803384846107e9565b600554600160a060020a031633146105c55760405160e560020a62461bcd02815260040161043090611248565b600160a060020a0381166106445760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610430565b61064d816109a6565b50565b600554600160a060020a0316331461067d5760405160e560020a62461bcd02815260040161043090611248565b6106878282610a05565b5050565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561087b57600160a060020a03831660009081526006602052604081205460085461083891849160ff9182169116610ae8565b600160a060020a0385166000908152600760205260408120805492935083929091906108659084906112d2565b9091555061087590508382610b52565b50505050565b600160a060020a03821660009081526006602052604090205460ff161561099657600160a060020a0382166000908152600660205260408120546008546108ca91849160ff9182169116610ae8565b600160a060020a03841660009081526007602052604090205490915081111561095e5760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f67650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152600760205260408120805483929061098690849061141f565b9091555061087590508482610c34565b6109a1838383610dbf565b505050565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610a595760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e67746873000000000000000000000000006044820152606401610430565b60005b82518110156109a157818181518110610a7757610a776114cb565b602002602001015160066000858481518110610a9557610a956114cb565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610ae090611497565b915050610a5c565b60008260ff168260ff161415610aff57508261044c565b8260ff168260ff161115610b3357610b178383611436565b610b2290600a611354565b610b2c9085611400565b905061044c565b610b3d8284611436565b610b4890600a611354565b610b2c90856112ea565b600160a060020a038216610bab5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610430565b8060026000828254610bbd91906112d2565b9091555050600160a060020a03821660009081526020819052604081208054839290610bea9084906112d2565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610cb35760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03821660009081526020819052604090205481811015610d455760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152602081905260408120838303905560028054849290610d7490849061141f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610e3e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a038216610ebd5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03831660009081526020819052604090205481811015610f4f5760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610f869084906112d2565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fd291815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610ff757600080fd5b919050565b600082601f83011261100d57600080fd5b8135602061102261101d836112ae565b61127d565b828152818101908583018385028701840188101561103f57600080fd5b6000805b8681101561106d57823560ff8116811461105b578283fd5b85529385019391850191600101611043565b509198975050505050505050565b60006020828403121561108d57600080fd5b61044c82610fe0565b600080604083850312156110a957600080fd5b6110b283610fe0565b91506110c060208401610fe0565b90509250929050565b6000806000606084860312156110de57600080fd5b6110e784610fe0565b92506110f560208501610fe0565b9150604084013590509250925092565b6000806040838503121561111857600080fd5b61112183610fe0565b946020939093013593505050565b6000806040838503121561114257600080fd5b823567ffffffffffffffff8082111561115a57600080fd5b818501915085601f83011261116e57600080fd5b8135602061117e61101d836112ae565b82815281810190858301838502870184018b101561119b57600080fd5b600096505b848710156111c5576111b181610fe0565b8352600196909601959183019183016111a0565b50965050860135925050808211156111dc57600080fd5b506111e985828601610ffc565b9150509250929050565b600060208083528351808285015260005b8181101561122057858101830151858201604001528201611204565b81811115611232576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156112a6576112a66114e4565b604052919050565b600067ffffffffffffffff8211156112c8576112c86114e4565b5060209081020190565b600082198211156112e5576112e56114b2565b500190565b60008261130a5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b8085111561134c578160001904821115611330576113306114b2565b8085161561133d57918102915b60029094049390800290611314565b509250929050565b600061044c60ff84168360008261136d57506001610384565b8161137a57506000610384565b8160018114611390576002811461139a576113b7565b6001915050610384565b60ff8411156113ab576113ab6114b2565b8360020a915050610384565b5060208310610133831016604e8410600b84101617156113da575081810a610384565b6113e4838361130f565b80600019048211156113f8576113f86114b2565b029392505050565b600081600019048311821515161561141a5761141a6114b2565b500290565b600082821015611431576114316114b2565b500390565b600060ff821660ff841680821015611450576114506114b2565b90039392505050565b60028104600182168061146d57607f821691505b602082108114156114915760e060020a634e487b7102600052602260045260246000fd5b50919050565b60006000198214156114ab576114ab6114b2565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212206b2785398fb5d85e9f4e501b73aeebdf28671c2de2180c0a2e1996c5a262966364736f6c63430008060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b60405161014291906111f3565b60405180910390f35b61015e610159366004611105565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461107b565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c33660046110c9565b61038a565b60085460ff166101a3565b61015e6101e1366004611105565b610453565b6101726101f436600461107b565b600160a060020a031660009081526020819052604090205490565b61021761048f565b005b600554604051600160a060020a039091168152602001610142565b6101356104c8565b61015e61024a366004611105565b6104d7565b61015e61025d366004611105565b61058b565b61017261027036600461107b565b60076020526000908152604090205481565b610172610290366004611096565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461107b565b610598565b6102176102dc36600461112f565b610650565b6060600380546102f090611459565b80601f016020809104026020016040519081016040528092919081815260200182805461031c90611459565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461068b565b5060015b92915050565b60006103978484846107e9565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104395760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446853385840361068b565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061048a9086906112d2565b61068b565b600554600160a060020a031633146104bc5760405160e560020a62461bcd02815260040161043090611248565b6104c660006109a6565b565b6060600480546102f090611459565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105745760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610430565b610581338585840361068b565b5060019392505050565b60006103803384846107e9565b600554600160a060020a031633146105c55760405160e560020a62461bcd02815260040161043090611248565b600160a060020a0381166106445760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610430565b61064d816109a6565b50565b600554600160a060020a0316331461067d5760405160e560020a62461bcd02815260040161043090611248565b6106878282610a05565b5050565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561087b57600160a060020a03831660009081526006602052604081205460085461083891849160ff9182169116610ae8565b600160a060020a0385166000908152600760205260408120805492935083929091906108659084906112d2565b9091555061087590508382610b52565b50505050565b600160a060020a03821660009081526006602052604090205460ff161561099657600160a060020a0382166000908152600660205260408120546008546108ca91849160ff9182169116610ae8565b600160a060020a03841660009081526007602052604090205490915081111561095e5760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f67650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152600760205260408120805483929061098690849061141f565b9091555061087590508482610c34565b6109a1838383610dbf565b505050565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610a595760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e67746873000000000000000000000000006044820152606401610430565b60005b82518110156109a157818181518110610a7757610a776114cb565b602002602001015160066000858481518110610a9557610a956114cb565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610ae090611497565b915050610a5c565b60008260ff168260ff161415610aff57508261044c565b8260ff168260ff161115610b3357610b178383611436565b610b2290600a611354565b610b2c9085611400565b905061044c565b610b3d8284611436565b610b4890600a611354565b610b2c90856112ea565b600160a060020a038216610bab5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610430565b8060026000828254610bbd91906112d2565b9091555050600160a060020a03821660009081526020819052604081208054839290610bea9084906112d2565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610cb35760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03821660009081526020819052604090205481811015610d455760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152602081905260408120838303905560028054849290610d7490849061141f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610e3e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a038216610ebd5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03831660009081526020819052604090205481811015610f4f5760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610f869084906112d2565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fd291815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610ff757600080fd5b919050565b600082601f83011261100d57600080fd5b8135602061102261101d836112ae565b61127d565b828152818101908583018385028701840188101561103f57600080fd5b6000805b8681101561106d57823560ff8116811461105b578283fd5b85529385019391850191600101611043565b509198975050505050505050565b60006020828403121561108d57600080fd5b61044c82610fe0565b600080604083850312156110a957600080fd5b6110b283610fe0565b91506110c060208401610fe0565b90509250929050565b6000806000606084860312156110de57600080fd5b6110e784610fe0565b92506110f560208501610fe0565b9150604084013590509250925092565b6000806040838503121561111857600080fd5b61112183610fe0565b946020939093013593505050565b6000806040838503121561114257600080fd5b823567ffffffffffffffff8082111561115a57600080fd5b818501915085601f83011261116e57600080fd5b8135602061117e61101d836112ae565b82815281810190858301838502870184018b101561119b57600080fd5b600096505b848710156111c5576111b181610fe0565b8352600196909601959183019183016111a0565b50965050860135925050808211156111dc57600080fd5b506111e985828601610ffc565b9150509250929050565b600060208083528351808285015260005b8181101561122057858101830151858201604001528201611204565b81811115611232576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156112a6576112a66114e4565b604052919050565b600067ffffffffffffffff8211156112c8576112c86114e4565b5060209081020190565b600082198211156112e5576112e56114b2565b500190565b60008261130a5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b8085111561134c578160001904821115611330576113306114b2565b8085161561133d57918102915b60029094049390800290611314565b509250929050565b600061044c60ff84168360008261136d57506001610384565b8161137a57506000610384565b8160018114611390576002811461139a576113b7565b6001915050610384565b60ff8411156113ab576113ab6114b2565b8360020a915050610384565b5060208310610133831016604e8410600b84101617156113da575081810a610384565b6113e4838361130f565b80600019048211156113f8576113f86114b2565b029392505050565b600081600019048311821515161561141a5761141a6114b2565b500290565b600082821015611431576114316114b2565b500390565b600060ff821660ff841680821015611450576114506114b2565b90039392505050565b60028104600182168061146d57607f821691505b602082108114156114915760e060020a634e487b7102600052602260045260246000fd5b50919050565b60006000198214156114ab576114ab6114b2565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212206b2785398fb5d85e9f4e501b73aeebdf28671c2de2180c0a2e1996c5a262966364736f6c63430008060033", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", + "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgeBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"name\":\"setSideTokenDecimals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"sideTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20_Amb.sol\":\"BridgeERC20_Amb\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20_Amb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20_Amb is ERC20, Ownable {\\n\\n // decimals of token in side network\\n // example:\\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\\n mapping(address => uint8) public sideTokenDecimals;\\n\\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\\n\\n uint8 _decimals;\\n\\n constructor(\\n string memory name_, string memory symbol_, uint8 decimals_,\\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\\n ) ERC20(name_, symbol_) Ownable() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n }\\n\\n // todo check if we need this func\\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \\\"wrong array lengths\\\");\\n for (uint i = 0; i < bridgeAddresses_.length; i++)\\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\\n }\\n\\n\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n // convert decimals just like in _transfer function\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n amount = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n amount = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n }\\n\\n uint256 currentAllowance = allowance(sender,_msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n // user transfer tokens to ambrosus => need to mint it\\n\\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n\\n\\n // bridge mint money to user; same amount locked on side bridge\\n bridgeBalances[sender] += amount_this;\\n\\n _mint(recipient, amount_this);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n // user withdraw tokens from ambrosus => need to burn it\\n\\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n\\n\\n // user burn tokens; side bridge must have enough tokens to send\\n require(bridgeBalances[recipient] >= amount_this, \\\"not enough locked tokens on bridge\\\");\\n bridgeBalances[recipient] -= amount_this;\\n\\n _burn(sender, amount_this);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n\\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\\n if (dTo == dFrom)\\n return amount;\\n if (dTo > dFrom)\\n return amount * (10 ** (dTo - dFrom));\\n else\\n return amount / (10 ** (dFrom - dTo));\\n }\\n\\n}\\n\",\"keccak256\":\"0xf2f414a753c0e2046491b76a7e7898f5f6820f62f2d6187d3fd061add6a17feb\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162001c6038038062001c608339810160408190526200003491620003fc565b8451859085906200004d9060039060208501906200022a565b508051620000639060049060208401906200022a565b5050506200009262000083620000c6640100000000026401000000009004565b640100000000620000ca810204565b620000a782826401000000006200011c810204565b50506008805460ff191660ff92909216919091179055506200068b9050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80518251146200018c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e6774687300000000000000000000000000604482015260640160405180910390fd5b60005b82518110156200022557818181518110620001ae57620001ae6200062d565b602002602001015160066000858481518110620001cf57620001cf6200062d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff16021790555080806200021c90620005ea565b9150506200018f565b505050565b828054620002389062000594565b90600052602060002090601f0160209004810192826200025c5760008555620002a7565b82601f106200027757805160ff1916838001178555620002a7565b82800160010185558215620002a7579182015b82811115620002a75782518255916020019190600101906200028a565b50620002b5929150620002b9565b5090565b5b80821115620002b55760008155600101620002ba565b600082601f830112620002e257600080fd5b81516020620002fb620002f5836200056e565b6200053b565b82815281810190858301838502870184018810156200031957600080fd5b60005b8581101562000343576200033082620003e5565b845292840192908401906001016200031c565b5090979650505050505050565b600082601f8301126200036257600080fd5b81516001604060020a038111156200037e576200037e6200065c565b602062000394601f8301601f191682016200053b565b8281528582848701011115620003a957600080fd5b60005b83811015620003c9578581018301518282018401528201620003ac565b83811115620003db5760008385840101525b5095945050505050565b805160ff81168114620003f757600080fd5b919050565b600080600080600060a086880312156200041557600080fd5b85516001604060020a03808211156200042d57600080fd5b6200043b89838a0162000350565b96506020915081880151818111156200045357600080fd5b620004618a828b0162000350565b9650506200047260408901620003e5565b94506060880151818111156200048757600080fd5b8801601f81018a136200049957600080fd5b8051620004aa620002f5826200056e565b81815284810190838601868402850187018e1015620004c857600080fd5b600094505b8385101562000503578051600160a060020a0381168114620004ee57600080fd5b835260019490940193918601918601620004cd565b5060808c01519097509450505050808211156200051f57600080fd5b506200052e88828901620002d0565b9150509295509295909350565b604051601f8201601f191681016001604060020a03811182821017156200056657620005666200065c565b604052919050565b60006001604060020a038211156200058a576200058a6200065c565b5060209081020190565b600281046001821680620005a957607f821691505b60208210811415620005e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060001982141562000626577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6115c5806200069b6000396000f3fe608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b6040516101429190611285565b60405180910390f35b61015e610159366004611197565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461110d565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c336600461115b565b61038a565b60085460ff166101a3565b61015e6101e1366004611197565b6104e5565b6101726101f436600461110d565b600160a060020a031660009081526020819052604090205490565b610217610521565b005b600554604051600160a060020a039091168152602001610142565b61013561055a565b61015e61024a366004611197565b610569565b61015e61025d366004611197565b61061d565b61017261027036600461110d565b60076020526000908152604090205481565b610172610290366004611128565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461110d565b61062a565b6102176102dc3660046111c1565b6106e2565b6060600380546102f0906114eb565b80601f016020809104026020016040519081016040528092919081815260200182805461031c906114eb565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461071d565b5060015b92915050565b600061039784848461087b565b600160a060020a03841660009081526006602052604090205460ff16156103ed57600160a060020a0384166000908152600660205260409020546008546103e691849160ff9182169116610a38565b915061043f565b600160a060020a03831660009081526006602052604090205460ff161561043f57600160a060020a03831660009081526006602052604090205460085461043c91849160ff9182169116610a38565b91505b600061044b8533610290565b9050828110156104cb5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104d8853385840361071d565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061051c908690611364565b61071d565b600554600160a060020a0316331461054e5760405160e560020a62461bcd0281526004016104c2906112da565b6105586000610aa2565b565b6060600480546102f0906114eb565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156106065760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016104c2565b610613338585840361071d565b5060019392505050565b600061038033848461087b565b600554600160a060020a031633146106575760405160e560020a62461bcd0281526004016104c2906112da565b600160a060020a0381166106d65760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104c2565b6106df81610aa2565b50565b600554600160a060020a0316331461070f5760405160e560020a62461bcd0281526004016104c2906112da565b6107198282610b01565b5050565b600160a060020a03831661079b5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821661081a5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561090d57600160a060020a0383166000908152600660205260408120546008546108ca91849160ff9182169116610a38565b600160a060020a0385166000908152600760205260408120805492935083929091906108f7908490611364565b9091555061090790508382610be4565b50505050565b600160a060020a03821660009081526006602052604090205460ff1615610a2857600160a060020a03821660009081526006602052604081205460085461095c91849160ff9182169116610a38565b600160a060020a0384166000908152600760205260409020549091508111156109f05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f676500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526007602052604081208054839290610a189084906114b1565b9091555061090790508482610cc6565b610a33838383610e51565b505050565b60008260ff168260ff161415610a4f5750826104de565b8260ff168260ff161115610a8357610a6783836114c8565b610a7290600a6113e6565b610a7c9085611492565b90506104de565b610a8d82846114c8565b610a9890600a6113e6565b610a7c908561137c565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610b555760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064016104c2565b60005b8251811015610a3357818181518110610b7357610b7361155d565b602002602001015160066000858481518110610b9157610b9161155d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610bdc90611529565b915050610b58565b600160a060020a038216610c3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104c2565b8060026000828254610c4f9190611364565b9091555050600160a060020a03821660009081526020819052604081208054839290610c7c908490611364565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610d455760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821660009081526020819052604090205481811015610dd75760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383166000908152602081905260408120838303905560028054849290610e069084906114b1565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610ed05760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a038216610f4f5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526020819052604090205481811015610fe15760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290611018908490611364565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161106491815260200190565b60405180910390a350505050565b8035600160a060020a038116811461108957600080fd5b919050565b600082601f83011261109f57600080fd5b813560206110b46110af83611340565b61130f565b82815281810190858301838502870184018810156110d157600080fd5b6000805b868110156110ff57823560ff811681146110ed578283fd5b855293850193918501916001016110d5565b509198975050505050505050565b60006020828403121561111f57600080fd5b6104de82611072565b6000806040838503121561113b57600080fd5b61114483611072565b915061115260208401611072565b90509250929050565b60008060006060848603121561117057600080fd5b61117984611072565b925061118760208501611072565b9150604084013590509250925092565b600080604083850312156111aa57600080fd5b6111b383611072565b946020939093013593505050565b600080604083850312156111d457600080fd5b823567ffffffffffffffff808211156111ec57600080fd5b818501915085601f83011261120057600080fd5b813560206112106110af83611340565b82815281810190858301838502870184018b101561122d57600080fd5b600096505b848710156112575761124381611072565b835260019690960195918301918301611232565b509650508601359250508082111561126e57600080fd5b5061127b8582860161108e565b9150509250929050565b600060208083528351808285015260005b818110156112b257858101830151858201604001528201611296565b818111156112c4576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561133857611338611576565b604052919050565b600067ffffffffffffffff82111561135a5761135a611576565b5060209081020190565b6000821982111561137757611377611544565b500190565b60008261139c5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b808511156113de5781600019048211156113c2576113c2611544565b808516156113cf57918102915b600290940493908002906113a6565b509250929050565b60006104de60ff8416836000826113ff57506001610384565b8161140c57506000610384565b8160018114611422576002811461142c57611449565b6001915050610384565b60ff84111561143d5761143d611544565b8360020a915050610384565b5060208310610133831016604e8410600b841016171561146c575081810a610384565b61147683836113a1565b806000190482111561148a5761148a611544565b029392505050565b60008160001904831182151516156114ac576114ac611544565b500290565b6000828210156114c3576114c3611544565b500390565b600060ff821660ff8416808210156114e2576114e2611544565b90039392505050565b6002810460018216806114ff57607f821691505b602082108114156115235760e060020a634e487b7102600052602260045260246000fd5b50919050565b600060001982141561153d5761153d611544565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212208c84ff84563dca0a3e128ed404345f130db0415ba23e7368c16a212b29455baf64736f6c63430008060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b6040516101429190611285565b60405180910390f35b61015e610159366004611197565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461110d565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c336600461115b565b61038a565b60085460ff166101a3565b61015e6101e1366004611197565b6104e5565b6101726101f436600461110d565b600160a060020a031660009081526020819052604090205490565b610217610521565b005b600554604051600160a060020a039091168152602001610142565b61013561055a565b61015e61024a366004611197565b610569565b61015e61025d366004611197565b61061d565b61017261027036600461110d565b60076020526000908152604090205481565b610172610290366004611128565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461110d565b61062a565b6102176102dc3660046111c1565b6106e2565b6060600380546102f0906114eb565b80601f016020809104026020016040519081016040528092919081815260200182805461031c906114eb565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461071d565b5060015b92915050565b600061039784848461087b565b600160a060020a03841660009081526006602052604090205460ff16156103ed57600160a060020a0384166000908152600660205260409020546008546103e691849160ff9182169116610a38565b915061043f565b600160a060020a03831660009081526006602052604090205460ff161561043f57600160a060020a03831660009081526006602052604090205460085461043c91849160ff9182169116610a38565b91505b600061044b8533610290565b9050828110156104cb5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104d8853385840361071d565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061051c908690611364565b61071d565b600554600160a060020a0316331461054e5760405160e560020a62461bcd0281526004016104c2906112da565b6105586000610aa2565b565b6060600480546102f0906114eb565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156106065760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016104c2565b610613338585840361071d565b5060019392505050565b600061038033848461087b565b600554600160a060020a031633146106575760405160e560020a62461bcd0281526004016104c2906112da565b600160a060020a0381166106d65760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104c2565b6106df81610aa2565b50565b600554600160a060020a0316331461070f5760405160e560020a62461bcd0281526004016104c2906112da565b6107198282610b01565b5050565b600160a060020a03831661079b5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821661081a5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561090d57600160a060020a0383166000908152600660205260408120546008546108ca91849160ff9182169116610a38565b600160a060020a0385166000908152600760205260408120805492935083929091906108f7908490611364565b9091555061090790508382610be4565b50505050565b600160a060020a03821660009081526006602052604090205460ff1615610a2857600160a060020a03821660009081526006602052604081205460085461095c91849160ff9182169116610a38565b600160a060020a0384166000908152600760205260409020549091508111156109f05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f676500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526007602052604081208054839290610a189084906114b1565b9091555061090790508482610cc6565b610a33838383610e51565b505050565b60008260ff168260ff161415610a4f5750826104de565b8260ff168260ff161115610a8357610a6783836114c8565b610a7290600a6113e6565b610a7c9085611492565b90506104de565b610a8d82846114c8565b610a9890600a6113e6565b610a7c908561137c565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610b555760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064016104c2565b60005b8251811015610a3357818181518110610b7357610b7361155d565b602002602001015160066000858481518110610b9157610b9161155d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610bdc90611529565b915050610b58565b600160a060020a038216610c3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104c2565b8060026000828254610c4f9190611364565b9091555050600160a060020a03821660009081526020819052604081208054839290610c7c908490611364565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610d455760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821660009081526020819052604090205481811015610dd75760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383166000908152602081905260408120838303905560028054849290610e069084906114b1565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610ed05760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a038216610f4f5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526020819052604090205481811015610fe15760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290611018908490611364565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161106491815260200190565b60405180910390a350505050565b8035600160a060020a038116811461108957600080fd5b919050565b600082601f83011261109f57600080fd5b813560206110b46110af83611340565b61130f565b82815281810190858301838502870184018810156110d157600080fd5b6000805b868110156110ff57823560ff811681146110ed578283fd5b855293850193918501916001016110d5565b509198975050505050505050565b60006020828403121561111f57600080fd5b6104de82611072565b6000806040838503121561113b57600080fd5b61114483611072565b915061115260208401611072565b90509250929050565b60008060006060848603121561117057600080fd5b61117984611072565b925061118760208501611072565b9150604084013590509250925092565b600080604083850312156111aa57600080fd5b6111b383611072565b946020939093013593505050565b600080604083850312156111d457600080fd5b823567ffffffffffffffff808211156111ec57600080fd5b818501915085601f83011261120057600080fd5b813560206112106110af83611340565b82815281810190858301838502870184018b101561122d57600080fd5b600096505b848710156112575761124381611072565b835260019690960195918301918301611232565b509650508601359250508082111561126e57600080fd5b5061127b8582860161108e565b9150509250929050565b600060208083528351808285015260005b818110156112b257858101830151858201604001528201611296565b818111156112c4576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561133857611338611576565b604052919050565b600067ffffffffffffffff82111561135a5761135a611576565b5060209081020190565b6000821982111561137757611377611544565b500190565b60008261139c5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b808511156113de5781600019048211156113c2576113c2611544565b808516156113cf57918102915b600290940493908002906113a6565b509250929050565b60006104de60ff8416836000826113ff57506001610384565b8161140c57506000610384565b8160018114611422576002811461142c57611449565b6001915050610384565b60ff84111561143d5761143d611544565b8360020a915050610384565b5060208310610133831016604e8410600b841016171561146c575081810a610384565b61147683836113a1565b806000190482111561148a5761148a611544565b029392505050565b60008160001904831182151516156114ac576114ac611544565b500290565b6000828210156114c3576114c3611544565b500390565b600060ff821660ff8416808210156114e2576114e2611544565b90039392505050565b6002810460018216806114ff57607f821691505b602082108114156115235760e060020a634e487b7102600052602260045260246000fd5b50919050565b600060001982141561153d5761153d611544565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212208c84ff84563dca0a3e128ed404345f130db0415ba23e7368c16a212b29455baf64736f6c63430008060033", "devdoc": { "kind": "dev", "methods": { @@ -510,7 +510,7 @@ "storageLayout": { "storage": [ { - "astId": 991, + "astId": 1371, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_balances", "offset": 0, @@ -518,7 +518,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 997, + "astId": 1377, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_allowances", "offset": 0, @@ -526,7 +526,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 999, + "astId": 1379, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_totalSupply", "offset": 0, @@ -534,7 +534,7 @@ "type": "t_uint256" }, { - "astId": 1001, + "astId": 1381, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_name", "offset": 0, @@ -542,7 +542,7 @@ "type": "t_string_storage" }, { - "astId": 1003, + "astId": 1383, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_symbol", "offset": 0, @@ -550,7 +550,7 @@ "type": "t_string_storage" }, { - "astId": 879, + "astId": 1259, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_owner", "offset": 0, @@ -558,7 +558,7 @@ "type": "t_address" }, { - "astId": 9196, + "astId": 4869, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "sideTokenDecimals", "offset": 0, @@ -566,7 +566,7 @@ "type": "t_mapping(t_address,t_uint8)" }, { - "astId": 9200, + "astId": 4873, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "bridgeBalances", "offset": 0, @@ -574,7 +574,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 9202, + "astId": 4875, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_decimals", "offset": 0, diff --git a/contracts/deployments/test/amb/USDT.json b/contracts/deployments/test/amb/USDT.json index 310f6c79..c8649703 100644 --- a/contracts/deployments/test/amb/USDT.json +++ b/contracts/deployments/test/amb/USDT.json @@ -1,5 +1,5 @@ { - "address": "0x2Af6411938cc6a1BE90bB74494A57b971D2Ff079", + "address": "0x1bB13b68DbA3571415B4092802777B5cA15de897", "abi": [ { "inputs": [ @@ -411,22 +411,22 @@ "type": "function" } ], - "transactionHash": "0xf22a08ad59553f4775a4f6676916afe7d5f104ad2441c298e5ab4485a2ba1b50", + "transactionHash": "0x365728c7f955bf1f370eecfec36b649d646ccdaa6ecd316d420396517d01b074", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x2Af6411938cc6a1BE90bB74494A57b971D2Ff079", + "contractAddress": "0x1bB13b68DbA3571415B4092802777B5cA15de897", "transactionIndex": 0, - "gasUsed": "1709233", - "logsBloom": "0x00080000000000000000002000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000002000000000000000000000000000000000000000000000000000000000000020000000000002000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xad11110954a4858e083ce14e95c8874ff637cbd7e0347bcd34718fb85d399d29", - "transactionHash": "0xf22a08ad59553f4775a4f6676916afe7d5f104ad2441c298e5ab4485a2ba1b50", + "gasUsed": "1702714", + "logsBloom": "0x00000000000000000000002000000000000000000000000000800000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000002000000000000000000000000000000000000004000000080000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x346abb5d15428b4d6c78b4fcd3f07a21d38f5b271ee258f9173615dcf35bb8e8", + "transactionHash": "0x365728c7f955bf1f370eecfec36b649d646ccdaa6ecd316d420396517d01b074", "logs": [ { "transactionIndex": 0, - "blockNumber": 1771061, - "transactionHash": "0xf22a08ad59553f4775a4f6676916afe7d5f104ad2441c298e5ab4485a2ba1b50", - "address": "0x2Af6411938cc6a1BE90bB74494A57b971D2Ff079", + "blockNumber": 33942, + "transactionHash": "0x365728c7f955bf1f370eecfec36b649d646ccdaa6ecd316d420396517d01b074", + "address": "0x1bB13b68DbA3571415B4092802777B5cA15de897", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -434,11 +434,11 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0xad11110954a4858e083ce14e95c8874ff637cbd7e0347bcd34718fb85d399d29" + "blockHash": "0x346abb5d15428b4d6c78b4fcd3f07a21d38f5b271ee258f9173615dcf35bb8e8" } ], - "blockNumber": 1771061, - "cumulativeGasUsed": "1709233", + "blockNumber": 33942, + "cumulativeGasUsed": "1702714", "status": 1, "byzantium": true }, @@ -446,20 +446,14 @@ "Tether USD", "USDT", 18, - [ - "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", - "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0" - ], - [ - 6, - 18 - ] + [], + [] ], "numDeployments": 1, - "solcInputHash": "14835e48c656ebed02c4fc9389a12566", - "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgeBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"name\":\"setSideTokenDecimals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"sideTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20_Amb.sol\":\"BridgeERC20_Amb\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20_Amb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20_Amb is ERC20, Ownable {\\n\\n // decimals of token in side network\\n // example:\\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\\n mapping(address => uint8) public sideTokenDecimals;\\n\\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\\n\\n uint8 _decimals;\\n\\n constructor(\\n string memory name_, string memory symbol_, uint8 decimals_,\\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\\n ) ERC20(name_, symbol_) Ownable() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n }\\n\\n // todo check if we need this func\\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \\\"wrong array lengths\\\");\\n for (uint i = 0; i < bridgeAddresses_.length; i++)\\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n // todo events\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n // user transfer tokens to ambrosus => need to mint it\\n\\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n\\n\\n // bridge mint money to user; same amount locked on side bridge\\n bridgeBalances[sender] += amount_this;\\n\\n _mint(recipient, amount_this);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n // user withdraw tokens from ambrosus => need to burn it\\n\\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n\\n\\n // user burn tokens; side bridge must have enough tokens to send\\n require(bridgeBalances[recipient] >= amount_this, \\\"not enough locked tokens on bridge\\\");\\n bridgeBalances[recipient] -= amount_this;\\n\\n _burn(sender, amount_this);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n\\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\\n if (dTo == dFrom)\\n return amount;\\n if (dTo > dFrom)\\n return amount * (10 ** (dTo - dFrom));\\n else\\n return amount / (10 ** (dFrom - dTo));\\n }\\n\\n}\\n\",\"keccak256\":\"0xd4ef121631f7a651ebe5f73c8565f862fa43cae907804e7876b29e87ce36a1cf\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001bce38038062001bce8339810160408190526200003491620003fc565b8451859085906200004d9060039060208501906200022a565b508051620000639060049060208401906200022a565b5050506200009262000083620000c6640100000000026401000000009004565b640100000000620000ca810204565b620000a782826401000000006200011c810204565b50506008805460ff191660ff92909216919091179055506200068b9050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80518251146200018c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e6774687300000000000000000000000000604482015260640160405180910390fd5b60005b82518110156200022557818181518110620001ae57620001ae6200062d565b602002602001015160066000858481518110620001cf57620001cf6200062d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff16021790555080806200021c90620005ea565b9150506200018f565b505050565b828054620002389062000594565b90600052602060002090601f0160209004810192826200025c5760008555620002a7565b82601f106200027757805160ff1916838001178555620002a7565b82800160010185558215620002a7579182015b82811115620002a75782518255916020019190600101906200028a565b50620002b5929150620002b9565b5090565b5b80821115620002b55760008155600101620002ba565b600082601f830112620002e257600080fd5b81516020620002fb620002f5836200056e565b6200053b565b82815281810190858301838502870184018810156200031957600080fd5b60005b8581101562000343576200033082620003e5565b845292840192908401906001016200031c565b5090979650505050505050565b600082601f8301126200036257600080fd5b81516001604060020a038111156200037e576200037e6200065c565b602062000394601f8301601f191682016200053b565b8281528582848701011115620003a957600080fd5b60005b83811015620003c9578581018301518282018401528201620003ac565b83811115620003db5760008385840101525b5095945050505050565b805160ff81168114620003f757600080fd5b919050565b600080600080600060a086880312156200041557600080fd5b85516001604060020a03808211156200042d57600080fd5b6200043b89838a0162000350565b96506020915081880151818111156200045357600080fd5b620004618a828b0162000350565b9650506200047260408901620003e5565b94506060880151818111156200048757600080fd5b8801601f81018a136200049957600080fd5b8051620004aa620002f5826200056e565b81815284810190838601868402850187018e1015620004c857600080fd5b600094505b8385101562000503578051600160a060020a0381168114620004ee57600080fd5b835260019490940193918601918601620004cd565b5060808c01519097509450505050808211156200051f57600080fd5b506200052e88828901620002d0565b9150509295509295909350565b604051601f8201601f191681016001604060020a03811182821017156200056657620005666200065c565b604052919050565b60006001604060020a038211156200058a576200058a6200065c565b5060209081020190565b600281046001821680620005a957607f821691505b60208210811415620005e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060001982141562000626577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611533806200069b6000396000f3fe608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b60405161014291906111f3565b60405180910390f35b61015e610159366004611105565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461107b565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c33660046110c9565b61038a565b60085460ff166101a3565b61015e6101e1366004611105565b610453565b6101726101f436600461107b565b600160a060020a031660009081526020819052604090205490565b61021761048f565b005b600554604051600160a060020a039091168152602001610142565b6101356104c8565b61015e61024a366004611105565b6104d7565b61015e61025d366004611105565b61058b565b61017261027036600461107b565b60076020526000908152604090205481565b610172610290366004611096565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461107b565b610598565b6102176102dc36600461112f565b610650565b6060600380546102f090611459565b80601f016020809104026020016040519081016040528092919081815260200182805461031c90611459565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461068b565b5060015b92915050565b60006103978484846107e9565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104395760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446853385840361068b565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061048a9086906112d2565b61068b565b600554600160a060020a031633146104bc5760405160e560020a62461bcd02815260040161043090611248565b6104c660006109a6565b565b6060600480546102f090611459565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105745760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610430565b610581338585840361068b565b5060019392505050565b60006103803384846107e9565b600554600160a060020a031633146105c55760405160e560020a62461bcd02815260040161043090611248565b600160a060020a0381166106445760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610430565b61064d816109a6565b50565b600554600160a060020a0316331461067d5760405160e560020a62461bcd02815260040161043090611248565b6106878282610a05565b5050565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561087b57600160a060020a03831660009081526006602052604081205460085461083891849160ff9182169116610ae8565b600160a060020a0385166000908152600760205260408120805492935083929091906108659084906112d2565b9091555061087590508382610b52565b50505050565b600160a060020a03821660009081526006602052604090205460ff161561099657600160a060020a0382166000908152600660205260408120546008546108ca91849160ff9182169116610ae8565b600160a060020a03841660009081526007602052604090205490915081111561095e5760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f67650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152600760205260408120805483929061098690849061141f565b9091555061087590508482610c34565b6109a1838383610dbf565b505050565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610a595760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e67746873000000000000000000000000006044820152606401610430565b60005b82518110156109a157818181518110610a7757610a776114cb565b602002602001015160066000858481518110610a9557610a956114cb565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610ae090611497565b915050610a5c565b60008260ff168260ff161415610aff57508261044c565b8260ff168260ff161115610b3357610b178383611436565b610b2290600a611354565b610b2c9085611400565b905061044c565b610b3d8284611436565b610b4890600a611354565b610b2c90856112ea565b600160a060020a038216610bab5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610430565b8060026000828254610bbd91906112d2565b9091555050600160a060020a03821660009081526020819052604081208054839290610bea9084906112d2565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610cb35760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03821660009081526020819052604090205481811015610d455760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152602081905260408120838303905560028054849290610d7490849061141f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610e3e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a038216610ebd5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03831660009081526020819052604090205481811015610f4f5760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610f869084906112d2565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fd291815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610ff757600080fd5b919050565b600082601f83011261100d57600080fd5b8135602061102261101d836112ae565b61127d565b828152818101908583018385028701840188101561103f57600080fd5b6000805b8681101561106d57823560ff8116811461105b578283fd5b85529385019391850191600101611043565b509198975050505050505050565b60006020828403121561108d57600080fd5b61044c82610fe0565b600080604083850312156110a957600080fd5b6110b283610fe0565b91506110c060208401610fe0565b90509250929050565b6000806000606084860312156110de57600080fd5b6110e784610fe0565b92506110f560208501610fe0565b9150604084013590509250925092565b6000806040838503121561111857600080fd5b61112183610fe0565b946020939093013593505050565b6000806040838503121561114257600080fd5b823567ffffffffffffffff8082111561115a57600080fd5b818501915085601f83011261116e57600080fd5b8135602061117e61101d836112ae565b82815281810190858301838502870184018b101561119b57600080fd5b600096505b848710156111c5576111b181610fe0565b8352600196909601959183019183016111a0565b50965050860135925050808211156111dc57600080fd5b506111e985828601610ffc565b9150509250929050565b600060208083528351808285015260005b8181101561122057858101830151858201604001528201611204565b81811115611232576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156112a6576112a66114e4565b604052919050565b600067ffffffffffffffff8211156112c8576112c86114e4565b5060209081020190565b600082198211156112e5576112e56114b2565b500190565b60008261130a5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b8085111561134c578160001904821115611330576113306114b2565b8085161561133d57918102915b60029094049390800290611314565b509250929050565b600061044c60ff84168360008261136d57506001610384565b8161137a57506000610384565b8160018114611390576002811461139a576113b7565b6001915050610384565b60ff8411156113ab576113ab6114b2565b8360020a915050610384565b5060208310610133831016604e8410600b84101617156113da575081810a610384565b6113e4838361130f565b80600019048211156113f8576113f86114b2565b029392505050565b600081600019048311821515161561141a5761141a6114b2565b500290565b600082821015611431576114316114b2565b500390565b600060ff821660ff841680821015611450576114506114b2565b90039392505050565b60028104600182168061146d57607f821691505b602082108114156114915760e060020a634e487b7102600052602260045260246000fd5b50919050565b60006000198214156114ab576114ab6114b2565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212206b2785398fb5d85e9f4e501b73aeebdf28671c2de2180c0a2e1996c5a262966364736f6c63430008060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b60405161014291906111f3565b60405180910390f35b61015e610159366004611105565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461107b565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c33660046110c9565b61038a565b60085460ff166101a3565b61015e6101e1366004611105565b610453565b6101726101f436600461107b565b600160a060020a031660009081526020819052604090205490565b61021761048f565b005b600554604051600160a060020a039091168152602001610142565b6101356104c8565b61015e61024a366004611105565b6104d7565b61015e61025d366004611105565b61058b565b61017261027036600461107b565b60076020526000908152604090205481565b610172610290366004611096565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461107b565b610598565b6102176102dc36600461112f565b610650565b6060600380546102f090611459565b80601f016020809104026020016040519081016040528092919081815260200182805461031c90611459565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461068b565b5060015b92915050565b60006103978484846107e9565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104395760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446853385840361068b565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061048a9086906112d2565b61068b565b600554600160a060020a031633146104bc5760405160e560020a62461bcd02815260040161043090611248565b6104c660006109a6565b565b6060600480546102f090611459565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105745760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610430565b610581338585840361068b565b5060019392505050565b60006103803384846107e9565b600554600160a060020a031633146105c55760405160e560020a62461bcd02815260040161043090611248565b600160a060020a0381166106445760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610430565b61064d816109a6565b50565b600554600160a060020a0316331461067d5760405160e560020a62461bcd02815260040161043090611248565b6106878282610a05565b5050565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561087b57600160a060020a03831660009081526006602052604081205460085461083891849160ff9182169116610ae8565b600160a060020a0385166000908152600760205260408120805492935083929091906108659084906112d2565b9091555061087590508382610b52565b50505050565b600160a060020a03821660009081526006602052604090205460ff161561099657600160a060020a0382166000908152600660205260408120546008546108ca91849160ff9182169116610ae8565b600160a060020a03841660009081526007602052604090205490915081111561095e5760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f67650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152600760205260408120805483929061098690849061141f565b9091555061087590508482610c34565b6109a1838383610dbf565b505050565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610a595760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e67746873000000000000000000000000006044820152606401610430565b60005b82518110156109a157818181518110610a7757610a776114cb565b602002602001015160066000858481518110610a9557610a956114cb565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610ae090611497565b915050610a5c565b60008260ff168260ff161415610aff57508261044c565b8260ff168260ff161115610b3357610b178383611436565b610b2290600a611354565b610b2c9085611400565b905061044c565b610b3d8284611436565b610b4890600a611354565b610b2c90856112ea565b600160a060020a038216610bab5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610430565b8060026000828254610bbd91906112d2565b9091555050600160a060020a03821660009081526020819052604081208054839290610bea9084906112d2565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610cb35760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03821660009081526020819052604090205481811015610d455760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152602081905260408120838303905560028054849290610d7490849061141f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610e3e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a038216610ebd5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03831660009081526020819052604090205481811015610f4f5760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610f869084906112d2565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fd291815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610ff757600080fd5b919050565b600082601f83011261100d57600080fd5b8135602061102261101d836112ae565b61127d565b828152818101908583018385028701840188101561103f57600080fd5b6000805b8681101561106d57823560ff8116811461105b578283fd5b85529385019391850191600101611043565b509198975050505050505050565b60006020828403121561108d57600080fd5b61044c82610fe0565b600080604083850312156110a957600080fd5b6110b283610fe0565b91506110c060208401610fe0565b90509250929050565b6000806000606084860312156110de57600080fd5b6110e784610fe0565b92506110f560208501610fe0565b9150604084013590509250925092565b6000806040838503121561111857600080fd5b61112183610fe0565b946020939093013593505050565b6000806040838503121561114257600080fd5b823567ffffffffffffffff8082111561115a57600080fd5b818501915085601f83011261116e57600080fd5b8135602061117e61101d836112ae565b82815281810190858301838502870184018b101561119b57600080fd5b600096505b848710156111c5576111b181610fe0565b8352600196909601959183019183016111a0565b50965050860135925050808211156111dc57600080fd5b506111e985828601610ffc565b9150509250929050565b600060208083528351808285015260005b8181101561122057858101830151858201604001528201611204565b81811115611232576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156112a6576112a66114e4565b604052919050565b600067ffffffffffffffff8211156112c8576112c86114e4565b5060209081020190565b600082198211156112e5576112e56114b2565b500190565b60008261130a5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b8085111561134c578160001904821115611330576113306114b2565b8085161561133d57918102915b60029094049390800290611314565b509250929050565b600061044c60ff84168360008261136d57506001610384565b8161137a57506000610384565b8160018114611390576002811461139a576113b7565b6001915050610384565b60ff8411156113ab576113ab6114b2565b8360020a915050610384565b5060208310610133831016604e8410600b84101617156113da575081810a610384565b6113e4838361130f565b80600019048211156113f8576113f86114b2565b029392505050565b600081600019048311821515161561141a5761141a6114b2565b500290565b600082821015611431576114316114b2565b500390565b600060ff821660ff841680821015611450576114506114b2565b90039392505050565b60028104600182168061146d57607f821691505b602082108114156114915760e060020a634e487b7102600052602260045260246000fd5b50919050565b60006000198214156114ab576114ab6114b2565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212206b2785398fb5d85e9f4e501b73aeebdf28671c2de2180c0a2e1996c5a262966364736f6c63430008060033", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", + "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgeBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"name\":\"setSideTokenDecimals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"sideTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20_Amb.sol\":\"BridgeERC20_Amb\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20_Amb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20_Amb is ERC20, Ownable {\\n\\n // decimals of token in side network\\n // example:\\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\\n mapping(address => uint8) public sideTokenDecimals;\\n\\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\\n\\n uint8 _decimals;\\n\\n constructor(\\n string memory name_, string memory symbol_, uint8 decimals_,\\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\\n ) ERC20(name_, symbol_) Ownable() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n }\\n\\n // todo check if we need this func\\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \\\"wrong array lengths\\\");\\n for (uint i = 0; i < bridgeAddresses_.length; i++)\\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\\n }\\n\\n\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n // convert decimals just like in _transfer function\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n amount = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n amount = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n }\\n\\n uint256 currentAllowance = allowance(sender,_msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n // user transfer tokens to ambrosus => need to mint it\\n\\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n\\n\\n // bridge mint money to user; same amount locked on side bridge\\n bridgeBalances[sender] += amount_this;\\n\\n _mint(recipient, amount_this);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n // user withdraw tokens from ambrosus => need to burn it\\n\\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n\\n\\n // user burn tokens; side bridge must have enough tokens to send\\n require(bridgeBalances[recipient] >= amount_this, \\\"not enough locked tokens on bridge\\\");\\n bridgeBalances[recipient] -= amount_this;\\n\\n _burn(sender, amount_this);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n\\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\\n if (dTo == dFrom)\\n return amount;\\n if (dTo > dFrom)\\n return amount * (10 ** (dTo - dFrom));\\n else\\n return amount / (10 ** (dFrom - dTo));\\n }\\n\\n}\\n\",\"keccak256\":\"0xf2f414a753c0e2046491b76a7e7898f5f6820f62f2d6187d3fd061add6a17feb\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162001c6038038062001c608339810160408190526200003491620003fc565b8451859085906200004d9060039060208501906200022a565b508051620000639060049060208401906200022a565b5050506200009262000083620000c6640100000000026401000000009004565b640100000000620000ca810204565b620000a782826401000000006200011c810204565b50506008805460ff191660ff92909216919091179055506200068b9050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80518251146200018c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e6774687300000000000000000000000000604482015260640160405180910390fd5b60005b82518110156200022557818181518110620001ae57620001ae6200062d565b602002602001015160066000858481518110620001cf57620001cf6200062d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff16021790555080806200021c90620005ea565b9150506200018f565b505050565b828054620002389062000594565b90600052602060002090601f0160209004810192826200025c5760008555620002a7565b82601f106200027757805160ff1916838001178555620002a7565b82800160010185558215620002a7579182015b82811115620002a75782518255916020019190600101906200028a565b50620002b5929150620002b9565b5090565b5b80821115620002b55760008155600101620002ba565b600082601f830112620002e257600080fd5b81516020620002fb620002f5836200056e565b6200053b565b82815281810190858301838502870184018810156200031957600080fd5b60005b8581101562000343576200033082620003e5565b845292840192908401906001016200031c565b5090979650505050505050565b600082601f8301126200036257600080fd5b81516001604060020a038111156200037e576200037e6200065c565b602062000394601f8301601f191682016200053b565b8281528582848701011115620003a957600080fd5b60005b83811015620003c9578581018301518282018401528201620003ac565b83811115620003db5760008385840101525b5095945050505050565b805160ff81168114620003f757600080fd5b919050565b600080600080600060a086880312156200041557600080fd5b85516001604060020a03808211156200042d57600080fd5b6200043b89838a0162000350565b96506020915081880151818111156200045357600080fd5b620004618a828b0162000350565b9650506200047260408901620003e5565b94506060880151818111156200048757600080fd5b8801601f81018a136200049957600080fd5b8051620004aa620002f5826200056e565b81815284810190838601868402850187018e1015620004c857600080fd5b600094505b8385101562000503578051600160a060020a0381168114620004ee57600080fd5b835260019490940193918601918601620004cd565b5060808c01519097509450505050808211156200051f57600080fd5b506200052e88828901620002d0565b9150509295509295909350565b604051601f8201601f191681016001604060020a03811182821017156200056657620005666200065c565b604052919050565b60006001604060020a038211156200058a576200058a6200065c565b5060209081020190565b600281046001821680620005a957607f821691505b60208210811415620005e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060001982141562000626577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6115c5806200069b6000396000f3fe608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b6040516101429190611285565b60405180910390f35b61015e610159366004611197565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461110d565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c336600461115b565b61038a565b60085460ff166101a3565b61015e6101e1366004611197565b6104e5565b6101726101f436600461110d565b600160a060020a031660009081526020819052604090205490565b610217610521565b005b600554604051600160a060020a039091168152602001610142565b61013561055a565b61015e61024a366004611197565b610569565b61015e61025d366004611197565b61061d565b61017261027036600461110d565b60076020526000908152604090205481565b610172610290366004611128565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461110d565b61062a565b6102176102dc3660046111c1565b6106e2565b6060600380546102f0906114eb565b80601f016020809104026020016040519081016040528092919081815260200182805461031c906114eb565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461071d565b5060015b92915050565b600061039784848461087b565b600160a060020a03841660009081526006602052604090205460ff16156103ed57600160a060020a0384166000908152600660205260409020546008546103e691849160ff9182169116610a38565b915061043f565b600160a060020a03831660009081526006602052604090205460ff161561043f57600160a060020a03831660009081526006602052604090205460085461043c91849160ff9182169116610a38565b91505b600061044b8533610290565b9050828110156104cb5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104d8853385840361071d565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061051c908690611364565b61071d565b600554600160a060020a0316331461054e5760405160e560020a62461bcd0281526004016104c2906112da565b6105586000610aa2565b565b6060600480546102f0906114eb565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156106065760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016104c2565b610613338585840361071d565b5060019392505050565b600061038033848461087b565b600554600160a060020a031633146106575760405160e560020a62461bcd0281526004016104c2906112da565b600160a060020a0381166106d65760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104c2565b6106df81610aa2565b50565b600554600160a060020a0316331461070f5760405160e560020a62461bcd0281526004016104c2906112da565b6107198282610b01565b5050565b600160a060020a03831661079b5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821661081a5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561090d57600160a060020a0383166000908152600660205260408120546008546108ca91849160ff9182169116610a38565b600160a060020a0385166000908152600760205260408120805492935083929091906108f7908490611364565b9091555061090790508382610be4565b50505050565b600160a060020a03821660009081526006602052604090205460ff1615610a2857600160a060020a03821660009081526006602052604081205460085461095c91849160ff9182169116610a38565b600160a060020a0384166000908152600760205260409020549091508111156109f05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f676500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526007602052604081208054839290610a189084906114b1565b9091555061090790508482610cc6565b610a33838383610e51565b505050565b60008260ff168260ff161415610a4f5750826104de565b8260ff168260ff161115610a8357610a6783836114c8565b610a7290600a6113e6565b610a7c9085611492565b90506104de565b610a8d82846114c8565b610a9890600a6113e6565b610a7c908561137c565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610b555760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064016104c2565b60005b8251811015610a3357818181518110610b7357610b7361155d565b602002602001015160066000858481518110610b9157610b9161155d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610bdc90611529565b915050610b58565b600160a060020a038216610c3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104c2565b8060026000828254610c4f9190611364565b9091555050600160a060020a03821660009081526020819052604081208054839290610c7c908490611364565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610d455760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821660009081526020819052604090205481811015610dd75760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383166000908152602081905260408120838303905560028054849290610e069084906114b1565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610ed05760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a038216610f4f5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526020819052604090205481811015610fe15760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290611018908490611364565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161106491815260200190565b60405180910390a350505050565b8035600160a060020a038116811461108957600080fd5b919050565b600082601f83011261109f57600080fd5b813560206110b46110af83611340565b61130f565b82815281810190858301838502870184018810156110d157600080fd5b6000805b868110156110ff57823560ff811681146110ed578283fd5b855293850193918501916001016110d5565b509198975050505050505050565b60006020828403121561111f57600080fd5b6104de82611072565b6000806040838503121561113b57600080fd5b61114483611072565b915061115260208401611072565b90509250929050565b60008060006060848603121561117057600080fd5b61117984611072565b925061118760208501611072565b9150604084013590509250925092565b600080604083850312156111aa57600080fd5b6111b383611072565b946020939093013593505050565b600080604083850312156111d457600080fd5b823567ffffffffffffffff808211156111ec57600080fd5b818501915085601f83011261120057600080fd5b813560206112106110af83611340565b82815281810190858301838502870184018b101561122d57600080fd5b600096505b848710156112575761124381611072565b835260019690960195918301918301611232565b509650508601359250508082111561126e57600080fd5b5061127b8582860161108e565b9150509250929050565b600060208083528351808285015260005b818110156112b257858101830151858201604001528201611296565b818111156112c4576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561133857611338611576565b604052919050565b600067ffffffffffffffff82111561135a5761135a611576565b5060209081020190565b6000821982111561137757611377611544565b500190565b60008261139c5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b808511156113de5781600019048211156113c2576113c2611544565b808516156113cf57918102915b600290940493908002906113a6565b509250929050565b60006104de60ff8416836000826113ff57506001610384565b8161140c57506000610384565b8160018114611422576002811461142c57611449565b6001915050610384565b60ff84111561143d5761143d611544565b8360020a915050610384565b5060208310610133831016604e8410600b841016171561146c575081810a610384565b61147683836113a1565b806000190482111561148a5761148a611544565b029392505050565b60008160001904831182151516156114ac576114ac611544565b500290565b6000828210156114c3576114c3611544565b500390565b600060ff821660ff8416808210156114e2576114e2611544565b90039392505050565b6002810460018216806114ff57607f821691505b602082108114156115235760e060020a634e487b7102600052602260045260246000fd5b50919050565b600060001982141561153d5761153d611544565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212208c84ff84563dca0a3e128ed404345f130db0415ba23e7368c16a212b29455baf64736f6c63430008060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b6040516101429190611285565b60405180910390f35b61015e610159366004611197565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461110d565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c336600461115b565b61038a565b60085460ff166101a3565b61015e6101e1366004611197565b6104e5565b6101726101f436600461110d565b600160a060020a031660009081526020819052604090205490565b610217610521565b005b600554604051600160a060020a039091168152602001610142565b61013561055a565b61015e61024a366004611197565b610569565b61015e61025d366004611197565b61061d565b61017261027036600461110d565b60076020526000908152604090205481565b610172610290366004611128565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461110d565b61062a565b6102176102dc3660046111c1565b6106e2565b6060600380546102f0906114eb565b80601f016020809104026020016040519081016040528092919081815260200182805461031c906114eb565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461071d565b5060015b92915050565b600061039784848461087b565b600160a060020a03841660009081526006602052604090205460ff16156103ed57600160a060020a0384166000908152600660205260409020546008546103e691849160ff9182169116610a38565b915061043f565b600160a060020a03831660009081526006602052604090205460ff161561043f57600160a060020a03831660009081526006602052604090205460085461043c91849160ff9182169116610a38565b91505b600061044b8533610290565b9050828110156104cb5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104d8853385840361071d565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061051c908690611364565b61071d565b600554600160a060020a0316331461054e5760405160e560020a62461bcd0281526004016104c2906112da565b6105586000610aa2565b565b6060600480546102f0906114eb565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156106065760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016104c2565b610613338585840361071d565b5060019392505050565b600061038033848461087b565b600554600160a060020a031633146106575760405160e560020a62461bcd0281526004016104c2906112da565b600160a060020a0381166106d65760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104c2565b6106df81610aa2565b50565b600554600160a060020a0316331461070f5760405160e560020a62461bcd0281526004016104c2906112da565b6107198282610b01565b5050565b600160a060020a03831661079b5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821661081a5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561090d57600160a060020a0383166000908152600660205260408120546008546108ca91849160ff9182169116610a38565b600160a060020a0385166000908152600760205260408120805492935083929091906108f7908490611364565b9091555061090790508382610be4565b50505050565b600160a060020a03821660009081526006602052604090205460ff1615610a2857600160a060020a03821660009081526006602052604081205460085461095c91849160ff9182169116610a38565b600160a060020a0384166000908152600760205260409020549091508111156109f05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f676500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526007602052604081208054839290610a189084906114b1565b9091555061090790508482610cc6565b610a33838383610e51565b505050565b60008260ff168260ff161415610a4f5750826104de565b8260ff168260ff161115610a8357610a6783836114c8565b610a7290600a6113e6565b610a7c9085611492565b90506104de565b610a8d82846114c8565b610a9890600a6113e6565b610a7c908561137c565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610b555760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064016104c2565b60005b8251811015610a3357818181518110610b7357610b7361155d565b602002602001015160066000858481518110610b9157610b9161155d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610bdc90611529565b915050610b58565b600160a060020a038216610c3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104c2565b8060026000828254610c4f9190611364565b9091555050600160a060020a03821660009081526020819052604081208054839290610c7c908490611364565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610d455760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821660009081526020819052604090205481811015610dd75760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383166000908152602081905260408120838303905560028054849290610e069084906114b1565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610ed05760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a038216610f4f5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526020819052604090205481811015610fe15760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290611018908490611364565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161106491815260200190565b60405180910390a350505050565b8035600160a060020a038116811461108957600080fd5b919050565b600082601f83011261109f57600080fd5b813560206110b46110af83611340565b61130f565b82815281810190858301838502870184018810156110d157600080fd5b6000805b868110156110ff57823560ff811681146110ed578283fd5b855293850193918501916001016110d5565b509198975050505050505050565b60006020828403121561111f57600080fd5b6104de82611072565b6000806040838503121561113b57600080fd5b61114483611072565b915061115260208401611072565b90509250929050565b60008060006060848603121561117057600080fd5b61117984611072565b925061118760208501611072565b9150604084013590509250925092565b600080604083850312156111aa57600080fd5b6111b383611072565b946020939093013593505050565b600080604083850312156111d457600080fd5b823567ffffffffffffffff808211156111ec57600080fd5b818501915085601f83011261120057600080fd5b813560206112106110af83611340565b82815281810190858301838502870184018b101561122d57600080fd5b600096505b848710156112575761124381611072565b835260019690960195918301918301611232565b509650508601359250508082111561126e57600080fd5b5061127b8582860161108e565b9150509250929050565b600060208083528351808285015260005b818110156112b257858101830151858201604001528201611296565b818111156112c4576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561133857611338611576565b604052919050565b600067ffffffffffffffff82111561135a5761135a611576565b5060209081020190565b6000821982111561137757611377611544565b500190565b60008261139c5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b808511156113de5781600019048211156113c2576113c2611544565b808516156113cf57918102915b600290940493908002906113a6565b509250929050565b60006104de60ff8416836000826113ff57506001610384565b8161140c57506000610384565b8160018114611422576002811461142c57611449565b6001915050610384565b60ff84111561143d5761143d611544565b8360020a915050610384565b5060208310610133831016604e8410600b841016171561146c575081810a610384565b61147683836113a1565b806000190482111561148a5761148a611544565b029392505050565b60008160001904831182151516156114ac576114ac611544565b500290565b6000828210156114c3576114c3611544565b500390565b600060ff821660ff8416808210156114e2576114e2611544565b90039392505050565b6002810460018216806114ff57607f821691505b602082108114156115235760e060020a634e487b7102600052602260045260246000fd5b50919050565b600060001982141561153d5761153d611544565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212208c84ff84563dca0a3e128ed404345f130db0415ba23e7368c16a212b29455baf64736f6c63430008060033", "devdoc": { "kind": "dev", "methods": { @@ -516,7 +510,7 @@ "storageLayout": { "storage": [ { - "astId": 991, + "astId": 1371, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_balances", "offset": 0, @@ -524,7 +518,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 997, + "astId": 1377, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_allowances", "offset": 0, @@ -532,7 +526,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 999, + "astId": 1379, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_totalSupply", "offset": 0, @@ -540,7 +534,7 @@ "type": "t_uint256" }, { - "astId": 1001, + "astId": 1381, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_name", "offset": 0, @@ -548,7 +542,7 @@ "type": "t_string_storage" }, { - "astId": 1003, + "astId": 1383, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_symbol", "offset": 0, @@ -556,7 +550,7 @@ "type": "t_string_storage" }, { - "astId": 879, + "astId": 1259, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_owner", "offset": 0, @@ -564,7 +558,7 @@ "type": "t_address" }, { - "astId": 9229, + "astId": 4869, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "sideTokenDecimals", "offset": 0, @@ -572,7 +566,7 @@ "type": "t_mapping(t_address,t_uint8)" }, { - "astId": 9233, + "astId": 4873, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "bridgeBalances", "offset": 0, @@ -580,7 +574,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 9235, + "astId": 4875, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_decimals", "offset": 0, diff --git a/contracts/deployments/test/amb/WBNB.json b/contracts/deployments/test/amb/WBNB.json index a65389e3..d27177e2 100644 --- a/contracts/deployments/test/amb/WBNB.json +++ b/contracts/deployments/test/amb/WBNB.json @@ -1,5 +1,5 @@ { - "address": "0xD52F6e6aD16904a23E5cA0309098652502CA97E8", + "address": "0x871c1F199bD17F1cbed559DE974a7F1568b6E1Ea", "abi": [ { "inputs": [ @@ -411,22 +411,22 @@ "type": "function" } ], - "transactionHash": "0x85f27c09f4844e173f8bc39d7eeb4fb6c84f559890acb47a2f3379a90f02f2a1", + "transactionHash": "0xfa8f28e5e0b2c31b074468468b9d137f0ef551b457859f1b1260e0531c52d34f", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0xD52F6e6aD16904a23E5cA0309098652502CA97E8", + "contractAddress": "0x871c1F199bD17F1cbed559DE974a7F1568b6E1Ea", "transactionIndex": 0, - "gasUsed": "1663873", - "logsBloom": "0x00000000000000000001002000000000020000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000002000000000000000000000000000000000000000000000000000000000000020000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x93cdfb9cac1f62b7a5e993a5d8e7ea3dd74aba579a009d5133a34896f41d67da", - "transactionHash": "0x85f27c09f4844e173f8bc39d7eeb4fb6c84f559890acb47a2f3379a90f02f2a1", + "gasUsed": "1702778", + "logsBloom": "0x00000000000000000000002000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000010020000000004000000000800000000000000000000000000000000400000002000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000001000000000000000000000000000000000000000000000", + "blockHash": "0x4b48897b9d577d3a432924e150011942de78bb859e227f3e6085f1cfbe62cceb", + "transactionHash": "0xfa8f28e5e0b2c31b074468468b9d137f0ef551b457859f1b1260e0531c52d34f", "logs": [ { "transactionIndex": 0, - "blockNumber": 1406696, - "transactionHash": "0x85f27c09f4844e173f8bc39d7eeb4fb6c84f559890acb47a2f3379a90f02f2a1", - "address": "0xD52F6e6aD16904a23E5cA0309098652502CA97E8", + "blockNumber": 33939, + "transactionHash": "0xfa8f28e5e0b2c31b074468468b9d137f0ef551b457859f1b1260e0531c52d34f", + "address": "0x871c1F199bD17F1cbed559DE974a7F1568b6E1Ea", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -434,11 +434,11 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x93cdfb9cac1f62b7a5e993a5d8e7ea3dd74aba579a009d5133a34896f41d67da" + "blockHash": "0x4b48897b9d577d3a432924e150011942de78bb859e227f3e6085f1cfbe62cceb" } ], - "blockNumber": 1406696, - "cumulativeGasUsed": "1663873", + "blockNumber": 33939, + "cumulativeGasUsed": "1702778", "status": 1, "byzantium": true }, @@ -450,10 +450,10 @@ [] ], "numDeployments": 1, - "solcInputHash": "13963204c1e3ae6f33bd8024ced50cd9", - "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgeBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"name\":\"setSideTokenDecimals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"sideTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20_Amb.sol\":\"BridgeERC20_Amb\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20_Amb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20_Amb is ERC20, Ownable {\\n\\n // decimals of token in side network\\n // example:\\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\\n mapping(address => uint8) public sideTokenDecimals;\\n\\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\\n\\n uint8 _decimals;\\n\\n constructor(\\n string memory name_, string memory symbol_, uint8 decimals_,\\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\\n ) ERC20(name_, symbol_) Ownable() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n }\\n\\n // todo check if we need this func\\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \\\"wrong array lengths\\\");\\n for (uint i = 0; i < bridgeAddresses_.length; i++)\\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n // todo events\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n // user transfer tokens to ambrosus => need to mint it\\n\\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n\\n\\n // bridge mint money to user; same amount locked on side bridge\\n bridgeBalances[sender] += amount_this;\\n\\n _mint(recipient, amount_this);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n // user withdraw tokens from ambrosus => need to burn it\\n\\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n\\n\\n // user burn tokens; side bridge must have enough tokens to send\\n require(bridgeBalances[recipient] >= amount_this, \\\"not enough locked tokens on bridge\\\");\\n bridgeBalances[recipient] -= amount_this;\\n\\n _burn(sender, amount_this);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n\\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\\n if (dTo == dFrom)\\n return amount;\\n if (dTo > dFrom)\\n return amount * (10 ** (dTo - dFrom));\\n else\\n return amount / (10 ** (dFrom - dTo));\\n }\\n\\n}\\n\",\"keccak256\":\"0xd4ef121631f7a651ebe5f73c8565f862fa43cae907804e7876b29e87ce36a1cf\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001bce38038062001bce8339810160408190526200003491620003fc565b8451859085906200004d9060039060208501906200022a565b508051620000639060049060208401906200022a565b5050506200009262000083620000c6640100000000026401000000009004565b640100000000620000ca810204565b620000a782826401000000006200011c810204565b50506008805460ff191660ff92909216919091179055506200068b9050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80518251146200018c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e6774687300000000000000000000000000604482015260640160405180910390fd5b60005b82518110156200022557818181518110620001ae57620001ae6200062d565b602002602001015160066000858481518110620001cf57620001cf6200062d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff16021790555080806200021c90620005ea565b9150506200018f565b505050565b828054620002389062000594565b90600052602060002090601f0160209004810192826200025c5760008555620002a7565b82601f106200027757805160ff1916838001178555620002a7565b82800160010185558215620002a7579182015b82811115620002a75782518255916020019190600101906200028a565b50620002b5929150620002b9565b5090565b5b80821115620002b55760008155600101620002ba565b600082601f830112620002e257600080fd5b81516020620002fb620002f5836200056e565b6200053b565b82815281810190858301838502870184018810156200031957600080fd5b60005b8581101562000343576200033082620003e5565b845292840192908401906001016200031c565b5090979650505050505050565b600082601f8301126200036257600080fd5b81516001604060020a038111156200037e576200037e6200065c565b602062000394601f8301601f191682016200053b565b8281528582848701011115620003a957600080fd5b60005b83811015620003c9578581018301518282018401528201620003ac565b83811115620003db5760008385840101525b5095945050505050565b805160ff81168114620003f757600080fd5b919050565b600080600080600060a086880312156200041557600080fd5b85516001604060020a03808211156200042d57600080fd5b6200043b89838a0162000350565b96506020915081880151818111156200045357600080fd5b620004618a828b0162000350565b9650506200047260408901620003e5565b94506060880151818111156200048757600080fd5b8801601f81018a136200049957600080fd5b8051620004aa620002f5826200056e565b81815284810190838601868402850187018e1015620004c857600080fd5b600094505b8385101562000503578051600160a060020a0381168114620004ee57600080fd5b835260019490940193918601918601620004cd565b5060808c01519097509450505050808211156200051f57600080fd5b506200052e88828901620002d0565b9150509295509295909350565b604051601f8201601f191681016001604060020a03811182821017156200056657620005666200065c565b604052919050565b60006001604060020a038211156200058a576200058a6200065c565b5060209081020190565b600281046001821680620005a957607f821691505b60208210811415620005e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060001982141562000626577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611533806200069b6000396000f3fe608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b60405161014291906111f3565b60405180910390f35b61015e610159366004611105565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461107b565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c33660046110c9565b61038a565b60085460ff166101a3565b61015e6101e1366004611105565b610453565b6101726101f436600461107b565b600160a060020a031660009081526020819052604090205490565b61021761048f565b005b600554604051600160a060020a039091168152602001610142565b6101356104c8565b61015e61024a366004611105565b6104d7565b61015e61025d366004611105565b61058b565b61017261027036600461107b565b60076020526000908152604090205481565b610172610290366004611096565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461107b565b610598565b6102176102dc36600461112f565b610650565b6060600380546102f090611459565b80601f016020809104026020016040519081016040528092919081815260200182805461031c90611459565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461068b565b5060015b92915050565b60006103978484846107e9565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104395760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446853385840361068b565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061048a9086906112d2565b61068b565b600554600160a060020a031633146104bc5760405160e560020a62461bcd02815260040161043090611248565b6104c660006109a6565b565b6060600480546102f090611459565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105745760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610430565b610581338585840361068b565b5060019392505050565b60006103803384846107e9565b600554600160a060020a031633146105c55760405160e560020a62461bcd02815260040161043090611248565b600160a060020a0381166106445760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610430565b61064d816109a6565b50565b600554600160a060020a0316331461067d5760405160e560020a62461bcd02815260040161043090611248565b6106878282610a05565b5050565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561087b57600160a060020a03831660009081526006602052604081205460085461083891849160ff9182169116610ae8565b600160a060020a0385166000908152600760205260408120805492935083929091906108659084906112d2565b9091555061087590508382610b52565b50505050565b600160a060020a03821660009081526006602052604090205460ff161561099657600160a060020a0382166000908152600660205260408120546008546108ca91849160ff9182169116610ae8565b600160a060020a03841660009081526007602052604090205490915081111561095e5760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f67650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152600760205260408120805483929061098690849061141f565b9091555061087590508482610c34565b6109a1838383610dbf565b505050565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610a595760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e67746873000000000000000000000000006044820152606401610430565b60005b82518110156109a157818181518110610a7757610a776114cb565b602002602001015160066000858481518110610a9557610a956114cb565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610ae090611497565b915050610a5c565b60008260ff168260ff161415610aff57508261044c565b8260ff168260ff161115610b3357610b178383611436565b610b2290600a611354565b610b2c9085611400565b905061044c565b610b3d8284611436565b610b4890600a611354565b610b2c90856112ea565b600160a060020a038216610bab5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610430565b8060026000828254610bbd91906112d2565b9091555050600160a060020a03821660009081526020819052604081208054839290610bea9084906112d2565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610cb35760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03821660009081526020819052604090205481811015610d455760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152602081905260408120838303905560028054849290610d7490849061141f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610e3e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a038216610ebd5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03831660009081526020819052604090205481811015610f4f5760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610f869084906112d2565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fd291815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610ff757600080fd5b919050565b600082601f83011261100d57600080fd5b8135602061102261101d836112ae565b61127d565b828152818101908583018385028701840188101561103f57600080fd5b6000805b8681101561106d57823560ff8116811461105b578283fd5b85529385019391850191600101611043565b509198975050505050505050565b60006020828403121561108d57600080fd5b61044c82610fe0565b600080604083850312156110a957600080fd5b6110b283610fe0565b91506110c060208401610fe0565b90509250929050565b6000806000606084860312156110de57600080fd5b6110e784610fe0565b92506110f560208501610fe0565b9150604084013590509250925092565b6000806040838503121561111857600080fd5b61112183610fe0565b946020939093013593505050565b6000806040838503121561114257600080fd5b823567ffffffffffffffff8082111561115a57600080fd5b818501915085601f83011261116e57600080fd5b8135602061117e61101d836112ae565b82815281810190858301838502870184018b101561119b57600080fd5b600096505b848710156111c5576111b181610fe0565b8352600196909601959183019183016111a0565b50965050860135925050808211156111dc57600080fd5b506111e985828601610ffc565b9150509250929050565b600060208083528351808285015260005b8181101561122057858101830151858201604001528201611204565b81811115611232576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156112a6576112a66114e4565b604052919050565b600067ffffffffffffffff8211156112c8576112c86114e4565b5060209081020190565b600082198211156112e5576112e56114b2565b500190565b60008261130a5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b8085111561134c578160001904821115611330576113306114b2565b8085161561133d57918102915b60029094049390800290611314565b509250929050565b600061044c60ff84168360008261136d57506001610384565b8161137a57506000610384565b8160018114611390576002811461139a576113b7565b6001915050610384565b60ff8411156113ab576113ab6114b2565b8360020a915050610384565b5060208310610133831016604e8410600b84101617156113da575081810a610384565b6113e4838361130f565b80600019048211156113f8576113f86114b2565b029392505050565b600081600019048311821515161561141a5761141a6114b2565b500290565b600082821015611431576114316114b2565b500390565b600060ff821660ff841680821015611450576114506114b2565b90039392505050565b60028104600182168061146d57607f821691505b602082108114156114915760e060020a634e487b7102600052602260045260246000fd5b50919050565b60006000198214156114ab576114ab6114b2565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212206b2785398fb5d85e9f4e501b73aeebdf28671c2de2180c0a2e1996c5a262966364736f6c63430008060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b60405161014291906111f3565b60405180910390f35b61015e610159366004611105565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461107b565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c33660046110c9565b61038a565b60085460ff166101a3565b61015e6101e1366004611105565b610453565b6101726101f436600461107b565b600160a060020a031660009081526020819052604090205490565b61021761048f565b005b600554604051600160a060020a039091168152602001610142565b6101356104c8565b61015e61024a366004611105565b6104d7565b61015e61025d366004611105565b61058b565b61017261027036600461107b565b60076020526000908152604090205481565b610172610290366004611096565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461107b565b610598565b6102176102dc36600461112f565b610650565b6060600380546102f090611459565b80601f016020809104026020016040519081016040528092919081815260200182805461031c90611459565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461068b565b5060015b92915050565b60006103978484846107e9565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104395760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446853385840361068b565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061048a9086906112d2565b61068b565b600554600160a060020a031633146104bc5760405160e560020a62461bcd02815260040161043090611248565b6104c660006109a6565b565b6060600480546102f090611459565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105745760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610430565b610581338585840361068b565b5060019392505050565b60006103803384846107e9565b600554600160a060020a031633146105c55760405160e560020a62461bcd02815260040161043090611248565b600160a060020a0381166106445760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610430565b61064d816109a6565b50565b600554600160a060020a0316331461067d5760405160e560020a62461bcd02815260040161043090611248565b6106878282610a05565b5050565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561087b57600160a060020a03831660009081526006602052604081205460085461083891849160ff9182169116610ae8565b600160a060020a0385166000908152600760205260408120805492935083929091906108659084906112d2565b9091555061087590508382610b52565b50505050565b600160a060020a03821660009081526006602052604090205460ff161561099657600160a060020a0382166000908152600660205260408120546008546108ca91849160ff9182169116610ae8565b600160a060020a03841660009081526007602052604090205490915081111561095e5760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f67650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152600760205260408120805483929061098690849061141f565b9091555061087590508482610c34565b6109a1838383610dbf565b505050565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610a595760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e67746873000000000000000000000000006044820152606401610430565b60005b82518110156109a157818181518110610a7757610a776114cb565b602002602001015160066000858481518110610a9557610a956114cb565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610ae090611497565b915050610a5c565b60008260ff168260ff161415610aff57508261044c565b8260ff168260ff161115610b3357610b178383611436565b610b2290600a611354565b610b2c9085611400565b905061044c565b610b3d8284611436565b610b4890600a611354565b610b2c90856112ea565b600160a060020a038216610bab5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610430565b8060026000828254610bbd91906112d2565b9091555050600160a060020a03821660009081526020819052604081208054839290610bea9084906112d2565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610cb35760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03821660009081526020819052604090205481811015610d455760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152602081905260408120838303905560028054849290610d7490849061141f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610e3e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a038216610ebd5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03831660009081526020819052604090205481811015610f4f5760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610f869084906112d2565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fd291815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610ff757600080fd5b919050565b600082601f83011261100d57600080fd5b8135602061102261101d836112ae565b61127d565b828152818101908583018385028701840188101561103f57600080fd5b6000805b8681101561106d57823560ff8116811461105b578283fd5b85529385019391850191600101611043565b509198975050505050505050565b60006020828403121561108d57600080fd5b61044c82610fe0565b600080604083850312156110a957600080fd5b6110b283610fe0565b91506110c060208401610fe0565b90509250929050565b6000806000606084860312156110de57600080fd5b6110e784610fe0565b92506110f560208501610fe0565b9150604084013590509250925092565b6000806040838503121561111857600080fd5b61112183610fe0565b946020939093013593505050565b6000806040838503121561114257600080fd5b823567ffffffffffffffff8082111561115a57600080fd5b818501915085601f83011261116e57600080fd5b8135602061117e61101d836112ae565b82815281810190858301838502870184018b101561119b57600080fd5b600096505b848710156111c5576111b181610fe0565b8352600196909601959183019183016111a0565b50965050860135925050808211156111dc57600080fd5b506111e985828601610ffc565b9150509250929050565b600060208083528351808285015260005b8181101561122057858101830151858201604001528201611204565b81811115611232576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156112a6576112a66114e4565b604052919050565b600067ffffffffffffffff8211156112c8576112c86114e4565b5060209081020190565b600082198211156112e5576112e56114b2565b500190565b60008261130a5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b8085111561134c578160001904821115611330576113306114b2565b8085161561133d57918102915b60029094049390800290611314565b509250929050565b600061044c60ff84168360008261136d57506001610384565b8161137a57506000610384565b8160018114611390576002811461139a576113b7565b6001915050610384565b60ff8411156113ab576113ab6114b2565b8360020a915050610384565b5060208310610133831016604e8410600b84101617156113da575081810a610384565b6113e4838361130f565b80600019048211156113f8576113f86114b2565b029392505050565b600081600019048311821515161561141a5761141a6114b2565b500290565b600082821015611431576114316114b2565b500390565b600060ff821660ff841680821015611450576114506114b2565b90039392505050565b60028104600182168061146d57607f821691505b602082108114156114915760e060020a634e487b7102600052602260045260246000fd5b50919050565b60006000198214156114ab576114ab6114b2565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212206b2785398fb5d85e9f4e501b73aeebdf28671c2de2180c0a2e1996c5a262966364736f6c63430008060033", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", + "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgeBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"name\":\"setSideTokenDecimals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"sideTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20_Amb.sol\":\"BridgeERC20_Amb\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20_Amb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20_Amb is ERC20, Ownable {\\n\\n // decimals of token in side network\\n // example:\\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\\n mapping(address => uint8) public sideTokenDecimals;\\n\\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\\n\\n uint8 _decimals;\\n\\n constructor(\\n string memory name_, string memory symbol_, uint8 decimals_,\\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\\n ) ERC20(name_, symbol_) Ownable() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n }\\n\\n // todo check if we need this func\\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \\\"wrong array lengths\\\");\\n for (uint i = 0; i < bridgeAddresses_.length; i++)\\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\\n }\\n\\n\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n // convert decimals just like in _transfer function\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n amount = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n amount = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n }\\n\\n uint256 currentAllowance = allowance(sender,_msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n // user transfer tokens to ambrosus => need to mint it\\n\\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n\\n\\n // bridge mint money to user; same amount locked on side bridge\\n bridgeBalances[sender] += amount_this;\\n\\n _mint(recipient, amount_this);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n // user withdraw tokens from ambrosus => need to burn it\\n\\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n\\n\\n // user burn tokens; side bridge must have enough tokens to send\\n require(bridgeBalances[recipient] >= amount_this, \\\"not enough locked tokens on bridge\\\");\\n bridgeBalances[recipient] -= amount_this;\\n\\n _burn(sender, amount_this);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n\\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\\n if (dTo == dFrom)\\n return amount;\\n if (dTo > dFrom)\\n return amount * (10 ** (dTo - dFrom));\\n else\\n return amount / (10 ** (dFrom - dTo));\\n }\\n\\n}\\n\",\"keccak256\":\"0xf2f414a753c0e2046491b76a7e7898f5f6820f62f2d6187d3fd061add6a17feb\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162001c6038038062001c608339810160408190526200003491620003fc565b8451859085906200004d9060039060208501906200022a565b508051620000639060049060208401906200022a565b5050506200009262000083620000c6640100000000026401000000009004565b640100000000620000ca810204565b620000a782826401000000006200011c810204565b50506008805460ff191660ff92909216919091179055506200068b9050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80518251146200018c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e6774687300000000000000000000000000604482015260640160405180910390fd5b60005b82518110156200022557818181518110620001ae57620001ae6200062d565b602002602001015160066000858481518110620001cf57620001cf6200062d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff16021790555080806200021c90620005ea565b9150506200018f565b505050565b828054620002389062000594565b90600052602060002090601f0160209004810192826200025c5760008555620002a7565b82601f106200027757805160ff1916838001178555620002a7565b82800160010185558215620002a7579182015b82811115620002a75782518255916020019190600101906200028a565b50620002b5929150620002b9565b5090565b5b80821115620002b55760008155600101620002ba565b600082601f830112620002e257600080fd5b81516020620002fb620002f5836200056e565b6200053b565b82815281810190858301838502870184018810156200031957600080fd5b60005b8581101562000343576200033082620003e5565b845292840192908401906001016200031c565b5090979650505050505050565b600082601f8301126200036257600080fd5b81516001604060020a038111156200037e576200037e6200065c565b602062000394601f8301601f191682016200053b565b8281528582848701011115620003a957600080fd5b60005b83811015620003c9578581018301518282018401528201620003ac565b83811115620003db5760008385840101525b5095945050505050565b805160ff81168114620003f757600080fd5b919050565b600080600080600060a086880312156200041557600080fd5b85516001604060020a03808211156200042d57600080fd5b6200043b89838a0162000350565b96506020915081880151818111156200045357600080fd5b620004618a828b0162000350565b9650506200047260408901620003e5565b94506060880151818111156200048757600080fd5b8801601f81018a136200049957600080fd5b8051620004aa620002f5826200056e565b81815284810190838601868402850187018e1015620004c857600080fd5b600094505b8385101562000503578051600160a060020a0381168114620004ee57600080fd5b835260019490940193918601918601620004cd565b5060808c01519097509450505050808211156200051f57600080fd5b506200052e88828901620002d0565b9150509295509295909350565b604051601f8201601f191681016001604060020a03811182821017156200056657620005666200065c565b604052919050565b60006001604060020a038211156200058a576200058a6200065c565b5060209081020190565b600281046001821680620005a957607f821691505b60208210811415620005e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060001982141562000626577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6115c5806200069b6000396000f3fe608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b6040516101429190611285565b60405180910390f35b61015e610159366004611197565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461110d565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c336600461115b565b61038a565b60085460ff166101a3565b61015e6101e1366004611197565b6104e5565b6101726101f436600461110d565b600160a060020a031660009081526020819052604090205490565b610217610521565b005b600554604051600160a060020a039091168152602001610142565b61013561055a565b61015e61024a366004611197565b610569565b61015e61025d366004611197565b61061d565b61017261027036600461110d565b60076020526000908152604090205481565b610172610290366004611128565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461110d565b61062a565b6102176102dc3660046111c1565b6106e2565b6060600380546102f0906114eb565b80601f016020809104026020016040519081016040528092919081815260200182805461031c906114eb565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461071d565b5060015b92915050565b600061039784848461087b565b600160a060020a03841660009081526006602052604090205460ff16156103ed57600160a060020a0384166000908152600660205260409020546008546103e691849160ff9182169116610a38565b915061043f565b600160a060020a03831660009081526006602052604090205460ff161561043f57600160a060020a03831660009081526006602052604090205460085461043c91849160ff9182169116610a38565b91505b600061044b8533610290565b9050828110156104cb5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104d8853385840361071d565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061051c908690611364565b61071d565b600554600160a060020a0316331461054e5760405160e560020a62461bcd0281526004016104c2906112da565b6105586000610aa2565b565b6060600480546102f0906114eb565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156106065760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016104c2565b610613338585840361071d565b5060019392505050565b600061038033848461087b565b600554600160a060020a031633146106575760405160e560020a62461bcd0281526004016104c2906112da565b600160a060020a0381166106d65760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104c2565b6106df81610aa2565b50565b600554600160a060020a0316331461070f5760405160e560020a62461bcd0281526004016104c2906112da565b6107198282610b01565b5050565b600160a060020a03831661079b5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821661081a5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561090d57600160a060020a0383166000908152600660205260408120546008546108ca91849160ff9182169116610a38565b600160a060020a0385166000908152600760205260408120805492935083929091906108f7908490611364565b9091555061090790508382610be4565b50505050565b600160a060020a03821660009081526006602052604090205460ff1615610a2857600160a060020a03821660009081526006602052604081205460085461095c91849160ff9182169116610a38565b600160a060020a0384166000908152600760205260409020549091508111156109f05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f676500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526007602052604081208054839290610a189084906114b1565b9091555061090790508482610cc6565b610a33838383610e51565b505050565b60008260ff168260ff161415610a4f5750826104de565b8260ff168260ff161115610a8357610a6783836114c8565b610a7290600a6113e6565b610a7c9085611492565b90506104de565b610a8d82846114c8565b610a9890600a6113e6565b610a7c908561137c565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610b555760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064016104c2565b60005b8251811015610a3357818181518110610b7357610b7361155d565b602002602001015160066000858481518110610b9157610b9161155d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610bdc90611529565b915050610b58565b600160a060020a038216610c3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104c2565b8060026000828254610c4f9190611364565b9091555050600160a060020a03821660009081526020819052604081208054839290610c7c908490611364565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610d455760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821660009081526020819052604090205481811015610dd75760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383166000908152602081905260408120838303905560028054849290610e069084906114b1565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610ed05760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a038216610f4f5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526020819052604090205481811015610fe15760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290611018908490611364565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161106491815260200190565b60405180910390a350505050565b8035600160a060020a038116811461108957600080fd5b919050565b600082601f83011261109f57600080fd5b813560206110b46110af83611340565b61130f565b82815281810190858301838502870184018810156110d157600080fd5b6000805b868110156110ff57823560ff811681146110ed578283fd5b855293850193918501916001016110d5565b509198975050505050505050565b60006020828403121561111f57600080fd5b6104de82611072565b6000806040838503121561113b57600080fd5b61114483611072565b915061115260208401611072565b90509250929050565b60008060006060848603121561117057600080fd5b61117984611072565b925061118760208501611072565b9150604084013590509250925092565b600080604083850312156111aa57600080fd5b6111b383611072565b946020939093013593505050565b600080604083850312156111d457600080fd5b823567ffffffffffffffff808211156111ec57600080fd5b818501915085601f83011261120057600080fd5b813560206112106110af83611340565b82815281810190858301838502870184018b101561122d57600080fd5b600096505b848710156112575761124381611072565b835260019690960195918301918301611232565b509650508601359250508082111561126e57600080fd5b5061127b8582860161108e565b9150509250929050565b600060208083528351808285015260005b818110156112b257858101830151858201604001528201611296565b818111156112c4576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561133857611338611576565b604052919050565b600067ffffffffffffffff82111561135a5761135a611576565b5060209081020190565b6000821982111561137757611377611544565b500190565b60008261139c5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b808511156113de5781600019048211156113c2576113c2611544565b808516156113cf57918102915b600290940493908002906113a6565b509250929050565b60006104de60ff8416836000826113ff57506001610384565b8161140c57506000610384565b8160018114611422576002811461142c57611449565b6001915050610384565b60ff84111561143d5761143d611544565b8360020a915050610384565b5060208310610133831016604e8410600b841016171561146c575081810a610384565b61147683836113a1565b806000190482111561148a5761148a611544565b029392505050565b60008160001904831182151516156114ac576114ac611544565b500290565b6000828210156114c3576114c3611544565b500390565b600060ff821660ff8416808210156114e2576114e2611544565b90039392505050565b6002810460018216806114ff57607f821691505b602082108114156115235760e060020a634e487b7102600052602260045260246000fd5b50919050565b600060001982141561153d5761153d611544565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212208c84ff84563dca0a3e128ed404345f130db0415ba23e7368c16a212b29455baf64736f6c63430008060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b6040516101429190611285565b60405180910390f35b61015e610159366004611197565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461110d565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c336600461115b565b61038a565b60085460ff166101a3565b61015e6101e1366004611197565b6104e5565b6101726101f436600461110d565b600160a060020a031660009081526020819052604090205490565b610217610521565b005b600554604051600160a060020a039091168152602001610142565b61013561055a565b61015e61024a366004611197565b610569565b61015e61025d366004611197565b61061d565b61017261027036600461110d565b60076020526000908152604090205481565b610172610290366004611128565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461110d565b61062a565b6102176102dc3660046111c1565b6106e2565b6060600380546102f0906114eb565b80601f016020809104026020016040519081016040528092919081815260200182805461031c906114eb565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461071d565b5060015b92915050565b600061039784848461087b565b600160a060020a03841660009081526006602052604090205460ff16156103ed57600160a060020a0384166000908152600660205260409020546008546103e691849160ff9182169116610a38565b915061043f565b600160a060020a03831660009081526006602052604090205460ff161561043f57600160a060020a03831660009081526006602052604090205460085461043c91849160ff9182169116610a38565b91505b600061044b8533610290565b9050828110156104cb5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104d8853385840361071d565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061051c908690611364565b61071d565b600554600160a060020a0316331461054e5760405160e560020a62461bcd0281526004016104c2906112da565b6105586000610aa2565b565b6060600480546102f0906114eb565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156106065760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016104c2565b610613338585840361071d565b5060019392505050565b600061038033848461087b565b600554600160a060020a031633146106575760405160e560020a62461bcd0281526004016104c2906112da565b600160a060020a0381166106d65760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104c2565b6106df81610aa2565b50565b600554600160a060020a0316331461070f5760405160e560020a62461bcd0281526004016104c2906112da565b6107198282610b01565b5050565b600160a060020a03831661079b5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821661081a5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561090d57600160a060020a0383166000908152600660205260408120546008546108ca91849160ff9182169116610a38565b600160a060020a0385166000908152600760205260408120805492935083929091906108f7908490611364565b9091555061090790508382610be4565b50505050565b600160a060020a03821660009081526006602052604090205460ff1615610a2857600160a060020a03821660009081526006602052604081205460085461095c91849160ff9182169116610a38565b600160a060020a0384166000908152600760205260409020549091508111156109f05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f676500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526007602052604081208054839290610a189084906114b1565b9091555061090790508482610cc6565b610a33838383610e51565b505050565b60008260ff168260ff161415610a4f5750826104de565b8260ff168260ff161115610a8357610a6783836114c8565b610a7290600a6113e6565b610a7c9085611492565b90506104de565b610a8d82846114c8565b610a9890600a6113e6565b610a7c908561137c565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610b555760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064016104c2565b60005b8251811015610a3357818181518110610b7357610b7361155d565b602002602001015160066000858481518110610b9157610b9161155d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610bdc90611529565b915050610b58565b600160a060020a038216610c3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104c2565b8060026000828254610c4f9190611364565b9091555050600160a060020a03821660009081526020819052604081208054839290610c7c908490611364565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610d455760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821660009081526020819052604090205481811015610dd75760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383166000908152602081905260408120838303905560028054849290610e069084906114b1565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610ed05760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a038216610f4f5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526020819052604090205481811015610fe15760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290611018908490611364565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161106491815260200190565b60405180910390a350505050565b8035600160a060020a038116811461108957600080fd5b919050565b600082601f83011261109f57600080fd5b813560206110b46110af83611340565b61130f565b82815281810190858301838502870184018810156110d157600080fd5b6000805b868110156110ff57823560ff811681146110ed578283fd5b855293850193918501916001016110d5565b509198975050505050505050565b60006020828403121561111f57600080fd5b6104de82611072565b6000806040838503121561113b57600080fd5b61114483611072565b915061115260208401611072565b90509250929050565b60008060006060848603121561117057600080fd5b61117984611072565b925061118760208501611072565b9150604084013590509250925092565b600080604083850312156111aa57600080fd5b6111b383611072565b946020939093013593505050565b600080604083850312156111d457600080fd5b823567ffffffffffffffff808211156111ec57600080fd5b818501915085601f83011261120057600080fd5b813560206112106110af83611340565b82815281810190858301838502870184018b101561122d57600080fd5b600096505b848710156112575761124381611072565b835260019690960195918301918301611232565b509650508601359250508082111561126e57600080fd5b5061127b8582860161108e565b9150509250929050565b600060208083528351808285015260005b818110156112b257858101830151858201604001528201611296565b818111156112c4576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561133857611338611576565b604052919050565b600067ffffffffffffffff82111561135a5761135a611576565b5060209081020190565b6000821982111561137757611377611544565b500190565b60008261139c5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b808511156113de5781600019048211156113c2576113c2611544565b808516156113cf57918102915b600290940493908002906113a6565b509250929050565b60006104de60ff8416836000826113ff57506001610384565b8161140c57506000610384565b8160018114611422576002811461142c57611449565b6001915050610384565b60ff84111561143d5761143d611544565b8360020a915050610384565b5060208310610133831016604e8410600b841016171561146c575081810a610384565b61147683836113a1565b806000190482111561148a5761148a611544565b029392505050565b60008160001904831182151516156114ac576114ac611544565b500290565b6000828210156114c3576114c3611544565b500390565b600060ff821660ff8416808210156114e2576114e2611544565b90039392505050565b6002810460018216806114ff57607f821691505b602082108114156115235760e060020a634e487b7102600052602260045260246000fd5b50919050565b600060001982141561153d5761153d611544565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212208c84ff84563dca0a3e128ed404345f130db0415ba23e7368c16a212b29455baf64736f6c63430008060033", "devdoc": { "kind": "dev", "methods": { @@ -510,7 +510,7 @@ "storageLayout": { "storage": [ { - "astId": 991, + "astId": 1371, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_balances", "offset": 0, @@ -518,7 +518,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 997, + "astId": 1377, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_allowances", "offset": 0, @@ -526,7 +526,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 999, + "astId": 1379, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_totalSupply", "offset": 0, @@ -534,7 +534,7 @@ "type": "t_uint256" }, { - "astId": 1001, + "astId": 1381, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_name", "offset": 0, @@ -542,7 +542,7 @@ "type": "t_string_storage" }, { - "astId": 1003, + "astId": 1383, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_symbol", "offset": 0, @@ -550,7 +550,7 @@ "type": "t_string_storage" }, { - "astId": 879, + "astId": 1259, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_owner", "offset": 0, @@ -558,7 +558,7 @@ "type": "t_address" }, { - "astId": 9196, + "astId": 4869, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "sideTokenDecimals", "offset": 0, @@ -566,7 +566,7 @@ "type": "t_mapping(t_address,t_uint8)" }, { - "astId": 9200, + "astId": 4873, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "bridgeBalances", "offset": 0, @@ -574,7 +574,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 9202, + "astId": 4875, "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", "label": "_decimals", "offset": 0, diff --git a/contracts/deployments/test/amb/WETH.json b/contracts/deployments/test/amb/WETH.json deleted file mode 100644 index 5277f324..00000000 --- a/contracts/deployments/test/amb/WETH.json +++ /dev/null @@ -1,629 +0,0 @@ -{ - "address": "0x075dE66D19CA867387c75C880CffddBA9A3E9763", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "bridgeAddresses_", - "type": "address[]" - }, - { - "internalType": "uint8[]", - "name": "sideTokenDecimals_", - "type": "uint8[]" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "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": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "bridgeBalances", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "bridgeAddresses_", - "type": "address[]" - }, - { - "internalType": "uint8[]", - "name": "sideTokenDecimals_", - "type": "uint8[]" - } - ], - "name": "setSideTokenDecimals", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "sideTokenDecimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xb2ddcc778bd1d374b3bfeaa3543f54f172fd8deaa1d0846547cb4ddad9f27283", - "receipt": { - "to": null, - "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x075dE66D19CA867387c75C880CffddBA9A3E9763", - "transactionIndex": 0, - "gasUsed": "1664001", - "logsBloom": "0x00000000000000000000002000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000001000000000000000000000020000000000000000000800000000000000000000000000000000400000002000028000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc6c43151349605c4100bbfb0aa845b7849413e6d9701d9163d78055412c78843", - "transactionHash": "0xb2ddcc778bd1d374b3bfeaa3543f54f172fd8deaa1d0846547cb4ddad9f27283", - "logs": [ - { - "transactionIndex": 0, - "blockNumber": 1406694, - "transactionHash": "0xb2ddcc778bd1d374b3bfeaa3543f54f172fd8deaa1d0846547cb4ddad9f27283", - "address": "0x075dE66D19CA867387c75C880CffddBA9A3E9763", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0xc6c43151349605c4100bbfb0aa845b7849413e6d9701d9163d78055412c78843" - } - ], - "blockNumber": 1406694, - "cumulativeGasUsed": "1664001", - "status": 1, - "byzantium": true - }, - "args": [ - "Wrapped Ether", - "WETH", - 18, - [], - [] - ], - "numDeployments": 1, - "solcInputHash": "13963204c1e3ae6f33bd8024ced50cd9", - "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgeBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"name\":\"setSideTokenDecimals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"sideTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20_Amb.sol\":\"BridgeERC20_Amb\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20_Amb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20_Amb is ERC20, Ownable {\\n\\n // decimals of token in side network\\n // example:\\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\\n mapping(address => uint8) public sideTokenDecimals;\\n\\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\\n\\n uint8 _decimals;\\n\\n constructor(\\n string memory name_, string memory symbol_, uint8 decimals_,\\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\\n ) ERC20(name_, symbol_) Ownable() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n }\\n\\n // todo check if we need this func\\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \\\"wrong array lengths\\\");\\n for (uint i = 0; i < bridgeAddresses_.length; i++)\\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n // todo events\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n // user transfer tokens to ambrosus => need to mint it\\n\\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n\\n\\n // bridge mint money to user; same amount locked on side bridge\\n bridgeBalances[sender] += amount_this;\\n\\n _mint(recipient, amount_this);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n // user withdraw tokens from ambrosus => need to burn it\\n\\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n\\n\\n // user burn tokens; side bridge must have enough tokens to send\\n require(bridgeBalances[recipient] >= amount_this, \\\"not enough locked tokens on bridge\\\");\\n bridgeBalances[recipient] -= amount_this;\\n\\n _burn(sender, amount_this);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n\\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\\n if (dTo == dFrom)\\n return amount;\\n if (dTo > dFrom)\\n return amount * (10 ** (dTo - dFrom));\\n else\\n return amount / (10 ** (dFrom - dTo));\\n }\\n\\n}\\n\",\"keccak256\":\"0xd4ef121631f7a651ebe5f73c8565f862fa43cae907804e7876b29e87ce36a1cf\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001bce38038062001bce8339810160408190526200003491620003fc565b8451859085906200004d9060039060208501906200022a565b508051620000639060049060208401906200022a565b5050506200009262000083620000c6640100000000026401000000009004565b640100000000620000ca810204565b620000a782826401000000006200011c810204565b50506008805460ff191660ff92909216919091179055506200068b9050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80518251146200018c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e6774687300000000000000000000000000604482015260640160405180910390fd5b60005b82518110156200022557818181518110620001ae57620001ae6200062d565b602002602001015160066000858481518110620001cf57620001cf6200062d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff16021790555080806200021c90620005ea565b9150506200018f565b505050565b828054620002389062000594565b90600052602060002090601f0160209004810192826200025c5760008555620002a7565b82601f106200027757805160ff1916838001178555620002a7565b82800160010185558215620002a7579182015b82811115620002a75782518255916020019190600101906200028a565b50620002b5929150620002b9565b5090565b5b80821115620002b55760008155600101620002ba565b600082601f830112620002e257600080fd5b81516020620002fb620002f5836200056e565b6200053b565b82815281810190858301838502870184018810156200031957600080fd5b60005b8581101562000343576200033082620003e5565b845292840192908401906001016200031c565b5090979650505050505050565b600082601f8301126200036257600080fd5b81516001604060020a038111156200037e576200037e6200065c565b602062000394601f8301601f191682016200053b565b8281528582848701011115620003a957600080fd5b60005b83811015620003c9578581018301518282018401528201620003ac565b83811115620003db5760008385840101525b5095945050505050565b805160ff81168114620003f757600080fd5b919050565b600080600080600060a086880312156200041557600080fd5b85516001604060020a03808211156200042d57600080fd5b6200043b89838a0162000350565b96506020915081880151818111156200045357600080fd5b620004618a828b0162000350565b9650506200047260408901620003e5565b94506060880151818111156200048757600080fd5b8801601f81018a136200049957600080fd5b8051620004aa620002f5826200056e565b81815284810190838601868402850187018e1015620004c857600080fd5b600094505b8385101562000503578051600160a060020a0381168114620004ee57600080fd5b835260019490940193918601918601620004cd565b5060808c01519097509450505050808211156200051f57600080fd5b506200052e88828901620002d0565b9150509295509295909350565b604051601f8201601f191681016001604060020a03811182821017156200056657620005666200065c565b604052919050565b60006001604060020a038211156200058a576200058a6200065c565b5060209081020190565b600281046001821680620005a957607f821691505b60208210811415620005e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060001982141562000626577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611533806200069b6000396000f3fe608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b60405161014291906111f3565b60405180910390f35b61015e610159366004611105565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461107b565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c33660046110c9565b61038a565b60085460ff166101a3565b61015e6101e1366004611105565b610453565b6101726101f436600461107b565b600160a060020a031660009081526020819052604090205490565b61021761048f565b005b600554604051600160a060020a039091168152602001610142565b6101356104c8565b61015e61024a366004611105565b6104d7565b61015e61025d366004611105565b61058b565b61017261027036600461107b565b60076020526000908152604090205481565b610172610290366004611096565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461107b565b610598565b6102176102dc36600461112f565b610650565b6060600380546102f090611459565b80601f016020809104026020016040519081016040528092919081815260200182805461031c90611459565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461068b565b5060015b92915050565b60006103978484846107e9565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104395760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446853385840361068b565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061048a9086906112d2565b61068b565b600554600160a060020a031633146104bc5760405160e560020a62461bcd02815260040161043090611248565b6104c660006109a6565b565b6060600480546102f090611459565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105745760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610430565b610581338585840361068b565b5060019392505050565b60006103803384846107e9565b600554600160a060020a031633146105c55760405160e560020a62461bcd02815260040161043090611248565b600160a060020a0381166106445760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610430565b61064d816109a6565b50565b600554600160a060020a0316331461067d5760405160e560020a62461bcd02815260040161043090611248565b6106878282610a05565b5050565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561087b57600160a060020a03831660009081526006602052604081205460085461083891849160ff9182169116610ae8565b600160a060020a0385166000908152600760205260408120805492935083929091906108659084906112d2565b9091555061087590508382610b52565b50505050565b600160a060020a03821660009081526006602052604090205460ff161561099657600160a060020a0382166000908152600660205260408120546008546108ca91849160ff9182169116610ae8565b600160a060020a03841660009081526007602052604090205490915081111561095e5760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f67650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152600760205260408120805483929061098690849061141f565b9091555061087590508482610c34565b6109a1838383610dbf565b505050565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610a595760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e67746873000000000000000000000000006044820152606401610430565b60005b82518110156109a157818181518110610a7757610a776114cb565b602002602001015160066000858481518110610a9557610a956114cb565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610ae090611497565b915050610a5c565b60008260ff168260ff161415610aff57508261044c565b8260ff168260ff161115610b3357610b178383611436565b610b2290600a611354565b610b2c9085611400565b905061044c565b610b3d8284611436565b610b4890600a611354565b610b2c90856112ea565b600160a060020a038216610bab5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610430565b8060026000828254610bbd91906112d2565b9091555050600160a060020a03821660009081526020819052604081208054839290610bea9084906112d2565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610cb35760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03821660009081526020819052604090205481811015610d455760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152602081905260408120838303905560028054849290610d7490849061141f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610e3e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a038216610ebd5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03831660009081526020819052604090205481811015610f4f5760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610f869084906112d2565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fd291815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610ff757600080fd5b919050565b600082601f83011261100d57600080fd5b8135602061102261101d836112ae565b61127d565b828152818101908583018385028701840188101561103f57600080fd5b6000805b8681101561106d57823560ff8116811461105b578283fd5b85529385019391850191600101611043565b509198975050505050505050565b60006020828403121561108d57600080fd5b61044c82610fe0565b600080604083850312156110a957600080fd5b6110b283610fe0565b91506110c060208401610fe0565b90509250929050565b6000806000606084860312156110de57600080fd5b6110e784610fe0565b92506110f560208501610fe0565b9150604084013590509250925092565b6000806040838503121561111857600080fd5b61112183610fe0565b946020939093013593505050565b6000806040838503121561114257600080fd5b823567ffffffffffffffff8082111561115a57600080fd5b818501915085601f83011261116e57600080fd5b8135602061117e61101d836112ae565b82815281810190858301838502870184018b101561119b57600080fd5b600096505b848710156111c5576111b181610fe0565b8352600196909601959183019183016111a0565b50965050860135925050808211156111dc57600080fd5b506111e985828601610ffc565b9150509250929050565b600060208083528351808285015260005b8181101561122057858101830151858201604001528201611204565b81811115611232576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156112a6576112a66114e4565b604052919050565b600067ffffffffffffffff8211156112c8576112c86114e4565b5060209081020190565b600082198211156112e5576112e56114b2565b500190565b60008261130a5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b8085111561134c578160001904821115611330576113306114b2565b8085161561133d57918102915b60029094049390800290611314565b509250929050565b600061044c60ff84168360008261136d57506001610384565b8161137a57506000610384565b8160018114611390576002811461139a576113b7565b6001915050610384565b60ff8411156113ab576113ab6114b2565b8360020a915050610384565b5060208310610133831016604e8410600b84101617156113da575081810a610384565b6113e4838361130f565b80600019048211156113f8576113f86114b2565b029392505050565b600081600019048311821515161561141a5761141a6114b2565b500290565b600082821015611431576114316114b2565b500390565b600060ff821660ff841680821015611450576114506114b2565b90039392505050565b60028104600182168061146d57607f821691505b602082108114156114915760e060020a634e487b7102600052602260045260246000fd5b50919050565b60006000198214156114ab576114ab6114b2565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212206b2785398fb5d85e9f4e501b73aeebdf28671c2de2180c0a2e1996c5a262966364736f6c63430008060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b60405161014291906111f3565b60405180910390f35b61015e610159366004611105565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461107b565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c33660046110c9565b61038a565b60085460ff166101a3565b61015e6101e1366004611105565b610453565b6101726101f436600461107b565b600160a060020a031660009081526020819052604090205490565b61021761048f565b005b600554604051600160a060020a039091168152602001610142565b6101356104c8565b61015e61024a366004611105565b6104d7565b61015e61025d366004611105565b61058b565b61017261027036600461107b565b60076020526000908152604090205481565b610172610290366004611096565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461107b565b610598565b6102176102dc36600461112f565b610650565b6060600380546102f090611459565b80601f016020809104026020016040519081016040528092919081815260200182805461031c90611459565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461068b565b5060015b92915050565b60006103978484846107e9565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104395760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446853385840361068b565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061048a9086906112d2565b61068b565b600554600160a060020a031633146104bc5760405160e560020a62461bcd02815260040161043090611248565b6104c660006109a6565b565b6060600480546102f090611459565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105745760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610430565b610581338585840361068b565b5060019392505050565b60006103803384846107e9565b600554600160a060020a031633146105c55760405160e560020a62461bcd02815260040161043090611248565b600160a060020a0381166106445760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610430565b61064d816109a6565b50565b600554600160a060020a0316331461067d5760405160e560020a62461bcd02815260040161043090611248565b6106878282610a05565b5050565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561087b57600160a060020a03831660009081526006602052604081205460085461083891849160ff9182169116610ae8565b600160a060020a0385166000908152600760205260408120805492935083929091906108659084906112d2565b9091555061087590508382610b52565b50505050565b600160a060020a03821660009081526006602052604090205460ff161561099657600160a060020a0382166000908152600660205260408120546008546108ca91849160ff9182169116610ae8565b600160a060020a03841660009081526007602052604090205490915081111561095e5760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f67650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152600760205260408120805483929061098690849061141f565b9091555061087590508482610c34565b6109a1838383610dbf565b505050565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610a595760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e67746873000000000000000000000000006044820152606401610430565b60005b82518110156109a157818181518110610a7757610a776114cb565b602002602001015160066000858481518110610a9557610a956114cb565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610ae090611497565b915050610a5c565b60008260ff168260ff161415610aff57508261044c565b8260ff168260ff161115610b3357610b178383611436565b610b2290600a611354565b610b2c9085611400565b905061044c565b610b3d8284611436565b610b4890600a611354565b610b2c90856112ea565b600160a060020a038216610bab5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610430565b8060026000828254610bbd91906112d2565b9091555050600160a060020a03821660009081526020819052604081208054839290610bea9084906112d2565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610cb35760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03821660009081526020819052604090205481811015610d455760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a0383166000908152602081905260408120838303905560028054849290610d7490849061141f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610e3e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a038216610ebd5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03831660009081526020819052604090205481811015610f4f5760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610430565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610f869084906112d2565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610fd291815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610ff757600080fd5b919050565b600082601f83011261100d57600080fd5b8135602061102261101d836112ae565b61127d565b828152818101908583018385028701840188101561103f57600080fd5b6000805b8681101561106d57823560ff8116811461105b578283fd5b85529385019391850191600101611043565b509198975050505050505050565b60006020828403121561108d57600080fd5b61044c82610fe0565b600080604083850312156110a957600080fd5b6110b283610fe0565b91506110c060208401610fe0565b90509250929050565b6000806000606084860312156110de57600080fd5b6110e784610fe0565b92506110f560208501610fe0565b9150604084013590509250925092565b6000806040838503121561111857600080fd5b61112183610fe0565b946020939093013593505050565b6000806040838503121561114257600080fd5b823567ffffffffffffffff8082111561115a57600080fd5b818501915085601f83011261116e57600080fd5b8135602061117e61101d836112ae565b82815281810190858301838502870184018b101561119b57600080fd5b600096505b848710156111c5576111b181610fe0565b8352600196909601959183019183016111a0565b50965050860135925050808211156111dc57600080fd5b506111e985828601610ffc565b9150509250929050565b600060208083528351808285015260005b8181101561122057858101830151858201604001528201611204565b81811115611232576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156112a6576112a66114e4565b604052919050565b600067ffffffffffffffff8211156112c8576112c86114e4565b5060209081020190565b600082198211156112e5576112e56114b2565b500190565b60008261130a5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b8085111561134c578160001904821115611330576113306114b2565b8085161561133d57918102915b60029094049390800290611314565b509250929050565b600061044c60ff84168360008261136d57506001610384565b8161137a57506000610384565b8160018114611390576002811461139a576113b7565b6001915050610384565b60ff8411156113ab576113ab6114b2565b8360020a915050610384565b5060208310610133831016604e8410600b84101617156113da575081810a610384565b6113e4838361130f565b80600019048211156113f8576113f86114b2565b029392505050565b600081600019048311821515161561141a5761141a6114b2565b500290565b600082821015611431576114316114b2565b500390565b600060ff821660ff841680821015611450576114506114b2565b90039392505050565b60028104600182168061146d57607f821691505b602082108114156114915760e060020a634e487b7102600052602260045260246000fd5b50919050565b60006000198214156114ab576114ab6114b2565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212206b2785398fb5d85e9f4e501b73aeebdf28671c2de2180c0a2e1996c5a262966364736f6c63430008060033", - "devdoc": { - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "owner()": { - "details": "Returns the address of the current owner." - }, - "renounceOwnership()": { - "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 991, - "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", - "label": "_balances", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 997, - "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", - "label": "_allowances", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 999, - "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", - "label": "_totalSupply", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 1001, - "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", - "label": "_name", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 1003, - "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", - "label": "_symbol", - "offset": 0, - "slot": "4", - "type": "t_string_storage" - }, - { - "astId": 879, - "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", - "label": "_owner", - "offset": 0, - "slot": "5", - "type": "t_address" - }, - { - "astId": 9196, - "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", - "label": "sideTokenDecimals", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_address,t_uint8)" - }, - { - "astId": 9200, - "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", - "label": "bridgeBalances", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 9202, - "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", - "label": "_decimals", - "offset": 0, - "slot": "8", - "type": "t_uint8" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_address,t_uint8)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint8)", - "numberOfBytes": "32", - "value": "t_uint8" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} \ No newline at end of file diff --git a/contracts/deployments/test/amb/solcInputs/13963204c1e3ae6f33bd8024ced50cd9.json b/contracts/deployments/test/amb/solcInputs/13963204c1e3ae6f33bd8024ced50cd9.json deleted file mode 100644 index a2474623..00000000 --- a/contracts/deployments/test/amb/solcInputs/13963204c1e3ae6f33bd8024ced50cd9.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/checks/CheckAura.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckAura is Initializable {\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n bytes1 constant STEP_PREFIX = 0x84;\n bytes2 constant SIGNATURE_PREFIX = 0xB841;\n\n address[] public validatorSet;\n address validatorSetAddress;\n bytes32 public lastProcessedBlock; // actually latest processed block in which *vs change event* emitted\n uint public minSafetyBlocksValidators;\n\n\n struct BlockAura {\n bytes3 p0Seal;\n bytes3 p0Bare;\n\n bytes32 parentHash;\n bytes p2;\n bytes32 receiptHash;\n bytes p3;\n\n bytes4 step;\n bytes signature; // todo maybe pass s r v values?\n\n uint64 finalizedVs;\n }\n\n\n struct ValidatorSetChange {\n address deltaAddress;\n uint16 deltaIndex; // add if 0, else remove\n }\n\n struct ValidatorSetProof {\n bytes[] receiptProof;\n ValidatorSetChange[] changes;\n uint64 eventBlock;\n }\n\n struct AuraProof {\n BlockAura[] blocks;\n CommonStructs.TransferProof transfer;\n ValidatorSetProof[] vsChanges;\n uint64 transferEventBlock;\n }\n\n\n function __CheckAura_init(\n address[] calldata initialValidators_,\n address validatorSetAddress_,\n bytes32 lastProcessedBlock_,\n uint minSafetyBlocksValidators_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n validatorSet = initialValidators_;\n validatorSetAddress = validatorSetAddress_;\n lastProcessedBlock = lastProcessedBlock_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n\n\n /*\n AuraProof.blocks contains:\n - blocks for validate validatorSet change event, in that order:\n - block with `InitiateChange` events (contains list of all validators)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize; have `finalizedVs` != 0\n * repeated for each vs change event; all events must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n AuraProof.vsChanges contains changes in validator set and receiptProof for validation.\n block.finalizedVs-1 is index in AuraProof.vsChanges array\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between vsChange events\n If there are no errors, the transfer is considered valid\n */\n function checkAura_(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n\n bytes32 parentHash;\n bytes32 receiptHash;\n\n // auraProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (auraProof.transfer.eventId != 0) {\n receiptHash = calcTransferReceiptsHash(auraProof.transfer, sideBridgeAddress);\n require(auraProof.blocks[auraProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(auraProof.blocks.length - auraProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < auraProof.blocks.length; i++) {\n BlockAura calldata block_ = auraProof.blocks[i];\n\n // check that parentHash is correct\n if (block_.parentHash != parentHash) {\n // we can ignore wrong parentHash if:\n // - it's NOT safety blocks for transfer event\n // - it's first block (don't know parentHash)\n // - it's finalizing block (there is gap BEFORE finalizing block)\n // - it's next block after finalizing (there is gap AFTER finalizing block)\n // else, raise error\n\n if (i > auraProof.transferEventBlock || // safety blocks for transfer event\n (i != 0 && // not first block\n block_.finalizedVs == 0 && // not finalizing block\n auraProof.blocks[i-1].finalizedVs == 0) // not next block after finalizing\n )\n revert(\"Wrong parent hash\");\n }\n\n // check validator for this block\n // calc block hash for this block\n parentHash = checkBlock(block_);\n\n // if this block is finalizing block\n // 0 means no events should be finalized, so indexes are shifted by 1\n if (block_.finalizedVs != 0) {\n // vs changes in that block\n ValidatorSetProof calldata vsProof = auraProof.vsChanges[block_.finalizedVs - 1];\n\n // apply vs changes\n for (uint k = 0; k < vsProof.changes.length; k++)\n applyVsChange(vsProof.changes[k]);\n\n // check proof\n receiptHash = calcValidatorSetReceiptHash(vsProof.receiptProof, validatorSetAddress, validatorSet);\n require(auraProof.blocks[vsProof.eventBlock].receiptHash == receiptHash, \"Wrong VS receipt hash\");\n require(i - vsProof.eventBlock >= minSafetyBlocksValidators, \"Few safety blocks validators\");\n }\n\n }\n\n // save block.parentHash in which latest processed vsChange event emitted\n if (auraProof.vsChanges.length > 0) {\n lastProcessedBlock = auraProof.blocks[auraProof.vsChanges[auraProof.vsChanges.length - 1].eventBlock].parentHash;\n }\n }\n\n function getValidatorSet() public view returns (address[] memory) {\n return validatorSet;\n }\n\n function applyVsChange(ValidatorSetChange calldata vsEvent) internal {\n if (vsEvent.deltaIndex == 0) {// add validator\n validatorSet.push(vsEvent.deltaAddress);\n } else {// delete validator\n uint index = uint(vsEvent.deltaIndex - 1);\n validatorSet[index] = validatorSet[validatorSet.length - 1];\n validatorSet.pop();\n }\n }\n\n function checkBlock(BlockAura calldata block_) internal view returns (bytes32) {\n (bytes32 bareHash, bytes32 sealHash) = calcBlockHash(block_);\n\n address validator = validatorSet[bytesToUint(block_.step) % validatorSet.length];\n require(ecdsaRecover(bareHash, block_.signature) == validator, \"Failed to verify sign\");\n\n return sealHash;\n }\n\n function calcBlockHash(BlockAura calldata block_) internal pure returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p2, block_.receiptHash, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Bare, commonRlp)),\n // hash with seal, for prevHash check\n keccak256(abi.encodePacked(block_.p0Seal, commonRlp, STEP_PREFIX, block_.step, SIGNATURE_PREFIX, block_.signature))\n );\n }\n\n\n function calcValidatorSetReceiptHash(bytes[] calldata receiptProof, address validatorSetAddress_, address[] storage vSet) private pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n receiptProof[0],\n validatorSetAddress_,\n receiptProof[1],\n abi.encode(vSet),\n receiptProof[2]\n ));\n return calcReceiptsHash(receiptProof, el, 3);\n }\n\n function bytesToUint(bytes4 b) internal pure returns (uint){\n return uint(uint32(b));\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckReceiptsProof.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\n// check readme for focs\nfunction calcReceiptsHash(bytes[] calldata proof, bytes32 el, uint proofStart) pure returns (bytes32) {\n bytes memory s;\n\n for (uint i = proofStart; i < proof.length; i += 2) {\n s = abi.encodePacked(proof[i], el, proof[i + 1]);\n el = (s.length > 32) ? keccak256(s) : bytes32(s);\n }\n\n return el;\n}\n\n\nfunction calcTransferReceiptsHash(CommonStructs.TransferProof calldata p, address eventContractAddress) pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n p.receiptProof[0],\n eventContractAddress,\n p.receiptProof[1],\n toBinary(p.eventId),\n p.receiptProof[2],\n abi.encode(p.transfers),\n p.receiptProof[3]\n ));\n return calcReceiptsHash(p.receiptProof, el, 4);\n // start from proof[4]\n}\n\n\nfunction toBinary(uint _x) pure returns (bytes memory) {\n bytes memory b = new bytes(32);\n assembly {\n mstore(add(b, 32), _x)\n }\n uint i;\n for (i = 0; i < 32; i++) {\n if (b[i] != 0) {\n break;\n }\n }\n bytes memory res = new bytes(32 - i);\n for (uint j = 0; j < res.length; j++) {\n res[j] = b[i++];\n }\n return res;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" - }, - "contracts/checks/SignatureCheck.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" - }, - "contracts/common/CommonStructs.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address adminAddress;\n address relayAddress; address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" - }, - "contracts/networks/_AuraReceiver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract _AuraReceiver is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n}\n" - }, - "contracts/common/CommonBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // OWNER_ROLE must be DEFAULT_ADMIN_ROLE because by default only this role able to grant or revoke other roles\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\"); // can submit transfers\n bytes32 public constant WATCHDOG_ROLE = keccak256(\"WATCHDOG_ROLE\"); // can pause contract\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\"FEE_PROVIDER_ROLE\"); // fee signatures must be signed by this role\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable public transferFeeRecipient;\n address payable public bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRole(ADMIN_ROLE, args.adminAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId **and all after it**\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n require(eventId <= inputEventId, \"eventId must be <= inputEventId\");\n\n // now waiting for submitting a new transfer with `eventId` id\n inputEventId = eventId - 1;\n\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n\n }\n\n // pretend like bridge already receive and process all transfers up to `eventId` id\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\n }\n\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(WATCHDOG_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(FEE_PROVIDER_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" - }, - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\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, _msgSender());\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(IAccessControlUpgradeable).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" - }, - "contracts/tokens/IWrapper.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 IERC165Upgradeable {\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" - }, - "contracts/networks/ETH_EthBridge_AURA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract ETH_EthBridge_AURA is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/BSC_BscBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract BSC_BscBridge is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/ETH_EthBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract ETH_EthBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata _watchdogs,\n address _fee_provider\n ) public initializer {\n __CommonBridge_init(args);\n setWatchdogsAndFeeProvider(_watchdogs, _fee_provider);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n setWatchdogsAndFeeProvider(_watchdogs, _fee_provider);\n }\n\n function setWatchdogsAndFeeProvider(\n address[] calldata _watchdogs,\n address _fee_provider\n ) public onlyRole(ADMIN_ROLE) whenNotPaused {\n for (uint i = 0; i < _watchdogs.length; i++)\n _setupRole(WATCHDOG_ROLE, _watchdogs[i]);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n\n\n}\n" - }, - "contracts/checks/CheckUntrustless2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\ncontract CheckUntrustless2 {\n // this contract do nothing, but i think it's required to inheritance from it\n // todo check this\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckUntrustless.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckUntrustless {\n uint public confirmationsThreshold;\n\n // [hash of (eventId, transfers)] => [relayAddress] => isConfirmed\n mapping(bytes32 => mapping(address => bool)) public confirmations;\n\n // using this instead of RELAY_ROLE coz it simpler\n address[] public relays;\n\n event RelayAdd(address indexed relay);\n event RelayRemove(address indexed relay);\n event ThresholdChange(uint newThreshold);\n event RelayConfirmation(address indexed sender, uint indexed eventId, bytes32 hash);\n\n // return true if current call reach confirmationsThreshold\n function checkUntrustless_(uint eventId, CommonStructs.Transfer[] calldata transfers) internal returns (bool) {\n require(isRelay(msg.sender), \"You not in relay whitelist\");\n\n bytes32 hash = transfersHash(eventId, transfers);\n require(confirmations[hash][msg.sender] == false, \"You have already confirmed this\");\n\n uint confirmCount = confirmedCount(hash);\n require(confirmCount < confirmationsThreshold, \"Already confirmed\");\n\n confirmations[hash][msg.sender] = true;\n emit RelayConfirmation(msg.sender, eventId, hash);\n\n // +1 coz current relay confirmed just now\n return confirmCount + 1 >= confirmationsThreshold;\n }\n\n\n function isConfirmedByRelay(address relay, uint eventId, CommonStructs.Transfer[] calldata transfers) public view returns (bool) {\n bytes32 hash = transfersHash(eventId, transfers);\n return confirmations[hash][relay];\n }\n\n\n function confirmedCount(bytes32 hash) public view returns (uint) {\n uint res;\n for (uint i = 0; i < relays.length; i++)\n if (confirmations[hash][relays[i]])\n res++;\n return res;\n }\n\n\n function isRelay(address relay) public view returns (bool){\n for (uint i = 0; i < relays.length; i++)\n if (relays[i] == relay)\n return true;\n return false;\n }\n\n function getRelays() public view returns (address[] memory) {\n return relays;\n }\n\n function transfersHash(uint eventId, CommonStructs.Transfer[] calldata transfers) public pure returns (bytes32) {\n bytes memory payload = abi.encodePacked(eventId);\n\n // i guess we can hash transfers only in this way\n for (uint i = 0; i < transfers.length; i++)\n payload = abi.encodePacked(payload, transfers[i].amount, transfers[i].toAddress, transfers[i].tokenAddress);\n\n return keccak256(payload);\n }\n\n\n function _setRelaysAndConfirmations(address[] memory toRemove, address[] memory toAdd, uint _confirmations) internal {\n for (uint i = 0; i < toRemove.length; i++)\n _removeRelay(toRemove[i]);\n for (uint i = 0; i < toAdd.length; i++)\n _addRelay(toAdd[i]);\n\n if (confirmationsThreshold != _confirmations) {\n confirmationsThreshold = _confirmations;\n emit ThresholdChange(_confirmations);\n }\n }\n\n function _removeRelay(address relay) internal {\n for (uint i = 0; i < relays.length; i++) {\n if (relays[i] == relay) {\n relays[i] = relays[relays.length - 1];\n relays.pop();\n emit RelayRemove(relay);\n return;\n }\n }\n revert(\"Not a relay\");\n }\n\n function _addRelay(address relay) internal {\n require(!isRelay(relay), \"Already relay\");\n relays.push(relay);\n emit RelayAdd(relay);\n }\n\n uint256[15] private ___gap;\n\n}\n" - }, - "contracts/networks/ETH_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless.sol\";\n\n\ncontract ETH_AmbBridge is CommonBridge, CheckUntrustless {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint _confirmations,\n address[] calldata _relays\n ) public initializer {\n __CommonBridge_init(args);\n _setRelaysAndConfirmations(new address[](0), _relays, _confirmations);\n }\n\n function upgrade(\n uint _confirmations,\n address[] memory _relays\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n // _setRelaysAndConfirmations don't work during upgrade and nobody knows why\n relays = _relays;\n confirmationsThreshold = _confirmations;\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public whenNotPaused {\n // relay \"role\" checked at CheckUntrustless contract\n require(eventId == inputEventId + 1, \"EventId out of order\");\n\n bool confirm = checkUntrustless_(eventId, transfers);\n if (confirm) {// required count of confirmations reached\n ++inputEventId;\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n // todo need lock?\n }\n }\n\n function setRelaysAndConfirmations(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n require(msg.sender == address(this), \"This method require multisig\");\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n\n}\n" - }, - "contracts/contracts_for_tests/CheckUntrustlessTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckUntrustless.sol\";\n\ncontract CheckUntrustlessTest is CheckUntrustless {\n constructor() {}\n\n event checkUntrustlessTestResult(bool result);\n\n function checkUntrustlessTest(uint eventId, CommonStructs.Transfer[] calldata transfers) public {\n emit checkUntrustlessTestResult(checkUntrustless_(eventId, transfers));\n }\n\n function setRelaysAndConfirmationsTest(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n}\n" - }, - "contracts/checks/CheckPoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"./CheckPoW_Ethash.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckPoW is Initializable, Ethash {\n struct BlockPoW {\n bytes3 p0WithNonce;\n bytes3 p0WithoutNonce;\n\n bytes p1;\n bytes32 parentOrReceiptHash;\n bytes p2;\n bytes difficulty;\n bytes p3;\n bytes number;\n bytes p4; // end when extra end\n bytes p5; // after extra\n bytes nonce;\n bytes p6;\n\n uint[] dataSetLookup;\n uint[] witnessForLookup;\n }\n\n struct PoWProof {\n BlockPoW[] blocks;\n CommonStructs.TransferProof transfer;\n }\n\n uint256 minimumDifficulty;\n\n function __CheckPoW_init(\n uint256 minimumDifficulty_\n ) internal initializer {\n minimumDifficulty = minimumDifficulty_;\n }\n\n /*\n PoWProof.blocks contains:\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, checking it pow hash.\n Each block parentHash must be equal to the hash of the previous block.\n If there are no errors, the transfer is considered valid\n */\n function checkPoW_(PoWProof calldata powProof, address sideBridgeAddress) internal view\n {\n bytes32 hash = calcTransferReceiptsHash(powProof.transfer, sideBridgeAddress);\n for (uint i = 0; i < powProof.blocks.length; i++) {\n require(powProof.blocks[i].parentOrReceiptHash == hash, \"parentHash or receiptHash wrong\");\n hash = blockHash(powProof.blocks[i]);\n\n verifyEthash(powProof.blocks[i]);\n }\n }\n\n\n function verifyEthash(BlockPoW calldata block_) internal view {\n uint difficulty = bytesToUint(block_.difficulty);\n require(difficulty >= minimumDifficulty, \"difficulty too low\");\n verifyPoW(\n bytesToUint(block_.number),\n blockHashWithoutNonce(block_),\n bytesToUint(block_.nonce),\n difficulty,\n block_.dataSetLookup,\n block_.witnessForLookup\n );\n }\n\n function blockHash(BlockPoW calldata block_) internal pure returns (bytes32) {\n // Note: too much arguments in abi.encodePacked() function cause CompilerError: Stack too deep...\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2,\n block_.difficulty,\n block_.p3\n ),\n abi.encodePacked(\n block_.number,\n block_.p4,\n block_.p5,\n block_.nonce,\n block_.p6\n )\n ));\n }\n\n function blockHashWithoutNonce(BlockPoW calldata block_) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithoutNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2\n ),\n abi.encodePacked(\n block_.difficulty,\n block_.p3,\n block_.number,\n block_.p4,\n block_.p6\n )\n ));\n }\n\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckPoW_Ethash.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n/// @dev These contracts are used to verify Proof of Work within a smart contract.\n/// The algorithms have been extracted from the implementation of smart pool (https://github.com/smartpool)\ncontract SHA3_512 {\n constructor() {}\n\n function keccak_f(uint[25] memory A) pure private returns (uint[25] memory) {\n uint[25] memory B;\n uint[5] memory C;\n uint[5] memory D;\n\n uint[24] memory RC = [\n uint(0x0000000000000001),\n 0x0000000000008082,\n 0x800000000000808A,\n 0x8000000080008000,\n 0x000000000000808B,\n 0x0000000080000001,\n 0x8000000080008081,\n 0x8000000000008009,\n 0x000000000000008A,\n 0x0000000000000088,\n 0x0000000080008009,\n 0x000000008000000A,\n 0x000000008000808B,\n 0x800000000000008B,\n 0x8000000000008089,\n 0x8000000000008003,\n 0x8000000000008002,\n 0x8000000000000080,\n 0x000000000000800A,\n 0x800000008000000A,\n 0x8000000080008081,\n 0x8000000000008080,\n 0x0000000080000001,\n 0x8000000080008008];\n\n for (uint i = 0; i < 24; i++) {\n\n C[0] = A[0] ^ A[1] ^ A[2] ^ A[3] ^ A[4];\n C[1] = A[5] ^ A[6] ^ A[7] ^ A[8] ^ A[9];\n C[2] = A[10] ^ A[11] ^ A[12] ^ A[13] ^ A[14];\n C[3] = A[15] ^ A[16] ^ A[17] ^ A[18] ^ A[19];\n C[4] = A[20] ^ A[21] ^ A[22] ^ A[23] ^ A[24];\n\n D[0] = C[4] ^ ((C[1] * 2) & 0xffffffffffffffff | (C[1] / (2 ** 63)));\n D[1] = C[0] ^ ((C[2] * 2) & 0xffffffffffffffff | (C[2] / (2 ** 63)));\n D[2] = C[1] ^ ((C[3] * 2) & 0xffffffffffffffff | (C[3] / (2 ** 63)));\n D[3] = C[2] ^ ((C[4] * 2) & 0xffffffffffffffff | (C[4] / (2 ** 63)));\n D[4] = C[3] ^ ((C[0] * 2) & 0xffffffffffffffff | (C[0] / (2 ** 63)));\n\n A[0] = A[0] ^ D[0];\n A[1] = A[1] ^ D[0];\n A[2] = A[2] ^ D[0];\n A[3] = A[3] ^ D[0];\n A[4] = A[4] ^ D[0];\n A[5] = A[5] ^ D[1];\n A[6] = A[6] ^ D[1];\n A[7] = A[7] ^ D[1];\n A[8] = A[8] ^ D[1];\n A[9] = A[9] ^ D[1];\n A[10] = A[10] ^ D[2];\n A[11] = A[11] ^ D[2];\n A[12] = A[12] ^ D[2];\n A[13] = A[13] ^ D[2];\n A[14] = A[14] ^ D[2];\n A[15] = A[15] ^ D[3];\n A[16] = A[16] ^ D[3];\n A[17] = A[17] ^ D[3];\n A[18] = A[18] ^ D[3];\n A[19] = A[19] ^ D[3];\n A[20] = A[20] ^ D[4];\n A[21] = A[21] ^ D[4];\n A[22] = A[22] ^ D[4];\n A[23] = A[23] ^ D[4];\n A[24] = A[24] ^ D[4];\n\n /*Rho and pi steps*/\n B[0] = A[0];\n B[8] = ((A[1] * (2 ** 36)) & 0xffffffffffffffff | (A[1] / (2 ** 28)));\n B[11] = ((A[2] * (2 ** 3)) & 0xffffffffffffffff | (A[2] / (2 ** 61)));\n B[19] = ((A[3] * (2 ** 41)) & 0xffffffffffffffff | (A[3] / (2 ** 23)));\n B[22] = ((A[4] * (2 ** 18)) & 0xffffffffffffffff | (A[4] / (2 ** 46)));\n B[2] = ((A[5] * (2 ** 1)) & 0xffffffffffffffff | (A[5] / (2 ** 63)));\n B[5] = ((A[6] * (2 ** 44)) & 0xffffffffffffffff | (A[6] / (2 ** 20)));\n B[13] = ((A[7] * (2 ** 10)) & 0xffffffffffffffff | (A[7] / (2 ** 54)));\n B[16] = ((A[8] * (2 ** 45)) & 0xffffffffffffffff | (A[8] / (2 ** 19)));\n B[24] = ((A[9] * (2 ** 2)) & 0xffffffffffffffff | (A[9] / (2 ** 62)));\n B[4] = ((A[10] * (2 ** 62)) & 0xffffffffffffffff | (A[10] / (2 ** 2)));\n B[7] = ((A[11] * (2 ** 6)) & 0xffffffffffffffff | (A[11] / (2 ** 58)));\n B[10] = ((A[12] * (2 ** 43)) & 0xffffffffffffffff | (A[12] / (2 ** 21)));\n B[18] = ((A[13] * (2 ** 15)) & 0xffffffffffffffff | (A[13] / (2 ** 49)));\n B[21] = ((A[14] * (2 ** 61)) & 0xffffffffffffffff | (A[14] / (2 ** 3)));\n B[1] = ((A[15] * (2 ** 28)) & 0xffffffffffffffff | (A[15] / (2 ** 36)));\n B[9] = ((A[16] * (2 ** 55)) & 0xffffffffffffffff | (A[16] / (2 ** 9)));\n B[12] = ((A[17] * (2 ** 25)) & 0xffffffffffffffff | (A[17] / (2 ** 39)));\n B[15] = ((A[18] * (2 ** 21)) & 0xffffffffffffffff | (A[18] / (2 ** 43)));\n B[23] = ((A[19] * (2 ** 56)) & 0xffffffffffffffff | (A[19] / (2 ** 8)));\n B[3] = ((A[20] * (2 ** 27)) & 0xffffffffffffffff | (A[20] / (2 ** 37)));\n B[6] = ((A[21] * (2 ** 20)) & 0xffffffffffffffff | (A[21] / (2 ** 44)));\n B[14] = ((A[22] * (2 ** 39)) & 0xffffffffffffffff | (A[22] / (2 ** 25)));\n B[17] = ((A[23] * (2 ** 8)) & 0xffffffffffffffff | (A[23] / (2 ** 56)));\n B[20] = ((A[24] * (2 ** 14)) & 0xffffffffffffffff | (A[24] / (2 ** 50)));\n\n /*Xi state*/\n A[0] = B[0] ^ ((~B[5]) & B[10]);\n A[1] = B[1] ^ ((~B[6]) & B[11]);\n A[2] = B[2] ^ ((~B[7]) & B[12]);\n A[3] = B[3] ^ ((~B[8]) & B[13]);\n A[4] = B[4] ^ ((~B[9]) & B[14]);\n A[5] = B[5] ^ ((~B[10]) & B[15]);\n A[6] = B[6] ^ ((~B[11]) & B[16]);\n A[7] = B[7] ^ ((~B[12]) & B[17]);\n A[8] = B[8] ^ ((~B[13]) & B[18]);\n A[9] = B[9] ^ ((~B[14]) & B[19]);\n A[10] = B[10] ^ ((~B[15]) & B[20]);\n A[11] = B[11] ^ ((~B[16]) & B[21]);\n A[12] = B[12] ^ ((~B[17]) & B[22]);\n A[13] = B[13] ^ ((~B[18]) & B[23]);\n A[14] = B[14] ^ ((~B[19]) & B[24]);\n A[15] = B[15] ^ ((~B[20]) & B[0]);\n A[16] = B[16] ^ ((~B[21]) & B[1]);\n A[17] = B[17] ^ ((~B[22]) & B[2]);\n A[18] = B[18] ^ ((~B[23]) & B[3]);\n A[19] = B[19] ^ ((~B[24]) & B[4]);\n A[20] = B[20] ^ ((~B[0]) & B[5]);\n A[21] = B[21] ^ ((~B[1]) & B[6]);\n A[22] = B[22] ^ ((~B[2]) & B[7]);\n A[23] = B[23] ^ ((~B[3]) & B[8]);\n A[24] = B[24] ^ ((~B[4]) & B[9]);\n\n /*Last step*/\n A[0] = A[0] ^ RC[i];\n }\n\n return A;\n }\n\n\n function sponge(uint[9] memory M) pure internal returns (uint[16] memory) {\n require((M.length * 8) == 72, \"sponge error\");\n\n M[5] = 0x01;\n M[8] = 0x8000000000000000;\n\n uint r = 72;\n uint w = 8;\n uint size = M.length * 8;\n\n uint[25] memory S;\n uint i;\n uint y;\n uint x;\n /*Absorbing Phase*/\n for (i = 0; i < size / r; i++) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w)) {\n S[5 * x + y] = S[5 * x + y] ^ M[i * 9 + x + 5 * y];\n }\n }\n }\n S = keccak_f(S);\n }\n\n /*Squeezing phase*/\n uint[16] memory result;\n uint b = 0;\n while (b < 16) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w) && (b < 16)) {\n result[b] = S[5 * x + y] & 0xFFFFFFFF;\n result[b + 1] = S[5 * x + y] / 0x100000000;\n b += 2;\n }\n }\n }\n }\n\n return result;\n }\n\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\ncontract Ethash is SHA3_512 {\n\n uint constant EPOCH_LENGTH = 30000; // blocks per epoch\n\n constructor() {\n }\n\n struct EthashCacheOptData {\n uint[512] merkleNodes;\n uint fullSizeIn128Resultion;\n uint branchDepth;\n }\n\n mapping(uint => EthashCacheOptData) epochData;\n\n\n function verifyPoW(uint blockNumber, bytes32 rlpHeaderHashWithoutNonce, uint nonce, uint difficulty,\n uint[] memory dataSetLookup, uint[] memory witnessForLookup) internal view {\n\n uint epoch = blockNumber / EPOCH_LENGTH;\n uint ethash = hashimoto(rlpHeaderHashWithoutNonce, nonce, dataSetLookup, witnessForLookup, epoch);\n\n require(ethash <= (2 ** 256 - 1) / difficulty, \"Ethash difficulty too low\");\n }\n\n function isEpochDataSet(uint epochIndex) public view returns (bool) {\n return epochData[epochIndex].fullSizeIn128Resultion != 0;\n }\n\n function setEpochData(\n uint epochNum,\n uint fullSizeIn128Resultion,\n uint branchDepth,\n uint[] calldata merkleNodes\n ) public {\n\n // we store only previous and current epochs\n // so, delete second from the end epoch\n if (epochNum >= 2) // underflow check\n delete epochData[epochNum - 2];\n\n\n uint l = merkleNodes.length;\n uint[512] storage nodes = epochData[epochNum].merkleNodes;\n\n for (uint i = 0; i < l; i++) {\n nodes[i] = merkleNodes[i];\n }\n\n epochData[epochNum].fullSizeIn128Resultion = fullSizeIn128Resultion;\n epochData[epochNum].branchDepth = branchDepth;\n }\n\n\n function hashimoto(bytes32 header,\n uint nonceLe,\n uint[] memory dataSetLookup,\n uint[] memory witnessForLookup,\n uint epochIndex) private view returns (uint) {\n\n uint[16] memory s = computeS(uint(header), nonceLe);\n uint[32] memory mix;\n uint[8] memory cmix;\n\n\n uint depth = epochData[epochIndex].branchDepth;\n uint fullSize = epochData[epochIndex].fullSizeIn128Resultion;\n\n uint i;\n uint j;\n\n require(fullSize != 0, \"EpochData not set\");\n\n\n for (i = 0; i < 16; i++) {\n assembly {\n let offset := mul(i, 0x20)\n\n //mix[i] = s[i];\n mstore(add(mix, offset), mload(add(s, offset)))\n\n // mix[i+16] = s[i];\n mstore(add(mix, add(0x200, offset)), mload(add(s, offset)))\n }\n }\n\n for (i = 0; i < 64; i++) {\n uint p = fnv(i ^ s[0], mix[i % 32]) % fullSize;\n\n // console.log(computeCacheRoot( p, i, dataSetLookup, witnessForLookup, depthAndFullSize[0]));\n // console.log(getMerkleLeave( epochIndex, p ));\n\n if (computeCacheRoot(p, i, dataSetLookup, witnessForLookup, depth) != getMerkleLeave(epochIndex, p)) {\n // PoW failed\n revert(\"PoW failed\");\n }\n\n for (j = 0; j < 8; j++) {\n\n assembly{\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & varFFFFFFFF );\n let dataOffset := add(mul(0x80, i), add(dataSetLookup, 0x20))\n let dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n let mixOffset := add(mix, mul(0x20, j))\n let mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n let fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n }\n\n\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & 0xFFFFFFFF );\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n\n\n //dataSetLookup[4*i ] = dataSetLookup[4*i ]/(2**32);\n //dataSetLookup[4*i + 1] = dataSetLookup[4*i + 1]/(2**32);\n //dataSetLookup[4*i + 2] = dataSetLookup[4*i + 2]/(2**32);\n //dataSetLookup[4*i + 3] = dataSetLookup[4*i + 3]/(2**32);\n\n assembly{\n let offset := add(add(dataSetLookup, 0x20), mul(i, 0x80))\n let value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n }\n }\n }\n\n\n for (i = 0; i < 32; i += 4) {\n cmix[i / 4] = (fnv(fnv(fnv(mix[i], mix[i + 1]), mix[i + 2]), mix[i + 3]));\n }\n\n return computeSha3(s, cmix);\n\n }\n\n\n function fnv(uint v1, uint v2) pure internal returns (uint) {\n return ((v1 * 0x01000193) ^ v2) & 0xFFFFFFFF;\n }\n\n function computeCacheRoot(uint index,\n uint indexInElementsArray,\n uint[] memory elements,\n uint[] memory witness,\n uint branchSize) pure private returns (uint) {\n\n uint leaf = computeLeaf(elements, indexInElementsArray) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n\n uint left;\n uint right;\n uint node;\n bool oddBranchSize = (branchSize % 2) > 0;\n\n assembly {\n branchSize := div(branchSize, 2)\n //branchSize /= 2;\n }\n uint witnessIndex = indexInElementsArray * branchSize;\n if (oddBranchSize) witnessIndex += indexInElementsArray;\n\n uint depth;\n for (depth = 0; depth < branchSize; depth++) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n\n //node = witness[witnessIndex + depth] / (2**128);\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := div(node, 0x100000000000000000000000000000000)\n }\n }\n else {\n assembly {\n left := div(node, 0x100000000000000000000000000000000)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n }\n\n if (oddBranchSize) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n }\n\n\n return leaf;\n }\n\n\n function computeSha3(uint[16] memory s, uint[8] memory cmix) pure internal returns (uint) {\n uint s0 = s[0] + s[1] * (2 ** 32) + s[2] * (2 ** 64) + s[3] * (2 ** 96) +\n (s[4] + s[5] * (2 ** 32) + s[6] * (2 ** 64) + s[7] * (2 ** 96)) * (2 ** 128);\n\n uint s1 = s[8] + s[9] * (2 ** 32) + s[10] * (2 ** 64) + s[11] * (2 ** 96) +\n (s[12] + s[13] * (2 ** 32) + s[14] * (2 ** 64) + s[15] * (2 ** 96)) * (2 ** 128);\n\n uint c = cmix[0] + cmix[1] * (2 ** 32) + cmix[2] * (2 ** 64) + cmix[3] * (2 ** 96) +\n (cmix[4] + cmix[5] * (2 ** 32) + cmix[6] * (2 ** 64) + cmix[7] * (2 ** 96)) * (2 ** 128);\n\n\n /* god knows why need to convert to big endian */\n return uint(keccak256(abi.encodePacked(reverseBytes(s0), reverseBytes(s1), reverseBytes(c))));\n }\n\n\n function computeLeaf(uint[] memory dataSetLookup, uint index) pure internal returns (uint) {\n return uint(keccak256(abi.encodePacked(\n dataSetLookup[4 * index],\n dataSetLookup[4 * index + 1],\n dataSetLookup[4 * index + 2],\n dataSetLookup[4 * index + 3]\n )));\n\n }\n\n function computeS(uint header, uint nonceLe) pure internal returns (uint[16] memory) {\n uint[9] memory M;\n\n header = reverseBytes(header);\n\n M[0] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[1] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[2] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[3] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n\n // make little endian nonce\n M[4] = nonceLe;\n return sponge(M);\n }\n\n function reverseBytes(uint input) pure internal returns (uint) {\n uint result;\n for (uint i = 0; i < 32; i++) {\n result = (result << 8) + (input & 0xff);\n input = input >> 8;\n }\n return result;\n }\n\n\n function getMerkleLeave(uint epochIndex, uint p) view internal returns (uint) {\n uint rootIndex = uint(p >> epochData[epochIndex].branchDepth);\n uint expectedRoot = epochData[epochIndex].merkleNodes[(rootIndex >> 1)];\n\n if ((rootIndex % 2) == 0)\n return expectedRoot & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n return expectedRoot >> 128;\n }\n\n}\n" - }, - "contracts/networks/ETH_AmbBridge_PoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoW.sol\";\n\n\ncontract ETH_AmbBridge_PoW is CommonBridge, CheckPoW {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint minimumDifficulty\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoW_init(minimumDifficulty);\n }\n\n function submitTransferPoW(PoWProof calldata powProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(powProof.transfer.eventId);\n checkEventId(powProof.transfer.eventId);\n checkPoW_(powProof, sideBridgeAddress);\n // checkPoW_(powProof, sideBridgeAddress);\n lockTransfers(powProof.transfer.transfers, powProof.transfer.eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n}\n\n" - }, - "contracts/contracts_for_tests/CheckPoWTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoW.sol\";\n\ncontract CheckPoWTest is CheckPoW {\n\n constructor(\n uint minimumDifficulty_\n ) {\n minimumDifficulty = minimumDifficulty_;\n }\n\n function checkPoWTest(PoWProof calldata powProof, address sideBridgeAddress) public {\n checkPoW_(powProof, sideBridgeAddress);\n }\n\n function verifyEthashTest(BlockPoW calldata block_) public view {\n verifyEthash(block_);\n }\n\n function blockHashTest(BlockPoW calldata block_) public pure returns (bytes32) {\n return blockHash(block_);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CommonBridgeTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckReceiptsProof.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // used for signature check\n _setupRole(RELAY_ROLE, address(0x295C2707319ad4BecA6b5bb4086617fD6F240CfE));\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n checkEventId(eventId); // now its more like submitTransferTest\n lockTransfers(events, eventId);\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n // checkReceiptsProof\n\n function calcTransferReceiptsHashTest(CommonStructs.TransferProof calldata p, address eventContractAddress) public pure returns (bytes32) {\n return calcTransferReceiptsHash(p, eventContractAddress);\n }\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" - }, - "contracts/checks/CheckPoSA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckPoSA is Initializable {\n uint256 private constant ADDRESS_LENGTH = 20;\n uint256 private constant EXTRA_VANITY_LENGTH = 32;\n uint256 private constant EXTRA_SEAL_LENGTH = 65;\n uint256 private constant EPOCH_LENGTH = 200;\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n\n mapping(uint => mapping(address => bool)) internal allValidators;\n uint public currentEpoch;\n uint currentValidatorSetSize;\n\n bytes1 chainId;\n\n\n struct BlockPoSA {\n bytes3 p0Signed;\n bytes3 p0Unsigned;\n\n bytes32 parentHash;\n bytes p1;\n bytes32 receiptHash;\n bytes p2;\n bytes number;\n bytes p3;\n\n bytes p4Signed;\n bytes p4Unsigned;\n bytes extraData;\n\n bytes p5;\n }\n\n struct PoSAProof {\n BlockPoSA[] blocks;\n CommonStructs.TransferProof transfer;\n uint64 transferEventBlock;\n }\n\n\n function __CheckPoSA_init(\n address[] calldata initialValidators_,\n uint initialEpoch_,\n bytes1 chainId_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n chainId = chainId_;\n currentEpoch = initialEpoch_;\n currentValidatorSetSize = initialValidators_.length;\n\n for (uint i = 0; i < initialValidators_.length; i++) {\n allValidators[currentEpoch][initialValidators_[i]] = true;\n }\n }\n\n /*\n PoSAProof.blocks contains:\n - blocks for validate validatorSet changes, in that order:\n - first block in epoch (blockNum % 200 == 0)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize\n * repeated for each new epoch, all epochs must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between epochs\n If there are no errors, the transfer is considered valid\n */\n function checkPoSA_(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n bytes32 bareHash;\n bytes32 parentHash;\n uint finalizeVsBlock;\n uint nextVsSize;\n\n // posaProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (posaProof.transfer.eventId != 0) {\n bytes32 receiptHash = calcTransferReceiptsHash(posaProof.transfer, sideBridgeAddress);\n require(posaProof.blocks[posaProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(posaProof.blocks.length - posaProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < posaProof.blocks.length; i++) {\n BlockPoSA calldata block_ = posaProof.blocks[i];\n\n if (parentHash != bytes32(0))\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n\n (bareHash, parentHash) = calcBlockHash(block_);\n\n require(verifySignature(bareHash, getSignature(block_.extraData)), \"invalid signature\");\n\n // change validator set\n\n uint blockNumber = bytesToUint(block_.number);\n\n if (blockNumber % EPOCH_LENGTH == 0) {\n require(blockNumber / EPOCH_LENGTH == currentEpoch + 1, \"invalid epoch\");\n\n nextVsSize = newValidatorSet(block_.extraData);\n finalizeVsBlock = blockNumber + currentValidatorSetSize / 2;\n } else if (blockNumber == finalizeVsBlock) {\n currentEpoch++;\n currentValidatorSetSize = nextVsSize;\n\n // after finalizing vs change, next block in posaProof.blocks can have any parentHash (skipping some blocks)\n // but only if it's not the safety blocks for transfer event\n if (i < posaProof.transferEventBlock)\n parentHash = bytes32(0);\n }\n }\n }\n\n\n function calcBlockHash(BlockPoSA calldata block_) internal view returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p1, block_.receiptHash, block_.p2, block_.number, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Unsigned, chainId, commonRlp, block_.p4Unsigned, getExtraDataUnsigned(block_.extraData), block_.p5)),\n // hash with seal, for prev_hash check\n keccak256(abi.encodePacked(block_.p0Signed, commonRlp, block_.p4Signed, block_.extraData, block_.p5))\n );\n }\n\n function getSignature(bytes calldata extraData) private pure returns (bytes calldata) {\n uint start = extraData.length - EXTRA_SEAL_LENGTH;\n return extraData[start : start + EXTRA_SEAL_LENGTH];\n }\n\n function getExtraDataUnsigned(bytes calldata extraData) private pure returns (bytes memory) {\n return extraData[0 : extraData.length - EXTRA_SEAL_LENGTH];\n }\n\n function newValidatorSet(bytes calldata extraData) private returns (uint) {\n uint nextValidatorSet = currentEpoch + 1;\n uint endPos = extraData.length - EXTRA_SEAL_LENGTH;\n\n uint nextValidatorSetSize;\n for (uint pos = EXTRA_VANITY_LENGTH; pos < endPos; pos += ADDRESS_LENGTH) {\n address validator = address(bytes20(extraData[pos : pos + ADDRESS_LENGTH]));\n allValidators[nextValidatorSet][validator] = true;\n nextValidatorSetSize++;\n }\n\n return nextValidatorSetSize;\n }\n\n function verifySignature(bytes32 hash, bytes calldata signature) private view returns (bool) {\n address signer = ecdsaRecover(hash, signature);\n return allValidators[currentEpoch][signer];\n }\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n}\n" - }, - "contracts/networks/BSC_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract BSC_AmbBridge is CommonBridge, CheckPoSA {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n uint initialEpoch,\n bytes1 chainId\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoSA_init(initialValidators, initialEpoch, chainId);\n }\n\n function submitTransferPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(posaProof.transfer.eventId);\n checkEventId(posaProof.transfer.eventId);\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(posaProof.transfer.transfers, posaProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoSATest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract CheckPoSATest is CheckPoSA {\n constructor(\n bytes1 chainId_\n ) {\n chainId = chainId_;\n }\n\n function checkPoSATest(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress,\n address[] memory _initialValidators, uint _initialEpoch, bytes1 _chainId) public {\n // TODO: we can't use the `__CheckPoSA_init` twice, but copy-paste is also not good\n chainId = _chainId;\n currentEpoch = _initialEpoch;\n currentValidatorSetSize = _initialValidators.length;\n\n for (uint i = 0; i < _initialValidators.length; i++) {\n allValidators[currentEpoch][_initialValidators[i]] = true;\n }\n\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockPoSA calldata block_) public view returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockPoSA calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n}\n" - }, - "contracts/tokens/sAMB.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./IWrapper.sol\";\n\ncontract sAMB is IWrapper, ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\n\n function deposit() public override payable {\n _mint(msg.sender, msg.value);\n\n emit Deposit(msg.sender, msg.value);\n }\n\n function withdraw(uint amount) public override {\n _burn(msg.sender, amount);\n payable(msg.sender).transfer(amount);\n\n emit Withdrawal(msg.sender, amount);\n }\n\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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 * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, 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 * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), 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 * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\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 * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\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/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\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" - }, - "contracts/contracts_for_tests/MintableERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MintableERC20 is ERC20 {\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20 is ERC20, Ownable {\n address public bridgeAddress; // address of bridge contract on this network\n uint public bridgeBalance; // locked tokens on the bridge\n\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\n ERC20(name_, symbol_)\n Ownable() {\n bridgeAddress = bridgeAddress_;\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\n bridgeAddress = bridgeAddress_;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sender == bridgeAddress) {\n // user transfer tokens to ambrosus => need to mint it\n\n // same amount locked on side bridge\n bridgeBalance += amount;\n\n _mint(recipient, amount);\n } else if (recipient == bridgeAddress) {\n // user withdraw tokens from ambrosus => need to burn it\n\n // side bridge must have enough tokens to send\n require(bridgeBalance >= amount, \"not enough locked tokens on bridge\");\n bridgeBalance -= amount;\n\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/access/Ownable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 _setOwner(_msgSender());\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 called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _setOwner(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 _setOwner(newOwner);\n }\n\n function _setOwner(address newOwner) private {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20_Amb.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20_Amb is ERC20, Ownable {\n\n // decimals of token in side network\n // example:\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\n mapping(address => uint8) public sideTokenDecimals;\n\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\n\n uint8 _decimals;\n\n constructor(\n string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n ) ERC20(name_, symbol_) Ownable() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n }\n\n // todo check if we need this func\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \"wrong array lengths\");\n for (uint i = 0; i < bridgeAddresses_.length; i++)\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n // todo events\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n // user transfer tokens to ambrosus => need to mint it\n\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n\n\n // bridge mint money to user; same amount locked on side bridge\n bridgeBalances[sender] += amount_this;\n\n _mint(recipient, amount_this);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n // user withdraw tokens from ambrosus => need to burn it\n\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n\n\n // user burn tokens; side bridge must have enough tokens to send\n require(bridgeBalances[recipient] >= amount_this, \"not enough locked tokens on bridge\");\n bridgeBalances[recipient] -= amount_this;\n\n _burn(sender, amount_this);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\n if (dTo == dFrom)\n return amount;\n if (dTo > dFrom)\n return amount * (10 ** (dTo - dFrom));\n else\n return amount / (10 ** (dFrom - dTo));\n }\n\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20_AmbTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20_Amb.sol\";\n\ncontract BridgeERC20_AmbTest is BridgeERC20_Amb {\n constructor(string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n )\n BridgeERC20_Amb(name_, symbol_, decimals_, bridgeAddresses_, sideTokenDecimals_) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n function changeBridgeBalance(address bridge, uint balance) public {\n bridgeBalances[bridge] = balance;\n }\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20Test.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n function changeBridgeBalance(uint balance) public {\n bridgeBalance = balance;\n }\n}\n" - }, - "contracts/contracts_for_tests/CheckAuraTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckAura.sol\";\n\ncontract CheckAuraTest is CheckAura {\n constructor(address validatorSetAddress_, uint minSafetyBlocksValidators_) {\n validatorSetAddress = validatorSetAddress_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function checkAuraTest(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress, address[] memory initialValidators_) public {\n validatorSet = initialValidators_;\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockAura calldata block_) public pure returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockAura calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function bytesToUintTest(bytes4 b) public pure returns (uint) {\n return bytesToUint(b);\n }\n\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "evmVersion": "byzantium", - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/contracts/deployments/test/amb/solcInputs/14835e48c656ebed02c4fc9389a12566.json b/contracts/deployments/test/amb/solcInputs/14835e48c656ebed02c4fc9389a12566.json deleted file mode 100644 index 332844f0..00000000 --- a/contracts/deployments/test/amb/solcInputs/14835e48c656ebed02c4fc9389a12566.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/checks/CheckAura.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckAura is Initializable {\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n bytes1 constant STEP_PREFIX = 0x84;\n bytes2 constant SIGNATURE_PREFIX = 0xB841;\n\n address[] public validatorSet;\n address validatorSetAddress;\n bytes32 public lastProcessedBlock; // actually latest processed block in which *vs change event* emitted\n uint public minSafetyBlocksValidators;\n\n\n struct BlockAura {\n bytes3 p0Seal;\n bytes3 p0Bare;\n\n bytes32 parentHash;\n bytes p2;\n bytes32 receiptHash;\n bytes p3;\n\n bytes4 step;\n bytes signature; // todo maybe pass s r v values?\n\n uint64 finalizedVs;\n }\n\n\n struct ValidatorSetChange {\n address deltaAddress;\n uint16 deltaIndex; // add if 0, else remove\n }\n\n struct ValidatorSetProof {\n bytes[] receiptProof;\n ValidatorSetChange[] changes;\n uint64 eventBlock;\n }\n\n struct AuraProof {\n BlockAura[] blocks;\n CommonStructs.TransferProof transfer;\n ValidatorSetProof[] vsChanges;\n uint64 transferEventBlock;\n }\n\n\n function __CheckAura_init(\n address[] calldata initialValidators_,\n address validatorSetAddress_,\n bytes32 lastProcessedBlock_,\n uint minSafetyBlocksValidators_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n validatorSet = initialValidators_;\n validatorSetAddress = validatorSetAddress_;\n lastProcessedBlock = lastProcessedBlock_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n\n\n /*\n AuraProof.blocks contains:\n - blocks for validate validatorSet change event, in that order:\n - block with `InitiateChange` events (contains list of all validators)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize; have `finalizedVs` != 0\n * repeated for each vs change event; all events must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n AuraProof.vsChanges contains changes in validator set and receiptProof for validation.\n block.finalizedVs-1 is index in AuraProof.vsChanges array\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between vsChange events\n If there are no errors, the transfer is considered valid\n */\n function checkAura_(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n\n bytes32 parentHash;\n bytes32 receiptHash;\n\n // auraProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (auraProof.transfer.eventId != 0) {\n receiptHash = calcTransferReceiptsHash(auraProof.transfer, sideBridgeAddress);\n require(auraProof.blocks[auraProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(auraProof.blocks.length - auraProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < auraProof.blocks.length; i++) {\n BlockAura calldata block_ = auraProof.blocks[i];\n\n // check that parentHash is correct\n if (block_.parentHash != parentHash) {\n // we can ignore wrong parentHash if:\n // - it's NOT safety blocks for transfer event\n // - it's first block (don't know parentHash)\n // - it's finalizing block (there is gap BEFORE finalizing block)\n // - it's next block after finalizing (there is gap AFTER finalizing block)\n // else, raise error\n\n if (i > auraProof.transferEventBlock || // safety blocks for transfer event\n (i != 0 && // not first block\n block_.finalizedVs == 0 && // not finalizing block\n auraProof.blocks[i-1].finalizedVs == 0) // not next block after finalizing\n )\n revert(\"Wrong parent hash\");\n }\n\n // check validator for this block\n // calc block hash for this block\n parentHash = checkBlock(block_);\n\n // if this block is finalizing block\n // 0 means no events should be finalized, so indexes are shifted by 1\n if (block_.finalizedVs != 0) {\n // vs changes in that block\n ValidatorSetProof calldata vsProof = auraProof.vsChanges[block_.finalizedVs - 1];\n\n // apply vs changes\n for (uint k = 0; k < vsProof.changes.length; k++)\n applyVsChange(vsProof.changes[k]);\n\n // check proof\n receiptHash = calcValidatorSetReceiptHash(vsProof.receiptProof, validatorSetAddress, validatorSet);\n require(auraProof.blocks[vsProof.eventBlock].receiptHash == receiptHash, \"Wrong VS receipt hash\");\n require(i - vsProof.eventBlock >= minSafetyBlocksValidators, \"Few safety blocks validators\");\n }\n\n }\n\n // save block.parentHash in which latest processed vsChange event emitted\n if (auraProof.vsChanges.length > 0) {\n lastProcessedBlock = auraProof.blocks[auraProof.vsChanges[auraProof.vsChanges.length - 1].eventBlock].parentHash;\n }\n }\n\n function getValidatorSet() public view returns (address[] memory) {\n return validatorSet;\n }\n\n function applyVsChange(ValidatorSetChange calldata vsEvent) internal {\n if (vsEvent.deltaIndex == 0) {// add validator\n validatorSet.push(vsEvent.deltaAddress);\n } else {// delete validator\n uint index = uint(vsEvent.deltaIndex - 1);\n validatorSet[index] = validatorSet[validatorSet.length - 1];\n validatorSet.pop();\n }\n }\n\n function checkBlock(BlockAura calldata block_) internal view returns (bytes32) {\n (bytes32 bareHash, bytes32 sealHash) = calcBlockHash(block_);\n\n address validator = validatorSet[bytesToUint(block_.step) % validatorSet.length];\n require(ecdsaRecover(bareHash, block_.signature) == validator, \"Failed to verify sign\");\n\n return sealHash;\n }\n\n function calcBlockHash(BlockAura calldata block_) internal pure returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p2, block_.receiptHash, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Bare, commonRlp)),\n // hash with seal, for prevHash check\n keccak256(abi.encodePacked(block_.p0Seal, commonRlp, STEP_PREFIX, block_.step, SIGNATURE_PREFIX, block_.signature))\n );\n }\n\n\n function calcValidatorSetReceiptHash(bytes[] calldata receiptProof, address validatorSetAddress_, address[] storage vSet) private pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n receiptProof[0],\n validatorSetAddress_,\n receiptProof[1],\n abi.encode(vSet),\n receiptProof[2]\n ));\n return calcReceiptsHash(receiptProof, el, 3);\n }\n\n function bytesToUint(bytes4 b) internal pure returns (uint){\n return uint(uint32(b));\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckReceiptsProof.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\n// check readme for focs\nfunction calcReceiptsHash(bytes[] calldata proof, bytes32 el, uint proofStart) pure returns (bytes32) {\n bytes memory s;\n\n for (uint i = proofStart; i < proof.length; i += 2) {\n s = abi.encodePacked(proof[i], el, proof[i + 1]);\n el = (s.length > 32) ? keccak256(s) : bytes32(s);\n }\n\n return el;\n}\n\n\nfunction calcTransferReceiptsHash(CommonStructs.TransferProof calldata p, address eventContractAddress) pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n p.receiptProof[0],\n eventContractAddress,\n p.receiptProof[1],\n toBinary(p.eventId),\n p.receiptProof[2],\n abi.encode(p.transfers),\n p.receiptProof[3]\n ));\n return calcReceiptsHash(p.receiptProof, el, 4);\n // start from proof[4]\n}\n\n\nfunction toBinary(uint _x) pure returns (bytes memory) {\n bytes memory b = new bytes(32);\n assembly {\n mstore(add(b, 32), _x)\n }\n uint i;\n for (i = 0; i < 32; i++) {\n if (b[i] != 0) {\n break;\n }\n }\n bytes memory res = new bytes(32 - i);\n for (uint j = 0; j < res.length; j++) {\n res[j] = b[i++];\n }\n return res;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" - }, - "contracts/checks/SignatureCheck.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" - }, - "contracts/common/CommonStructs.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address relayAddress;\n address[] watchdogsAddresses; address feeProviderAddress;\n address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" - }, - "contracts/networks/_AuraReceiver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract _AuraReceiver is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n}\n" - }, - "contracts/common/CommonBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // DEFAULT_ADMIN_ROLE can grants and revokes all roles below; Set to multisig (proxy contract address)\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\"); // can submit transfers\n bytes32 public constant WATCHDOG_ROLE = keccak256(\"WATCHDOG_ROLE\"); // can pause contract\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\"FEE_PROVIDER_ROLE\"); // fee signatures must be signed by this role\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable public transferFeeRecipient;\n address payable public bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, address(this));\n _setupRole(ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRoles(WATCHDOG_ROLE, args.watchdogsAddresses);\n _setupRole(FEE_PROVIDER_ROLE, args.feeProviderAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId **and all after it**\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n require(eventId <= inputEventId, \"eventId must be <= inputEventId\");\n\n // now waiting for submitting a new transfer with `eventId` id\n inputEventId = eventId - 1;\n\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n\n }\n\n // pretend like bridge already receive and process all transfers up to `eventId` id\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\n }\n\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(WATCHDOG_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // roles\n\n function grantRoles(bytes32 role, address[] calldata accounts) public onlyRole(getRoleAdmin(role)) {\n // check permission to grant role via onlyRole(getRoleAdmin(role))\n _setupRoles(role, accounts);\n }\n function revokeRoles(bytes32 role, address[] calldata accounts) public {\n // revokeRole will check for permissions\n for (uint i = 0; i < accounts.length; i++)\n revokeRole(role, accounts[i]);\n }\n function _setupRoles(bytes32 role, address[] calldata accounts) internal {\n // no permissions check at all\n for (uint i = 0; i < accounts.length; i++)\n _setupRole(role, accounts[i]);\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(FEE_PROVIDER_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" - }, - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\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, _msgSender());\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(IAccessControlUpgradeable).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" - }, - "contracts/tokens/IWrapper.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 IERC165Upgradeable {\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" - }, - "contracts/networks/ETH_EthBridge_AURA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract ETH_EthBridge_AURA is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/BSC_BscBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract BSC_BscBridge is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/ETH_EthBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract ETH_EthBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address oldDefaultAdmin\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n}\n" - }, - "contracts/checks/CheckUntrustless2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\ncontract CheckUntrustless2 {\n // this contract do nothing, but i think it's required to inheritance from it\n // todo check this\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckUntrustless.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckUntrustless {\n uint public confirmationsThreshold;\n\n // [hash of (eventId, transfers)] => [relayAddress] => isConfirmed\n mapping(bytes32 => mapping(address => bool)) public confirmations;\n\n // using this instead of RELAY_ROLE coz it simpler\n address[] public relays;\n\n event RelayAdd(address indexed relay);\n event RelayRemove(address indexed relay);\n event ThresholdChange(uint newThreshold);\n event RelayConfirmation(address indexed sender, uint indexed eventId, bytes32 hash);\n\n // return true if current call reach confirmationsThreshold\n function checkUntrustless_(uint eventId, CommonStructs.Transfer[] calldata transfers) internal returns (bool) {\n require(isRelay(msg.sender), \"You not in relay whitelist\");\n\n bytes32 hash = transfersHash(eventId, transfers);\n require(confirmations[hash][msg.sender] == false, \"You have already confirmed this\");\n\n uint confirmCount = confirmedCount(hash);\n require(confirmCount < confirmationsThreshold, \"Already confirmed\");\n\n confirmations[hash][msg.sender] = true;\n emit RelayConfirmation(msg.sender, eventId, hash);\n\n // +1 coz current relay confirmed just now\n return confirmCount + 1 >= confirmationsThreshold;\n }\n\n\n function isConfirmedByRelay(address relay, uint eventId, CommonStructs.Transfer[] calldata transfers) public view returns (bool) {\n bytes32 hash = transfersHash(eventId, transfers);\n return confirmations[hash][relay];\n }\n\n\n function confirmedCount(bytes32 hash) public view returns (uint) {\n uint res;\n for (uint i = 0; i < relays.length; i++)\n if (confirmations[hash][relays[i]])\n res++;\n return res;\n }\n\n\n function isRelay(address relay) public view returns (bool){\n for (uint i = 0; i < relays.length; i++)\n if (relays[i] == relay)\n return true;\n return false;\n }\n\n function getRelays() public view returns (address[] memory) {\n return relays;\n }\n\n function transfersHash(uint eventId, CommonStructs.Transfer[] calldata transfers) public pure returns (bytes32) {\n bytes memory payload = abi.encodePacked(eventId);\n\n // i guess we can hash transfers only in this way\n for (uint i = 0; i < transfers.length; i++)\n payload = abi.encodePacked(payload, transfers[i].amount, transfers[i].toAddress, transfers[i].tokenAddress);\n\n return keccak256(payload);\n }\n\n\n function _setRelaysAndConfirmations(address[] memory toRemove, address[] memory toAdd, uint _confirmations) internal {\n for (uint i = 0; i < toRemove.length; i++)\n _removeRelay(toRemove[i]);\n for (uint i = 0; i < toAdd.length; i++)\n _addRelay(toAdd[i]);\n\n if (confirmationsThreshold != _confirmations) {\n confirmationsThreshold = _confirmations;\n emit ThresholdChange(_confirmations);\n }\n }\n\n function _removeRelay(address relay) internal {\n for (uint i = 0; i < relays.length; i++) {\n if (relays[i] == relay) {\n relays[i] = relays[relays.length - 1];\n relays.pop();\n emit RelayRemove(relay);\n return;\n }\n }\n revert(\"Not a relay\");\n }\n\n function _addRelay(address relay) internal {\n require(!isRelay(relay), \"Already relay\");\n relays.push(relay);\n emit RelayAdd(relay);\n }\n\n uint256[15] private ___gap;\n\n}\n" - }, - "contracts/networks/ETH_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless.sol\";\n\n\ncontract ETH_AmbBridge is CommonBridge, CheckUntrustless {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint _confirmations,\n address[] calldata _relays\n ) public initializer {\n __CommonBridge_init(args);\n _setRelaysAndConfirmations(new address[](0), _relays, _confirmations);\n }\n\n function upgrade(\n uint _confirmations,\n address[] memory _relays\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n // _setRelaysAndConfirmations don't work during upgrade and nobody knows why\n relays = _relays;\n confirmationsThreshold = _confirmations;\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public whenNotPaused {\n // relay \"role\" checked at CheckUntrustless contract\n require(eventId == inputEventId + 1, \"EventId out of order\");\n\n bool confirm = checkUntrustless_(eventId, transfers);\n if (confirm) {// required count of confirmations reached\n ++inputEventId;\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n // todo need lock?\n }\n }\n\n function setRelaysAndConfirmations(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n require(msg.sender == address(this), \"This method require multisig\");\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n\n}\n" - }, - "contracts/contracts_for_tests/CheckUntrustlessTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckUntrustless.sol\";\n\ncontract CheckUntrustlessTest is CheckUntrustless {\n constructor() {}\n\n event checkUntrustlessTestResult(bool result);\n\n function checkUntrustlessTest(uint eventId, CommonStructs.Transfer[] calldata transfers) public {\n emit checkUntrustlessTestResult(checkUntrustless_(eventId, transfers));\n }\n\n function setRelaysAndConfirmationsTest(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n}\n" - }, - "contracts/checks/CheckPoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"./CheckPoW_Ethash.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckPoW is Initializable, Ethash {\n struct BlockPoW {\n bytes3 p0WithNonce;\n bytes3 p0WithoutNonce;\n\n bytes p1;\n bytes32 parentOrReceiptHash;\n bytes p2;\n bytes difficulty;\n bytes p3;\n bytes number;\n bytes p4; // end when extra end\n bytes p5; // after extra\n bytes nonce;\n bytes p6;\n\n uint[] dataSetLookup;\n uint[] witnessForLookup;\n }\n\n struct PoWProof {\n BlockPoW[] blocks;\n CommonStructs.TransferProof transfer;\n }\n\n uint256 minimumDifficulty;\n\n function __CheckPoW_init(\n uint256 minimumDifficulty_\n ) internal initializer {\n minimumDifficulty = minimumDifficulty_;\n }\n\n /*\n PoWProof.blocks contains:\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, checking it pow hash.\n Each block parentHash must be equal to the hash of the previous block.\n If there are no errors, the transfer is considered valid\n */\n function checkPoW_(PoWProof calldata powProof, address sideBridgeAddress) internal view\n {\n bytes32 hash = calcTransferReceiptsHash(powProof.transfer, sideBridgeAddress);\n for (uint i = 0; i < powProof.blocks.length; i++) {\n require(powProof.blocks[i].parentOrReceiptHash == hash, \"parentHash or receiptHash wrong\");\n hash = blockHash(powProof.blocks[i]);\n\n verifyEthash(powProof.blocks[i]);\n }\n }\n\n\n function verifyEthash(BlockPoW calldata block_) internal view {\n uint difficulty = bytesToUint(block_.difficulty);\n require(difficulty >= minimumDifficulty, \"difficulty too low\");\n verifyPoW(\n bytesToUint(block_.number),\n blockHashWithoutNonce(block_),\n bytesToUint(block_.nonce),\n difficulty,\n block_.dataSetLookup,\n block_.witnessForLookup\n );\n }\n\n function blockHash(BlockPoW calldata block_) internal pure returns (bytes32) {\n // Note: too much arguments in abi.encodePacked() function cause CompilerError: Stack too deep...\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2,\n block_.difficulty,\n block_.p3\n ),\n abi.encodePacked(\n block_.number,\n block_.p4,\n block_.p5,\n block_.nonce,\n block_.p6\n )\n ));\n }\n\n function blockHashWithoutNonce(BlockPoW calldata block_) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithoutNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2\n ),\n abi.encodePacked(\n block_.difficulty,\n block_.p3,\n block_.number,\n block_.p4,\n block_.p6\n )\n ));\n }\n\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckPoW_Ethash.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n/// @dev These contracts are used to verify Proof of Work within a smart contract.\n/// The algorithms have been extracted from the implementation of smart pool (https://github.com/smartpool)\ncontract SHA3_512 {\n constructor() {}\n\n function keccak_f(uint[25] memory A) pure private returns (uint[25] memory) {\n uint[25] memory B;\n uint[5] memory C;\n uint[5] memory D;\n\n uint[24] memory RC = [\n uint(0x0000000000000001),\n 0x0000000000008082,\n 0x800000000000808A,\n 0x8000000080008000,\n 0x000000000000808B,\n 0x0000000080000001,\n 0x8000000080008081,\n 0x8000000000008009,\n 0x000000000000008A,\n 0x0000000000000088,\n 0x0000000080008009,\n 0x000000008000000A,\n 0x000000008000808B,\n 0x800000000000008B,\n 0x8000000000008089,\n 0x8000000000008003,\n 0x8000000000008002,\n 0x8000000000000080,\n 0x000000000000800A,\n 0x800000008000000A,\n 0x8000000080008081,\n 0x8000000000008080,\n 0x0000000080000001,\n 0x8000000080008008];\n\n for (uint i = 0; i < 24; i++) {\n\n C[0] = A[0] ^ A[1] ^ A[2] ^ A[3] ^ A[4];\n C[1] = A[5] ^ A[6] ^ A[7] ^ A[8] ^ A[9];\n C[2] = A[10] ^ A[11] ^ A[12] ^ A[13] ^ A[14];\n C[3] = A[15] ^ A[16] ^ A[17] ^ A[18] ^ A[19];\n C[4] = A[20] ^ A[21] ^ A[22] ^ A[23] ^ A[24];\n\n D[0] = C[4] ^ ((C[1] * 2) & 0xffffffffffffffff | (C[1] / (2 ** 63)));\n D[1] = C[0] ^ ((C[2] * 2) & 0xffffffffffffffff | (C[2] / (2 ** 63)));\n D[2] = C[1] ^ ((C[3] * 2) & 0xffffffffffffffff | (C[3] / (2 ** 63)));\n D[3] = C[2] ^ ((C[4] * 2) & 0xffffffffffffffff | (C[4] / (2 ** 63)));\n D[4] = C[3] ^ ((C[0] * 2) & 0xffffffffffffffff | (C[0] / (2 ** 63)));\n\n A[0] = A[0] ^ D[0];\n A[1] = A[1] ^ D[0];\n A[2] = A[2] ^ D[0];\n A[3] = A[3] ^ D[0];\n A[4] = A[4] ^ D[0];\n A[5] = A[5] ^ D[1];\n A[6] = A[6] ^ D[1];\n A[7] = A[7] ^ D[1];\n A[8] = A[8] ^ D[1];\n A[9] = A[9] ^ D[1];\n A[10] = A[10] ^ D[2];\n A[11] = A[11] ^ D[2];\n A[12] = A[12] ^ D[2];\n A[13] = A[13] ^ D[2];\n A[14] = A[14] ^ D[2];\n A[15] = A[15] ^ D[3];\n A[16] = A[16] ^ D[3];\n A[17] = A[17] ^ D[3];\n A[18] = A[18] ^ D[3];\n A[19] = A[19] ^ D[3];\n A[20] = A[20] ^ D[4];\n A[21] = A[21] ^ D[4];\n A[22] = A[22] ^ D[4];\n A[23] = A[23] ^ D[4];\n A[24] = A[24] ^ D[4];\n\n /*Rho and pi steps*/\n B[0] = A[0];\n B[8] = ((A[1] * (2 ** 36)) & 0xffffffffffffffff | (A[1] / (2 ** 28)));\n B[11] = ((A[2] * (2 ** 3)) & 0xffffffffffffffff | (A[2] / (2 ** 61)));\n B[19] = ((A[3] * (2 ** 41)) & 0xffffffffffffffff | (A[3] / (2 ** 23)));\n B[22] = ((A[4] * (2 ** 18)) & 0xffffffffffffffff | (A[4] / (2 ** 46)));\n B[2] = ((A[5] * (2 ** 1)) & 0xffffffffffffffff | (A[5] / (2 ** 63)));\n B[5] = ((A[6] * (2 ** 44)) & 0xffffffffffffffff | (A[6] / (2 ** 20)));\n B[13] = ((A[7] * (2 ** 10)) & 0xffffffffffffffff | (A[7] / (2 ** 54)));\n B[16] = ((A[8] * (2 ** 45)) & 0xffffffffffffffff | (A[8] / (2 ** 19)));\n B[24] = ((A[9] * (2 ** 2)) & 0xffffffffffffffff | (A[9] / (2 ** 62)));\n B[4] = ((A[10] * (2 ** 62)) & 0xffffffffffffffff | (A[10] / (2 ** 2)));\n B[7] = ((A[11] * (2 ** 6)) & 0xffffffffffffffff | (A[11] / (2 ** 58)));\n B[10] = ((A[12] * (2 ** 43)) & 0xffffffffffffffff | (A[12] / (2 ** 21)));\n B[18] = ((A[13] * (2 ** 15)) & 0xffffffffffffffff | (A[13] / (2 ** 49)));\n B[21] = ((A[14] * (2 ** 61)) & 0xffffffffffffffff | (A[14] / (2 ** 3)));\n B[1] = ((A[15] * (2 ** 28)) & 0xffffffffffffffff | (A[15] / (2 ** 36)));\n B[9] = ((A[16] * (2 ** 55)) & 0xffffffffffffffff | (A[16] / (2 ** 9)));\n B[12] = ((A[17] * (2 ** 25)) & 0xffffffffffffffff | (A[17] / (2 ** 39)));\n B[15] = ((A[18] * (2 ** 21)) & 0xffffffffffffffff | (A[18] / (2 ** 43)));\n B[23] = ((A[19] * (2 ** 56)) & 0xffffffffffffffff | (A[19] / (2 ** 8)));\n B[3] = ((A[20] * (2 ** 27)) & 0xffffffffffffffff | (A[20] / (2 ** 37)));\n B[6] = ((A[21] * (2 ** 20)) & 0xffffffffffffffff | (A[21] / (2 ** 44)));\n B[14] = ((A[22] * (2 ** 39)) & 0xffffffffffffffff | (A[22] / (2 ** 25)));\n B[17] = ((A[23] * (2 ** 8)) & 0xffffffffffffffff | (A[23] / (2 ** 56)));\n B[20] = ((A[24] * (2 ** 14)) & 0xffffffffffffffff | (A[24] / (2 ** 50)));\n\n /*Xi state*/\n A[0] = B[0] ^ ((~B[5]) & B[10]);\n A[1] = B[1] ^ ((~B[6]) & B[11]);\n A[2] = B[2] ^ ((~B[7]) & B[12]);\n A[3] = B[3] ^ ((~B[8]) & B[13]);\n A[4] = B[4] ^ ((~B[9]) & B[14]);\n A[5] = B[5] ^ ((~B[10]) & B[15]);\n A[6] = B[6] ^ ((~B[11]) & B[16]);\n A[7] = B[7] ^ ((~B[12]) & B[17]);\n A[8] = B[8] ^ ((~B[13]) & B[18]);\n A[9] = B[9] ^ ((~B[14]) & B[19]);\n A[10] = B[10] ^ ((~B[15]) & B[20]);\n A[11] = B[11] ^ ((~B[16]) & B[21]);\n A[12] = B[12] ^ ((~B[17]) & B[22]);\n A[13] = B[13] ^ ((~B[18]) & B[23]);\n A[14] = B[14] ^ ((~B[19]) & B[24]);\n A[15] = B[15] ^ ((~B[20]) & B[0]);\n A[16] = B[16] ^ ((~B[21]) & B[1]);\n A[17] = B[17] ^ ((~B[22]) & B[2]);\n A[18] = B[18] ^ ((~B[23]) & B[3]);\n A[19] = B[19] ^ ((~B[24]) & B[4]);\n A[20] = B[20] ^ ((~B[0]) & B[5]);\n A[21] = B[21] ^ ((~B[1]) & B[6]);\n A[22] = B[22] ^ ((~B[2]) & B[7]);\n A[23] = B[23] ^ ((~B[3]) & B[8]);\n A[24] = B[24] ^ ((~B[4]) & B[9]);\n\n /*Last step*/\n A[0] = A[0] ^ RC[i];\n }\n\n return A;\n }\n\n\n function sponge(uint[9] memory M) pure internal returns (uint[16] memory) {\n require((M.length * 8) == 72, \"sponge error\");\n\n M[5] = 0x01;\n M[8] = 0x8000000000000000;\n\n uint r = 72;\n uint w = 8;\n uint size = M.length * 8;\n\n uint[25] memory S;\n uint i;\n uint y;\n uint x;\n /*Absorbing Phase*/\n for (i = 0; i < size / r; i++) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w)) {\n S[5 * x + y] = S[5 * x + y] ^ M[i * 9 + x + 5 * y];\n }\n }\n }\n S = keccak_f(S);\n }\n\n /*Squeezing phase*/\n uint[16] memory result;\n uint b = 0;\n while (b < 16) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w) && (b < 16)) {\n result[b] = S[5 * x + y] & 0xFFFFFFFF;\n result[b + 1] = S[5 * x + y] / 0x100000000;\n b += 2;\n }\n }\n }\n }\n\n return result;\n }\n\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\ncontract Ethash is SHA3_512 {\n\n uint constant EPOCH_LENGTH = 30000; // blocks per epoch\n\n constructor() {\n }\n\n struct EthashCacheOptData {\n uint[512] merkleNodes;\n uint fullSizeIn128Resultion;\n uint branchDepth;\n }\n\n mapping(uint => EthashCacheOptData) epochData;\n\n\n function verifyPoW(uint blockNumber, bytes32 rlpHeaderHashWithoutNonce, uint nonce, uint difficulty,\n uint[] memory dataSetLookup, uint[] memory witnessForLookup) internal view {\n\n uint epoch = blockNumber / EPOCH_LENGTH;\n uint ethash = hashimoto(rlpHeaderHashWithoutNonce, nonce, dataSetLookup, witnessForLookup, epoch);\n\n require(ethash <= (2 ** 256 - 1) / difficulty, \"Ethash difficulty too low\");\n }\n\n function isEpochDataSet(uint epochIndex) public view returns (bool) {\n return epochData[epochIndex].fullSizeIn128Resultion != 0;\n }\n\n function setEpochData(\n uint epochNum,\n uint fullSizeIn128Resultion,\n uint branchDepth,\n uint[] calldata merkleNodes\n ) public {\n\n // we store only previous and current epochs\n // so, delete second from the end epoch\n if (epochNum >= 2) // underflow check\n delete epochData[epochNum - 2];\n\n\n uint l = merkleNodes.length;\n uint[512] storage nodes = epochData[epochNum].merkleNodes;\n\n for (uint i = 0; i < l; i++) {\n nodes[i] = merkleNodes[i];\n }\n\n epochData[epochNum].fullSizeIn128Resultion = fullSizeIn128Resultion;\n epochData[epochNum].branchDepth = branchDepth;\n }\n\n\n function hashimoto(bytes32 header,\n uint nonceLe,\n uint[] memory dataSetLookup,\n uint[] memory witnessForLookup,\n uint epochIndex) private view returns (uint) {\n\n uint[16] memory s = computeS(uint(header), nonceLe);\n uint[32] memory mix;\n uint[8] memory cmix;\n\n\n uint depth = epochData[epochIndex].branchDepth;\n uint fullSize = epochData[epochIndex].fullSizeIn128Resultion;\n\n uint i;\n uint j;\n\n require(fullSize != 0, \"EpochData not set\");\n\n\n for (i = 0; i < 16; i++) {\n assembly {\n let offset := mul(i, 0x20)\n\n //mix[i] = s[i];\n mstore(add(mix, offset), mload(add(s, offset)))\n\n // mix[i+16] = s[i];\n mstore(add(mix, add(0x200, offset)), mload(add(s, offset)))\n }\n }\n\n for (i = 0; i < 64; i++) {\n uint p = fnv(i ^ s[0], mix[i % 32]) % fullSize;\n\n // console.log(computeCacheRoot( p, i, dataSetLookup, witnessForLookup, depthAndFullSize[0]));\n // console.log(getMerkleLeave( epochIndex, p ));\n\n if (computeCacheRoot(p, i, dataSetLookup, witnessForLookup, depth) != getMerkleLeave(epochIndex, p)) {\n // PoW failed\n revert(\"PoW failed\");\n }\n\n for (j = 0; j < 8; j++) {\n\n assembly{\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & varFFFFFFFF );\n let dataOffset := add(mul(0x80, i), add(dataSetLookup, 0x20))\n let dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n let mixOffset := add(mix, mul(0x20, j))\n let mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n let fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n }\n\n\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & 0xFFFFFFFF );\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n\n\n //dataSetLookup[4*i ] = dataSetLookup[4*i ]/(2**32);\n //dataSetLookup[4*i + 1] = dataSetLookup[4*i + 1]/(2**32);\n //dataSetLookup[4*i + 2] = dataSetLookup[4*i + 2]/(2**32);\n //dataSetLookup[4*i + 3] = dataSetLookup[4*i + 3]/(2**32);\n\n assembly{\n let offset := add(add(dataSetLookup, 0x20), mul(i, 0x80))\n let value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n }\n }\n }\n\n\n for (i = 0; i < 32; i += 4) {\n cmix[i / 4] = (fnv(fnv(fnv(mix[i], mix[i + 1]), mix[i + 2]), mix[i + 3]));\n }\n\n return computeSha3(s, cmix);\n\n }\n\n\n function fnv(uint v1, uint v2) pure internal returns (uint) {\n return ((v1 * 0x01000193) ^ v2) & 0xFFFFFFFF;\n }\n\n function computeCacheRoot(uint index,\n uint indexInElementsArray,\n uint[] memory elements,\n uint[] memory witness,\n uint branchSize) pure private returns (uint) {\n\n uint leaf = computeLeaf(elements, indexInElementsArray) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n\n uint left;\n uint right;\n uint node;\n bool oddBranchSize = (branchSize % 2) > 0;\n\n assembly {\n branchSize := div(branchSize, 2)\n //branchSize /= 2;\n }\n uint witnessIndex = indexInElementsArray * branchSize;\n if (oddBranchSize) witnessIndex += indexInElementsArray;\n\n uint depth;\n for (depth = 0; depth < branchSize; depth++) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n\n //node = witness[witnessIndex + depth] / (2**128);\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := div(node, 0x100000000000000000000000000000000)\n }\n }\n else {\n assembly {\n left := div(node, 0x100000000000000000000000000000000)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n }\n\n if (oddBranchSize) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n }\n\n\n return leaf;\n }\n\n\n function computeSha3(uint[16] memory s, uint[8] memory cmix) pure internal returns (uint) {\n uint s0 = s[0] + s[1] * (2 ** 32) + s[2] * (2 ** 64) + s[3] * (2 ** 96) +\n (s[4] + s[5] * (2 ** 32) + s[6] * (2 ** 64) + s[7] * (2 ** 96)) * (2 ** 128);\n\n uint s1 = s[8] + s[9] * (2 ** 32) + s[10] * (2 ** 64) + s[11] * (2 ** 96) +\n (s[12] + s[13] * (2 ** 32) + s[14] * (2 ** 64) + s[15] * (2 ** 96)) * (2 ** 128);\n\n uint c = cmix[0] + cmix[1] * (2 ** 32) + cmix[2] * (2 ** 64) + cmix[3] * (2 ** 96) +\n (cmix[4] + cmix[5] * (2 ** 32) + cmix[6] * (2 ** 64) + cmix[7] * (2 ** 96)) * (2 ** 128);\n\n\n /* god knows why need to convert to big endian */\n return uint(keccak256(abi.encodePacked(reverseBytes(s0), reverseBytes(s1), reverseBytes(c))));\n }\n\n\n function computeLeaf(uint[] memory dataSetLookup, uint index) pure internal returns (uint) {\n return uint(keccak256(abi.encodePacked(\n dataSetLookup[4 * index],\n dataSetLookup[4 * index + 1],\n dataSetLookup[4 * index + 2],\n dataSetLookup[4 * index + 3]\n )));\n\n }\n\n function computeS(uint header, uint nonceLe) pure internal returns (uint[16] memory) {\n uint[9] memory M;\n\n header = reverseBytes(header);\n\n M[0] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[1] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[2] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[3] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n\n // make little endian nonce\n M[4] = nonceLe;\n return sponge(M);\n }\n\n function reverseBytes(uint input) pure internal returns (uint) {\n uint result;\n for (uint i = 0; i < 32; i++) {\n result = (result << 8) + (input & 0xff);\n input = input >> 8;\n }\n return result;\n }\n\n\n function getMerkleLeave(uint epochIndex, uint p) view internal returns (uint) {\n uint rootIndex = uint(p >> epochData[epochIndex].branchDepth);\n uint expectedRoot = epochData[epochIndex].merkleNodes[(rootIndex >> 1)];\n\n if ((rootIndex % 2) == 0)\n return expectedRoot & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n return expectedRoot >> 128;\n }\n\n}\n" - }, - "contracts/networks/ETH_AmbBridge_PoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoW.sol\";\n\n\ncontract ETH_AmbBridge_PoW is CommonBridge, CheckPoW {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint minimumDifficulty\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoW_init(minimumDifficulty);\n }\n\n function submitTransferPoW(PoWProof calldata powProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(powProof.transfer.eventId);\n checkEventId(powProof.transfer.eventId);\n checkPoW_(powProof, sideBridgeAddress);\n // checkPoW_(powProof, sideBridgeAddress);\n lockTransfers(powProof.transfer.transfers, powProof.transfer.eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n}\n\n" - }, - "contracts/contracts_for_tests/CheckPoWTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoW.sol\";\n\ncontract CheckPoWTest is CheckPoW {\n\n constructor(\n uint minimumDifficulty_\n ) {\n minimumDifficulty = minimumDifficulty_;\n }\n\n function checkPoWTest(PoWProof calldata powProof, address sideBridgeAddress) public {\n checkPoW_(powProof, sideBridgeAddress);\n }\n\n function verifyEthashTest(BlockPoW calldata block_) public view {\n verifyEthash(block_);\n }\n\n function blockHashTest(BlockPoW calldata block_) public pure returns (bytes32) {\n return blockHash(block_);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CommonBridgeTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckReceiptsProof.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // deployer now can grant roles\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n checkEventId(eventId); // now its more like submitTransferTest\n lockTransfers(events, eventId);\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n // checkReceiptsProof\n\n function calcTransferReceiptsHashTest(CommonStructs.TransferProof calldata p, address eventContractAddress) public pure returns (bytes32) {\n return calcTransferReceiptsHash(p, eventContractAddress);\n }\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" - }, - "contracts/checks/CheckPoSA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckPoSA is Initializable {\n uint256 private constant ADDRESS_LENGTH = 20;\n uint256 private constant EXTRA_VANITY_LENGTH = 32;\n uint256 private constant EXTRA_SEAL_LENGTH = 65;\n uint256 private constant EPOCH_LENGTH = 200;\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n\n mapping(uint => mapping(address => bool)) internal allValidators;\n uint public currentEpoch;\n uint currentValidatorSetSize;\n\n bytes1 chainId;\n\n\n struct BlockPoSA {\n bytes3 p0Signed;\n bytes3 p0Unsigned;\n\n bytes32 parentHash;\n bytes p1;\n bytes32 receiptHash;\n bytes p2;\n bytes number;\n bytes p3;\n\n bytes p4Signed;\n bytes p4Unsigned;\n bytes extraData;\n\n bytes p5;\n }\n\n struct PoSAProof {\n BlockPoSA[] blocks;\n CommonStructs.TransferProof transfer;\n uint64 transferEventBlock;\n }\n\n\n function __CheckPoSA_init(\n address[] calldata initialValidators_,\n uint initialEpoch_,\n bytes1 chainId_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n chainId = chainId_;\n currentEpoch = initialEpoch_;\n currentValidatorSetSize = initialValidators_.length;\n\n for (uint i = 0; i < initialValidators_.length; i++) {\n allValidators[currentEpoch][initialValidators_[i]] = true;\n }\n }\n\n /*\n PoSAProof.blocks contains:\n - blocks for validate validatorSet changes, in that order:\n - first block in epoch (blockNum % 200 == 0)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize\n * repeated for each new epoch, all epochs must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between epochs\n If there are no errors, the transfer is considered valid\n */\n function checkPoSA_(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n bytes32 bareHash;\n bytes32 parentHash;\n uint finalizeVsBlock;\n uint nextVsSize;\n\n // posaProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (posaProof.transfer.eventId != 0) {\n bytes32 receiptHash = calcTransferReceiptsHash(posaProof.transfer, sideBridgeAddress);\n require(posaProof.blocks[posaProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(posaProof.blocks.length - posaProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < posaProof.blocks.length; i++) {\n BlockPoSA calldata block_ = posaProof.blocks[i];\n\n if (parentHash != bytes32(0))\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n\n (bareHash, parentHash) = calcBlockHash(block_);\n\n require(verifySignature(bareHash, getSignature(block_.extraData)), \"invalid signature\");\n\n // change validator set\n\n uint blockNumber = bytesToUint(block_.number);\n\n if (blockNumber % EPOCH_LENGTH == 0) {\n require(blockNumber / EPOCH_LENGTH == currentEpoch + 1, \"invalid epoch\");\n\n nextVsSize = newValidatorSet(block_.extraData);\n finalizeVsBlock = blockNumber + currentValidatorSetSize / 2;\n } else if (blockNumber == finalizeVsBlock) {\n currentEpoch++;\n currentValidatorSetSize = nextVsSize;\n\n // after finalizing vs change, next block in posaProof.blocks can have any parentHash (skipping some blocks)\n // but only if it's not the safety blocks for transfer event\n if (i < posaProof.transferEventBlock)\n parentHash = bytes32(0);\n }\n }\n }\n\n\n function calcBlockHash(BlockPoSA calldata block_) internal view returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p1, block_.receiptHash, block_.p2, block_.number, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Unsigned, chainId, commonRlp, block_.p4Unsigned, getExtraDataUnsigned(block_.extraData), block_.p5)),\n // hash with seal, for prev_hash check\n keccak256(abi.encodePacked(block_.p0Signed, commonRlp, block_.p4Signed, block_.extraData, block_.p5))\n );\n }\n\n function getSignature(bytes calldata extraData) private pure returns (bytes calldata) {\n uint start = extraData.length - EXTRA_SEAL_LENGTH;\n return extraData[start : start + EXTRA_SEAL_LENGTH];\n }\n\n function getExtraDataUnsigned(bytes calldata extraData) private pure returns (bytes memory) {\n return extraData[0 : extraData.length - EXTRA_SEAL_LENGTH];\n }\n\n function newValidatorSet(bytes calldata extraData) private returns (uint) {\n uint nextValidatorSet = currentEpoch + 1;\n uint endPos = extraData.length - EXTRA_SEAL_LENGTH;\n\n uint nextValidatorSetSize;\n for (uint pos = EXTRA_VANITY_LENGTH; pos < endPos; pos += ADDRESS_LENGTH) {\n address validator = address(bytes20(extraData[pos : pos + ADDRESS_LENGTH]));\n allValidators[nextValidatorSet][validator] = true;\n nextValidatorSetSize++;\n }\n\n return nextValidatorSetSize;\n }\n\n function verifySignature(bytes32 hash, bytes calldata signature) private view returns (bool) {\n address signer = ecdsaRecover(hash, signature);\n return allValidators[currentEpoch][signer];\n }\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n}\n" - }, - "contracts/networks/BSC_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract BSC_AmbBridge is CommonBridge, CheckPoSA {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n uint initialEpoch,\n bytes1 chainId\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoSA_init(initialValidators, initialEpoch, chainId);\n }\n\n function submitTransferPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(posaProof.transfer.eventId);\n checkEventId(posaProof.transfer.eventId);\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(posaProof.transfer.transfers, posaProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoSATest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract CheckPoSATest is CheckPoSA {\n constructor(\n bytes1 chainId_\n ) {\n chainId = chainId_;\n }\n\n function checkPoSATest(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress,\n address[] memory _initialValidators, uint _initialEpoch, bytes1 _chainId) public {\n // TODO: we can't use the `__CheckPoSA_init` twice, but copy-paste is also not good\n chainId = _chainId;\n currentEpoch = _initialEpoch;\n currentValidatorSetSize = _initialValidators.length;\n\n for (uint i = 0; i < _initialValidators.length; i++) {\n allValidators[currentEpoch][_initialValidators[i]] = true;\n }\n\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockPoSA calldata block_) public view returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockPoSA calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n}\n" - }, - "contracts/tokens/sAMB.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./IWrapper.sol\";\n\ncontract sAMB is IWrapper, ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\n\n function deposit() public override payable {\n _mint(msg.sender, msg.value);\n\n emit Deposit(msg.sender, msg.value);\n }\n\n function withdraw(uint amount) public override {\n _burn(msg.sender, amount);\n payable(msg.sender).transfer(amount);\n\n emit Withdrawal(msg.sender, amount);\n }\n\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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 * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, 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 * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), 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 * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\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 * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\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/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\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" - }, - "contracts/contracts_for_tests/MintableERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MintableERC20 is ERC20 {\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20 is ERC20, Ownable {\n address public bridgeAddress; // address of bridge contract on this network\n\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\n ERC20(name_, symbol_)\n Ownable() {\n bridgeAddress = bridgeAddress_;\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\n bridgeAddress = bridgeAddress_;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sender == bridgeAddress) {\n // user transfer tokens to ambrosus => need to mint it\n _mint(recipient, amount);\n } else if (recipient == bridgeAddress) {\n // user withdraw tokens from ambrosus => need to burn it\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/access/Ownable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 _setOwner(_msgSender());\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 called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _setOwner(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 _setOwner(newOwner);\n }\n\n function _setOwner(address newOwner) private {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20_Amb.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20_Amb is ERC20, Ownable {\n\n // decimals of token in side network\n // example:\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\n mapping(address => uint8) public sideTokenDecimals;\n\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\n\n uint8 _decimals;\n\n constructor(\n string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n ) ERC20(name_, symbol_) Ownable() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n }\n\n // todo check if we need this func\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \"wrong array lengths\");\n for (uint i = 0; i < bridgeAddresses_.length; i++)\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n // todo events\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n // user transfer tokens to ambrosus => need to mint it\n\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n\n\n // bridge mint money to user; same amount locked on side bridge\n bridgeBalances[sender] += amount_this;\n\n _mint(recipient, amount_this);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n // user withdraw tokens from ambrosus => need to burn it\n\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n\n\n // user burn tokens; side bridge must have enough tokens to send\n require(bridgeBalances[recipient] >= amount_this, \"not enough locked tokens on bridge\");\n bridgeBalances[recipient] -= amount_this;\n\n _burn(sender, amount_this);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\n if (dTo == dFrom)\n return amount;\n if (dTo > dFrom)\n return amount * (10 ** (dTo - dFrom));\n else\n return amount / (10 ** (dFrom - dTo));\n }\n\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20_AmbTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20_Amb.sol\";\n\ncontract BridgeERC20_AmbTest is BridgeERC20_Amb {\n constructor(string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n )\n BridgeERC20_Amb(name_, symbol_, decimals_, bridgeAddresses_, sideTokenDecimals_) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n function changeBridgeBalance(address bridge, uint balance) public {\n bridgeBalances[bridge] = balance;\n }\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20Test.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckAuraTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckAura.sol\";\n\ncontract CheckAuraTest is CheckAura {\n constructor(address validatorSetAddress_, uint minSafetyBlocksValidators_) {\n validatorSetAddress = validatorSetAddress_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function checkAuraTest(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress, address[] memory initialValidators_) public {\n validatorSet = initialValidators_;\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockAura calldata block_) public pure returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockAura calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function bytesToUintTest(bytes4 b) public pure returns (uint) {\n return bytesToUint(b);\n }\n\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "evmVersion": "byzantium", - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/contracts/deployments/test/amb/solcInputs/3d9e02ffdf8a213afd0c4d189b503155.json b/contracts/deployments/test/amb/solcInputs/3d9e02ffdf8a213afd0c4d189b503155.json deleted file mode 100644 index 500bb8e7..00000000 --- a/contracts/deployments/test/amb/solcInputs/3d9e02ffdf8a213afd0c4d189b503155.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/checks/CheckAura.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckAura is Initializable {\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n bytes1 constant STEP_PREFIX = 0x84;\n bytes2 constant SIGNATURE_PREFIX = 0xB841;\n\n address[] public validatorSet;\n address validatorSetAddress;\n bytes32 public lastProcessedBlock; // actually latest processed block in which *vs change event* emitted\n uint public minSafetyBlocksValidators;\n\n\n struct BlockAura {\n bytes3 p0Seal;\n bytes3 p0Bare;\n\n bytes32 parentHash;\n bytes p2;\n bytes32 receiptHash;\n bytes p3;\n\n bytes4 step;\n bytes signature; // todo maybe pass s r v values?\n\n uint64 finalizedVs;\n }\n\n\n struct ValidatorSetChange {\n address deltaAddress;\n uint16 deltaIndex; // add if 0, else remove\n }\n\n struct ValidatorSetProof {\n bytes[] receiptProof;\n ValidatorSetChange[] changes;\n uint64 eventBlock;\n }\n\n struct AuraProof {\n BlockAura[] blocks;\n CommonStructs.TransferProof transfer;\n ValidatorSetProof[] vsChanges;\n uint64 transferEventBlock;\n }\n\n\n function __CheckAura_init(\n address[] calldata initialValidators_,\n address validatorSetAddress_,\n bytes32 lastProcessedBlock_,\n uint minSafetyBlocksValidators_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n validatorSet = initialValidators_;\n validatorSetAddress = validatorSetAddress_;\n lastProcessedBlock = lastProcessedBlock_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n\n\n /*\n AuraProof.blocks contains:\n - blocks for validate validatorSet change event, in that order:\n - block with `InitiateChange` events (contains list of all validators)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize; have `finalizedVs` != 0\n * repeated for each vs change event; all events must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n AuraProof.vsChanges contains changes in validator set and receiptProof for validation.\n block.finalizedVs-1 is index in AuraProof.vsChanges array\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between vsChange events\n If there are no errors, the transfer is considered valid\n */\n function checkAura_(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n\n bytes32 parentHash;\n bytes32 receiptHash;\n\n // auraProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (auraProof.transfer.eventId != 0) {\n receiptHash = calcTransferReceiptsHash(auraProof.transfer, sideBridgeAddress);\n require(auraProof.blocks[auraProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(auraProof.blocks.length - auraProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < auraProof.blocks.length; i++) {\n BlockAura calldata block_ = auraProof.blocks[i];\n\n // check that parentHash is correct\n if (block_.parentHash != parentHash) {\n // we can ignore wrong parentHash if:\n // - it's NOT safety blocks for transfer event\n // - it's first block (don't know parentHash)\n // - it's finalizing block (there is gap BEFORE finalizing block)\n // - it's next block after finalizing (there is gap AFTER finalizing block)\n // else, raise error\n\n if (i > auraProof.transferEventBlock || // safety blocks for transfer event\n (i != 0 && // not first block\n block_.finalizedVs == 0 && // not finalizing block\n auraProof.blocks[i-1].finalizedVs == 0) // not next block after finalizing\n )\n revert(\"Wrong parent hash\");\n }\n\n // check validator for this block\n // calc block hash for this block\n parentHash = checkBlock(block_);\n\n // if this block is finalizing block\n // 0 means no events should be finalized, so indexes are shifted by 1\n if (block_.finalizedVs != 0) {\n // vs changes in that block\n ValidatorSetProof calldata vsProof = auraProof.vsChanges[block_.finalizedVs - 1];\n\n // apply vs changes\n for (uint k = 0; k < vsProof.changes.length; k++)\n applyVsChange(vsProof.changes[k]);\n\n // check proof\n receiptHash = calcValidatorSetReceiptHash(vsProof.receiptProof, validatorSetAddress, validatorSet);\n require(auraProof.blocks[vsProof.eventBlock].receiptHash == receiptHash, \"Wrong VS receipt hash\");\n require(i - vsProof.eventBlock >= minSafetyBlocksValidators, \"Few safety blocks validators\");\n }\n\n }\n\n // save block.parentHash in which latest processed vsChange event emitted\n if (auraProof.vsChanges.length > 0) {\n lastProcessedBlock = auraProof.blocks[auraProof.vsChanges[auraProof.vsChanges.length - 1].eventBlock].parentHash;\n }\n }\n\n function getValidatorSet() public view returns (address[] memory) {\n return validatorSet;\n }\n\n function applyVsChange(ValidatorSetChange calldata vsEvent) internal {\n if (vsEvent.deltaIndex == 0) {// add validator\n validatorSet.push(vsEvent.deltaAddress);\n } else {// delete validator\n uint index = uint(vsEvent.deltaIndex - 1);\n validatorSet[index] = validatorSet[validatorSet.length - 1];\n validatorSet.pop();\n }\n }\n\n function checkBlock(BlockAura calldata block_) internal view returns (bytes32) {\n (bytes32 bareHash, bytes32 sealHash) = calcBlockHash(block_);\n\n address validator = validatorSet[bytesToUint(block_.step) % validatorSet.length];\n require(ecdsaRecover(bareHash, block_.signature) == validator, \"Failed to verify sign\");\n\n return sealHash;\n }\n\n function calcBlockHash(BlockAura calldata block_) internal pure returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p2, block_.receiptHash, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Bare, commonRlp)),\n // hash with seal, for prevHash check\n keccak256(abi.encodePacked(block_.p0Seal, commonRlp, STEP_PREFIX, block_.step, SIGNATURE_PREFIX, block_.signature))\n );\n }\n\n\n function calcValidatorSetReceiptHash(bytes[] calldata receiptProof, address validatorSetAddress_, address[] storage vSet) private pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n receiptProof[0],\n validatorSetAddress_,\n receiptProof[1],\n abi.encode(vSet),\n receiptProof[2]\n ));\n return calcReceiptsHash(receiptProof, el, 3);\n }\n\n function bytesToUint(bytes4 b) internal pure returns (uint){\n return uint(uint32(b));\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckReceiptsProof.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\n// check readme for focs\nfunction calcReceiptsHash(bytes[] calldata proof, bytes32 el, uint proofStart) pure returns (bytes32) {\n bytes memory s;\n\n for (uint i = proofStart; i < proof.length; i += 2) {\n s = abi.encodePacked(proof[i], el, proof[i + 1]);\n el = (s.length > 32) ? keccak256(s) : bytes32(s);\n }\n\n return el;\n}\n\n\nfunction calcTransferReceiptsHash(CommonStructs.TransferProof calldata p, address eventContractAddress) pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n p.receiptProof[0],\n eventContractAddress,\n p.receiptProof[1],\n toBinary(p.eventId),\n p.receiptProof[2],\n abi.encode(p.transfers),\n p.receiptProof[3]\n ));\n return calcReceiptsHash(p.receiptProof, el, 4);\n // start from proof[4]\n}\n\n\nfunction toBinary(uint _x) pure returns (bytes memory) {\n bytes memory b = new bytes(32);\n assembly {\n mstore(add(b, 32), _x)\n }\n uint i;\n for (i = 0; i < 32; i++) {\n if (b[i] != 0) {\n break;\n }\n }\n bytes memory res = new bytes(32 - i);\n for (uint j = 0; j < res.length; j++) {\n res[j] = b[i++];\n }\n return res;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" - }, - "contracts/checks/SignatureCheck.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" - }, - "contracts/common/CommonStructs.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address relayAddress;\n address[] watchdogsAddresses; address feeProviderAddress;\n address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" - }, - "contracts/networks/_AuraReceiver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract _AuraReceiver is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n}\n" - }, - "contracts/common/CommonBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // DEFAULT_ADMIN_ROLE can grants and revokes all roles below; Set to multisig (proxy contract address)\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\"); // can submit transfers\n bytes32 public constant WATCHDOG_ROLE = keccak256(\"WATCHDOG_ROLE\"); // can pause contract\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\"FEE_PROVIDER_ROLE\"); // fee signatures must be signed by this role\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable public transferFeeRecipient;\n address payable public bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, address(this));\n _setupRole(ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRoles(WATCHDOG_ROLE, args.watchdogsAddresses);\n _setupRole(FEE_PROVIDER_ROLE, args.feeProviderAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId **and all after it**\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n require(eventId <= inputEventId, \"eventId must be <= inputEventId\");\n\n // now waiting for submitting a new transfer with `eventId` id\n inputEventId = eventId - 1;\n\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n\n }\n\n // pretend like bridge already receive and process all transfers up to `eventId` id\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\n }\n\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(WATCHDOG_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // roles\n\n function grantRoles(bytes32 role, address[] calldata accounts) public onlyRole(getRoleAdmin(role)) {\n // check permission to grant role via onlyRole(getRoleAdmin(role))\n _setupRoles(role, accounts);\n }\n function revokeRoles(bytes32 role, address[] calldata accounts) public {\n // revokeRole will check for permissions\n for (uint i = 0; i < accounts.length; i++)\n revokeRole(role, accounts[i]);\n }\n function _setupRoles(bytes32 role, address[] calldata accounts) internal {\n // no permissions check at all\n for (uint i = 0; i < accounts.length; i++)\n _setupRole(role, accounts[i]);\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(FEE_PROVIDER_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" - }, - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\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, _msgSender());\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(IAccessControlUpgradeable).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" - }, - "contracts/tokens/IWrapper.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 IERC165Upgradeable {\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" - }, - "contracts/networks/ETH_EthBridge_AURA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract ETH_EthBridge_AURA is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/BSC_BscBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract BSC_BscBridge is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/ETH_EthBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract ETH_EthBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address oldDefaultAdmin\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n}\n" - }, - "contracts/checks/CheckUntrustless2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\ncontract CheckUntrustless2 {\n // this contract do nothing, but i think it's required to inheritance from it\n // todo check this\n uint256[15] private ___gap;\n}\n" - }, - "contracts/networks/ETH_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract ETH_AmbBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address oldDefaultAdmin\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n}\n" - }, - "contracts/checks/CheckUntrustless.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckUntrustless {\n uint public confirmationsThreshold;\n\n // [hash of (eventId, transfers)] => [relayAddress] => isConfirmed\n mapping(bytes32 => mapping(address => bool)) public confirmations;\n\n // using this instead of RELAY_ROLE coz it simpler\n address[] public relays;\n\n event RelayAdd(address indexed relay);\n event RelayRemove(address indexed relay);\n event ThresholdChange(uint newThreshold);\n event RelayConfirmation(address indexed sender, uint indexed eventId, bytes32 hash);\n\n // return true if current call reach confirmationsThreshold\n function checkUntrustless_(uint eventId, CommonStructs.Transfer[] calldata transfers) internal returns (bool) {\n require(isRelay(msg.sender), \"You not in relay whitelist\");\n\n bytes32 hash = transfersHash(eventId, transfers);\n require(confirmations[hash][msg.sender] == false, \"You have already confirmed this\");\n\n uint confirmCount = confirmedCount(hash);\n require(confirmCount < confirmationsThreshold, \"Already confirmed\");\n\n confirmations[hash][msg.sender] = true;\n emit RelayConfirmation(msg.sender, eventId, hash);\n\n // +1 coz current relay confirmed just now\n return confirmCount + 1 >= confirmationsThreshold;\n }\n\n\n function isConfirmedByRelay(address relay, uint eventId, CommonStructs.Transfer[] calldata transfers) public view returns (bool) {\n bytes32 hash = transfersHash(eventId, transfers);\n return confirmations[hash][relay];\n }\n\n\n function confirmedCount(bytes32 hash) public view returns (uint) {\n uint res;\n for (uint i = 0; i < relays.length; i++)\n if (confirmations[hash][relays[i]])\n res++;\n return res;\n }\n\n\n function isRelay(address relay) public view returns (bool){\n for (uint i = 0; i < relays.length; i++)\n if (relays[i] == relay)\n return true;\n return false;\n }\n\n function getRelays() public view returns (address[] memory) {\n return relays;\n }\n\n function transfersHash(uint eventId, CommonStructs.Transfer[] calldata transfers) public pure returns (bytes32) {\n bytes memory payload = abi.encodePacked(eventId);\n\n // i guess we can hash transfers only in this way\n for (uint i = 0; i < transfers.length; i++)\n payload = abi.encodePacked(payload, transfers[i].amount, transfers[i].toAddress, transfers[i].tokenAddress);\n\n return keccak256(payload);\n }\n\n\n function _setRelaysAndConfirmations(address[] memory toRemove, address[] memory toAdd, uint _confirmations) internal {\n for (uint i = 0; i < toRemove.length; i++)\n _removeRelay(toRemove[i]);\n for (uint i = 0; i < toAdd.length; i++)\n _addRelay(toAdd[i]);\n\n if (confirmationsThreshold != _confirmations) {\n confirmationsThreshold = _confirmations;\n emit ThresholdChange(_confirmations);\n }\n }\n\n function _removeRelay(address relay) internal {\n for (uint i = 0; i < relays.length; i++) {\n if (relays[i] == relay) {\n relays[i] = relays[relays.length - 1];\n relays.pop();\n emit RelayRemove(relay);\n return;\n }\n }\n revert(\"Not a relay\");\n }\n\n function _addRelay(address relay) internal {\n require(!isRelay(relay), \"Already relay\");\n relays.push(relay);\n emit RelayAdd(relay);\n }\n\n uint256[15] private ___gap;\n\n}\n" - }, - "contracts/contracts_for_tests/CheckUntrustlessTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckUntrustless.sol\";\n\ncontract CheckUntrustlessTest is CheckUntrustless {\n constructor() {}\n\n event checkUntrustlessTestResult(bool result);\n\n function checkUntrustlessTest(uint eventId, CommonStructs.Transfer[] calldata transfers) public {\n emit checkUntrustlessTestResult(checkUntrustless_(eventId, transfers));\n }\n\n function setRelaysAndConfirmationsTest(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n}\n" - }, - "contracts/checks/CheckPoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"./CheckPoW_Ethash.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckPoW is Initializable, Ethash {\n struct BlockPoW {\n bytes3 p0WithNonce;\n bytes3 p0WithoutNonce;\n\n bytes p1;\n bytes32 parentOrReceiptHash;\n bytes p2;\n bytes difficulty;\n bytes p3;\n bytes number;\n bytes p4; // end when extra end\n bytes p5; // after extra\n bytes nonce;\n bytes p6;\n\n uint[] dataSetLookup;\n uint[] witnessForLookup;\n }\n\n struct PoWProof {\n BlockPoW[] blocks;\n CommonStructs.TransferProof transfer;\n }\n\n uint256 minimumDifficulty;\n\n function __CheckPoW_init(\n uint256 minimumDifficulty_\n ) internal initializer {\n minimumDifficulty = minimumDifficulty_;\n }\n\n /*\n PoWProof.blocks contains:\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, checking it pow hash.\n Each block parentHash must be equal to the hash of the previous block.\n If there are no errors, the transfer is considered valid\n */\n function checkPoW_(PoWProof calldata powProof, address sideBridgeAddress) internal view\n {\n bytes32 hash = calcTransferReceiptsHash(powProof.transfer, sideBridgeAddress);\n for (uint i = 0; i < powProof.blocks.length; i++) {\n require(powProof.blocks[i].parentOrReceiptHash == hash, \"parentHash or receiptHash wrong\");\n hash = blockHash(powProof.blocks[i]);\n\n verifyEthash(powProof.blocks[i]);\n }\n }\n\n\n function verifyEthash(BlockPoW calldata block_) internal view {\n uint difficulty = bytesToUint(block_.difficulty);\n require(difficulty >= minimumDifficulty, \"difficulty too low\");\n verifyPoW(\n bytesToUint(block_.number),\n blockHashWithoutNonce(block_),\n bytesToUint(block_.nonce),\n difficulty,\n block_.dataSetLookup,\n block_.witnessForLookup\n );\n }\n\n function blockHash(BlockPoW calldata block_) internal pure returns (bytes32) {\n // Note: too much arguments in abi.encodePacked() function cause CompilerError: Stack too deep...\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2,\n block_.difficulty,\n block_.p3\n ),\n abi.encodePacked(\n block_.number,\n block_.p4,\n block_.p5,\n block_.nonce,\n block_.p6\n )\n ));\n }\n\n function blockHashWithoutNonce(BlockPoW calldata block_) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithoutNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2\n ),\n abi.encodePacked(\n block_.difficulty,\n block_.p3,\n block_.number,\n block_.p4,\n block_.p6\n )\n ));\n }\n\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckPoW_Ethash.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n/// @dev These contracts are used to verify Proof of Work within a smart contract.\n/// The algorithms have been extracted from the implementation of smart pool (https://github.com/smartpool)\ncontract SHA3_512 {\n constructor() {}\n\n function keccak_f(uint[25] memory A) pure private returns (uint[25] memory) {\n uint[25] memory B;\n uint[5] memory C;\n uint[5] memory D;\n\n uint[24] memory RC = [\n uint(0x0000000000000001),\n 0x0000000000008082,\n 0x800000000000808A,\n 0x8000000080008000,\n 0x000000000000808B,\n 0x0000000080000001,\n 0x8000000080008081,\n 0x8000000000008009,\n 0x000000000000008A,\n 0x0000000000000088,\n 0x0000000080008009,\n 0x000000008000000A,\n 0x000000008000808B,\n 0x800000000000008B,\n 0x8000000000008089,\n 0x8000000000008003,\n 0x8000000000008002,\n 0x8000000000000080,\n 0x000000000000800A,\n 0x800000008000000A,\n 0x8000000080008081,\n 0x8000000000008080,\n 0x0000000080000001,\n 0x8000000080008008];\n\n for (uint i = 0; i < 24; i++) {\n\n C[0] = A[0] ^ A[1] ^ A[2] ^ A[3] ^ A[4];\n C[1] = A[5] ^ A[6] ^ A[7] ^ A[8] ^ A[9];\n C[2] = A[10] ^ A[11] ^ A[12] ^ A[13] ^ A[14];\n C[3] = A[15] ^ A[16] ^ A[17] ^ A[18] ^ A[19];\n C[4] = A[20] ^ A[21] ^ A[22] ^ A[23] ^ A[24];\n\n D[0] = C[4] ^ ((C[1] * 2) & 0xffffffffffffffff | (C[1] / (2 ** 63)));\n D[1] = C[0] ^ ((C[2] * 2) & 0xffffffffffffffff | (C[2] / (2 ** 63)));\n D[2] = C[1] ^ ((C[3] * 2) & 0xffffffffffffffff | (C[3] / (2 ** 63)));\n D[3] = C[2] ^ ((C[4] * 2) & 0xffffffffffffffff | (C[4] / (2 ** 63)));\n D[4] = C[3] ^ ((C[0] * 2) & 0xffffffffffffffff | (C[0] / (2 ** 63)));\n\n A[0] = A[0] ^ D[0];\n A[1] = A[1] ^ D[0];\n A[2] = A[2] ^ D[0];\n A[3] = A[3] ^ D[0];\n A[4] = A[4] ^ D[0];\n A[5] = A[5] ^ D[1];\n A[6] = A[6] ^ D[1];\n A[7] = A[7] ^ D[1];\n A[8] = A[8] ^ D[1];\n A[9] = A[9] ^ D[1];\n A[10] = A[10] ^ D[2];\n A[11] = A[11] ^ D[2];\n A[12] = A[12] ^ D[2];\n A[13] = A[13] ^ D[2];\n A[14] = A[14] ^ D[2];\n A[15] = A[15] ^ D[3];\n A[16] = A[16] ^ D[3];\n A[17] = A[17] ^ D[3];\n A[18] = A[18] ^ D[3];\n A[19] = A[19] ^ D[3];\n A[20] = A[20] ^ D[4];\n A[21] = A[21] ^ D[4];\n A[22] = A[22] ^ D[4];\n A[23] = A[23] ^ D[4];\n A[24] = A[24] ^ D[4];\n\n /*Rho and pi steps*/\n B[0] = A[0];\n B[8] = ((A[1] * (2 ** 36)) & 0xffffffffffffffff | (A[1] / (2 ** 28)));\n B[11] = ((A[2] * (2 ** 3)) & 0xffffffffffffffff | (A[2] / (2 ** 61)));\n B[19] = ((A[3] * (2 ** 41)) & 0xffffffffffffffff | (A[3] / (2 ** 23)));\n B[22] = ((A[4] * (2 ** 18)) & 0xffffffffffffffff | (A[4] / (2 ** 46)));\n B[2] = ((A[5] * (2 ** 1)) & 0xffffffffffffffff | (A[5] / (2 ** 63)));\n B[5] = ((A[6] * (2 ** 44)) & 0xffffffffffffffff | (A[6] / (2 ** 20)));\n B[13] = ((A[7] * (2 ** 10)) & 0xffffffffffffffff | (A[7] / (2 ** 54)));\n B[16] = ((A[8] * (2 ** 45)) & 0xffffffffffffffff | (A[8] / (2 ** 19)));\n B[24] = ((A[9] * (2 ** 2)) & 0xffffffffffffffff | (A[9] / (2 ** 62)));\n B[4] = ((A[10] * (2 ** 62)) & 0xffffffffffffffff | (A[10] / (2 ** 2)));\n B[7] = ((A[11] * (2 ** 6)) & 0xffffffffffffffff | (A[11] / (2 ** 58)));\n B[10] = ((A[12] * (2 ** 43)) & 0xffffffffffffffff | (A[12] / (2 ** 21)));\n B[18] = ((A[13] * (2 ** 15)) & 0xffffffffffffffff | (A[13] / (2 ** 49)));\n B[21] = ((A[14] * (2 ** 61)) & 0xffffffffffffffff | (A[14] / (2 ** 3)));\n B[1] = ((A[15] * (2 ** 28)) & 0xffffffffffffffff | (A[15] / (2 ** 36)));\n B[9] = ((A[16] * (2 ** 55)) & 0xffffffffffffffff | (A[16] / (2 ** 9)));\n B[12] = ((A[17] * (2 ** 25)) & 0xffffffffffffffff | (A[17] / (2 ** 39)));\n B[15] = ((A[18] * (2 ** 21)) & 0xffffffffffffffff | (A[18] / (2 ** 43)));\n B[23] = ((A[19] * (2 ** 56)) & 0xffffffffffffffff | (A[19] / (2 ** 8)));\n B[3] = ((A[20] * (2 ** 27)) & 0xffffffffffffffff | (A[20] / (2 ** 37)));\n B[6] = ((A[21] * (2 ** 20)) & 0xffffffffffffffff | (A[21] / (2 ** 44)));\n B[14] = ((A[22] * (2 ** 39)) & 0xffffffffffffffff | (A[22] / (2 ** 25)));\n B[17] = ((A[23] * (2 ** 8)) & 0xffffffffffffffff | (A[23] / (2 ** 56)));\n B[20] = ((A[24] * (2 ** 14)) & 0xffffffffffffffff | (A[24] / (2 ** 50)));\n\n /*Xi state*/\n A[0] = B[0] ^ ((~B[5]) & B[10]);\n A[1] = B[1] ^ ((~B[6]) & B[11]);\n A[2] = B[2] ^ ((~B[7]) & B[12]);\n A[3] = B[3] ^ ((~B[8]) & B[13]);\n A[4] = B[4] ^ ((~B[9]) & B[14]);\n A[5] = B[5] ^ ((~B[10]) & B[15]);\n A[6] = B[6] ^ ((~B[11]) & B[16]);\n A[7] = B[7] ^ ((~B[12]) & B[17]);\n A[8] = B[8] ^ ((~B[13]) & B[18]);\n A[9] = B[9] ^ ((~B[14]) & B[19]);\n A[10] = B[10] ^ ((~B[15]) & B[20]);\n A[11] = B[11] ^ ((~B[16]) & B[21]);\n A[12] = B[12] ^ ((~B[17]) & B[22]);\n A[13] = B[13] ^ ((~B[18]) & B[23]);\n A[14] = B[14] ^ ((~B[19]) & B[24]);\n A[15] = B[15] ^ ((~B[20]) & B[0]);\n A[16] = B[16] ^ ((~B[21]) & B[1]);\n A[17] = B[17] ^ ((~B[22]) & B[2]);\n A[18] = B[18] ^ ((~B[23]) & B[3]);\n A[19] = B[19] ^ ((~B[24]) & B[4]);\n A[20] = B[20] ^ ((~B[0]) & B[5]);\n A[21] = B[21] ^ ((~B[1]) & B[6]);\n A[22] = B[22] ^ ((~B[2]) & B[7]);\n A[23] = B[23] ^ ((~B[3]) & B[8]);\n A[24] = B[24] ^ ((~B[4]) & B[9]);\n\n /*Last step*/\n A[0] = A[0] ^ RC[i];\n }\n\n return A;\n }\n\n\n function sponge(uint[9] memory M) pure internal returns (uint[16] memory) {\n require((M.length * 8) == 72, \"sponge error\");\n\n M[5] = 0x01;\n M[8] = 0x8000000000000000;\n\n uint r = 72;\n uint w = 8;\n uint size = M.length * 8;\n\n uint[25] memory S;\n uint i;\n uint y;\n uint x;\n /*Absorbing Phase*/\n for (i = 0; i < size / r; i++) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w)) {\n S[5 * x + y] = S[5 * x + y] ^ M[i * 9 + x + 5 * y];\n }\n }\n }\n S = keccak_f(S);\n }\n\n /*Squeezing phase*/\n uint[16] memory result;\n uint b = 0;\n while (b < 16) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w) && (b < 16)) {\n result[b] = S[5 * x + y] & 0xFFFFFFFF;\n result[b + 1] = S[5 * x + y] / 0x100000000;\n b += 2;\n }\n }\n }\n }\n\n return result;\n }\n\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\ncontract Ethash is SHA3_512 {\n\n uint constant EPOCH_LENGTH = 30000; // blocks per epoch\n\n constructor() {\n }\n\n struct EthashCacheOptData {\n uint[512] merkleNodes;\n uint fullSizeIn128Resultion;\n uint branchDepth;\n }\n\n mapping(uint => EthashCacheOptData) epochData;\n\n\n function verifyPoW(uint blockNumber, bytes32 rlpHeaderHashWithoutNonce, uint nonce, uint difficulty,\n uint[] memory dataSetLookup, uint[] memory witnessForLookup) internal view {\n\n uint epoch = blockNumber / EPOCH_LENGTH;\n uint ethash = hashimoto(rlpHeaderHashWithoutNonce, nonce, dataSetLookup, witnessForLookup, epoch);\n\n require(ethash <= (2 ** 256 - 1) / difficulty, \"Ethash difficulty too low\");\n }\n\n function isEpochDataSet(uint epochIndex) public view returns (bool) {\n return epochData[epochIndex].fullSizeIn128Resultion != 0;\n }\n\n function setEpochData(\n uint epochNum,\n uint fullSizeIn128Resultion,\n uint branchDepth,\n uint[] calldata merkleNodes\n ) public {\n\n // we store only previous and current epochs\n // so, delete second from the end epoch\n if (epochNum >= 2) // underflow check\n delete epochData[epochNum - 2];\n\n\n uint l = merkleNodes.length;\n uint[512] storage nodes = epochData[epochNum].merkleNodes;\n\n for (uint i = 0; i < l; i++) {\n nodes[i] = merkleNodes[i];\n }\n\n epochData[epochNum].fullSizeIn128Resultion = fullSizeIn128Resultion;\n epochData[epochNum].branchDepth = branchDepth;\n }\n\n\n function hashimoto(bytes32 header,\n uint nonceLe,\n uint[] memory dataSetLookup,\n uint[] memory witnessForLookup,\n uint epochIndex) private view returns (uint) {\n\n uint[16] memory s = computeS(uint(header), nonceLe);\n uint[32] memory mix;\n uint[8] memory cmix;\n\n\n uint depth = epochData[epochIndex].branchDepth;\n uint fullSize = epochData[epochIndex].fullSizeIn128Resultion;\n\n uint i;\n uint j;\n\n require(fullSize != 0, \"EpochData not set\");\n\n\n for (i = 0; i < 16; i++) {\n assembly {\n let offset := mul(i, 0x20)\n\n //mix[i] = s[i];\n mstore(add(mix, offset), mload(add(s, offset)))\n\n // mix[i+16] = s[i];\n mstore(add(mix, add(0x200, offset)), mload(add(s, offset)))\n }\n }\n\n for (i = 0; i < 64; i++) {\n uint p = fnv(i ^ s[0], mix[i % 32]) % fullSize;\n\n // console.log(computeCacheRoot( p, i, dataSetLookup, witnessForLookup, depthAndFullSize[0]));\n // console.log(getMerkleLeave( epochIndex, p ));\n\n if (computeCacheRoot(p, i, dataSetLookup, witnessForLookup, depth) != getMerkleLeave(epochIndex, p)) {\n // PoW failed\n revert(\"PoW failed\");\n }\n\n for (j = 0; j < 8; j++) {\n\n assembly{\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & varFFFFFFFF );\n let dataOffset := add(mul(0x80, i), add(dataSetLookup, 0x20))\n let dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n let mixOffset := add(mix, mul(0x20, j))\n let mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n let fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n }\n\n\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & 0xFFFFFFFF );\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n\n\n //dataSetLookup[4*i ] = dataSetLookup[4*i ]/(2**32);\n //dataSetLookup[4*i + 1] = dataSetLookup[4*i + 1]/(2**32);\n //dataSetLookup[4*i + 2] = dataSetLookup[4*i + 2]/(2**32);\n //dataSetLookup[4*i + 3] = dataSetLookup[4*i + 3]/(2**32);\n\n assembly{\n let offset := add(add(dataSetLookup, 0x20), mul(i, 0x80))\n let value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n }\n }\n }\n\n\n for (i = 0; i < 32; i += 4) {\n cmix[i / 4] = (fnv(fnv(fnv(mix[i], mix[i + 1]), mix[i + 2]), mix[i + 3]));\n }\n\n return computeSha3(s, cmix);\n\n }\n\n\n function fnv(uint v1, uint v2) pure internal returns (uint) {\n return ((v1 * 0x01000193) ^ v2) & 0xFFFFFFFF;\n }\n\n function computeCacheRoot(uint index,\n uint indexInElementsArray,\n uint[] memory elements,\n uint[] memory witness,\n uint branchSize) pure private returns (uint) {\n\n uint leaf = computeLeaf(elements, indexInElementsArray) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n\n uint left;\n uint right;\n uint node;\n bool oddBranchSize = (branchSize % 2) > 0;\n\n assembly {\n branchSize := div(branchSize, 2)\n //branchSize /= 2;\n }\n uint witnessIndex = indexInElementsArray * branchSize;\n if (oddBranchSize) witnessIndex += indexInElementsArray;\n\n uint depth;\n for (depth = 0; depth < branchSize; depth++) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n\n //node = witness[witnessIndex + depth] / (2**128);\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := div(node, 0x100000000000000000000000000000000)\n }\n }\n else {\n assembly {\n left := div(node, 0x100000000000000000000000000000000)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n }\n\n if (oddBranchSize) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n }\n\n\n return leaf;\n }\n\n\n function computeSha3(uint[16] memory s, uint[8] memory cmix) pure internal returns (uint) {\n uint s0 = s[0] + s[1] * (2 ** 32) + s[2] * (2 ** 64) + s[3] * (2 ** 96) +\n (s[4] + s[5] * (2 ** 32) + s[6] * (2 ** 64) + s[7] * (2 ** 96)) * (2 ** 128);\n\n uint s1 = s[8] + s[9] * (2 ** 32) + s[10] * (2 ** 64) + s[11] * (2 ** 96) +\n (s[12] + s[13] * (2 ** 32) + s[14] * (2 ** 64) + s[15] * (2 ** 96)) * (2 ** 128);\n\n uint c = cmix[0] + cmix[1] * (2 ** 32) + cmix[2] * (2 ** 64) + cmix[3] * (2 ** 96) +\n (cmix[4] + cmix[5] * (2 ** 32) + cmix[6] * (2 ** 64) + cmix[7] * (2 ** 96)) * (2 ** 128);\n\n\n /* god knows why need to convert to big endian */\n return uint(keccak256(abi.encodePacked(reverseBytes(s0), reverseBytes(s1), reverseBytes(c))));\n }\n\n\n function computeLeaf(uint[] memory dataSetLookup, uint index) pure internal returns (uint) {\n return uint(keccak256(abi.encodePacked(\n dataSetLookup[4 * index],\n dataSetLookup[4 * index + 1],\n dataSetLookup[4 * index + 2],\n dataSetLookup[4 * index + 3]\n )));\n\n }\n\n function computeS(uint header, uint nonceLe) pure internal returns (uint[16] memory) {\n uint[9] memory M;\n\n header = reverseBytes(header);\n\n M[0] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[1] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[2] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[3] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n\n // make little endian nonce\n M[4] = nonceLe;\n return sponge(M);\n }\n\n function reverseBytes(uint input) pure internal returns (uint) {\n uint result;\n for (uint i = 0; i < 32; i++) {\n result = (result << 8) + (input & 0xff);\n input = input >> 8;\n }\n return result;\n }\n\n\n function getMerkleLeave(uint epochIndex, uint p) view internal returns (uint) {\n uint rootIndex = uint(p >> epochData[epochIndex].branchDepth);\n uint expectedRoot = epochData[epochIndex].merkleNodes[(rootIndex >> 1)];\n\n if ((rootIndex % 2) == 0)\n return expectedRoot & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n return expectedRoot >> 128;\n }\n\n}\n" - }, - "contracts/networks/ETH_AmbBridge_PoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoW.sol\";\n\n\ncontract ETH_AmbBridge_PoW is CommonBridge, CheckPoW {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint minimumDifficulty\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoW_init(minimumDifficulty);\n }\n\n function submitTransferPoW(PoWProof calldata powProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(powProof.transfer.eventId);\n checkEventId(powProof.transfer.eventId);\n checkPoW_(powProof, sideBridgeAddress);\n // checkPoW_(powProof, sideBridgeAddress);\n lockTransfers(powProof.transfer.transfers, powProof.transfer.eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n}\n\n" - }, - "contracts/contracts_for_tests/CheckPoWTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoW.sol\";\n\ncontract CheckPoWTest is CheckPoW {\n\n constructor(\n uint minimumDifficulty_\n ) {\n minimumDifficulty = minimumDifficulty_;\n }\n\n function checkPoWTest(PoWProof calldata powProof, address sideBridgeAddress) public {\n checkPoW_(powProof, sideBridgeAddress);\n }\n\n function verifyEthashTest(BlockPoW calldata block_) public view {\n verifyEthash(block_);\n }\n\n function blockHashTest(BlockPoW calldata block_) public pure returns (bytes32) {\n return blockHash(block_);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CommonBridgeTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckReceiptsProof.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // deployer now can grant roles\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n checkEventId(eventId); // now its more like submitTransferTest\n lockTransfers(events, eventId);\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n // checkReceiptsProof\n\n function calcTransferReceiptsHashTest(CommonStructs.TransferProof calldata p, address eventContractAddress) public pure returns (bytes32) {\n return calcTransferReceiptsHash(p, eventContractAddress);\n }\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" - }, - "contracts/checks/CheckPoSA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckPoSA is Initializable {\n uint256 private constant ADDRESS_LENGTH = 20;\n uint256 private constant EXTRA_VANITY_LENGTH = 32;\n uint256 private constant EXTRA_SEAL_LENGTH = 65;\n uint256 private constant EPOCH_LENGTH = 200;\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n\n mapping(uint => mapping(address => bool)) internal allValidators;\n uint public currentEpoch;\n uint currentValidatorSetSize;\n\n bytes1 chainId;\n\n\n struct BlockPoSA {\n bytes3 p0Signed;\n bytes3 p0Unsigned;\n\n bytes32 parentHash;\n bytes p1;\n bytes32 receiptHash;\n bytes p2;\n bytes number;\n bytes p3;\n\n bytes p4Signed;\n bytes p4Unsigned;\n bytes extraData;\n\n bytes p5;\n }\n\n struct PoSAProof {\n BlockPoSA[] blocks;\n CommonStructs.TransferProof transfer;\n uint64 transferEventBlock;\n }\n\n\n function __CheckPoSA_init(\n address[] calldata initialValidators_,\n uint initialEpoch_,\n bytes1 chainId_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n chainId = chainId_;\n currentEpoch = initialEpoch_;\n currentValidatorSetSize = initialValidators_.length;\n\n for (uint i = 0; i < initialValidators_.length; i++) {\n allValidators[currentEpoch][initialValidators_[i]] = true;\n }\n }\n\n /*\n PoSAProof.blocks contains:\n - blocks for validate validatorSet changes, in that order:\n - first block in epoch (blockNum % 200 == 0)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize\n * repeated for each new epoch, all epochs must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between epochs\n If there are no errors, the transfer is considered valid\n */\n function checkPoSA_(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n bytes32 bareHash;\n bytes32 parentHash;\n uint finalizeVsBlock;\n uint nextVsSize;\n\n // posaProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (posaProof.transfer.eventId != 0) {\n bytes32 receiptHash = calcTransferReceiptsHash(posaProof.transfer, sideBridgeAddress);\n require(posaProof.blocks[posaProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(posaProof.blocks.length - posaProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < posaProof.blocks.length; i++) {\n BlockPoSA calldata block_ = posaProof.blocks[i];\n\n if (parentHash != bytes32(0))\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n\n (bareHash, parentHash) = calcBlockHash(block_);\n\n require(verifySignature(bareHash, getSignature(block_.extraData)), \"invalid signature\");\n\n // change validator set\n\n uint blockNumber = bytesToUint(block_.number);\n\n if (blockNumber % EPOCH_LENGTH == 0) {\n require(blockNumber / EPOCH_LENGTH == currentEpoch + 1, \"invalid epoch\");\n\n nextVsSize = newValidatorSet(block_.extraData);\n finalizeVsBlock = blockNumber + currentValidatorSetSize / 2;\n } else if (blockNumber == finalizeVsBlock) {\n currentEpoch++;\n currentValidatorSetSize = nextVsSize;\n\n // after finalizing vs change, next block in posaProof.blocks can have any parentHash (skipping some blocks)\n // but only if it's not the safety blocks for transfer event\n if (i < posaProof.transferEventBlock)\n parentHash = bytes32(0);\n }\n }\n }\n\n\n function calcBlockHash(BlockPoSA calldata block_) internal view returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p1, block_.receiptHash, block_.p2, block_.number, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Unsigned, chainId, commonRlp, block_.p4Unsigned, getExtraDataUnsigned(block_.extraData), block_.p5)),\n // hash with seal, for prev_hash check\n keccak256(abi.encodePacked(block_.p0Signed, commonRlp, block_.p4Signed, block_.extraData, block_.p5))\n );\n }\n\n function getSignature(bytes calldata extraData) private pure returns (bytes calldata) {\n uint start = extraData.length - EXTRA_SEAL_LENGTH;\n return extraData[start : start + EXTRA_SEAL_LENGTH];\n }\n\n function getExtraDataUnsigned(bytes calldata extraData) private pure returns (bytes memory) {\n return extraData[0 : extraData.length - EXTRA_SEAL_LENGTH];\n }\n\n function newValidatorSet(bytes calldata extraData) private returns (uint) {\n uint nextValidatorSet = currentEpoch + 1;\n uint endPos = extraData.length - EXTRA_SEAL_LENGTH;\n\n uint nextValidatorSetSize;\n for (uint pos = EXTRA_VANITY_LENGTH; pos < endPos; pos += ADDRESS_LENGTH) {\n address validator = address(bytes20(extraData[pos : pos + ADDRESS_LENGTH]));\n allValidators[nextValidatorSet][validator] = true;\n nextValidatorSetSize++;\n }\n\n return nextValidatorSetSize;\n }\n\n function verifySignature(bytes32 hash, bytes calldata signature) private view returns (bool) {\n address signer = ecdsaRecover(hash, signature);\n return allValidators[currentEpoch][signer];\n }\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n}\n" - }, - "contracts/networks/BSC_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract BSC_AmbBridge is CommonBridge, CheckPoSA {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n uint initialEpoch,\n bytes1 chainId\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoSA_init(initialValidators, initialEpoch, chainId);\n }\n\n function submitTransferPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(posaProof.transfer.eventId);\n checkEventId(posaProof.transfer.eventId);\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(posaProof.transfer.transfers, posaProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoSATest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract CheckPoSATest is CheckPoSA {\n constructor(\n bytes1 chainId_\n ) {\n chainId = chainId_;\n }\n\n function checkPoSATest(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress,\n address[] memory _initialValidators, uint _initialEpoch, bytes1 _chainId) public {\n // TODO: we can't use the `__CheckPoSA_init` twice, but copy-paste is also not good\n chainId = _chainId;\n currentEpoch = _initialEpoch;\n currentValidatorSetSize = _initialValidators.length;\n\n for (uint i = 0; i < _initialValidators.length; i++) {\n allValidators[currentEpoch][_initialValidators[i]] = true;\n }\n\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockPoSA calldata block_) public view returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockPoSA calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n}\n" - }, - "contracts/tokens/sAMB.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./IWrapper.sol\";\n\ncontract sAMB is IWrapper, ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\n\n function deposit() public override payable {\n _mint(msg.sender, msg.value);\n\n emit Deposit(msg.sender, msg.value);\n }\n\n function withdraw(uint amount) public override {\n _burn(msg.sender, amount);\n payable(msg.sender).transfer(amount);\n\n emit Withdrawal(msg.sender, amount);\n }\n\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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 * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, 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 * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), 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 * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\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 * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\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/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\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" - }, - "contracts/contracts_for_tests/MintableERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MintableERC20 is ERC20 {\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20 is ERC20, Ownable {\n address public bridgeAddress; // address of bridge contract on this network\n\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\n ERC20(name_, symbol_)\n Ownable() {\n bridgeAddress = bridgeAddress_;\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\n bridgeAddress = bridgeAddress_;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sender == bridgeAddress) {\n // user transfer tokens to ambrosus => need to mint it\n _mint(recipient, amount);\n } else if (recipient == bridgeAddress) {\n // user withdraw tokens from ambrosus => need to burn it\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/access/Ownable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 _setOwner(_msgSender());\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 called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _setOwner(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 _setOwner(newOwner);\n }\n\n function _setOwner(address newOwner) private {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20_Amb.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20_Amb is ERC20, Ownable {\n\n // decimals of token in side network\n // example:\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\n mapping(address => uint8) public sideTokenDecimals;\n\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\n\n uint8 _decimals;\n\n constructor(\n string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n ) ERC20(name_, symbol_) Ownable() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n }\n\n // todo check if we need this func\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \"wrong array lengths\");\n for (uint i = 0; i < bridgeAddresses_.length; i++)\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n // todo events\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n // user transfer tokens to ambrosus => need to mint it\n\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n\n\n // bridge mint money to user; same amount locked on side bridge\n bridgeBalances[sender] += amount_this;\n\n _mint(recipient, amount_this);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n // user withdraw tokens from ambrosus => need to burn it\n\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n\n\n // user burn tokens; side bridge must have enough tokens to send\n require(bridgeBalances[recipient] >= amount_this, \"not enough locked tokens on bridge\");\n bridgeBalances[recipient] -= amount_this;\n\n _burn(sender, amount_this);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\n if (dTo == dFrom)\n return amount;\n if (dTo > dFrom)\n return amount * (10 ** (dTo - dFrom));\n else\n return amount / (10 ** (dFrom - dTo));\n }\n\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20_AmbTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20_Amb.sol\";\n\ncontract BridgeERC20_AmbTest is BridgeERC20_Amb {\n constructor(string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n )\n BridgeERC20_Amb(name_, symbol_, decimals_, bridgeAddresses_, sideTokenDecimals_) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n function changeBridgeBalance(address bridge, uint balance) public {\n bridgeBalances[bridge] = balance;\n }\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20Test.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckAuraTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckAura.sol\";\n\ncontract CheckAuraTest is CheckAura {\n constructor(address validatorSetAddress_, uint minSafetyBlocksValidators_) {\n validatorSetAddress = validatorSetAddress_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function checkAuraTest(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress, address[] memory initialValidators_) public {\n validatorSet = initialValidators_;\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockAura calldata block_) public pure returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockAura calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function bytesToUintTest(bytes4 b) public pure returns (uint) {\n return bytesToUint(b);\n }\n\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "evmVersion": "byzantium", - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/contracts/deployments/test/amb/solcInputs/63b1c355e88e8fd19ebe2cd692a8475b.json b/contracts/deployments/test/amb/solcInputs/63b1c355e88e8fd19ebe2cd692a8475b.json deleted file mode 100644 index 15fb2537..00000000 --- a/contracts/deployments/test/amb/solcInputs/63b1c355e88e8fd19ebe2cd692a8475b.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/checks/CheckAura.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\nimport \"hardhat/console.sol\";\n\n\ncontract CheckAura is Initializable {\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n bytes1 constant STEP_PREFIX = 0x84;\n bytes2 constant SIGNATURE_PREFIX = 0xB841;\n\n address[] public validatorSet;\n address validatorSetAddress;\n bytes32 public lastProcessedBlock; // actually latest processed (finalized) *vs change event* block\n uint public minSafetyBlocksValidators;\n\n\n struct BlockAura {\n bytes3 p0Seal;\n bytes3 p0Bare;\n\n bytes32 parentHash;\n bytes p2;\n bytes32 receiptHash;\n bytes p3;\n\n bytes4 step;\n bytes signature; // todo maybe pass s r v values?\n\n uint64 finalizedVs;\n }\n\n\n struct ValidatorSetChange {\n address deltaAddress;\n int64 deltaIndex; // < 0 ? remove : add\n }\n\n struct ValidatorSetProof {\n bytes[] receiptProof;\n ValidatorSetChange[] changes;\n uint eventBlock;\n }\n\n struct AuraProof {\n BlockAura[] blocks;\n CommonStructs.TransferProof transfer;\n ValidatorSetProof[] vsChanges;\n uint64 transferEventBlock;\n }\n\n\n function __CheckAura_init(\n address[] calldata initialValidators_,\n address validatorSetAddress_,\n bytes32 lastProcessedBlock_,\n uint minSafetyBlocksValidators_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n validatorSet = initialValidators_;\n validatorSetAddress = validatorSetAddress_;\n lastProcessedBlock = lastProcessedBlock_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n\n\n /*\n AuraProof.blocks contains:\n - blocks for validate validatorSet change event, in that order:\n - block with `InitiateChange` events (contains list of all validators)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize; have `finalizedVs` != 0\n * repeated for each vs change event; all events must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n AuraProof.vsChanges contains changes in validator set and receiptProof for validation.\n block.finalizedVs-1 is index in AuraProof.vsChanges array\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between vsChange events\n If there are no errors, the transfer is considered valid\n */\n function checkAura_(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n\n bytes32 parentHash;\n bytes32 receiptHash;\n bytes32 lastProcessedBlockTemp;\n\n // auraProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (auraProof.transferEventBlock != 0) {\n receiptHash = calcTransferReceiptsHash(auraProof.transfer, sideBridgeAddress);\n require(auraProof.blocks[auraProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(auraProof.blocks.length - auraProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < auraProof.blocks.length; i++) {\n console.logUint(i);\n BlockAura calldata block_ = auraProof.blocks[i];\n\n checkBlock(block_);\n\n // 0 means no events should be finalized, so indexes are shifted by 1\n if (block_.finalizedVs != 0) {\n // vs changes in that block\n ValidatorSetProof calldata vsProof = auraProof.vsChanges[block_.finalizedVs - 1];\n console.logUint(vsProof.eventBlock);\n\n // apply vs changes\n for (uint k = 0; k < vsProof.changes.length; k++)\n applyVsChange(vsProof.changes[k]);\n\n // check proof\n receiptHash = calcValidatorSetReceiptHash(vsProof.receiptProof, validatorSetAddress, validatorSet);\n require(auraProof.blocks[vsProof.eventBlock].receiptHash == receiptHash, \"Wrong VS receipt hash\");\n require(i - vsProof.eventBlock >= minSafetyBlocksValidators, \"Few safety blocks validators\");\n\n // there is gap BEFORE finalizing block, so disable parentHash check for it\n // but only if it's not the safety blocks for transfer event\n if (i < auraProof.transferEventBlock){\n console.log(\"here 1\");\n parentHash = bytes32(0);\n }\n }\n\n // check that block.parentHash == parentHash (hash of prev block)\n // don't check parentHash for first block and for blocks before and after finalizing vs\n if (parentHash != bytes32(0)){\n console.logBytes32(parentHash);\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n }\n\n // calc block hash for this block\n (, parentHash) = calcBlockHash(block_);\n\n // and again, if this block is finalizing block\n if (block_.finalizedVs != 0) {\n // save it hash to `lastProcessedBlock`\n lastProcessedBlockTemp = parentHash;\n\n // there is gap AFTER finalizing block, so disable parentHash check for it\n // but only if it's not the safety blocks for transfer event\n if (i < auraProof.transferEventBlock){\n console.log(\"here 2\");\n parentHash = bytes32(0);\n }\n }\n\n }\n\n // saving in temp variable cost lower than saving in global `lastProcessedBlock`\n if (lastProcessedBlockTemp != bytes32(0)) {\n lastProcessedBlock = lastProcessedBlockTemp;\n }\n }\n\n function getValidatorSet() public view returns (address[] memory) {\n return validatorSet;\n }\n\n function applyVsChange(ValidatorSetChange calldata vsEvent) internal {\n // todo invert indexes sign meaning\n if (vsEvent.deltaIndex < 0) { // delete validator\n uint index = uint(int(vsEvent.deltaIndex * (- 1) - 1));\n validatorSet[index] = validatorSet[validatorSet.length - 1];\n validatorSet.pop();\n } else { // add validator\n validatorSet.push(vsEvent.deltaAddress);\n }\n }\n\n function checkBlock(BlockAura calldata block_) internal view returns (bytes32) {\n (bytes32 bareHash, bytes32 sealHash) = calcBlockHash(block_);\n\n for (uint i = 0; i < validatorSet.length; i++) {\n console.logAddress(validatorSet[i]);\n }\n\n address validator = validatorSet[bytesToUint(block_.step) % validatorSet.length];\n console.log();\n console.logAddress(validator);\n console.logAddress(ecdsaRecover(bareHash, block_.signature));\n require(ecdsaRecover(bareHash, block_.signature) == validator, \"Failed to verify sign\");\n\n return sealHash;\n }\n\n function calcBlockHash(BlockAura calldata block_) internal pure returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p2, block_.receiptHash, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Bare, commonRlp)),\n // hash with seal, for prevHash check\n keccak256(abi.encodePacked(block_.p0Seal, commonRlp, STEP_PREFIX, block_.step, SIGNATURE_PREFIX, block_.signature))\n );\n }\n\n\n function calcValidatorSetReceiptHash(bytes[] calldata receiptProof, address validatorSetAddress_, address[] storage vSet) private pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n receiptProof[0],\n validatorSetAddress_,\n receiptProof[1],\n abi.encode(vSet),\n receiptProof[2]\n ));\n return calcReceiptsHash(receiptProof, el, 3);\n }\n\n function bytesToUint(bytes4 b) internal pure returns (uint){\n return uint(uint32(b));\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckReceiptsProof.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\n// check readme for focs\nfunction calcReceiptsHash(bytes[] calldata proof, bytes32 el, uint proofStart) pure returns (bytes32) {\n bytes memory s;\n\n for (uint i = proofStart; i < proof.length; i += 2) {\n s = abi.encodePacked(proof[i], el, proof[i + 1]);\n el = (s.length > 32) ? keccak256(s) : bytes32(s);\n }\n\n return el;\n}\n\n\nfunction calcTransferReceiptsHash(CommonStructs.TransferProof calldata p, address eventContractAddress) pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n p.receiptProof[0],\n eventContractAddress,\n p.receiptProof[1],\n toBinary(p.eventId),\n p.receiptProof[2],\n abi.encode(p.transfers),\n p.receiptProof[3]\n ));\n return calcReceiptsHash(p.receiptProof, el, 4);\n // start from proof[4]\n}\n\n\nfunction toBinary(uint _x) pure returns (bytes memory) {\n bytes memory b = new bytes(32);\n assembly {\n mstore(add(b, 32), _x)\n }\n uint i;\n for (i = 0; i < 32; i++) {\n if (b[i] != 0) {\n break;\n }\n }\n bytes memory res = new bytes(32 - i);\n for (uint j = 0; j < res.length; j++) {\n res[j] = b[i++];\n }\n return res;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" - }, - "contracts/checks/SignatureCheck.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" - }, - "hardhat/console.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >= 0.4.22 <0.9.0;\n\nlibrary console {\n\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n\tfunction _sendLogPayload(bytes memory payload) private view {\n\t\tuint256 payloadLength = payload.length;\n\t\taddress consoleAddress = CONSOLE_ADDRESS;\n\t\tassembly {\n\t\t\tlet payloadStart := add(payload, 32)\n\t\t\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n\t\t}\n\t}\n\n\tfunction log() internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log()\"));\n\t}\n\n\tfunction logInt(int p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n\t}\n\n\tfunction logUint(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction logString(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction logBool(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction logAddress(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction logBytes(bytes memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n\t}\n\n\tfunction logBytes1(bytes1 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n\t}\n\n\tfunction logBytes2(bytes2 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n\t}\n\n\tfunction logBytes3(bytes3 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n\t}\n\n\tfunction logBytes4(bytes4 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n\t}\n\n\tfunction logBytes5(bytes5 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n\t}\n\n\tfunction logBytes6(bytes6 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n\t}\n\n\tfunction logBytes7(bytes7 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n\t}\n\n\tfunction logBytes8(bytes8 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n\t}\n\n\tfunction logBytes9(bytes9 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n\t}\n\n\tfunction logBytes10(bytes10 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n\t}\n\n\tfunction logBytes11(bytes11 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n\t}\n\n\tfunction logBytes12(bytes12 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n\t}\n\n\tfunction logBytes13(bytes13 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n\t}\n\n\tfunction logBytes14(bytes14 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n\t}\n\n\tfunction logBytes15(bytes15 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n\t}\n\n\tfunction logBytes16(bytes16 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n\t}\n\n\tfunction logBytes17(bytes17 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n\t}\n\n\tfunction logBytes18(bytes18 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n\t}\n\n\tfunction logBytes19(bytes19 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n\t}\n\n\tfunction logBytes20(bytes20 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n\t}\n\n\tfunction logBytes21(bytes21 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n\t}\n\n\tfunction logBytes22(bytes22 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n\t}\n\n\tfunction logBytes23(bytes23 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n\t}\n\n\tfunction logBytes24(bytes24 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n\t}\n\n\tfunction logBytes25(bytes25 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n\t}\n\n\tfunction logBytes26(bytes26 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n\t}\n\n\tfunction logBytes27(bytes27 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n\t}\n\n\tfunction logBytes28(bytes28 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n\t}\n\n\tfunction logBytes29(bytes29 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n\t}\n\n\tfunction logBytes30(bytes30 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n\t}\n\n\tfunction logBytes31(bytes31 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n\t}\n\n\tfunction logBytes32(bytes32 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n\t}\n\n\tfunction log(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction log(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction log(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction log(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction log(uint p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n\t}\n\n\tfunction log(address p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n\t}\n\n\tfunction log(address p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n\t}\n\n\tfunction log(address p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n\t}\n\n\tfunction log(address p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n}\n" - }, - "contracts/common/CommonStructs.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address adminAddress;\n address relayAddress; address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" - }, - "contracts/networks/ETH_EthBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract ETH_EthBridge is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n}\n" - }, - "contracts/common/CommonBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // OWNER_ROLE must be DEFAULT_ADMIN_ROLE because by default only this role able to grant or revoke other roles\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\");\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\");\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable transferFeeRecipient;\n address payable bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRole(ADMIN_ROLE, args.adminAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId and all after it\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\");\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n inputEventId = eventId - 1;\n // pretend like we don't receive that event\n }\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(ADMIN_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(RELAY_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" - }, - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\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, _msgSender());\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(IAccessControlUpgradeable).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" - }, - "contracts/tokens/IWrapper.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 IERC165Upgradeable {\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" - }, - "contracts/networks/ETH_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoW.sol\";\n\n\ncontract ETH_AmbBridge is CommonBridge, CheckPoW {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint minimumDifficulty\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoW_init(minimumDifficulty);\n }\n\n function submitTransferPoW(PoWProof calldata powProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(powProof.transfer.eventId);\n checkEventId(powProof.transfer.eventId);\n// checkPoW_(powProof, sideBridgeAddress);\n lockTransfers(powProof.transfer.transfers, powProof.transfer.eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n}\n" - }, - "contracts/checks/CheckPoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"./CheckPoW_Ethash.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckPoW is Initializable, Ethash {\n struct BlockPoW {\n bytes3 p0WithNonce;\n bytes3 p0WithoutNonce;\n\n bytes p1;\n bytes32 parentOrReceiptHash;\n bytes p2;\n bytes difficulty;\n bytes p3;\n bytes number;\n bytes p4; // end when extra end\n bytes p5; // after extra\n bytes nonce;\n bytes p6;\n\n uint[] dataSetLookup;\n uint[] witnessForLookup;\n }\n\n struct PoWProof {\n BlockPoW[] blocks;\n CommonStructs.TransferProof transfer;\n }\n\n uint256 minimumDifficulty;\n\n function __CheckPoW_init(\n uint256 minimumDifficulty_\n ) internal initializer {\n minimumDifficulty = minimumDifficulty_;\n }\n\n /*\n PoWProof.blocks contains:\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, checking it pow hash.\n Each block parentHash must be equal to the hash of the previous block.\n If there are no errors, the transfer is considered valid\n */\n function checkPoW_(PoWProof calldata powProof, address sideBridgeAddress) internal view\n {\n bytes32 hash = calcTransferReceiptsHash(powProof.transfer, sideBridgeAddress);\n for (uint i = 0; i < powProof.blocks.length; i++) {\n require(powProof.blocks[i].parentOrReceiptHash == hash, \"parentHash or receiptHash wrong\");\n hash = blockHash(powProof.blocks[i]);\n\n verifyEthash(powProof.blocks[i]);\n }\n }\n\n\n function verifyEthash(BlockPoW calldata block_) internal view {\n uint difficulty = bytesToUint(block_.difficulty);\n require(difficulty >= minimumDifficulty, \"difficulty too low\");\n verifyPoW(\n bytesToUint(block_.number),\n blockHashWithoutNonce(block_),\n bytesToUint(block_.nonce),\n difficulty,\n block_.dataSetLookup,\n block_.witnessForLookup\n );\n }\n\n function blockHash(BlockPoW calldata block_) internal pure returns (bytes32) {\n // Note: too much arguments in abi.encodePacked() function cause CompilerError: Stack too deep...\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2,\n block_.difficulty,\n block_.p3\n ),\n abi.encodePacked(\n block_.number,\n block_.p4,\n block_.p5,\n block_.nonce,\n block_.p6\n )\n ));\n }\n\n function blockHashWithoutNonce(BlockPoW calldata block_) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithoutNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2\n ),\n abi.encodePacked(\n block_.difficulty,\n block_.p3,\n block_.number,\n block_.p4,\n block_.p6\n )\n ));\n }\n\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckPoW_Ethash.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n/// @dev These contracts are used to verify Proof of Work within a smart contract.\n/// The algorithms have been extracted from the implementation of smart pool (https://github.com/smartpool)\ncontract SHA3_512 {\n constructor() {}\n\n function keccak_f(uint[25] memory A) pure private returns (uint[25] memory) {\n uint[25] memory B;\n uint[5] memory C;\n uint[5] memory D;\n\n uint[24] memory RC = [\n uint(0x0000000000000001),\n 0x0000000000008082,\n 0x800000000000808A,\n 0x8000000080008000,\n 0x000000000000808B,\n 0x0000000080000001,\n 0x8000000080008081,\n 0x8000000000008009,\n 0x000000000000008A,\n 0x0000000000000088,\n 0x0000000080008009,\n 0x000000008000000A,\n 0x000000008000808B,\n 0x800000000000008B,\n 0x8000000000008089,\n 0x8000000000008003,\n 0x8000000000008002,\n 0x8000000000000080,\n 0x000000000000800A,\n 0x800000008000000A,\n 0x8000000080008081,\n 0x8000000000008080,\n 0x0000000080000001,\n 0x8000000080008008];\n\n for (uint i = 0; i < 24; i++) {\n\n C[0] = A[0] ^ A[1] ^ A[2] ^ A[3] ^ A[4];\n C[1] = A[5] ^ A[6] ^ A[7] ^ A[8] ^ A[9];\n C[2] = A[10] ^ A[11] ^ A[12] ^ A[13] ^ A[14];\n C[3] = A[15] ^ A[16] ^ A[17] ^ A[18] ^ A[19];\n C[4] = A[20] ^ A[21] ^ A[22] ^ A[23] ^ A[24];\n\n D[0] = C[4] ^ ((C[1] * 2) & 0xffffffffffffffff | (C[1] / (2 ** 63)));\n D[1] = C[0] ^ ((C[2] * 2) & 0xffffffffffffffff | (C[2] / (2 ** 63)));\n D[2] = C[1] ^ ((C[3] * 2) & 0xffffffffffffffff | (C[3] / (2 ** 63)));\n D[3] = C[2] ^ ((C[4] * 2) & 0xffffffffffffffff | (C[4] / (2 ** 63)));\n D[4] = C[3] ^ ((C[0] * 2) & 0xffffffffffffffff | (C[0] / (2 ** 63)));\n\n A[0] = A[0] ^ D[0];\n A[1] = A[1] ^ D[0];\n A[2] = A[2] ^ D[0];\n A[3] = A[3] ^ D[0];\n A[4] = A[4] ^ D[0];\n A[5] = A[5] ^ D[1];\n A[6] = A[6] ^ D[1];\n A[7] = A[7] ^ D[1];\n A[8] = A[8] ^ D[1];\n A[9] = A[9] ^ D[1];\n A[10] = A[10] ^ D[2];\n A[11] = A[11] ^ D[2];\n A[12] = A[12] ^ D[2];\n A[13] = A[13] ^ D[2];\n A[14] = A[14] ^ D[2];\n A[15] = A[15] ^ D[3];\n A[16] = A[16] ^ D[3];\n A[17] = A[17] ^ D[3];\n A[18] = A[18] ^ D[3];\n A[19] = A[19] ^ D[3];\n A[20] = A[20] ^ D[4];\n A[21] = A[21] ^ D[4];\n A[22] = A[22] ^ D[4];\n A[23] = A[23] ^ D[4];\n A[24] = A[24] ^ D[4];\n\n /*Rho and pi steps*/\n B[0] = A[0];\n B[8] = ((A[1] * (2 ** 36)) & 0xffffffffffffffff | (A[1] / (2 ** 28)));\n B[11] = ((A[2] * (2 ** 3)) & 0xffffffffffffffff | (A[2] / (2 ** 61)));\n B[19] = ((A[3] * (2 ** 41)) & 0xffffffffffffffff | (A[3] / (2 ** 23)));\n B[22] = ((A[4] * (2 ** 18)) & 0xffffffffffffffff | (A[4] / (2 ** 46)));\n B[2] = ((A[5] * (2 ** 1)) & 0xffffffffffffffff | (A[5] / (2 ** 63)));\n B[5] = ((A[6] * (2 ** 44)) & 0xffffffffffffffff | (A[6] / (2 ** 20)));\n B[13] = ((A[7] * (2 ** 10)) & 0xffffffffffffffff | (A[7] / (2 ** 54)));\n B[16] = ((A[8] * (2 ** 45)) & 0xffffffffffffffff | (A[8] / (2 ** 19)));\n B[24] = ((A[9] * (2 ** 2)) & 0xffffffffffffffff | (A[9] / (2 ** 62)));\n B[4] = ((A[10] * (2 ** 62)) & 0xffffffffffffffff | (A[10] / (2 ** 2)));\n B[7] = ((A[11] * (2 ** 6)) & 0xffffffffffffffff | (A[11] / (2 ** 58)));\n B[10] = ((A[12] * (2 ** 43)) & 0xffffffffffffffff | (A[12] / (2 ** 21)));\n B[18] = ((A[13] * (2 ** 15)) & 0xffffffffffffffff | (A[13] / (2 ** 49)));\n B[21] = ((A[14] * (2 ** 61)) & 0xffffffffffffffff | (A[14] / (2 ** 3)));\n B[1] = ((A[15] * (2 ** 28)) & 0xffffffffffffffff | (A[15] / (2 ** 36)));\n B[9] = ((A[16] * (2 ** 55)) & 0xffffffffffffffff | (A[16] / (2 ** 9)));\n B[12] = ((A[17] * (2 ** 25)) & 0xffffffffffffffff | (A[17] / (2 ** 39)));\n B[15] = ((A[18] * (2 ** 21)) & 0xffffffffffffffff | (A[18] / (2 ** 43)));\n B[23] = ((A[19] * (2 ** 56)) & 0xffffffffffffffff | (A[19] / (2 ** 8)));\n B[3] = ((A[20] * (2 ** 27)) & 0xffffffffffffffff | (A[20] / (2 ** 37)));\n B[6] = ((A[21] * (2 ** 20)) & 0xffffffffffffffff | (A[21] / (2 ** 44)));\n B[14] = ((A[22] * (2 ** 39)) & 0xffffffffffffffff | (A[22] / (2 ** 25)));\n B[17] = ((A[23] * (2 ** 8)) & 0xffffffffffffffff | (A[23] / (2 ** 56)));\n B[20] = ((A[24] * (2 ** 14)) & 0xffffffffffffffff | (A[24] / (2 ** 50)));\n\n /*Xi state*/\n A[0] = B[0] ^ ((~B[5]) & B[10]);\n A[1] = B[1] ^ ((~B[6]) & B[11]);\n A[2] = B[2] ^ ((~B[7]) & B[12]);\n A[3] = B[3] ^ ((~B[8]) & B[13]);\n A[4] = B[4] ^ ((~B[9]) & B[14]);\n A[5] = B[5] ^ ((~B[10]) & B[15]);\n A[6] = B[6] ^ ((~B[11]) & B[16]);\n A[7] = B[7] ^ ((~B[12]) & B[17]);\n A[8] = B[8] ^ ((~B[13]) & B[18]);\n A[9] = B[9] ^ ((~B[14]) & B[19]);\n A[10] = B[10] ^ ((~B[15]) & B[20]);\n A[11] = B[11] ^ ((~B[16]) & B[21]);\n A[12] = B[12] ^ ((~B[17]) & B[22]);\n A[13] = B[13] ^ ((~B[18]) & B[23]);\n A[14] = B[14] ^ ((~B[19]) & B[24]);\n A[15] = B[15] ^ ((~B[20]) & B[0]);\n A[16] = B[16] ^ ((~B[21]) & B[1]);\n A[17] = B[17] ^ ((~B[22]) & B[2]);\n A[18] = B[18] ^ ((~B[23]) & B[3]);\n A[19] = B[19] ^ ((~B[24]) & B[4]);\n A[20] = B[20] ^ ((~B[0]) & B[5]);\n A[21] = B[21] ^ ((~B[1]) & B[6]);\n A[22] = B[22] ^ ((~B[2]) & B[7]);\n A[23] = B[23] ^ ((~B[3]) & B[8]);\n A[24] = B[24] ^ ((~B[4]) & B[9]);\n\n /*Last step*/\n A[0] = A[0] ^ RC[i];\n }\n\n return A;\n }\n\n\n function sponge(uint[9] memory M) pure internal returns (uint[16] memory) {\n require((M.length * 8) == 72, \"sponge error\");\n\n M[5] = 0x01;\n M[8] = 0x8000000000000000;\n\n uint r = 72;\n uint w = 8;\n uint size = M.length * 8;\n\n uint[25] memory S;\n uint i;\n uint y;\n uint x;\n /*Absorbing Phase*/\n for (i = 0; i < size / r; i++) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w)) {\n S[5 * x + y] = S[5 * x + y] ^ M[i * 9 + x + 5 * y];\n }\n }\n }\n S = keccak_f(S);\n }\n\n /*Squeezing phase*/\n uint[16] memory result;\n uint b = 0;\n while (b < 16) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w) && (b < 16)) {\n result[b] = S[5 * x + y] & 0xFFFFFFFF;\n result[b + 1] = S[5 * x + y] / 0x100000000;\n b += 2;\n }\n }\n }\n }\n\n return result;\n }\n\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\ncontract Ethash is SHA3_512 {\n\n uint constant EPOCH_LENGTH = 30000; // blocks per epoch\n\n constructor() {\n }\n\n struct EthashCacheOptData {\n uint[512] merkleNodes;\n uint fullSizeIn128Resultion;\n uint branchDepth;\n }\n\n mapping(uint => EthashCacheOptData) epochData;\n\n\n function verifyPoW(uint blockNumber, bytes32 rlpHeaderHashWithoutNonce, uint nonce, uint difficulty,\n uint[] memory dataSetLookup, uint[] memory witnessForLookup) internal view {\n\n uint epoch = blockNumber / EPOCH_LENGTH;\n uint ethash = hashimoto(rlpHeaderHashWithoutNonce, nonce, dataSetLookup, witnessForLookup, epoch);\n\n require(ethash <= (2 ** 256 - 1) / difficulty, \"Ethash difficulty too low\");\n }\n\n function isEpochDataSet(uint epochIndex) public view returns (bool) {\n return epochData[epochIndex].fullSizeIn128Resultion != 0;\n }\n\n function setEpochData(\n uint epochNum,\n uint fullSizeIn128Resultion,\n uint branchDepth,\n uint[] calldata merkleNodes\n ) public {\n\n // we store only previous and current epochs\n // so, delete second from the end epoch\n if (epochNum >= 2) // underflow check\n delete epochData[epochNum - 2];\n\n\n uint l = merkleNodes.length;\n uint[512] storage nodes = epochData[epochNum].merkleNodes;\n\n for (uint i = 0; i < l; i++) {\n nodes[i] = merkleNodes[i];\n }\n\n epochData[epochNum].fullSizeIn128Resultion = fullSizeIn128Resultion;\n epochData[epochNum].branchDepth = branchDepth;\n }\n\n\n function hashimoto(bytes32 header,\n uint nonceLe,\n uint[] memory dataSetLookup,\n uint[] memory witnessForLookup,\n uint epochIndex) private view returns (uint) {\n\n uint[16] memory s = computeS(uint(header), nonceLe);\n uint[32] memory mix;\n uint[8] memory cmix;\n\n\n uint depth = epochData[epochIndex].branchDepth;\n uint fullSize = epochData[epochIndex].fullSizeIn128Resultion;\n\n uint i;\n uint j;\n\n require(fullSize != 0, \"EpochData not set\");\n\n\n for (i = 0; i < 16; i++) {\n assembly {\n let offset := mul(i, 0x20)\n\n //mix[i] = s[i];\n mstore(add(mix, offset), mload(add(s, offset)))\n\n // mix[i+16] = s[i];\n mstore(add(mix, add(0x200, offset)), mload(add(s, offset)))\n }\n }\n\n for (i = 0; i < 64; i++) {\n uint p = fnv(i ^ s[0], mix[i % 32]) % fullSize;\n\n // console.log(computeCacheRoot( p, i, dataSetLookup, witnessForLookup, depthAndFullSize[0]));\n // console.log(getMerkleLeave( epochIndex, p ));\n\n if (computeCacheRoot(p, i, dataSetLookup, witnessForLookup, depth) != getMerkleLeave(epochIndex, p)) {\n // PoW failed\n revert(\"PoW failed\");\n }\n\n for (j = 0; j < 8; j++) {\n\n assembly{\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & varFFFFFFFF );\n let dataOffset := add(mul(0x80, i), add(dataSetLookup, 0x20))\n let dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n let mixOffset := add(mix, mul(0x20, j))\n let mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n let fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n }\n\n\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & 0xFFFFFFFF );\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n\n\n //dataSetLookup[4*i ] = dataSetLookup[4*i ]/(2**32);\n //dataSetLookup[4*i + 1] = dataSetLookup[4*i + 1]/(2**32);\n //dataSetLookup[4*i + 2] = dataSetLookup[4*i + 2]/(2**32);\n //dataSetLookup[4*i + 3] = dataSetLookup[4*i + 3]/(2**32);\n\n assembly{\n let offset := add(add(dataSetLookup, 0x20), mul(i, 0x80))\n let value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n }\n }\n }\n\n\n for (i = 0; i < 32; i += 4) {\n cmix[i / 4] = (fnv(fnv(fnv(mix[i], mix[i + 1]), mix[i + 2]), mix[i + 3]));\n }\n\n return computeSha3(s, cmix);\n\n }\n\n\n function fnv(uint v1, uint v2) pure internal returns (uint) {\n return ((v1 * 0x01000193) ^ v2) & 0xFFFFFFFF;\n }\n\n function computeCacheRoot(uint index,\n uint indexInElementsArray,\n uint[] memory elements,\n uint[] memory witness,\n uint branchSize) pure private returns (uint) {\n\n uint leaf = computeLeaf(elements, indexInElementsArray) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n\n uint left;\n uint right;\n uint node;\n bool oddBranchSize = (branchSize % 2) > 0;\n\n assembly {\n branchSize := div(branchSize, 2)\n //branchSize /= 2;\n }\n uint witnessIndex = indexInElementsArray * branchSize;\n if (oddBranchSize) witnessIndex += indexInElementsArray;\n\n uint depth;\n for (depth = 0; depth < branchSize; depth++) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n\n //node = witness[witnessIndex + depth] / (2**128);\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := div(node, 0x100000000000000000000000000000000)\n }\n }\n else {\n assembly {\n left := div(node, 0x100000000000000000000000000000000)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n }\n\n if (oddBranchSize) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n }\n\n\n return leaf;\n }\n\n\n function computeSha3(uint[16] memory s, uint[8] memory cmix) pure internal returns (uint) {\n uint s0 = s[0] + s[1] * (2 ** 32) + s[2] * (2 ** 64) + s[3] * (2 ** 96) +\n (s[4] + s[5] * (2 ** 32) + s[6] * (2 ** 64) + s[7] * (2 ** 96)) * (2 ** 128);\n\n uint s1 = s[8] + s[9] * (2 ** 32) + s[10] * (2 ** 64) + s[11] * (2 ** 96) +\n (s[12] + s[13] * (2 ** 32) + s[14] * (2 ** 64) + s[15] * (2 ** 96)) * (2 ** 128);\n\n uint c = cmix[0] + cmix[1] * (2 ** 32) + cmix[2] * (2 ** 64) + cmix[3] * (2 ** 96) +\n (cmix[4] + cmix[5] * (2 ** 32) + cmix[6] * (2 ** 64) + cmix[7] * (2 ** 96)) * (2 ** 128);\n\n\n /* god knows why need to convert to big endian */\n return uint(keccak256(abi.encodePacked(reverseBytes(s0), reverseBytes(s1), reverseBytes(c))));\n }\n\n\n function computeLeaf(uint[] memory dataSetLookup, uint index) pure internal returns (uint) {\n return uint(keccak256(abi.encodePacked(\n dataSetLookup[4 * index],\n dataSetLookup[4 * index + 1],\n dataSetLookup[4 * index + 2],\n dataSetLookup[4 * index + 3]\n )));\n\n }\n\n function computeS(uint header, uint nonceLe) pure internal returns (uint[16] memory) {\n uint[9] memory M;\n\n header = reverseBytes(header);\n\n M[0] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[1] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[2] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[3] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n\n // make little endian nonce\n M[4] = nonceLe;\n return sponge(M);\n }\n\n function reverseBytes(uint input) pure internal returns (uint) {\n uint result;\n for (uint i = 0; i < 32; i++) {\n result = (result << 8) + (input & 0xff);\n input = input >> 8;\n }\n return result;\n }\n\n\n function getMerkleLeave(uint epochIndex, uint p) view internal returns (uint) {\n uint rootIndex = uint(p >> epochData[epochIndex].branchDepth);\n uint expectedRoot = epochData[epochIndex].merkleNodes[(rootIndex >> 1)];\n\n if ((rootIndex % 2) == 0)\n return expectedRoot & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n return expectedRoot >> 128;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoWTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoW.sol\";\n\ncontract CheckPoWTest is CheckPoW {\n\n constructor(\n uint minimumDifficulty_\n ) {\n minimumDifficulty = minimumDifficulty_;\n }\n\n function checkPoWTest(PoWProof calldata powProof, address sideBridgeAddress) public {\n checkPoW_(powProof, sideBridgeAddress);\n }\n\n function verifyEthashTest(BlockPoW calldata block_) public view {\n verifyEthash(block_);\n }\n\n function blockHashTest(BlockPoW calldata block_) public pure returns (bytes32) {\n return blockHash(block_);\n }\n\n}\n" - }, - "contracts/checks/CheckPoSA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckPoSA is Initializable {\n uint256 private constant ADDRESS_LENGTH = 20;\n uint256 private constant EXTRA_VANITY_LENGTH = 32;\n uint256 private constant EXTRA_SEAL_LENGTH = 65;\n uint256 private constant EPOCH_LENGTH = 200;\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n\n mapping(uint => mapping(address => bool)) internal allValidators;\n uint public currentEpoch;\n uint currentValidatorSetSize;\n\n bytes1 chainId;\n\n\n struct BlockPoSA {\n bytes3 p0Signed;\n bytes3 p0Unsigned;\n\n bytes32 parentHash;\n bytes p1;\n bytes32 receiptHash;\n bytes p2;\n bytes number;\n bytes p3;\n\n bytes p4Signed;\n bytes p4Unsigned;\n bytes extraData;\n\n bytes p5;\n }\n\n struct PoSAProof {\n BlockPoSA[] blocks;\n CommonStructs.TransferProof transfer;\n uint64 transferEventBlock;\n }\n\n\n function __CheckPoSA_init(\n address[] calldata initialValidators_,\n uint initialEpoch_,\n bytes1 chainId_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n chainId = chainId_;\n currentEpoch = initialEpoch_;\n currentValidatorSetSize = initialValidators_.length;\n\n for (uint i = 0; i < initialValidators_.length; i++) {\n allValidators[currentEpoch][initialValidators_[i]] = true;\n }\n }\n\n /*\n PoSAProof.blocks contains:\n - blocks for validate validatorSet changes, in that order:\n - first block in epoch (blockNum % 200 == 0)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize\n * repeated for each new epoch, all epochs must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between epochs\n If there are no errors, the transfer is considered valid\n */\n function checkPoSA_(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n bytes32 bareHash;\n bytes32 parentHash;\n uint finalizeVsBlock;\n uint nextVsSize;\n\n // posaProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (posaProof.transferEventBlock != 0) {\n bytes32 receiptHash = calcTransferReceiptsHash(posaProof.transfer, sideBridgeAddress);\n require(posaProof.blocks[posaProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(posaProof.blocks.length - posaProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < posaProof.blocks.length; i++) {\n BlockPoSA calldata block_ = posaProof.blocks[i];\n\n if (parentHash != bytes32(0))\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n\n (bareHash, parentHash) = calcBlockHash(block_);\n\n require(verifySignature(bareHash, getSignature(block_.extraData)), \"invalid signature\");\n\n // change validator set\n\n uint blockNumber = bytesToUint(block_.number);\n\n if (blockNumber % EPOCH_LENGTH == 0) {\n require(blockNumber / EPOCH_LENGTH == currentEpoch + 1, \"invalid epoch\");\n\n nextVsSize = newValidatorSet(block_.extraData);\n finalizeVsBlock = blockNumber + currentValidatorSetSize / 2;\n } else if (blockNumber == finalizeVsBlock) {\n currentEpoch++;\n currentValidatorSetSize = nextVsSize;\n\n // after finalizing vs change, next block in posaProof.blocks can have any parentHash (skipping some blocks)\n // but only if it's not the safety blocks for transfer event\n if (i < posaProof.transferEventBlock)\n parentHash = bytes32(0);\n }\n }\n }\n\n\n function calcBlockHash(BlockPoSA calldata block_) internal view returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p1, block_.receiptHash, block_.p2, block_.number, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Unsigned, chainId, commonRlp, block_.p4Unsigned, getExtraDataUnsigned(block_.extraData), block_.p5)),\n // hash with seal, for prev_hash check\n keccak256(abi.encodePacked(block_.p0Signed, commonRlp, block_.p4Signed, block_.extraData, block_.p5))\n );\n }\n\n function getSignature(bytes calldata extraData) private pure returns (bytes calldata) {\n uint start = extraData.length - EXTRA_SEAL_LENGTH;\n return extraData[start : start + EXTRA_SEAL_LENGTH];\n }\n\n function getExtraDataUnsigned(bytes calldata extraData) private pure returns (bytes memory) {\n return extraData[0 : extraData.length - EXTRA_SEAL_LENGTH];\n }\n\n function newValidatorSet(bytes calldata extraData) private returns (uint) {\n uint nextValidatorSet = currentEpoch + 1;\n uint endPos = extraData.length - EXTRA_SEAL_LENGTH;\n\n uint nextValidatorSetSize;\n for (uint pos = EXTRA_VANITY_LENGTH; pos < endPos; pos += ADDRESS_LENGTH) {\n address validator = address(bytes20(extraData[pos : pos + ADDRESS_LENGTH]));\n allValidators[nextValidatorSet][validator] = true;\n nextValidatorSetSize++;\n }\n\n return nextValidatorSetSize;\n }\n\n function verifySignature(bytes32 hash, bytes calldata signature) private view returns (bool) {\n address signer = ecdsaRecover(hash, signature);\n return allValidators[currentEpoch][signer];\n }\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n}\n" - }, - "contracts/networks/BSC_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract BSC_AmbBridge is CommonBridge, CheckPoSA {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n uint initialEpoch,\n bytes1 chainId\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoSA_init(initialValidators, initialEpoch, chainId);\n }\n\n function submitTransferPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(posaProof.transfer.eventId);\n checkEventId(posaProof.transfer.eventId);\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(posaProof.transfer.transfers, posaProof.transfer.eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoSATest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract CheckPoSATest is CheckPoSA {\n constructor(\n bytes1 chainId_\n ) {\n chainId = chainId_;\n }\n\n function checkPoSATest(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress,\n address[] memory _initialValidators, uint _initialEpoch, bytes1 _chainId) public {\n // TODO: we can't use the `__CheckPoSA_init` twice, but copy-paste is also not good\n chainId = _chainId;\n currentEpoch = _initialEpoch;\n currentValidatorSetSize = _initialValidators.length;\n\n for (uint i = 0; i < _initialValidators.length; i++) {\n allValidators[currentEpoch][_initialValidators[i]] = true;\n }\n\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockPoSA calldata block_) public view returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockPoSA calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/commonBridgeTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckReceiptsProof.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // used for signature check\n _setupRole(RELAY_ROLE, address(0x295C2707319ad4BecA6b5bb4086617fD6F240CfE));\n }\n\n function getLockedTransferTest(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n lockTransfers(events, eventId);\n }\n\n function getOutputEventId() public view returns (uint) {\n return outputEventId;\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n // checkReceiptsProof\n\n function calcTransferReceiptsHashTest(CommonStructs.TransferProof calldata p, address eventContractAddress) public pure returns (bytes32) {\n return calcTransferReceiptsHash(p, eventContractAddress);\n }\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" - }, - "contracts/networks/BSC_BscBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract BSC_BscBridge is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n}\n" - }, - "contracts/tokens/sAMB.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./IWrapper.sol\";\n\ncontract sAMB is IWrapper, ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\n\n function deposit() public override payable {\n _mint(msg.sender, msg.value);\n\n emit Deposit(msg.sender, msg.value);\n }\n\n function withdraw(uint amount) public override {\n _burn(msg.sender, amount);\n payable(msg.sender).transfer(amount);\n\n emit Withdrawal(msg.sender, amount);\n }\n\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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 * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, 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 * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), 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 * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\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 * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\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/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\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/access/AccessControl.sol": { - "content": "// SPDX-License-Identifier: MIT\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 * ```\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 * ```\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.\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, _msgSender());\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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(uint160(account), 20),\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\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\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/utils/Strings.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts/utils/introspection/ERC165.sol": { - "content": "// SPDX-License-Identifier: MIT\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\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" - }, - "contracts/tokens/BridgeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\n\ncontract BridgeERC20 is ERC20, AccessControl {\n mapping (address => uint) public bridgeBalances;\n bytes32 public constant BRIDGE_ROLE = keccak256(\"BRIDGE_ROLE\");\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address[] memory bridgeAddresses)\n ERC20(name_, symbol_) {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setBridgeAddressesRole(bridgeAddresses);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddressesRole(address[] memory bridgeAddresses) public onlyRole(DEFAULT_ADMIN_ROLE) {\n _setBridgeAddressesRole(bridgeAddresses);\n }\n\n function _setBridgeAddressesRole(address[] memory bridgeAddresses) private {\n for (uint i = 0; i < bridgeAddresses.length; i++) {\n _setupRole(BRIDGE_ROLE, bridgeAddresses[i]);\n }\n }\n\n function _mint(address recipient, uint256 amount) internal virtual override {\n super._mint(recipient, amount);\n\n bridgeBalances[recipient] += amount;\n }\n\n function _burn(address sender, uint256 amount) internal virtual override {\n require(bridgeBalances[sender] >= amount, \"amount is bigger than balance\");\n\n bridgeBalances[sender] -= amount;\n\n super._burn(sender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (hasRole(BRIDGE_ROLE, sender)) {\n _mint(recipient, amount);\n } else if (hasRole(BRIDGE_ROLE, recipient)) {\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20Test.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address[] memory bridgeAddresses)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddresses) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n}\n" - }, - "contracts/contracts_for_tests/CheckAuraTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckAura.sol\";\n\ncontract CheckAuraTest is CheckAura {\n constructor(address validatorSetAddress_, uint minSafetyBlocksValidators_) {\n validatorSetAddress = validatorSetAddress_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function checkAuraTest(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress, address[] memory initialValidators_) public {\n validatorSet = initialValidators_;\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockAura calldata block_) public pure returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockAura calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function bytesToUintTest(bytes4 b) public pure returns (uint) {\n return bytesToUint(b);\n }\n\n}\n" - }, - "contracts/utils/Proxy.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/proxy/Proxy.sol\";\nimport \"@openzeppelin/contracts/utils/StorageSlot.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\nimport \"./MultiSigWallet.sol\";\nimport \"hardhat/console.sol\";\n\n\ncontract ProxyMultiSig is Proxy, MultiSigWallet {\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n bytes32 private constant ADMIN_STORAGE_LOCATION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n bytes4 private constant _UPGRADE_TO_AND_CALL_SIGNATURE = bytes4(keccak256(\"_upgradeToAndCall(address,bytes)\"));\n\n event Upgraded(address indexed implementation);\n\n\n constructor(\n address _logic,\n bytes memory _data,\n address[] memory owners,\n uint _required\n\n ) MultiSigWallet(owners, _required) {\n // Cannot use _upgradeToAndCall because of onlyWallet modifier\n _upgradeTo(_logic);\n if (_data.length > 0) {\n Address.functionDelegateCall(_logic, _data);\n }\n\n StorageSlot.getAddressSlot(ADMIN_STORAGE_LOCATION).value = msg.sender; // trick the hardhat-deploy\n }\n\n\n function implementation() external view returns (address) {\n return _implementation();\n }\n\n function upgradeTo(address newImplementation) external payable ownerExists(msg.sender) {\n submitTransaction(\n address(this),\n msg.value,\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, bytes(\"\"))\n );\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ownerExists(msg.sender) {\n submitTransaction(\n address(this),\n msg.value,\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, data)\n );\n }\n\n function _upgradeToAndCall(address newImplementation, bytes memory data) external onlyWallet payable {\n _upgradeTo(newImplementation);\n if (data.length > 0) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n function _upgradeTo(address newImplementation) internal {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n emit Upgraded(newImplementation);\n }\n\n function _implementation() internal view override returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/Proxy.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overriden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/utils/StorageSlot.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n}\n" - }, - "@openzeppelin/contracts/utils/Address.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \"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(\n address target,\n bytes memory data,\n uint256 value\n ) 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 require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(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 require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(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 require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason 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 // 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\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}\n" - }, - "contracts/utils/MultiSigWallet.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n\ncontract MultiSigWallet {\n\n /*\n * Events\n */\n event Confirmation(address indexed sender, uint indexed transactionId);\n event Revocation(address indexed sender, uint indexed transactionId);\n event Submission(uint indexed transactionId);\n event Execution(uint indexed transactionId);\n event ExecutionFailure(uint indexed transactionId);\n event OwnerAddition(address indexed owner);\n event OwnerRemoval(address indexed owner);\n event RequirementChange(uint required);\n\n /*\n * Constants\n */\n uint constant public MAX_OWNER_COUNT = 50;\n\n /*\n * Storage\n */\n mapping(uint => Transaction) public transactions;\n mapping(uint => mapping(address => bool)) public confirmations;\n mapping(address => bool) public isOwner;\n address[] public owners;\n uint public required;\n uint public transactionCount;\n\n struct Transaction {\n address destination;\n uint value;\n bytes data;\n bool executed;\n }\n\n /*\n * Modifiers\n */\n modifier onlyWallet() {\n require(msg.sender == address(this));\n _;\n }\n\n modifier ownerDoesNotExist(address owner) {\n require(!isOwner[owner]);\n _;\n }\n\n modifier ownerExists(address owner) {\n require(isOwner[owner]);\n _;\n }\n\n modifier transactionExists(uint transactionId) {\n require(transactions[transactionId].destination != address(0));\n _;\n }\n\n modifier confirmed(uint transactionId, address owner) {\n require(confirmations[transactionId][owner]);\n _;\n }\n\n modifier notConfirmed(uint transactionId, address owner) {\n require(!confirmations[transactionId][owner]);\n _;\n }\n\n modifier notExecuted(uint transactionId) {\n require(!transactions[transactionId].executed);\n _;\n }\n\n modifier notNull(address _address) {\n require(_address != address(0));\n _;\n }\n\n modifier validRequirement(uint ownerCount, uint _required) {\n require(ownerCount <= MAX_OWNER_COUNT\n && _required <= ownerCount\n && _required != 0\n && ownerCount != 0);\n _;\n }\n\n /*\n * Public functions\n */\n /// @dev Contract constructor sets initial owners and required number of confirmations.\n /// @param _owners List of initial owners.\n /// @param _required Number of required confirmations.\n constructor(address[] memory _owners, uint _required)\n validRequirement(_owners.length, _required)\n {\n for (uint i = 0; i < _owners.length; i++) {\n require(!isOwner[_owners[i]] && _owners[i] != address(0));\n isOwner[_owners[i]] = true;\n }\n owners = _owners;\n required = _required;\n }\n\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of new owner.\n function addOwner(address owner)\n public\n onlyWallet\n ownerDoesNotExist(owner)\n notNull(owner)\n validRequirement(owners.length + 1, required)\n {\n isOwner[owner] = true;\n owners.push(owner);\n emit OwnerAddition(owner);\n }\n\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner.\n function removeOwner(address owner)\n public\n onlyWallet\n ownerExists(owner)\n {\n isOwner[owner] = false;\n for (uint i = 0; i < owners.length - 1; i++)\n if (owners[i] == owner) {\n owners[i] = owners[owners.length - 1];\n break;\n }\n owners.pop();\n if (required > owners.length)\n changeRequirement(owners.length);\n emit OwnerRemoval(owner);\n }\n\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner to be replaced.\n /// @param newOwner Address of new owner.\n function replaceOwner(address owner, address newOwner)\n public\n onlyWallet\n ownerExists(owner)\n ownerDoesNotExist(newOwner)\n {\n for (uint i = 0; i < owners.length; i++)\n if (owners[i] == owner) {\n owners[i] = newOwner;\n break;\n }\n isOwner[owner] = false;\n isOwner[newOwner] = true;\n emit OwnerRemoval(owner);\n emit OwnerAddition(newOwner);\n }\n\n /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\n /// @param _required Number of required confirmations.\n function changeRequirement(uint _required)\n public\n onlyWallet\n validRequirement(owners.length, _required)\n {\n required = _required;\n emit RequirementChange(_required);\n }\n\n /// @dev Allows an owner to submit and confirm a transaction.\n /// @param destination Transaction target address.\n /// @param value Transaction ether value.\n /// @param data Transaction data payload.\n /// @return transactionId Returns transaction ID.\n function submitTransaction(\n address destination,\n uint value,\n bytes memory data\n ) public returns (uint transactionId)\n {\n transactionId = addTransaction(destination, value, data);\n confirmTransaction(transactionId);\n }\n\n /// @dev Allows an owner to confirm a transaction.\n /// @param transactionId Transaction ID.\n function confirmTransaction(uint transactionId)\n public\n ownerExists(msg.sender)\n transactionExists(transactionId)\n notConfirmed(transactionId, msg.sender)\n {\n confirmations[transactionId][msg.sender] = true;\n emit Confirmation(msg.sender, transactionId);\n executeTransaction(transactionId);\n }\n\n /// @dev Allows an owner to revoke a confirmation for a transaction.\n /// @param transactionId Transaction ID.\n function revokeConfirmation(uint transactionId)\n public\n ownerExists(msg.sender)\n confirmed(transactionId, msg.sender)\n notExecuted(transactionId)\n {\n confirmations[transactionId][msg.sender] = false;\n emit Revocation(msg.sender, transactionId);\n }\n\n /// @dev Allows anyone to execute a confirmed transaction.\n /// @param transactionId Transaction ID.\n function executeTransaction(uint transactionId)\n public\n ownerExists(msg.sender)\n confirmed(transactionId, msg.sender)\n notExecuted(transactionId)\n {\n if (isConfirmed(transactionId)) {\n Transaction storage txn = transactions[transactionId];\n txn.executed = true;\n if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\n emit Execution(transactionId);\n else {\n emit ExecutionFailure(transactionId);\n txn.executed = false;\n }\n }\n }\n\n // call has been separated into its own function in order to take advantage\n // of the Solidity's code generator to produce a loop that copies tx.data into memory.\n function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) {\n bool result;\n assembly {\n let x := mload(0x40) // \"Allocate\" memory for output (0x40 is where \"free memory\" pointer is stored by convention)\n let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\n result := call(\n sub(gas(), 36810), // 34710 is the value that solidity is currently emitting // todo\n // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\n // callNewAccountGas (25000, in case the destination address does not exist and needs creating) +\n // gasSLoadEIP2929 (2100)\n\n destination,\n value,\n d,\n dataLength, // Size of the input (in bytes) - this is what fixes the padding problem\n x,\n 0 // Output is ignored, therefore the output size is zero\n )\n }\n return result;\n }\n\n /// @dev Returns the confirmation status of a transaction.\n /// @param transactionId Transaction ID.\n /// @return Confirmation status.\n function isConfirmed(uint transactionId) public view returns (bool)\n {\n uint count = 0;\n for (uint i = 0; i < owners.length; i++) {\n if (confirmations[transactionId][owners[i]])\n count += 1;\n if (count == required)\n return true;\n }\n return false;\n }\n\n /*\n * Internal functions\n */\n /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\n /// @param destination Transaction target address.\n /// @param value Transaction ether value.\n /// @param data Transaction data payload.\n /// @return transactionId Returns transaction ID.\n function addTransaction(\n address destination,\n uint value,\n bytes memory data\n ) internal\n notNull(destination) returns (uint transactionId)\n {\n transactionId = transactionCount;\n transactions[transactionId] = Transaction({\n destination : destination,\n value : value,\n data : data,\n executed : false\n });\n transactionCount += 1;\n emit Submission(transactionId);\n }\n\n /*\n * Web3 call functions\n */\n /// @dev Returns number of confirmations of a transaction.\n /// @param transactionId Transaction ID.\n /// @return count Number of confirmations.\n function getConfirmationCount(uint transactionId)\n public\n view\n returns (uint count)\n {\n for (uint i = 0; i < owners.length; i++)\n if (confirmations[transactionId][owners[i]])\n count += 1;\n }\n\n /// @dev Returns total number of transactions after filers are applied.\n /// @param pending Include pending transactions.\n /// @param executed Include executed transactions.\n /// @return count Total number of transactions after filters are applied.\n function getTransactionCount(bool pending, bool executed)\n public\n view\n returns (uint count)\n {\n for (uint i = 0; i < transactionCount; i++)\n if (pending && !transactions[i].executed\n || executed && transactions[i].executed)\n count += 1;\n }\n\n /// @dev Returns list of owners.\n /// @return List of owner addresses.\n function getOwners() public view returns (address[] memory)\n {\n return owners;\n }\n\n /// @dev Returns array with owner addresses, which confirmed transaction.\n /// @param transactionId Transaction ID.\n /// @return _confirmations Returns array of owner addresses.\n function getConfirmations(uint transactionId) public view\n returns (address[] memory _confirmations)\n {\n address[] memory confirmationsTemp = new address[](owners.length);\n uint count = 0;\n uint i;\n for (i = 0; i < owners.length; i++)\n if (confirmations[transactionId][owners[i]]) {\n confirmationsTemp[count] = owners[i];\n count += 1;\n }\n _confirmations = new address[](count);\n for (i = 0; i < count; i++)\n _confirmations[i] = confirmationsTemp[i];\n }\n\n /// @dev Returns list of transaction IDs in defined range.\n /// @param from Index start position of transaction array.\n /// @param to Index end position of transaction array.\n /// @param pending Include pending transactions.\n /// @param executed Include executed transactions.\n /// @return _transactionIds Returns array of transaction IDs.\n function getTransactionIds(uint from, uint to, bool pending, bool executed)\n public\n view\n returns (uint[] memory _transactionIds)\n {\n uint[] memory transactionIdsTemp = new uint[](transactionCount);\n uint count = 0;\n uint i;\n for (i = 0; i < transactionCount; i++)\n if (pending && !transactions[i].executed\n || executed && transactions[i].executed)\n {\n transactionIdsTemp[count] = i;\n count += 1;\n }\n _transactionIds = new uint[](to - from);\n for (i = from; i < to; i++)\n _transactionIds[i - from] = transactionIdsTemp[i];\n }\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "evmVersion": "byzantium", - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/contracts/deployments/test/amb/solcInputs/d93bc3aa6701c2d134a7738294111712.json b/contracts/deployments/test/amb/solcInputs/af3862e0ddcca2861ee723b668139921.json similarity index 99% rename from contracts/deployments/test/amb/solcInputs/d93bc3aa6701c2d134a7738294111712.json rename to contracts/deployments/test/amb/solcInputs/af3862e0ddcca2861ee723b668139921.json index f55ec9f8..5c4c023e 100644 --- a/contracts/deployments/test/amb/solcInputs/d93bc3aa6701c2d134a7738294111712.json +++ b/contracts/deployments/test/amb/solcInputs/af3862e0ddcca2861ee723b668139921.json @@ -85,6 +85,9 @@ "contracts/tokens/BridgeERC20.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20 is ERC20, Ownable {\n address public bridgeAddress; // address of bridge contract on this network\n\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\n ERC20(name_, symbol_)\n Ownable() {\n bridgeAddress = bridgeAddress_;\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\n bridgeAddress = bridgeAddress_;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sender == bridgeAddress) {\n // user transfer tokens to ambrosus => need to mint it\n _mint(recipient, amount);\n } else if (recipient == bridgeAddress) {\n // user withdraw tokens from ambrosus => need to burn it\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" }, + "contracts/tokens/BridgeERC20_Fix.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./BridgeERC20.sol\";\n\ncontract BridgeERC20_Fix is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_,\n address[] memory oldAddresses, uint[] memory oldBalances\n )\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress_) {\n for (uint i = 0; i < oldAddresses.length; i++)\n _mint(oldAddresses[i], oldBalances[i]);\n }\n}\n" + }, "contracts/contracts_for_tests/BridgeERC20Test.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n}\n" }, diff --git a/contracts/deployments/test/amb/solcInputs/b172f70b177dc34899af81f78eb14450.json b/contracts/deployments/test/amb/solcInputs/b172f70b177dc34899af81f78eb14450.json deleted file mode 100644 index c3872636..00000000 --- a/contracts/deployments/test/amb/solcInputs/b172f70b177dc34899af81f78eb14450.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/checks/CheckAura.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckAura is Initializable {\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n bytes1 constant STEP_PREFIX = 0x84;\n bytes2 constant SIGNATURE_PREFIX = 0xB841;\n\n address[] public validatorSet;\n address validatorSetAddress;\n bytes32 public lastProcessedBlock; // actually latest processed block in which *vs change event* emitted\n uint public minSafetyBlocksValidators;\n\n\n struct BlockAura {\n bytes3 p0Seal;\n bytes3 p0Bare;\n\n bytes32 parentHash;\n bytes p2;\n bytes32 receiptHash;\n bytes p3;\n\n bytes4 step;\n bytes signature; // todo maybe pass s r v values?\n\n uint64 finalizedVs;\n }\n\n\n struct ValidatorSetChange {\n address deltaAddress;\n uint16 deltaIndex; // add if 0, else remove\n }\n\n struct ValidatorSetProof {\n bytes[] receiptProof;\n ValidatorSetChange[] changes;\n uint64 eventBlock;\n }\n\n struct AuraProof {\n BlockAura[] blocks;\n CommonStructs.TransferProof transfer;\n ValidatorSetProof[] vsChanges;\n uint64 transferEventBlock;\n }\n\n\n function __CheckAura_init(\n address[] calldata initialValidators_,\n address validatorSetAddress_,\n bytes32 lastProcessedBlock_,\n uint minSafetyBlocksValidators_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n validatorSet = initialValidators_;\n validatorSetAddress = validatorSetAddress_;\n lastProcessedBlock = lastProcessedBlock_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n\n\n /*\n AuraProof.blocks contains:\n - blocks for validate validatorSet change event, in that order:\n - block with `InitiateChange` events (contains list of all validators)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize; have `finalizedVs` != 0\n * repeated for each vs change event; all events must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n AuraProof.vsChanges contains changes in validator set and receiptProof for validation.\n block.finalizedVs-1 is index in AuraProof.vsChanges array\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between vsChange events\n If there are no errors, the transfer is considered valid\n */\n function checkAura_(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n\n bytes32 parentHash;\n bytes32 receiptHash;\n\n // auraProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (auraProof.transfer.eventId != 0) {\n receiptHash = calcTransferReceiptsHash(auraProof.transfer, sideBridgeAddress);\n require(auraProof.blocks[auraProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(auraProof.blocks.length - auraProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < auraProof.blocks.length; i++) {\n BlockAura calldata block_ = auraProof.blocks[i];\n\n // check that parentHash is correct\n if (block_.parentHash != parentHash) {\n // we can ignore wrong parentHash if:\n // - it's NOT safety blocks for transfer event\n // - it's first block (don't know parentHash)\n // - it's finalizing block (there is gap BEFORE finalizing block)\n // - it's next block after finalizing (there is gap AFTER finalizing block)\n // else, raise error\n\n if (i > auraProof.transferEventBlock || // safety blocks for transfer event\n (i != 0 && // not first block\n block_.finalizedVs == 0 && // not finalizing block\n auraProof.blocks[i-1].finalizedVs == 0) // not next block after finalizing\n )\n revert(\"Wrong parent hash\");\n }\n\n // check validator for this block\n // calc block hash for this block\n parentHash = checkBlock(block_);\n\n // if this block is finalizing block\n // 0 means no events should be finalized, so indexes are shifted by 1\n if (block_.finalizedVs != 0) {\n // vs changes in that block\n ValidatorSetProof calldata vsProof = auraProof.vsChanges[block_.finalizedVs - 1];\n\n // apply vs changes\n for (uint k = 0; k < vsProof.changes.length; k++)\n applyVsChange(vsProof.changes[k]);\n\n // check proof\n receiptHash = calcValidatorSetReceiptHash(vsProof.receiptProof, validatorSetAddress, validatorSet);\n require(auraProof.blocks[vsProof.eventBlock].receiptHash == receiptHash, \"Wrong VS receipt hash\");\n require(i - vsProof.eventBlock >= minSafetyBlocksValidators, \"Few safety blocks validators\");\n }\n\n }\n\n // save block.parentHash in which latest processed vsChange event emitted\n if (auraProof.vsChanges.length > 0) {\n lastProcessedBlock = auraProof.blocks[auraProof.vsChanges[auraProof.vsChanges.length - 1].eventBlock].parentHash;\n }\n }\n\n function getValidatorSet() public view returns (address[] memory) {\n return validatorSet;\n }\n\n function applyVsChange(ValidatorSetChange calldata vsEvent) internal {\n if (vsEvent.deltaIndex == 0) {// add validator\n validatorSet.push(vsEvent.deltaAddress);\n } else {// delete validator\n uint index = uint(vsEvent.deltaIndex - 1);\n validatorSet[index] = validatorSet[validatorSet.length - 1];\n validatorSet.pop();\n }\n }\n\n function checkBlock(BlockAura calldata block_) internal view returns (bytes32) {\n (bytes32 bareHash, bytes32 sealHash) = calcBlockHash(block_);\n\n address validator = validatorSet[bytesToUint(block_.step) % validatorSet.length];\n require(ecdsaRecover(bareHash, block_.signature) == validator, \"Failed to verify sign\");\n\n return sealHash;\n }\n\n function calcBlockHash(BlockAura calldata block_) internal pure returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p2, block_.receiptHash, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Bare, commonRlp)),\n // hash with seal, for prevHash check\n keccak256(abi.encodePacked(block_.p0Seal, commonRlp, STEP_PREFIX, block_.step, SIGNATURE_PREFIX, block_.signature))\n );\n }\n\n\n function calcValidatorSetReceiptHash(bytes[] calldata receiptProof, address validatorSetAddress_, address[] storage vSet) private pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n receiptProof[0],\n validatorSetAddress_,\n receiptProof[1],\n abi.encode(vSet),\n receiptProof[2]\n ));\n return calcReceiptsHash(receiptProof, el, 3);\n }\n\n function bytesToUint(bytes4 b) internal pure returns (uint){\n return uint(uint32(b));\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckReceiptsProof.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\n// check readme for focs\nfunction calcReceiptsHash(bytes[] calldata proof, bytes32 el, uint proofStart) pure returns (bytes32) {\n bytes memory s;\n\n for (uint i = proofStart; i < proof.length; i += 2) {\n s = abi.encodePacked(proof[i], el, proof[i + 1]);\n el = (s.length > 32) ? keccak256(s) : bytes32(s);\n }\n\n return el;\n}\n\n\nfunction calcTransferReceiptsHash(CommonStructs.TransferProof calldata p, address eventContractAddress) pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n p.receiptProof[0],\n eventContractAddress,\n p.receiptProof[1],\n toBinary(p.eventId),\n p.receiptProof[2],\n abi.encode(p.transfers),\n p.receiptProof[3]\n ));\n return calcReceiptsHash(p.receiptProof, el, 4);\n // start from proof[4]\n}\n\n\nfunction toBinary(uint _x) pure returns (bytes memory) {\n bytes memory b = new bytes(32);\n assembly {\n mstore(add(b, 32), _x)\n }\n uint i;\n for (i = 0; i < 32; i++) {\n if (b[i] != 0) {\n break;\n }\n }\n bytes memory res = new bytes(32 - i);\n for (uint j = 0; j < res.length; j++) {\n res[j] = b[i++];\n }\n return res;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" - }, - "contracts/checks/SignatureCheck.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" - }, - "contracts/common/CommonStructs.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address relayAddress;\n address[] watchdogsAddresses; address feeProviderAddress;\n address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" - }, - "contracts/networks/_AuraReceiver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract _AuraReceiver is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n}\n" - }, - "contracts/common/CommonBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // DEFAULT_ADMIN_ROLE can grants and revokes all roles below; Set to multisig (proxy contract address)\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\"); // can submit transfers\n bytes32 public constant WATCHDOG_ROLE = keccak256(\"WATCHDOG_ROLE\"); // can pause contract\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\"FEE_PROVIDER_ROLE\"); // fee signatures must be signed by this role\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable public transferFeeRecipient;\n address payable public bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, address(this));\n _setupRole(ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRoles(WATCHDOG_ROLE, args.watchdogsAddresses);\n _setupRole(FEE_PROVIDER_ROLE, args.feeProviderAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId **and all after it**\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n require(eventId <= inputEventId, \"eventId must be <= inputEventId\");\n\n // now waiting for submitting a new transfer with `eventId` id\n inputEventId = eventId - 1;\n\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n\n }\n\n // pretend like bridge already receive and process all transfers up to `eventId` id\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\n }\n\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(WATCHDOG_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // roles\n\n function grantRoles(bytes32 role, address[] calldata accounts) public onlyRole(getRoleAdmin(role)) {\n // check permission to grant role via onlyRole(getRoleAdmin(role))\n _setupRoles(role, accounts);\n }\n function revokeRoles(bytes32 role, address[] calldata accounts) public {\n // revokeRole will check for permissions\n for (uint i = 0; i < accounts.length; i++)\n revokeRole(role, accounts[i]);\n }\n function _setupRoles(bytes32 role, address[] calldata accounts) internal {\n // no permissions check at all\n for (uint i = 0; i < accounts.length; i++)\n _setupRole(role, accounts[i]);\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(FEE_PROVIDER_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" - }, - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\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, _msgSender());\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(IAccessControlUpgradeable).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" - }, - "contracts/tokens/IWrapper.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 IERC165Upgradeable {\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" - }, - "contracts/networks/ETH_EthBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract ETH_EthBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address oldDefaultAdmin\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n}\n" - }, - "contracts/checks/CheckUntrustless2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\ncontract CheckUntrustless2 {\n // this contract do nothing, but i think it's required to inheritance from it\n // todo check this\n uint256[15] private ___gap;\n}\n" - }, - "contracts/networks/ETH_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract ETH_AmbBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address mpcRelay,\n address oldDefaultAdmin,\n address oldRelay\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n\n // revoke RELAY_ROLE from old relay\n revokeRole(RELAY_ROLE, oldRelay);\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n _setupRole(RELAY_ROLE, mpcRelay);\n\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n\n}\n" - }, - "contracts/networks/BSC_BscBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract BSC_BscBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address oldDefaultAdmin\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n}\n" - }, - "contracts/networks/BSC_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract BSC_AmbBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address mpcRelay,\n address oldDefaultAdmin,\n address oldRelay\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n\n // revoke RELAY_ROLE from old relay\n revokeRole(RELAY_ROLE, oldRelay);\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n _setupRole(RELAY_ROLE, mpcRelay);\n\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n\n}\n" - }, - "contracts/checks/CheckUntrustless.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckUntrustless {\n uint public confirmationsThreshold;\n\n // [hash of (eventId, transfers)] => [relayAddress] => isConfirmed\n mapping(bytes32 => mapping(address => bool)) public confirmations;\n\n // using this instead of RELAY_ROLE coz it simpler\n address[] public relays;\n\n event RelayAdd(address indexed relay);\n event RelayRemove(address indexed relay);\n event ThresholdChange(uint newThreshold);\n event RelayConfirmation(address indexed sender, uint indexed eventId, bytes32 hash);\n\n // return true if current call reach confirmationsThreshold\n function checkUntrustless_(uint eventId, CommonStructs.Transfer[] calldata transfers) internal returns (bool) {\n require(isRelay(msg.sender), \"You not in relay whitelist\");\n\n bytes32 hash = transfersHash(eventId, transfers);\n require(confirmations[hash][msg.sender] == false, \"You have already confirmed this\");\n\n uint confirmCount = confirmedCount(hash);\n require(confirmCount < confirmationsThreshold, \"Already confirmed\");\n\n confirmations[hash][msg.sender] = true;\n emit RelayConfirmation(msg.sender, eventId, hash);\n\n // +1 coz current relay confirmed just now\n return confirmCount + 1 >= confirmationsThreshold;\n }\n\n\n function isConfirmedByRelay(address relay, uint eventId, CommonStructs.Transfer[] calldata transfers) public view returns (bool) {\n bytes32 hash = transfersHash(eventId, transfers);\n return confirmations[hash][relay];\n }\n\n\n function confirmedCount(bytes32 hash) public view returns (uint) {\n uint res;\n for (uint i = 0; i < relays.length; i++)\n if (confirmations[hash][relays[i]])\n res++;\n return res;\n }\n\n\n function isRelay(address relay) public view returns (bool){\n for (uint i = 0; i < relays.length; i++)\n if (relays[i] == relay)\n return true;\n return false;\n }\n\n function getRelays() public view returns (address[] memory) {\n return relays;\n }\n\n function transfersHash(uint eventId, CommonStructs.Transfer[] calldata transfers) public pure returns (bytes32) {\n bytes memory payload = abi.encodePacked(eventId);\n\n // i guess we can hash transfers only in this way\n for (uint i = 0; i < transfers.length; i++)\n payload = abi.encodePacked(payload, transfers[i].amount, transfers[i].toAddress, transfers[i].tokenAddress);\n\n return keccak256(payload);\n }\n\n\n function _setRelaysAndConfirmations(address[] memory toRemove, address[] memory toAdd, uint _confirmations) internal {\n for (uint i = 0; i < toRemove.length; i++)\n _removeRelay(toRemove[i]);\n for (uint i = 0; i < toAdd.length; i++)\n _addRelay(toAdd[i]);\n\n if (confirmationsThreshold != _confirmations) {\n confirmationsThreshold = _confirmations;\n emit ThresholdChange(_confirmations);\n }\n }\n\n function _removeRelay(address relay) internal {\n for (uint i = 0; i < relays.length; i++) {\n if (relays[i] == relay) {\n relays[i] = relays[relays.length - 1];\n relays.pop();\n emit RelayRemove(relay);\n return;\n }\n }\n revert(\"Not a relay\");\n }\n\n function _addRelay(address relay) internal {\n require(!isRelay(relay), \"Already relay\");\n relays.push(relay);\n emit RelayAdd(relay);\n }\n\n uint256[15] private ___gap;\n\n}\n" - }, - "contracts/contracts_for_tests/CheckUntrustlessTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckUntrustless.sol\";\n\ncontract CheckUntrustlessTest is CheckUntrustless {\n constructor() {}\n\n event checkUntrustlessTestResult(bool result);\n\n function checkUntrustlessTest(uint eventId, CommonStructs.Transfer[] calldata transfers) public {\n emit checkUntrustlessTestResult(checkUntrustless_(eventId, transfers));\n }\n\n function setRelaysAndConfirmationsTest(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n}\n" - }, - "contracts/checks/CheckPoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"./CheckPoW_Ethash.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckPoW is Initializable, Ethash {\n struct BlockPoW {\n bytes3 p0WithNonce;\n bytes3 p0WithoutNonce;\n\n bytes p1;\n bytes32 parentOrReceiptHash;\n bytes p2;\n bytes difficulty;\n bytes p3;\n bytes number;\n bytes p4; // end when extra end\n bytes p5; // after extra\n bytes nonce;\n bytes p6;\n\n uint[] dataSetLookup;\n uint[] witnessForLookup;\n }\n\n struct PoWProof {\n BlockPoW[] blocks;\n CommonStructs.TransferProof transfer;\n }\n\n uint256 minimumDifficulty;\n\n function __CheckPoW_init(\n uint256 minimumDifficulty_\n ) internal initializer {\n minimumDifficulty = minimumDifficulty_;\n }\n\n /*\n PoWProof.blocks contains:\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, checking it pow hash.\n Each block parentHash must be equal to the hash of the previous block.\n If there are no errors, the transfer is considered valid\n */\n function checkPoW_(PoWProof calldata powProof, address sideBridgeAddress) internal view\n {\n bytes32 hash = calcTransferReceiptsHash(powProof.transfer, sideBridgeAddress);\n for (uint i = 0; i < powProof.blocks.length; i++) {\n require(powProof.blocks[i].parentOrReceiptHash == hash, \"parentHash or receiptHash wrong\");\n hash = blockHash(powProof.blocks[i]);\n\n verifyEthash(powProof.blocks[i]);\n }\n }\n\n\n function verifyEthash(BlockPoW calldata block_) internal view {\n uint difficulty = bytesToUint(block_.difficulty);\n require(difficulty >= minimumDifficulty, \"difficulty too low\");\n verifyPoW(\n bytesToUint(block_.number),\n blockHashWithoutNonce(block_),\n bytesToUint(block_.nonce),\n difficulty,\n block_.dataSetLookup,\n block_.witnessForLookup\n );\n }\n\n function blockHash(BlockPoW calldata block_) internal pure returns (bytes32) {\n // Note: too much arguments in abi.encodePacked() function cause CompilerError: Stack too deep...\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2,\n block_.difficulty,\n block_.p3\n ),\n abi.encodePacked(\n block_.number,\n block_.p4,\n block_.p5,\n block_.nonce,\n block_.p6\n )\n ));\n }\n\n function blockHashWithoutNonce(BlockPoW calldata block_) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithoutNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2\n ),\n abi.encodePacked(\n block_.difficulty,\n block_.p3,\n block_.number,\n block_.p4,\n block_.p6\n )\n ));\n }\n\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckPoW_Ethash.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n/// @dev These contracts are used to verify Proof of Work within a smart contract.\n/// The algorithms have been extracted from the implementation of smart pool (https://github.com/smartpool)\ncontract SHA3_512 {\n constructor() {}\n\n function keccak_f(uint[25] memory A) pure private returns (uint[25] memory) {\n uint[25] memory B;\n uint[5] memory C;\n uint[5] memory D;\n\n uint[24] memory RC = [\n uint(0x0000000000000001),\n 0x0000000000008082,\n 0x800000000000808A,\n 0x8000000080008000,\n 0x000000000000808B,\n 0x0000000080000001,\n 0x8000000080008081,\n 0x8000000000008009,\n 0x000000000000008A,\n 0x0000000000000088,\n 0x0000000080008009,\n 0x000000008000000A,\n 0x000000008000808B,\n 0x800000000000008B,\n 0x8000000000008089,\n 0x8000000000008003,\n 0x8000000000008002,\n 0x8000000000000080,\n 0x000000000000800A,\n 0x800000008000000A,\n 0x8000000080008081,\n 0x8000000000008080,\n 0x0000000080000001,\n 0x8000000080008008];\n\n for (uint i = 0; i < 24; i++) {\n\n C[0] = A[0] ^ A[1] ^ A[2] ^ A[3] ^ A[4];\n C[1] = A[5] ^ A[6] ^ A[7] ^ A[8] ^ A[9];\n C[2] = A[10] ^ A[11] ^ A[12] ^ A[13] ^ A[14];\n C[3] = A[15] ^ A[16] ^ A[17] ^ A[18] ^ A[19];\n C[4] = A[20] ^ A[21] ^ A[22] ^ A[23] ^ A[24];\n\n D[0] = C[4] ^ ((C[1] * 2) & 0xffffffffffffffff | (C[1] / (2 ** 63)));\n D[1] = C[0] ^ ((C[2] * 2) & 0xffffffffffffffff | (C[2] / (2 ** 63)));\n D[2] = C[1] ^ ((C[3] * 2) & 0xffffffffffffffff | (C[3] / (2 ** 63)));\n D[3] = C[2] ^ ((C[4] * 2) & 0xffffffffffffffff | (C[4] / (2 ** 63)));\n D[4] = C[3] ^ ((C[0] * 2) & 0xffffffffffffffff | (C[0] / (2 ** 63)));\n\n A[0] = A[0] ^ D[0];\n A[1] = A[1] ^ D[0];\n A[2] = A[2] ^ D[0];\n A[3] = A[3] ^ D[0];\n A[4] = A[4] ^ D[0];\n A[5] = A[5] ^ D[1];\n A[6] = A[6] ^ D[1];\n A[7] = A[7] ^ D[1];\n A[8] = A[8] ^ D[1];\n A[9] = A[9] ^ D[1];\n A[10] = A[10] ^ D[2];\n A[11] = A[11] ^ D[2];\n A[12] = A[12] ^ D[2];\n A[13] = A[13] ^ D[2];\n A[14] = A[14] ^ D[2];\n A[15] = A[15] ^ D[3];\n A[16] = A[16] ^ D[3];\n A[17] = A[17] ^ D[3];\n A[18] = A[18] ^ D[3];\n A[19] = A[19] ^ D[3];\n A[20] = A[20] ^ D[4];\n A[21] = A[21] ^ D[4];\n A[22] = A[22] ^ D[4];\n A[23] = A[23] ^ D[4];\n A[24] = A[24] ^ D[4];\n\n /*Rho and pi steps*/\n B[0] = A[0];\n B[8] = ((A[1] * (2 ** 36)) & 0xffffffffffffffff | (A[1] / (2 ** 28)));\n B[11] = ((A[2] * (2 ** 3)) & 0xffffffffffffffff | (A[2] / (2 ** 61)));\n B[19] = ((A[3] * (2 ** 41)) & 0xffffffffffffffff | (A[3] / (2 ** 23)));\n B[22] = ((A[4] * (2 ** 18)) & 0xffffffffffffffff | (A[4] / (2 ** 46)));\n B[2] = ((A[5] * (2 ** 1)) & 0xffffffffffffffff | (A[5] / (2 ** 63)));\n B[5] = ((A[6] * (2 ** 44)) & 0xffffffffffffffff | (A[6] / (2 ** 20)));\n B[13] = ((A[7] * (2 ** 10)) & 0xffffffffffffffff | (A[7] / (2 ** 54)));\n B[16] = ((A[8] * (2 ** 45)) & 0xffffffffffffffff | (A[8] / (2 ** 19)));\n B[24] = ((A[9] * (2 ** 2)) & 0xffffffffffffffff | (A[9] / (2 ** 62)));\n B[4] = ((A[10] * (2 ** 62)) & 0xffffffffffffffff | (A[10] / (2 ** 2)));\n B[7] = ((A[11] * (2 ** 6)) & 0xffffffffffffffff | (A[11] / (2 ** 58)));\n B[10] = ((A[12] * (2 ** 43)) & 0xffffffffffffffff | (A[12] / (2 ** 21)));\n B[18] = ((A[13] * (2 ** 15)) & 0xffffffffffffffff | (A[13] / (2 ** 49)));\n B[21] = ((A[14] * (2 ** 61)) & 0xffffffffffffffff | (A[14] / (2 ** 3)));\n B[1] = ((A[15] * (2 ** 28)) & 0xffffffffffffffff | (A[15] / (2 ** 36)));\n B[9] = ((A[16] * (2 ** 55)) & 0xffffffffffffffff | (A[16] / (2 ** 9)));\n B[12] = ((A[17] * (2 ** 25)) & 0xffffffffffffffff | (A[17] / (2 ** 39)));\n B[15] = ((A[18] * (2 ** 21)) & 0xffffffffffffffff | (A[18] / (2 ** 43)));\n B[23] = ((A[19] * (2 ** 56)) & 0xffffffffffffffff | (A[19] / (2 ** 8)));\n B[3] = ((A[20] * (2 ** 27)) & 0xffffffffffffffff | (A[20] / (2 ** 37)));\n B[6] = ((A[21] * (2 ** 20)) & 0xffffffffffffffff | (A[21] / (2 ** 44)));\n B[14] = ((A[22] * (2 ** 39)) & 0xffffffffffffffff | (A[22] / (2 ** 25)));\n B[17] = ((A[23] * (2 ** 8)) & 0xffffffffffffffff | (A[23] / (2 ** 56)));\n B[20] = ((A[24] * (2 ** 14)) & 0xffffffffffffffff | (A[24] / (2 ** 50)));\n\n /*Xi state*/\n A[0] = B[0] ^ ((~B[5]) & B[10]);\n A[1] = B[1] ^ ((~B[6]) & B[11]);\n A[2] = B[2] ^ ((~B[7]) & B[12]);\n A[3] = B[3] ^ ((~B[8]) & B[13]);\n A[4] = B[4] ^ ((~B[9]) & B[14]);\n A[5] = B[5] ^ ((~B[10]) & B[15]);\n A[6] = B[6] ^ ((~B[11]) & B[16]);\n A[7] = B[7] ^ ((~B[12]) & B[17]);\n A[8] = B[8] ^ ((~B[13]) & B[18]);\n A[9] = B[9] ^ ((~B[14]) & B[19]);\n A[10] = B[10] ^ ((~B[15]) & B[20]);\n A[11] = B[11] ^ ((~B[16]) & B[21]);\n A[12] = B[12] ^ ((~B[17]) & B[22]);\n A[13] = B[13] ^ ((~B[18]) & B[23]);\n A[14] = B[14] ^ ((~B[19]) & B[24]);\n A[15] = B[15] ^ ((~B[20]) & B[0]);\n A[16] = B[16] ^ ((~B[21]) & B[1]);\n A[17] = B[17] ^ ((~B[22]) & B[2]);\n A[18] = B[18] ^ ((~B[23]) & B[3]);\n A[19] = B[19] ^ ((~B[24]) & B[4]);\n A[20] = B[20] ^ ((~B[0]) & B[5]);\n A[21] = B[21] ^ ((~B[1]) & B[6]);\n A[22] = B[22] ^ ((~B[2]) & B[7]);\n A[23] = B[23] ^ ((~B[3]) & B[8]);\n A[24] = B[24] ^ ((~B[4]) & B[9]);\n\n /*Last step*/\n A[0] = A[0] ^ RC[i];\n }\n\n return A;\n }\n\n\n function sponge(uint[9] memory M) pure internal returns (uint[16] memory) {\n require((M.length * 8) == 72, \"sponge error\");\n\n M[5] = 0x01;\n M[8] = 0x8000000000000000;\n\n uint r = 72;\n uint w = 8;\n uint size = M.length * 8;\n\n uint[25] memory S;\n uint i;\n uint y;\n uint x;\n /*Absorbing Phase*/\n for (i = 0; i < size / r; i++) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w)) {\n S[5 * x + y] = S[5 * x + y] ^ M[i * 9 + x + 5 * y];\n }\n }\n }\n S = keccak_f(S);\n }\n\n /*Squeezing phase*/\n uint[16] memory result;\n uint b = 0;\n while (b < 16) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w) && (b < 16)) {\n result[b] = S[5 * x + y] & 0xFFFFFFFF;\n result[b + 1] = S[5 * x + y] / 0x100000000;\n b += 2;\n }\n }\n }\n }\n\n return result;\n }\n\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\ncontract Ethash is SHA3_512 {\n\n uint constant EPOCH_LENGTH = 30000; // blocks per epoch\n\n constructor() {\n }\n\n struct EthashCacheOptData {\n uint[512] merkleNodes;\n uint fullSizeIn128Resultion;\n uint branchDepth;\n }\n\n mapping(uint => EthashCacheOptData) epochData;\n\n\n function verifyPoW(uint blockNumber, bytes32 rlpHeaderHashWithoutNonce, uint nonce, uint difficulty,\n uint[] memory dataSetLookup, uint[] memory witnessForLookup) internal view {\n\n uint epoch = blockNumber / EPOCH_LENGTH;\n uint ethash = hashimoto(rlpHeaderHashWithoutNonce, nonce, dataSetLookup, witnessForLookup, epoch);\n\n require(ethash <= (2 ** 256 - 1) / difficulty, \"Ethash difficulty too low\");\n }\n\n function isEpochDataSet(uint epochIndex) public view returns (bool) {\n return epochData[epochIndex].fullSizeIn128Resultion != 0;\n }\n\n function setEpochData(\n uint epochNum,\n uint fullSizeIn128Resultion,\n uint branchDepth,\n uint[] calldata merkleNodes\n ) public {\n\n // we store only previous and current epochs\n // so, delete second from the end epoch\n if (epochNum >= 2) // underflow check\n delete epochData[epochNum - 2];\n\n\n uint l = merkleNodes.length;\n uint[512] storage nodes = epochData[epochNum].merkleNodes;\n\n for (uint i = 0; i < l; i++) {\n nodes[i] = merkleNodes[i];\n }\n\n epochData[epochNum].fullSizeIn128Resultion = fullSizeIn128Resultion;\n epochData[epochNum].branchDepth = branchDepth;\n }\n\n\n function hashimoto(bytes32 header,\n uint nonceLe,\n uint[] memory dataSetLookup,\n uint[] memory witnessForLookup,\n uint epochIndex) private view returns (uint) {\n\n uint[16] memory s = computeS(uint(header), nonceLe);\n uint[32] memory mix;\n uint[8] memory cmix;\n\n\n uint depth = epochData[epochIndex].branchDepth;\n uint fullSize = epochData[epochIndex].fullSizeIn128Resultion;\n\n uint i;\n uint j;\n\n require(fullSize != 0, \"EpochData not set\");\n\n\n for (i = 0; i < 16; i++) {\n assembly {\n let offset := mul(i, 0x20)\n\n //mix[i] = s[i];\n mstore(add(mix, offset), mload(add(s, offset)))\n\n // mix[i+16] = s[i];\n mstore(add(mix, add(0x200, offset)), mload(add(s, offset)))\n }\n }\n\n for (i = 0; i < 64; i++) {\n uint p = fnv(i ^ s[0], mix[i % 32]) % fullSize;\n\n // console.log(computeCacheRoot( p, i, dataSetLookup, witnessForLookup, depthAndFullSize[0]));\n // console.log(getMerkleLeave( epochIndex, p ));\n\n if (computeCacheRoot(p, i, dataSetLookup, witnessForLookup, depth) != getMerkleLeave(epochIndex, p)) {\n // PoW failed\n revert(\"PoW failed\");\n }\n\n for (j = 0; j < 8; j++) {\n\n assembly{\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & varFFFFFFFF );\n let dataOffset := add(mul(0x80, i), add(dataSetLookup, 0x20))\n let dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n let mixOffset := add(mix, mul(0x20, j))\n let mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n let fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n }\n\n\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & 0xFFFFFFFF );\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n\n\n //dataSetLookup[4*i ] = dataSetLookup[4*i ]/(2**32);\n //dataSetLookup[4*i + 1] = dataSetLookup[4*i + 1]/(2**32);\n //dataSetLookup[4*i + 2] = dataSetLookup[4*i + 2]/(2**32);\n //dataSetLookup[4*i + 3] = dataSetLookup[4*i + 3]/(2**32);\n\n assembly{\n let offset := add(add(dataSetLookup, 0x20), mul(i, 0x80))\n let value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n }\n }\n }\n\n\n for (i = 0; i < 32; i += 4) {\n cmix[i / 4] = (fnv(fnv(fnv(mix[i], mix[i + 1]), mix[i + 2]), mix[i + 3]));\n }\n\n return computeSha3(s, cmix);\n\n }\n\n\n function fnv(uint v1, uint v2) pure internal returns (uint) {\n return ((v1 * 0x01000193) ^ v2) & 0xFFFFFFFF;\n }\n\n function computeCacheRoot(uint index,\n uint indexInElementsArray,\n uint[] memory elements,\n uint[] memory witness,\n uint branchSize) pure private returns (uint) {\n\n uint leaf = computeLeaf(elements, indexInElementsArray) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n\n uint left;\n uint right;\n uint node;\n bool oddBranchSize = (branchSize % 2) > 0;\n\n assembly {\n branchSize := div(branchSize, 2)\n //branchSize /= 2;\n }\n uint witnessIndex = indexInElementsArray * branchSize;\n if (oddBranchSize) witnessIndex += indexInElementsArray;\n\n uint depth;\n for (depth = 0; depth < branchSize; depth++) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n\n //node = witness[witnessIndex + depth] / (2**128);\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := div(node, 0x100000000000000000000000000000000)\n }\n }\n else {\n assembly {\n left := div(node, 0x100000000000000000000000000000000)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n }\n\n if (oddBranchSize) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n }\n\n\n return leaf;\n }\n\n\n function computeSha3(uint[16] memory s, uint[8] memory cmix) pure internal returns (uint) {\n uint s0 = s[0] + s[1] * (2 ** 32) + s[2] * (2 ** 64) + s[3] * (2 ** 96) +\n (s[4] + s[5] * (2 ** 32) + s[6] * (2 ** 64) + s[7] * (2 ** 96)) * (2 ** 128);\n\n uint s1 = s[8] + s[9] * (2 ** 32) + s[10] * (2 ** 64) + s[11] * (2 ** 96) +\n (s[12] + s[13] * (2 ** 32) + s[14] * (2 ** 64) + s[15] * (2 ** 96)) * (2 ** 128);\n\n uint c = cmix[0] + cmix[1] * (2 ** 32) + cmix[2] * (2 ** 64) + cmix[3] * (2 ** 96) +\n (cmix[4] + cmix[5] * (2 ** 32) + cmix[6] * (2 ** 64) + cmix[7] * (2 ** 96)) * (2 ** 128);\n\n\n /* god knows why need to convert to big endian */\n return uint(keccak256(abi.encodePacked(reverseBytes(s0), reverseBytes(s1), reverseBytes(c))));\n }\n\n\n function computeLeaf(uint[] memory dataSetLookup, uint index) pure internal returns (uint) {\n return uint(keccak256(abi.encodePacked(\n dataSetLookup[4 * index],\n dataSetLookup[4 * index + 1],\n dataSetLookup[4 * index + 2],\n dataSetLookup[4 * index + 3]\n )));\n\n }\n\n function computeS(uint header, uint nonceLe) pure internal returns (uint[16] memory) {\n uint[9] memory M;\n\n header = reverseBytes(header);\n\n M[0] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[1] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[2] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[3] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n\n // make little endian nonce\n M[4] = nonceLe;\n return sponge(M);\n }\n\n function reverseBytes(uint input) pure internal returns (uint) {\n uint result;\n for (uint i = 0; i < 32; i++) {\n result = (result << 8) + (input & 0xff);\n input = input >> 8;\n }\n return result;\n }\n\n\n function getMerkleLeave(uint epochIndex, uint p) view internal returns (uint) {\n uint rootIndex = uint(p >> epochData[epochIndex].branchDepth);\n uint expectedRoot = epochData[epochIndex].merkleNodes[(rootIndex >> 1)];\n\n if ((rootIndex % 2) == 0)\n return expectedRoot & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n return expectedRoot >> 128;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoWTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoW.sol\";\n\ncontract CheckPoWTest is CheckPoW {\n\n constructor(\n uint minimumDifficulty_\n ) {\n minimumDifficulty = minimumDifficulty_;\n }\n\n function checkPoWTest(PoWProof calldata powProof, address sideBridgeAddress) public {\n checkPoW_(powProof, sideBridgeAddress);\n }\n\n function verifyEthashTest(BlockPoW calldata block_) public view {\n verifyEthash(block_);\n }\n\n function blockHashTest(BlockPoW calldata block_) public pure returns (bytes32) {\n return blockHash(block_);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CommonBridgeTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckReceiptsProof.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // deployer now can grant roles\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n checkEventId(eventId); // now its more like submitTransferTest\n lockTransfers(events, eventId);\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n // checkReceiptsProof\n\n function calcTransferReceiptsHashTest(CommonStructs.TransferProof calldata p, address eventContractAddress) public pure returns (bytes32) {\n return calcTransferReceiptsHash(p, eventContractAddress);\n }\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" - }, - "contracts/checks/CheckPoSA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckPoSA is Initializable {\n uint256 private constant ADDRESS_LENGTH = 20;\n uint256 private constant EXTRA_VANITY_LENGTH = 32;\n uint256 private constant EXTRA_SEAL_LENGTH = 65;\n uint256 private constant EPOCH_LENGTH = 200;\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n\n mapping(uint => mapping(address => bool)) internal allValidators;\n uint public currentEpoch;\n uint currentValidatorSetSize;\n\n bytes1 chainId;\n\n\n struct BlockPoSA {\n bytes3 p0Signed;\n bytes3 p0Unsigned;\n\n bytes32 parentHash;\n bytes p1;\n bytes32 receiptHash;\n bytes p2;\n bytes number;\n bytes p3;\n\n bytes p4Signed;\n bytes p4Unsigned;\n bytes extraData;\n\n bytes p5;\n }\n\n struct PoSAProof {\n BlockPoSA[] blocks;\n CommonStructs.TransferProof transfer;\n uint64 transferEventBlock;\n }\n\n\n function __CheckPoSA_init(\n address[] calldata initialValidators_,\n uint initialEpoch_,\n bytes1 chainId_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n chainId = chainId_;\n currentEpoch = initialEpoch_;\n currentValidatorSetSize = initialValidators_.length;\n\n for (uint i = 0; i < initialValidators_.length; i++) {\n allValidators[currentEpoch][initialValidators_[i]] = true;\n }\n }\n\n /*\n PoSAProof.blocks contains:\n - blocks for validate validatorSet changes, in that order:\n - first block in epoch (blockNum % 200 == 0)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize\n * repeated for each new epoch, all epochs must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between epochs\n If there are no errors, the transfer is considered valid\n */\n function checkPoSA_(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n bytes32 bareHash;\n bytes32 parentHash;\n uint finalizeVsBlock;\n uint nextVsSize;\n\n // posaProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (posaProof.transfer.eventId != 0) {\n bytes32 receiptHash = calcTransferReceiptsHash(posaProof.transfer, sideBridgeAddress);\n require(posaProof.blocks[posaProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(posaProof.blocks.length - posaProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < posaProof.blocks.length; i++) {\n BlockPoSA calldata block_ = posaProof.blocks[i];\n\n if (parentHash != bytes32(0))\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n\n (bareHash, parentHash) = calcBlockHash(block_);\n\n require(verifySignature(bareHash, getSignature(block_.extraData)), \"invalid signature\");\n\n // change validator set\n\n uint blockNumber = bytesToUint(block_.number);\n\n if (blockNumber % EPOCH_LENGTH == 0) {\n require(blockNumber / EPOCH_LENGTH == currentEpoch + 1, \"invalid epoch\");\n\n nextVsSize = newValidatorSet(block_.extraData);\n finalizeVsBlock = blockNumber + currentValidatorSetSize / 2;\n } else if (blockNumber == finalizeVsBlock) {\n currentEpoch++;\n currentValidatorSetSize = nextVsSize;\n\n // after finalizing vs change, next block in posaProof.blocks can have any parentHash (skipping some blocks)\n // but only if it's not the safety blocks for transfer event\n if (i < posaProof.transferEventBlock)\n parentHash = bytes32(0);\n }\n }\n }\n\n\n function calcBlockHash(BlockPoSA calldata block_) internal view returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p1, block_.receiptHash, block_.p2, block_.number, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Unsigned, chainId, commonRlp, block_.p4Unsigned, getExtraDataUnsigned(block_.extraData), block_.p5)),\n // hash with seal, for prev_hash check\n keccak256(abi.encodePacked(block_.p0Signed, commonRlp, block_.p4Signed, block_.extraData, block_.p5))\n );\n }\n\n function getSignature(bytes calldata extraData) private pure returns (bytes calldata) {\n uint start = extraData.length - EXTRA_SEAL_LENGTH;\n return extraData[start : start + EXTRA_SEAL_LENGTH];\n }\n\n function getExtraDataUnsigned(bytes calldata extraData) private pure returns (bytes memory) {\n return extraData[0 : extraData.length - EXTRA_SEAL_LENGTH];\n }\n\n function newValidatorSet(bytes calldata extraData) private returns (uint) {\n uint nextValidatorSet = currentEpoch + 1;\n uint endPos = extraData.length - EXTRA_SEAL_LENGTH;\n\n uint nextValidatorSetSize;\n for (uint pos = EXTRA_VANITY_LENGTH; pos < endPos; pos += ADDRESS_LENGTH) {\n address validator = address(bytes20(extraData[pos : pos + ADDRESS_LENGTH]));\n allValidators[nextValidatorSet][validator] = true;\n nextValidatorSetSize++;\n }\n\n return nextValidatorSetSize;\n }\n\n function verifySignature(bytes32 hash, bytes calldata signature) private view returns (bool) {\n address signer = ecdsaRecover(hash, signature);\n return allValidators[currentEpoch][signer];\n }\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n}\n" - }, - "contracts/contracts_for_tests/CheckPoSATest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract CheckPoSATest is CheckPoSA {\n constructor(\n bytes1 chainId_\n ) {\n chainId = chainId_;\n }\n\n function checkPoSATest(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress,\n address[] memory _initialValidators, uint _initialEpoch, bytes1 _chainId) public {\n // TODO: we can't use the `__CheckPoSA_init` twice, but copy-paste is also not good\n chainId = _chainId;\n currentEpoch = _initialEpoch;\n currentValidatorSetSize = _initialValidators.length;\n\n for (uint i = 0; i < _initialValidators.length; i++) {\n allValidators[currentEpoch][_initialValidators[i]] = true;\n }\n\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockPoSA calldata block_) public view returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockPoSA calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n}\n" - }, - "contracts/tokens/sAMB.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./IWrapper.sol\";\n\ncontract sAMB is IWrapper, ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\n\n function deposit() public override payable {\n _mint(msg.sender, msg.value);\n\n emit Deposit(msg.sender, msg.value);\n }\n\n function withdraw(uint amount) public override {\n _burn(msg.sender, amount);\n payable(msg.sender).transfer(amount);\n\n emit Withdrawal(msg.sender, amount);\n }\n\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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 * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, 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 * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), 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 * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\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 * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\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/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\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" - }, - "contracts/tokens/BridgeERC20_Amb_OLD.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\n\n// this contract is already deployed on mainnets as USDC and BUSD tokens, but\n// it has an unpleasant feature: allowance need to be set with ANOTHER token denomination\n// and user will see counterintuitive amount in increaseAllowance() function.\n// SO, FRONT SHOULD CHECK FOR USDC AND BUSD TOKENS AND USE THIS LEGACY LOGIC FOR THEM\ncontract BridgeERC20_Amb_OLD is ERC20, Ownable {\n\n // decimals of token in side network\n // example:\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\n mapping(address => uint8) public sideTokenDecimals;\n\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\n\n uint8 _decimals;\n\n constructor(\n string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n ) ERC20(name_, symbol_) Ownable() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n }\n\n // todo check if we need this func\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \"wrong array lengths\");\n for (uint i = 0; i < bridgeAddresses_.length; i++)\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n // todo events\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n // user transfer tokens to ambrosus => need to mint it\n\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n\n\n // bridge mint money to user; same amount locked on side bridge\n bridgeBalances[sender] += amount_this;\n\n _mint(recipient, amount_this);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n // user withdraw tokens from ambrosus => need to burn it\n\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n\n\n // user burn tokens; side bridge must have enough tokens to send\n require(bridgeBalances[recipient] >= amount_this, \"not enough locked tokens on bridge\");\n bridgeBalances[recipient] -= amount_this;\n\n _burn(sender, amount_this);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\n if (dTo == dFrom)\n return amount;\n if (dTo > dFrom)\n return amount * (10 ** (dTo - dFrom));\n else\n return amount / (10 ** (dFrom - dTo));\n }\n\n}\n" - }, - "@openzeppelin/contracts/access/Ownable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 _setOwner(_msgSender());\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 called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _setOwner(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 _setOwner(newOwner);\n }\n\n function _setOwner(address newOwner) private {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20 is ERC20, Ownable {\n address public bridgeAddress; // address of bridge contract on this network\n\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\n ERC20(name_, symbol_)\n Ownable() {\n bridgeAddress = bridgeAddress_;\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\n bridgeAddress = bridgeAddress_;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sender == bridgeAddress) {\n // user transfer tokens to ambrosus => need to mint it\n _mint(recipient, amount);\n } else if (recipient == bridgeAddress) {\n // user withdraw tokens from ambrosus => need to burn it\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20Test.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n}\n" - }, - "contracts/tokens/BridgeERC20_Amb.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20_Amb is ERC20, Ownable {\n\n // decimals of token in side network\n // example:\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\n mapping(address => uint8) public sideTokenDecimals;\n\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\n\n uint8 _decimals;\n\n constructor(\n string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n ) ERC20(name_, symbol_) Ownable() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n }\n\n // todo check if we need this func\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \"wrong array lengths\");\n for (uint i = 0; i < bridgeAddresses_.length; i++)\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\n }\n\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n // convert decimals just like in _transfer function\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n amount = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n amount = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n }\n\n uint256 currentAllowance = allowance(sender,_msgSender());\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n // user transfer tokens to ambrosus => need to mint it\n\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n\n\n // bridge mint money to user; same amount locked on side bridge\n bridgeBalances[sender] += amount_this;\n\n _mint(recipient, amount_this);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n // user withdraw tokens from ambrosus => need to burn it\n\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n\n\n // user burn tokens; side bridge must have enough tokens to send\n require(bridgeBalances[recipient] >= amount_this, \"not enough locked tokens on bridge\");\n bridgeBalances[recipient] -= amount_this;\n\n _burn(sender, amount_this);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\n if (dTo == dFrom)\n return amount;\n if (dTo > dFrom)\n return amount * (10 ** (dTo - dFrom));\n else\n return amount / (10 ** (dFrom - dTo));\n }\n\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20_AmbTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20_Amb.sol\";\n\ncontract BridgeERC20_AmbTest is BridgeERC20_Amb {\n constructor(string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n )\n BridgeERC20_Amb(name_, symbol_, decimals_, bridgeAddresses_, sideTokenDecimals_) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n function changeBridgeBalance(address bridge, uint balance) public {\n bridgeBalances[bridge] = balance;\n }\n}\n" - }, - "contracts/contracts_for_tests/MintableERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MintableERC20 is ERC20 {\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n}\n" - }, - "contracts/contracts_for_tests/CheckAuraTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckAura.sol\";\n\ncontract CheckAuraTest is CheckAura {\n constructor(address validatorSetAddress_, uint minSafetyBlocksValidators_) {\n validatorSetAddress = validatorSetAddress_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function checkAuraTest(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress, address[] memory initialValidators_) public {\n validatorSet = initialValidators_;\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockAura calldata block_) public pure returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockAura calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function bytesToUintTest(bytes4 b) public pure returns (uint) {\n return bytesToUint(b);\n }\n\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "evmVersion": "byzantium", - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/contracts/deployments/test/bsc/BSC_BscBridge.json b/contracts/deployments/test/bsc/BSC_BscBridge.json index 7ba28aa6..97f169de 100644 --- a/contracts/deployments/test/bsc/BSC_BscBridge.json +++ b/contracts/deployments/test/bsc/BSC_BscBridge.json @@ -1,5 +1,5 @@ { - "address": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", "abi": [ { "anonymous": false, @@ -1720,50 +1720,65 @@ "type": "constructor" } ], - "transactionHash": "0xd7cf208cc6ff8fbaa4433a9ffba90e234b4636907435ab46262aa1a12186c347", + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", - "transactionIndex": 8, - "gasUsed": "2753579", - "logsBloom": "0x00000004000000000000002000000000400004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000002000000000020000000000000020000000000100000020000000000000000000800000000000000000808000000000000000000002000000000000000000000004000000000000000020000000000000020000020000000000000040000000000000000000000000000001000000000000000000020400000000000000000000000000000000000000100000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0fb826f64b00042c1deb0f63033536c72174c45b3f7d6996d64c5c4df0327bcd", - "transactionHash": "0xd7cf208cc6ff8fbaa4433a9ffba90e234b4636907435ab46262aa1a12186c347", + "contractAddress": "0x8619f5E8315aff3E7Eba238492906329414084Da", + "transactionIndex": 3, + "gasUsed": "2483268", + "logsBloom": "0x00000004000000040000002000000000400000000000000000004000000000080000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000002008000000020000000000000001000000400000004020000000000000000000800000000000000000800000000000000000000202000000000000000000000004000000000000000020000000800000000000020000020000000041000000020000000000000000000001000000000000000000020400000000000000000000000000000000000000100000000000020000000000000000000000000000000000000000000c00000000000000000000000", + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060", + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", "logs": [ { - "transactionIndex": 8, - "blockNumber": 23637484, - "transactionHash": "0xd7cf208cc6ff8fbaa4433a9ffba90e234b4636907435ab46262aa1a12186c347", - "address": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", + "transactionIndex": 3, + "blockNumber": 28469797, + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000004f30e523254d5d609d17bfa610be5a39bda40166" + "0x000000000000000000000000c3b24de6c62f16a2d6d8ab334f9b2c92d826bd74" ], "data": "0x", - "logIndex": 7, - "blockHash": "0x0fb826f64b00042c1deb0f63033536c72174c45b3f7d6996d64c5c4df0327bcd" + "logIndex": 2, + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060" }, { - "transactionIndex": 8, - "blockNumber": 23637484, - "transactionHash": "0xd7cf208cc6ff8fbaa4433a9ffba90e234b4636907435ab46262aa1a12186c347", - "address": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", + "transactionIndex": 3, + "blockNumber": 28469797, + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000008619f5e8315aff3e7eba238492906329414084da", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060" + }, + { + "transactionIndex": 3, + "blockNumber": 28469797, + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", - "logIndex": 8, - "blockHash": "0x0fb826f64b00042c1deb0f63033536c72174c45b3f7d6996d64c5c4df0327bcd" + "logIndex": 4, + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060" }, { - "transactionIndex": 8, - "blockNumber": 23637484, - "transactionHash": "0xd7cf208cc6ff8fbaa4433a9ffba90e234b4636907435ab46262aa1a12186c347", - "address": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", + "transactionIndex": 3, + "blockNumber": 28469797, + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", @@ -1771,61 +1786,94 @@ "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", - "logIndex": 9, - "blockHash": "0x0fb826f64b00042c1deb0f63033536c72174c45b3f7d6996d64c5c4df0327bcd" + "logIndex": 5, + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060" }, { - "transactionIndex": 8, - "blockNumber": 23637484, - "transactionHash": "0xd7cf208cc6ff8fbaa4433a9ffba90e234b4636907435ab46262aa1a12186c347", - "address": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", + "transactionIndex": 3, + "blockNumber": 28469797, + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0xb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", - "logIndex": 10, - "blockHash": "0x0fb826f64b00042c1deb0f63033536c72174c45b3f7d6996d64c5c4df0327bcd" + "logIndex": 6, + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060" + }, + { + "transactionIndex": 3, + "blockNumber": 28469797, + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060" } ], - "blockNumber": 23637484, - "cumulativeGasUsed": "3205652", + "blockNumber": 28469797, + "cumulativeGasUsed": "2602622", "status": 1, "byzantium": true }, "args": [ - "0x4F30e523254d5d609D17BFa610Be5A39bDA40166", - "0x169e7a9900000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000000000f0002d02acfe900f1e256bc2f3458701ec3a0c8689471bb4b056a290d3366bc25d20000000000000000000000000000000000000000000000000000000000000002000000000000000000000000a09de74437d2453df47def3f5c2d14cd3f0cf8c0000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000008601876f8a6dccae5ce8cf154f710e09c3f0f2c800000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000daa9ee2ab371e31a75faf93d0b859561a5d8a58f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000008601876f8a6dccae5ce8cf154f710e09c3f0f2c80000000000000000000000003a5633bae0243bb360e25624dc6dfd241333b5750000000000000000000000000000000000000000000000000000000000000004000000000000000000000000da9bb33f9e3334781f3e4fce310288d7db3ed29a000000000000000000000000daa9ee2ab371e31a75faf93d0b859561a5d8a58f000000000000000000000000d52f6e6ad16904a23e5ca0309098652502ca97e800000000000000000000000056a79d39fc414ff11ebb30d6a5367ea5da8c6fe9000000000000000000000000000000000000000000000000000000000000000d000000000000000000000000311b7e7d0795c9697c6ed20b962f844e1e1f08ba0000000000000000000000005a16b69a09013c077a70fc62a3705dbf1b60c2b000000000000000000000000091a48ebafb1c6bc89000b0f63850bef1258a082b000000000000000000000000042cab4fe91f0fb00936a2b9b262a1f9cf88aad200000000000000000000000062291e77dc079897751e26a9f6b3bc4630d7454c000000000000000000000000a373f89f90ecef9f430719ed83ed49722b98fd0900000000000000000000000051213f81319e42f6296c29beea1245c5f78f2def000000000000000000000000de3939bee9a4b0ab8272bdd06d6b6e7e917fb51400000000000000000000000052ab486a5067cd8e2705dbc90ed72d6da549d0eb000000000000000000000000a5384d3e54880eb433361f516e0aeb08ad1b58a3000000000000000000000000f4b075fdf227219ff2f72fe87641adcdfdc019bc000000000000000000000000c1e639642a242396c420c4880abb3599fb69d242000000000000000000000000fcf23c040142999e1c9894b421544aaa5805a21b", + "0xc3B24De6c62f16A2D6D8AB334F9b2c92D826BD74", + "0x5a5f55bf0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000dc103bf9a3789f78958f365321f3ba07e369667a000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000000000000000000000000000000000000000000180000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000003050a5cbe1ec89917933476a99962a40e802b89c00000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000c61d0cfadc9be2ef05288d04ebcc8ec8035d7ac600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003050a5cbe1ec89917933476a99962a40e802b89c0000000000000000000000009ce86a22e9a89a4d716ee23d057389c3df3e26a500000000000000000000000062c6e4534594ad39307fe654d5260f12010a297e000000000000000000000000446c2dae148049e53d0489a8cc0d7e55cf3da5df00000000000000000000000000000000000000000000000000000000000000060000000000000000000000007cee2ae3042d2c646aa24facfa92dfee589046f0000000000000000000000000c61d0cfadc9be2ef05288d04ebcc8ec8035d7ac6000000000000000000000000871c1f199bd17f1cbed559de974a7f1568b6e1ea000000000000000000000000952b98dbda3319bf0e339cc9cc574ff768f80f3c0000000000000000000000001bb13b68dba3571415b4092802777b5ca15de897000000000000000000000000fb069affe6e75674fabf67108e9094fb988a31d9", [ "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" ], 1 ], - "numDeployments": 5, + "numDeployments": 1, "solcInputHash": "54d2ddebdc6c37a1b4fd5c90d287707b", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Confirmation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Execution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"ExecutionFailure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerAddition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerRemoval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"required\",\"type\":\"uint256\"}],\"name\":\"RequirementChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Revocation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Submission\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"MAX_OWNER_COUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"_upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"name\":\"changeRequirement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"confirmTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"confirmations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmationCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmations\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"_confirmations\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"to\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_transactionIds\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"isConfirmed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"owners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"replaceOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"required\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"revokeConfirmation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"submitTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addOwner(address)\":{\"details\":\"Allows to add a new owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of new owner.\"}},\"changeRequirement(uint256)\":{\"details\":\"Allows to change the number of required confirmations. Transaction has to be sent by wallet.\",\"params\":{\"_required\":\"Number of required confirmations.\"}},\"confirmTransaction(uint256)\":{\"details\":\"Allows an owner to confirm a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"executeTransaction(uint256)\":{\"details\":\"Allows anyone to execute a confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"getConfirmationCount(uint256)\":{\"details\":\"Returns number of confirmations of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"count\":\"Number of confirmations.\"}},\"getConfirmations(uint256)\":{\"details\":\"Returns array with owner addresses, which confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_confirmations\":\"Returns array of owner addresses.\"}},\"getOwners()\":{\"details\":\"Returns list of owners.\",\"returns\":{\"_0\":\"List of owner addresses.\"}},\"getTransactionCount(bool,bool)\":{\"details\":\"Returns total number of transactions after filers are applied.\",\"params\":{\"executed\":\"Include executed transactions.\",\"pending\":\"Include pending transactions.\"},\"returns\":{\"count\":\"Total number of transactions after filters are applied.\"}},\"getTransactionIds(uint256,uint256,bool,bool)\":{\"details\":\"Returns list of transaction IDs in defined range.\",\"params\":{\"executed\":\"Include executed transactions.\",\"from\":\"Index start position of transaction array.\",\"pending\":\"Include pending transactions.\",\"to\":\"Index end position of transaction array.\"},\"returns\":{\"_transactionIds\":\"Returns array of transaction IDs.\"}},\"isConfirmed(uint256)\":{\"details\":\"Returns the confirmation status of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_0\":\"Confirmation status.\"}},\"removeOwner(address)\":{\"details\":\"Allows to remove an owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of owner.\"}},\"replaceOwner(address,address)\":{\"details\":\"Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\",\"params\":{\"newOwner\":\"Address of new owner.\",\"owner\":\"Address of owner to be replaced.\"}},\"revokeConfirmation(uint256)\":{\"details\":\"Allows an owner to revoke a confirmation for a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"submitTransaction(address,uint256,bytes)\":{\"details\":\"Allows an owner to submit and confirm a transaction.\",\"params\":{\"data\":\"Transaction data payload.\",\"destination\":\"Transaction target address.\",\"value\":\"Transaction ether value.\"},\"returns\":{\"transactionId\":\"Returns transaction ID.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/utils/Proxy.sol\":\"ProxyMultiSig\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \\\"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(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) 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 require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/utils/MultiSigWallet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\n\\ncontract MultiSigWallet {\\n\\n /*\\n * Events\\n */\\n event Confirmation(address indexed sender, uint indexed transactionId);\\n event Revocation(address indexed sender, uint indexed transactionId);\\n event Submission(uint indexed transactionId);\\n event Execution(uint indexed transactionId);\\n event ExecutionFailure(uint indexed transactionId);\\n event OwnerAddition(address indexed owner);\\n event OwnerRemoval(address indexed owner);\\n event RequirementChange(uint required);\\n\\n /*\\n * Constants\\n */\\n uint constant public MAX_OWNER_COUNT = 50;\\n\\n /*\\n * Storage\\n */\\n mapping(uint => Transaction) public transactions;\\n mapping(uint => mapping(address => bool)) public confirmations;\\n mapping(address => bool) public isOwner;\\n address[] public owners;\\n uint public required;\\n uint public transactionCount;\\n\\n struct Transaction {\\n address destination;\\n uint value;\\n bytes data;\\n bool executed;\\n }\\n\\n /*\\n * Modifiers\\n */\\n modifier onlyWallet() {\\n require(msg.sender == address(this));\\n _;\\n }\\n\\n modifier ownerDoesNotExist(address owner) {\\n require(!isOwner[owner]);\\n _;\\n }\\n\\n modifier ownerExists(address owner) {\\n require(isOwner[owner]);\\n _;\\n }\\n\\n modifier transactionExists(uint transactionId) {\\n require(transactions[transactionId].destination != address(0));\\n _;\\n }\\n\\n modifier confirmed(uint transactionId, address owner) {\\n require(confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notConfirmed(uint transactionId, address owner) {\\n require(!confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notExecuted(uint transactionId) {\\n require(!transactions[transactionId].executed);\\n _;\\n }\\n\\n modifier notNull(address _address) {\\n require(_address != address(0));\\n _;\\n }\\n\\n modifier validRequirement(uint ownerCount, uint _required) {\\n require(ownerCount <= MAX_OWNER_COUNT\\n && _required <= ownerCount\\n && _required != 0\\n && ownerCount != 0);\\n _;\\n }\\n\\n /*\\n * Public functions\\n */\\n /// @dev Contract constructor sets initial owners and required number of confirmations.\\n /// @param _owners List of initial owners.\\n /// @param _required Number of required confirmations.\\n constructor(address[] memory _owners, uint _required)\\n validRequirement(_owners.length, _required)\\n {\\n for (uint i = 0; i < _owners.length; i++) {\\n require(!isOwner[_owners[i]] && _owners[i] != address(0));\\n isOwner[_owners[i]] = true;\\n }\\n owners = _owners;\\n required = _required;\\n }\\n\\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of new owner.\\n function addOwner(address owner)\\n public\\n onlyWallet\\n ownerDoesNotExist(owner)\\n notNull(owner)\\n validRequirement(owners.length + 1, required)\\n {\\n isOwner[owner] = true;\\n owners.push(owner);\\n emit OwnerAddition(owner);\\n }\\n\\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner.\\n function removeOwner(address owner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n {\\n isOwner[owner] = false;\\n for (uint i = 0; i < owners.length - 1; i++)\\n if (owners[i] == owner) {\\n owners[i] = owners[owners.length - 1];\\n break;\\n }\\n owners.pop();\\n if (required > owners.length)\\n changeRequirement(owners.length);\\n emit OwnerRemoval(owner);\\n }\\n\\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner to be replaced.\\n /// @param newOwner Address of new owner.\\n function replaceOwner(address owner, address newOwner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n ownerDoesNotExist(newOwner)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (owners[i] == owner) {\\n owners[i] = newOwner;\\n break;\\n }\\n isOwner[owner] = false;\\n isOwner[newOwner] = true;\\n emit OwnerRemoval(owner);\\n emit OwnerAddition(newOwner);\\n }\\n\\n /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\\n /// @param _required Number of required confirmations.\\n function changeRequirement(uint _required)\\n public\\n onlyWallet\\n validRequirement(owners.length, _required)\\n {\\n required = _required;\\n emit RequirementChange(_required);\\n }\\n\\n /// @dev Allows an owner to submit and confirm a transaction.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function submitTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) public returns (uint transactionId)\\n {\\n transactionId = addTransaction(destination, value, data);\\n confirmTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to confirm a transaction.\\n /// @param transactionId Transaction ID.\\n function confirmTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n transactionExists(transactionId)\\n notConfirmed(transactionId, msg.sender)\\n {\\n confirmations[transactionId][msg.sender] = true;\\n emit Confirmation(msg.sender, transactionId);\\n executeTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to revoke a confirmation for a transaction.\\n /// @param transactionId Transaction ID.\\n function revokeConfirmation(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n confirmations[transactionId][msg.sender] = false;\\n emit Revocation(msg.sender, transactionId);\\n }\\n\\n /// @dev Allows anyone to execute a confirmed transaction.\\n /// @param transactionId Transaction ID.\\n function executeTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n if (isConfirmed(transactionId)) {\\n Transaction storage txn = transactions[transactionId];\\n txn.executed = true;\\n if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\\n emit Execution(transactionId);\\n else {\\n emit ExecutionFailure(transactionId);\\n txn.executed = false;\\n }\\n }\\n }\\n\\n // call has been separated into its own function in order to take advantage\\n // of the Solidity's code generator to produce a loop that copies tx.data into memory.\\n function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) {\\n bool result;\\n assembly {\\n let x := mload(0x40) // \\\"Allocate\\\" memory for output (0x40 is where \\\"free memory\\\" pointer is stored by convention)\\n let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\\n result := call(\\n sub(gas(), 36810), // 34710 is the value that solidity is currently emitting // todo\\n // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\\n // callNewAccountGas (25000, in case the destination address does not exist and needs creating) +\\n // gasSLoadEIP2929 (2100)\\n\\n destination,\\n value,\\n d,\\n dataLength, // Size of the input (in bytes) - this is what fixes the padding problem\\n x,\\n 0 // Output is ignored, therefore the output size is zero\\n )\\n }\\n return result;\\n }\\n\\n /// @dev Returns the confirmation status of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return Confirmation status.\\n function isConfirmed(uint transactionId) public view returns (bool)\\n {\\n uint count = 0;\\n for (uint i = 0; i < owners.length; i++) {\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n if (count == required)\\n return true;\\n }\\n return false;\\n }\\n\\n /*\\n * Internal functions\\n */\\n /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function addTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) internal\\n notNull(destination) returns (uint transactionId)\\n {\\n transactionId = transactionCount;\\n transactions[transactionId] = Transaction({\\n destination : destination,\\n value : value,\\n data : data,\\n executed : false\\n });\\n transactionCount += 1;\\n emit Submission(transactionId);\\n }\\n\\n /*\\n * Web3 call functions\\n */\\n /// @dev Returns number of confirmations of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return count Number of confirmations.\\n function getConfirmationCount(uint transactionId)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n }\\n\\n /// @dev Returns total number of transactions after filers are applied.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return count Total number of transactions after filters are applied.\\n function getTransactionCount(bool pending, bool executed)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n count += 1;\\n }\\n\\n /// @dev Returns list of owners.\\n /// @return List of owner addresses.\\n function getOwners() public view returns (address[] memory)\\n {\\n return owners;\\n }\\n\\n /// @dev Returns array with owner addresses, which confirmed transaction.\\n /// @param transactionId Transaction ID.\\n /// @return _confirmations Returns array of owner addresses.\\n function getConfirmations(uint transactionId) public view\\n returns (address[] memory _confirmations)\\n {\\n address[] memory confirmationsTemp = new address[](owners.length);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]]) {\\n confirmationsTemp[count] = owners[i];\\n count += 1;\\n }\\n _confirmations = new address[](count);\\n for (i = 0; i < count; i++)\\n _confirmations[i] = confirmationsTemp[i];\\n }\\n\\n /// @dev Returns list of transaction IDs in defined range.\\n /// @param from Index start position of transaction array.\\n /// @param to Index end position of transaction array.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return _transactionIds Returns array of transaction IDs.\\n function getTransactionIds(uint from, uint to, bool pending, bool executed)\\n public\\n view\\n returns (uint[] memory _transactionIds)\\n {\\n uint[] memory transactionIdsTemp = new uint[](transactionCount);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n {\\n transactionIdsTemp[count] = i;\\n count += 1;\\n }\\n _transactionIds = new uint[](to - from);\\n for (i = from; i < to; i++)\\n _transactionIds[i - from] = transactionIdsTemp[i];\\n }\\n}\\n\",\"keccak256\":\"0x1630487b4e9acd29e4c4ea04eff94b838660e39d009c0668c5213c209fb2f883\",\"license\":\"MIT\"},\"contracts/utils/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/proxy/Proxy.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport \\\"./MultiSigWallet.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\n\\ncontract ProxyMultiSig is Proxy, MultiSigWallet {\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n bytes32 private constant ADMIN_STORAGE_LOCATION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n bytes4 private constant _UPGRADE_TO_AND_CALL_SIGNATURE = bytes4(keccak256(\\\"_upgradeToAndCall(address,bytes)\\\"));\\n\\n event Upgraded(address indexed implementation);\\n\\n\\n constructor(\\n address _logic,\\n bytes memory _data,\\n address[] memory owners,\\n uint _required\\n\\n ) MultiSigWallet(owners, _required) {\\n // Cannot use _upgradeToAndCall because of onlyWallet modifier\\n _upgradeTo(_logic);\\n if (_data.length > 0) {\\n Address.functionDelegateCall(_logic, _data);\\n }\\n\\n StorageSlot.getAddressSlot(ADMIN_STORAGE_LOCATION).value = msg.sender; // trick the hardhat-deploy\\n }\\n\\n\\n function implementation() external view returns (address) {\\n return _implementation();\\n }\\n\\n function upgradeTo(address newImplementation) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, bytes(\\\"\\\"))\\n );\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, data)\\n );\\n }\\n\\n function _upgradeToAndCall(address newImplementation, bytes memory data) external onlyWallet payable {\\n _upgradeTo(newImplementation);\\n if (data.length > 0) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n function _upgradeTo(address newImplementation) internal {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n emit Upgraded(newImplementation);\\n }\\n\\n function _implementation() internal view override returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n}\\n\",\"keccak256\":\"0x9e2738f9167ae4a747ac4e8622c443ad735a257630293dee633535dae02863d5\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200285f3803806200285f833981016040819052620000349162000645565b8181815181603282111580156200004b5750818111155b80156200005757508015155b80156200006357508115155b6200006d57600080fd5b60005b845181101562000163576002600086838151811062000093576200009362000821565b602090810291909101810151600160a060020a031682528101919091526040016000205460ff16158015620000f757506000600160a060020a0316858281518110620000e357620000e362000821565b6020026020010151600160a060020a031614155b6200010157600080fd5b6001600260008784815181106200011c576200011c62000821565b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055806200015a81620007de565b91505062000070565b5083516200017990600390602087019062000511565b5050506004555062000194846401000000006200021b810204565b825115620001b857620001b68484640100000000620015686200034a82021704565b505b33620001f27fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a0392909216919091179055506200087f92505050565b6200023481640100000000620015906200038582021704565b620002c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b80620003007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a03928316179055604051908216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200037b838360405180606001604052806027815260200162002838602791396401000000006200038b810204565b9392505050565b90565b3b151590565b6060620003a18464010000000062000385810204565b6200042f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401620002bd565b60008085600160a060020a0316856040516200044c919062000725565b600060405180830381855af49150503d806000811462000489576040519150601f19603f3d011682016040523d82523d6000602084013e6200048e565b606091505b5091509150620004af828286620004b9640100000000026401000000009004565b9695505050505050565b60608315620004ca5750816200037b565b825115620004db5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002bd919062000743565b82805482825590600052602060002090810192821562000569579160200282015b82811115620005695782518254600160a060020a031916600160a060020a0390911617825560209092019160019091019062000532565b50620005779291506200057b565b5090565b5b808211156200057757600081556001016200057c565b8051600160a060020a0381168114620005aa57600080fd5b919050565b600082601f830112620005c157600080fd5b815160206001604060020a03821115620005df57620005df62000850565b808202620005ef82820162000778565b8381528281019086840183880185018910156200060b57600080fd5b600093505b858410156200063957620006248162000592565b83526001939093019291840191840162000610565b50979650505050505050565b600080600080608085870312156200065c57600080fd5b620006678562000592565b935060208501516001604060020a03808211156200068457600080fd5b818701915087601f8301126200069957600080fd5b815181811115620006ae57620006ae62000850565b620006c3601f8201601f191660200162000778565b818152896020838601011115620006d957600080fd5b620006ec826020830160208701620007ab565b6040890151909650925050808211156200070557600080fd5b506200071487828801620005af565b606096909601519497939650505050565b6000825162000739818460208701620007ab565b9190910192915050565b602081526000825180602084015262000764816040850160208701620007ab565b601f01601f19169190910160400192915050565b604051601f8201601f191681016001604060020a0381118282101715620007a357620007a362000850565b604052919050565b60005b83811015620007c8578181015183820152602001620007ae565b83811115620007d8576000848401525b50505050565b60006000198214156200081a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611fa9806200088f6000396000f3fe608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033", "execute": { - "methodName": "upgrade", + "methodName": "initialize", "args": [ - [ - "0x260cfE305cA40CaE1a32Ba7611137eF4d7146233", - "0xEB1c6a8a84063B1cef8B9a23AB87Bf926035A21a", - "0x40B7d71E70fA6311cB0b300c1Ba6926A2A9000b8", - "0xb017DcCC473499C83f1b553bE564f3CeAf002254", - "0x0f071e1785e3E115360E04c9C8D53e958E6f85FE", - "0x203F8dCBce61d9BFa48A95F588152Da073d9c693" - ], - "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" + { + "relayAddress": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "feeProviderAddress": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "watchdogsAddresses": [ + "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" + ], + "transferFeeRecipient": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "bridgeFeeRecipient": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "tokenThisAddresses": [ + "0xC61D0CfaDc9bE2EF05288D04EbCC8ec8035D7aC6", + "0x0000000000000000000000000000000000000000", + "0x3050A5cBe1ec89917933476a99962A40e802B89C", + "0x9CE86a22E9a89a4d716Ee23d057389c3df3E26A5", + "0x62c6e4534594aD39307FE654D5260f12010A297E", + "0x446c2daE148049E53D0489A8cc0D7E55CF3Da5df" + ], + "tokenSideAddresses": [ + "0x7cee2ae3042D2C646Aa24FACfA92dfeE589046f0", + "0xC61D0CfaDc9bE2EF05288D04EbCC8ec8035D7aC6", + "0x871c1F199bD17F1cbed559DE974a7F1568b6E1Ea", + "0x952b98DBDa3319BF0e339cC9CC574fF768F80f3c", + "0x1bB13b68DbA3571415B4092802777B5cA15de897", + "0xfB069aFFe6e75674FaBf67108e9094fb988A31D9" + ], + "sideBridgeAddress": "0xdC103bf9a3789f78958f365321F3BA07e369667A", + "wrappingTokenAddress": "0x3050A5cBe1ec89917933476a99962A40e802B89C", + "timeframeSeconds": 60, + "lockTime": 60, + "minSafetyBlocks": 10 + } ] }, - "implementation": "0xd3c82866DD68CBDD292db2A82cd6f41B5c93A9C6", + "implementation": "0xc3B24De6c62f16A2D6D8AB334F9b2c92D826BD74", "devdoc": { "kind": "dev", "methods": { diff --git a/contracts/deployments/test/bsc/BSC_BscBridge_Implementation.json b/contracts/deployments/test/bsc/BSC_BscBridge_Implementation.json index 2443866f..55ce12ee 100644 --- a/contracts/deployments/test/bsc/BSC_BscBridge_Implementation.json +++ b/contracts/deployments/test/bsc/BSC_BscBridge_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xd3c82866DD68CBDD292db2A82cd6f41B5c93A9C6", + "address": "0xc3B24De6c62f16A2D6D8AB334F9b2c92D826BD74", "abi": [ { "anonymous": false, @@ -1111,25 +1111,25 @@ "type": "receive" } ], - "transactionHash": "0xbaa56d1db51bdc54fbc7ad018e33cd5be899511dc2acce6db974ae8f9ece5acc", + "transactionHash": "0x8fdbe585c5459b39c5abe221ccdc6c6810bb640a088f2cb1fc1541b65c893ee0", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0xd3c82866DD68CBDD292db2A82cd6f41B5c93A9C6", + "contractAddress": "0xc3B24De6c62f16A2D6D8AB334F9b2c92D826BD74", "transactionIndex": 5, "gasUsed": "3047326", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5bd6b5fbc0fe454e647e0909cf4e10cec4db1e095b342f9bbadfca05a6aa80e0", - "transactionHash": "0xbaa56d1db51bdc54fbc7ad018e33cd5be899511dc2acce6db974ae8f9ece5acc", + "blockHash": "0xa645b20b32f00703f3c7b2c02b0873d6e13f6caaab6875a98c8a26fdc080c709", + "transactionHash": "0x8fdbe585c5459b39c5abe221ccdc6c6810bb640a088f2cb1fc1541b65c893ee0", "logs": [], - "blockNumber": 25277125, - "cumulativeGasUsed": "3197695", + "blockNumber": 28469795, + "cumulativeGasUsed": "3170420", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 5, - "solcInputHash": "b5a0243e5a7a5c6045b818e3d2d0a636", + "numDeployments": 1, + "solcInputHash": "af3862e0ddcca2861ee723b668139921", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"queue\",\"type\":\"tuple[]\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"TransferFinish\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"TransferSubmit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenFrom\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenTo\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"transferFeeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bridgeFeeAmount\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FEE_PROVIDER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RELAY_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WATCHDOG_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeFeeRecipient\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"feeRecipient_\",\"type\":\"address\"}],\"name\":\"changeBridgeFeeRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lockTime_\",\"type\":\"uint256\"}],\"name\":\"changeLockTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minSafetyBlocks_\",\"type\":\"uint256\"}],\"name\":\"changeMinSafetyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"signatureFeeCheckNumber_\",\"type\":\"uint256\"}],\"name\":\"changeSignatureFeeCheckNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timeframeSeconds_\",\"type\":\"uint256\"}],\"name\":\"changeTimeframeSeconds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"feeRecipient_\",\"type\":\"address\"}],\"name\":\"changeTransferFeeRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"getLockedTransfers\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"transfers\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"endTimestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.LockedTransfers\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"grantRoles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sideBridgeAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"watchdogsAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"feeProviderAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"wrappingTokenAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokenSideAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address payable\",\"name\":\"transferFeeRecipient\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"bridgeFeeRecipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timeframeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minSafetyBlocks\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.ConstructorArgs\",\"name\":\"args\",\"type\":\"tuple\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inputEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isQueueEmpty\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastTimeframe\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lockTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lockedTransfers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"endTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minSafetyBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldestLockedEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"outputEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"removeLockedTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"revokeRoles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sideBridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"skipTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"transfers\",\"type\":\"tuple[]\"}],\"name\":\"submitTransferUntrustless\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeframeSeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenSideAddress\",\"type\":\"address\"}],\"name\":\"tokensAdd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokenSideAddresses\",\"type\":\"address[]\"}],\"name\":\"tokensAddBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"}],\"name\":\"tokensRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"}],\"name\":\"tokensRemoveBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transferFeeRecipient\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"unlockTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unlockTransfersBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_watchdogs\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"_fee_provider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"mpcRelay\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oldDefaultAdmin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oldRelay\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"unwrapSide\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"feeSignature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"transferFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bridgeFee\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"feeSignature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"transferFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bridgeFee\",\"type\":\"uint256\"}],\"name\":\"wrapWithdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrapperAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"withdraw(address,address,uint256,bool,bytes,uint256,uint256)\":{\"params\":{\"bridgeFee\":\"Amount (in native coins), payed as bridge earnings\",\"feeSignature\":\"Signature signed by relay that confirms that the fee values are valid\",\"transferFee\":\"Amount (in native coins), payed to compensate gas fees in side network\"}},\"wrapWithdraw(address,bytes,uint256,uint256)\":{\"params\":{\"bridgeFee\":\"Amount (in native coins), payed as bridge earnings\",\"feeSignature\":\"Signature signed by relay that confirms that the fee values are valid\",\"toAddress\":\"Address in side network that will receive the tokens\",\"transferFee\":\"Amount (in native coins), payed to compensate gas fees in side network\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/networks/BSC_BscBridge.sol\":\"BSC_BscBridge\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 * ```\\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 * ```\\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.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\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, _msgSender());\\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(IAccessControlUpgradeable).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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\\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 function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\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 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 require(!paused(), \\\"Pausable: paused\\\");\\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 require(paused(), \\\"Pausable: not paused\\\");\\n _;\\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 uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x742c0fbab73bf595ca40025f6e81cb48dbd5e133950717f7befd062a925c0148\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 IERC165Upgradeable {\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"contracts/checks/CheckUntrustless2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"../common/CommonStructs.sol\\\";\\n\\n\\ncontract CheckUntrustless2 {\\n // this contract do nothing, but i think it's required to inheritance from it\\n // todo check this\\n uint256[15] private ___gap;\\n}\\n\",\"keccak256\":\"0xff7351b4e6b3628cd20511c65aa12dfb19b76472ee18ee06397879c1000d562d\",\"license\":\"MIT\"},\"contracts/checks/SignatureCheck.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n assembly {\\n r := mload(add(signature, 32))\\n s := mload(add(signature, 64))\\n v := byte(0, mload(add(signature, 96)))\\n if lt(v, 27) {v := add(v, 27)}\\n }\\n return ecrecover(messageHash, v, r, s);\\n}\\n\",\"keccak256\":\"0x16e553d27ac4c9c49f8487c5df1fd51b3afbffa9557be22ca031f05d82739ba7\",\"license\":\"MIT\"},\"contracts/common/CommonBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./CommonStructs.sol\\\";\\nimport \\\"../tokens/IWrapper.sol\\\";\\nimport \\\"../checks/SignatureCheck.sol\\\";\\n\\n\\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\\n // DEFAULT_ADMIN_ROLE can grants and revokes all roles below; Set to multisig (proxy contract address)\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\\n bytes32 public constant RELAY_ROLE = keccak256(\\\"RELAY_ROLE\\\"); // can submit transfers\\n bytes32 public constant WATCHDOG_ROLE = keccak256(\\\"WATCHDOG_ROLE\\\"); // can pause contract\\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\\\"FEE_PROVIDER_ROLE\\\"); // fee signatures must be signed by this role\\n\\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\\n uint internal signatureFeeCheckNumber;\\n\\n\\n // queue of Transfers to be pushed in another network\\n CommonStructs.Transfer[] queue;\\n\\n // locked transfers from another network\\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\\n // head index of lockedTransfers 'queue' mapping\\n uint public oldestLockedEventId;\\n\\n\\n // this network to side network token addresses mapping\\n mapping(address => address) public tokenAddresses;\\n // token that implement `IWrapper` interface and used to wrap native coin\\n address public wrapperAddress;\\n\\n // addresses that will receive fees\\n address payable public transferFeeRecipient;\\n address payable public bridgeFeeRecipient;\\n\\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\\n\\n uint public inputEventId; // last processed event from side network\\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\\n\\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\\n\\n\\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\\n uint transferFeeAmount, uint bridgeFeeAmount);\\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\\n event TransferSubmit(uint indexed eventId);\\n event TransferFinish(uint indexed eventId);\\n\\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, address(this));\\n _setupRole(ADMIN_ROLE, msg.sender);\\n _setupRole(RELAY_ROLE, args.relayAddress);\\n _setupRoles(WATCHDOG_ROLE, args.watchdogsAddresses);\\n _setupRole(FEE_PROVIDER_ROLE, args.feeProviderAddress);\\n\\n // initialise tokenAddresses with start values\\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\\n wrapperAddress = args.wrappingTokenAddress;\\n\\n sideBridgeAddress = args.sideBridgeAddress;\\n transferFeeRecipient = args.transferFeeRecipient;\\n bridgeFeeRecipient = args.bridgeFeeRecipient;\\n minSafetyBlocks = args.minSafetyBlocks;\\n timeframeSeconds = args.timeframeSeconds;\\n lockTime = args.lockTime;\\n\\n // 1, coz eventId 0 considered already processed\\n oldestLockedEventId = 1;\\n outputEventId = 1;\\n\\n signatureFeeCheckNumber = 3;\\n\\n lastTimeframe = block.timestamp / timeframeSeconds;\\n }\\n\\n\\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\\n\\n /// @param toAddress Address in side network that will receive the tokens\\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\\n function wrapWithdraw(address toAddress,\\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\\n ) public payable {\\n address tokenSideAddress = tokenAddresses[wrapperAddress];\\n require(tokenSideAddress != address(0), \\\"Unknown token address\\\");\\n\\n require(msg.value > transferFee + bridgeFee, \\\"Sent value <= fee\\\");\\n\\n uint amount = msg.value - transferFee - bridgeFee;\\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\\n transferFeeRecipient.transfer(transferFee);\\n bridgeFeeRecipient.transfer(bridgeFee);\\n\\n IWrapper(wrapperAddress).deposit{value : amount}();\\n\\n //\\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\\n\\n withdrawFinish();\\n }\\n\\n // `withdraw` function used for sending tokens from this network to side network;\\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\\n /// @param toAddress Address in side network that will receive the tokens\\n /// @param amount Amount of tokens to be sent\\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\\n */\\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\\n function withdraw(\\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\\n ) payable public {\\n address tokenSideAddress;\\n if (unwrapSide) {\\n require(tokenAddresses[address(0)] == tokenThisAddress, \\\"Token not point to native token\\\");\\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\\n } else {\\n tokenSideAddress = tokenAddresses[tokenThisAddress];\\n require(tokenSideAddress != address(0), \\\"Unknown token address\\\");\\n }\\n\\n require(msg.value == transferFee + bridgeFee, \\\"Sent value != fee\\\");\\n\\n require(amount > 0, \\\"Cannot withdraw 0\\\");\\n\\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\\n transferFeeRecipient.transfer(transferFee);\\n bridgeFeeRecipient.transfer(bridgeFee);\\n\\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \\\"Fail transfer coins\\\");\\n\\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\\n\\n withdrawFinish();\\n }\\n\\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\\n function triggerTransfers() public {\\n require(queue.length != 0, \\\"Queue is empty\\\");\\n\\n emit Transfer(outputEventId++, queue);\\n delete queue;\\n }\\n\\n\\n // after `lockTime` period, transfers can be unlocked\\n function unlockTransfers(uint eventId) public whenNotPaused {\\n require(eventId == oldestLockedEventId, \\\"can unlock only oldest event\\\");\\n\\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\\n require(transfersLocked.endTimestamp > 0, \\\"no locked transfers with this id\\\");\\n require(transfersLocked.endTimestamp < block.timestamp, \\\"lockTime has not yet passed\\\");\\n\\n proceedTransfers(transfersLocked.transfers);\\n\\n delete lockedTransfers[eventId];\\n emit TransferFinish(eventId);\\n\\n oldestLockedEventId = eventId + 1;\\n }\\n\\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\\n function unlockTransfersBatch() public whenNotPaused {\\n uint eventId = oldestLockedEventId;\\n for (;; eventId++) {\\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\\n\\n proceedTransfers(transfersLocked.transfers);\\n\\n delete lockedTransfers[eventId];\\n emit TransferFinish(eventId);\\n }\\n oldestLockedEventId = eventId;\\n }\\n\\n // delete transfers with passed eventId **and all after it**\\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\\n require(eventId >= oldestLockedEventId, \\\"eventId must be >= oldestLockedEventId\\\"); // can't undo unlocked :(\\n require(eventId <= inputEventId, \\\"eventId must be <= inputEventId\\\");\\n\\n // now waiting for submitting a new transfer with `eventId` id\\n inputEventId = eventId - 1;\\n\\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\\n delete lockedTransfers[eventId];\\n\\n }\\n\\n // pretend like bridge already receive and process all transfers up to `eventId` id\\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\\n require(eventId >= oldestLockedEventId, \\\"eventId must be >= oldestLockedEventId\\\"); // can't undo unlocked :(\\n\\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\\n }\\n\\n\\n // views\\n\\n // returns locked transfers from another network\\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\\n return lockedTransfers[eventId];\\n }\\n\\n\\n function isQueueEmpty() public view returns (bool) {\\n return queue.length == 0;\\n }\\n\\n\\n // admin setters\\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\\n minSafetyBlocks = minSafetyBlocks_;\\n }\\n\\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\\n transferFeeRecipient = feeRecipient_;\\n }\\n\\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\\n bridgeFeeRecipient = feeRecipient_;\\n }\\n\\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\\n timeframeSeconds = timeframeSeconds_;\\n }\\n\\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\\n lockTime = lockTime_;\\n }\\n\\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\\n }\\n\\n // token addressed mapping\\n\\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\\n }\\n\\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\\n delete tokenAddresses[tokenThisAddress];\\n }\\n\\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\\n }\\n\\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\\n require(tokenThisAddresses.length == tokenSideAddresses.length, \\\"sizes of tokenThisAddresses and tokenSideAddresses must be same\\\");\\n uint arrayLength = tokenThisAddresses.length;\\n for (uint i = 0; i < arrayLength; i++)\\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\\n }\\n\\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\\n uint arrayLength = tokenThisAddresses.length;\\n for (uint i = 0; i < arrayLength; i++)\\n delete tokenAddresses[tokenThisAddresses[i]];\\n }\\n\\n // pause\\n\\n function pause() public onlyRole(WATCHDOG_ROLE) {\\n _pause();\\n }\\n\\n function unpause() public onlyRole(ADMIN_ROLE) {\\n _unpause();\\n }\\n\\n // roles\\n\\n function grantRoles(bytes32 role, address[] calldata accounts) public onlyRole(getRoleAdmin(role)) {\\n // check permission to grant role via onlyRole(getRoleAdmin(role))\\n _setupRoles(role, accounts);\\n }\\n function revokeRoles(bytes32 role, address[] calldata accounts) public {\\n // revokeRole will check for permissions\\n for (uint i = 0; i < accounts.length; i++)\\n revokeRole(role, accounts[i]);\\n }\\n function _setupRoles(bytes32 role, address[] calldata accounts) internal {\\n // no permissions check at all\\n for (uint i = 0; i < accounts.length; i++)\\n _setupRole(role, accounts[i]);\\n }\\n\\n // internal\\n\\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\\n for (uint i = 0; i < events.length; i++)\\n lockedTransfers[eventId].transfers.push(events[i]);\\n }\\n\\n\\n // sends money according to the information in the Transfer structure\\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\\n for (uint i = 0; i < transfers.length; i++) {\\n\\n if (transfers[i].tokenAddress == address(0)) {// native token\\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\\n } else {// ERC20 token\\n require(\\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\\n \\\"Fail transfer coins\\\");\\n }\\n\\n }\\n }\\n\\n // used by `withdraw` and `wrapWithdraw` functions;\\n // emit `Transfer` event with current queue if timeframe was changed;\\n function withdrawFinish() internal {\\n uint nowTimeframe = block.timestamp / timeframeSeconds;\\n if (nowTimeframe != lastTimeframe) {\\n emit Transfer(outputEventId++, queue);\\n delete queue;\\n\\n lastTimeframe = nowTimeframe;\\n }\\n }\\n\\n // encode message with received values and current timestamp;\\n // check that signature is same message signed by address with RELAY_ROLE;\\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\\n bytes32 messageHash;\\n address signer;\\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\\n\\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\\n messageHash = keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\\n ));\\n\\n signer = ecdsaRecover(messageHash, signature);\\n if (hasRole(FEE_PROVIDER_ROLE, signer))\\n return;\\n timestampEpoch--;\\n }\\n revert(\\\"Signature check failed\\\");\\n }\\n\\n function checkEventId(uint eventId) internal {\\n require(eventId == ++inputEventId, \\\"EventId out of order\\\");\\n }\\n\\n receive() external payable {} // need to receive native token from wrapper contract\\n\\n uint256[15] private __gap;\\n}\\n\",\"keccak256\":\"0x74846658822e44c4fc71b2764a31d90bad77af3b492a2a4a5a512f7a41d9b489\",\"license\":\"MIT\"},\"contracts/common/CommonStructs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.6;\\n\\nlibrary CommonStructs {\\n struct Transfer {\\n address tokenAddress;\\n address toAddress;\\n uint amount;\\n }\\n\\n struct TransferProof {\\n bytes[] receiptProof;\\n uint eventId;\\n Transfer[] transfers;\\n }\\n\\n struct LockedTransfers {\\n Transfer[] transfers;\\n uint endTimestamp;\\n }\\n\\n struct ConstructorArgs {\\n address sideBridgeAddress; address relayAddress;\\n address[] watchdogsAddresses; address feeProviderAddress;\\n address wrappingTokenAddress;\\n address[] tokenThisAddresses; address[] tokenSideAddresses;\\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\\n }\\n}\\n\",\"keccak256\":\"0x0294bbc461102c4f4108d6f0163ce8158d5af7c5a6ff29971f01afdec7b38cf3\",\"license\":\"MIT\"},\"contracts/networks/BSC_BscBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"../common/CommonBridge.sol\\\";\\nimport \\\"../checks/CheckUntrustless2.sol\\\";\\n\\n\\ncontract BSC_BscBridge is CommonBridge, CheckUntrustless2 {\\n\\n function initialize(\\n CommonStructs.ConstructorArgs calldata args\\n ) public initializer {\\n __CommonBridge_init(args);\\n }\\n\\n function upgrade(\\n address[] calldata _watchdogs,\\n address _fee_provider,\\n address mpcRelay,\\n address oldDefaultAdmin,\\n address oldRelay\\n ) public {\\n require(msg.sender == address(this), \\\"This method require multisig\\\");\\n\\n // add DEFAULT_ADMIN_ROLE to multisig\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n // revoke RELAY_ROLE from old relay\\n revokeRole(RELAY_ROLE, oldRelay);\\n\\n // new roles for untrustless mpc\\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\\n _setupRole(RELAY_ROLE, mpcRelay);\\n\\n // revoke DEFAULT_ADMIN_ROLE from deployer\\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\\n }\\n\\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\\n checkEventId(eventId);\\n emit TransferSubmit(eventId);\\n lockTransfers(transfers, eventId);\\n }\\n}\\n\",\"keccak256\":\"0xb987ed8bc9297eb82f6dcf000cce3a5ec8368beffe4007f8a257c581897e89f3\",\"license\":\"MIT\"},\"contracts/tokens/IWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\ninterface IWrapper {\\n event Deposit(address indexed dst, uint amount);\\n event Withdrawal(address indexed src, uint amount);\\n\\n function deposit() external payable;\\n\\n function withdraw(uint amount) external;\\n}\\n\",\"keccak256\":\"0xbe5bc17241b9a14b78e18e4562e2a4c02e2b941fae0f1a896bbd795e49af136e\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50613643806100206000396000f3fe6080604052600436106102ec5760003560e060020a90048063853890ae11610194578063b87330e9116100e0578063deb9a3a211610099578063f700558711610073578063f7005587146108c4578063f862b7eb146108e4578063f8b7443314610904578063fd5d2ef31461091757600080fd5b8063deb9a3a214610857578063e31be08714610877578063f33fe10f146108a457600080fd5b8063b87330e9146107a9578063ba8bbbe0146107c9578063baeebe75146107df578063cf3317d3146107f5578063d3b89f4914610815578063d547741f1461083757600080fd5b806391d148541161014d57806399b5bb641161012757806399b5bb6414610726578063a217fddf1461073c578063a9b1cf0b14610751578063b6d3385e1461077357600080fd5b806391d14854146106d0578063924cf6e0146106f057806396cf52271461070657600080fd5b8063853890ae1461063257806386d7679e146106525780638ac1f86f146106685780638e5df9c71461067d5780638ff550e81461069d57806391c5bc0a146106bd57600080fd5b8063390d5388116102535780635249a7051161020c578063746b5c42116101e6578063746b5c42146105c657806375b238fc146105db5780637df8b802146105fd5780638456cb591461061d57600080fd5b80635249a7051461056e5780635a5f55bf1461058e5780635c975abb146105ae57600080fd5b8063390d5388146104a95780633928b296146104c95780633f4ba83a146104e957806342180fb8146104fe5780634a1856de1461051e5780635119b0ef1461054e57600080fd5b8063297c2677116102a5578063297c2677146103e55780632bbba847146103fb5780632f2ff15d14610411578063304561bb14610431578063331a891a1461046957806336568abe1461048957600080fd5b806301ffc9a7146102f8578063044218231461032d57806309fce3561461035d5780630d6680871461037f578063196f0f6214610395578063248a9ca3146103b557600080fd5b366102f357005b600080fd5b34801561030457600080fd5b50610318610313366004612fe2565b610937565b60405190151581526020015b60405180910390f35b34801561033957600080fd5b5061034f6000805160206135ae83398151915281565b604051908152602001610324565b34801561036957600080fd5b5061037d610378366004612ecf565b6109ca565b005b34801561038b57600080fd5b5061034f60d45481565b3480156103a157600080fd5b5061037d6103b0366004612f96565b6109f6565b3480156103c157600080fd5b5061034f6103d0366004612f58565b60009081526065602052604090206001015490565b3480156103f157600080fd5b5061034f60d65481565b34801561040757600080fd5b5060ca5415610318565b34801561041d57600080fd5b5061037d61042c366004612f71565b610a44565b34801561043d57600080fd5b5060cf5461045190600160a060020a031681565b604051600160a060020a039091168152602001610324565b34801561047557600080fd5b5061037d610484366004612f58565b610a6f565b34801561049557600080fd5b5061037d6104a4366004612f71565b610b8f565b3480156104b557600080fd5b5060d05461045190600160a060020a031681565b3480156104d557600080fd5b5061037d6104e4366004612cae565b610c1a565b3480156104f557600080fd5b5061037d610c56565b34801561050a57600080fd5b5061037d610519366004612f58565b610c7a565b34801561052a57600080fd5b5061034f610539366004612f58565b60cb6020526000908152604090206001015481565b34801561055a57600080fd5b5061037d61056936600461305d565b610cb7565b34801561057a57600080fd5b5061037d610589366004612dff565b610d35565b34801561059a57600080fd5b5061037d6105a9366004613021565b610dbe565b3480156105ba57600080fd5b5060975460ff16610318565b3480156105d257600080fd5b5061037d610e36565b3480156105e757600080fd5b5061034f6000805160206135ee83398151915281565b34801561060957600080fd5b5060ce5461045190600160a060020a031681565b34801561062957600080fd5b5061037d610ee2565b34801561063e57600080fd5b5061037d61064d366004612ccb565b610f03565b34801561065e57600080fd5b5061034f60d75481565b34801561067457600080fd5b5061037d610f4b565b34801561068957600080fd5b5061037d610698366004612cae565b6110a3565b3480156106a957600080fd5b5061037d6106b8366004612e41565b6110e4565b61037d6106cb366004612d98565b6111b5565b3480156106dc57600080fd5b506103186106eb366004612f71565b6114e5565b3480156106fc57600080fd5b5061034f60d25481565b34801561071257600080fd5b5061037d610721366004612f58565b611510565b34801561073257600080fd5b5061034f60d55481565b34801561074857600080fd5b5061034f600081565b34801561075d57600080fd5b5061034f60008051602061358e83398151915281565b34801561077f57600080fd5b5061045161078e366004612cae565b60cd60205260009081526040902054600160a060020a031681565b3480156107b557600080fd5b5061037d6107c4366004612cae565b61152f565b3480156107d557600080fd5b5061034f60cc5481565b3480156107eb57600080fd5b5061034f60d35481565b34801561080157600080fd5b5061037d610810366004612f58565b61156b565b34801561082157600080fd5b5061034f6000805160206135ce83398151915281565b34801561084357600080fd5b5061037d610852366004612f71565b6115e2565b34801561086357600080fd5b5061037d610872366004612f96565b611608565b34801561088357600080fd5b50610897610892366004612f58565b61162f565b6040516103249190613328565b3480156108b057600080fd5b5060d15461045190600160a060020a031681565b3480156108d057600080fd5b5061037d6108df366004612f58565b6116eb565b3480156108f057600080fd5b5061037d6108ff366004612f58565b61170a565b61037d610912366004612d04565b61193d565b34801561092357600080fd5b5061037d610932366004612f58565b611d9d565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b0000000000000000000000000000000000000000000000000000000014806109c457507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b6000805160206135ee8339815191526109e38133611dbc565b6109ef85858585611e23565b5050505050565b60005b81811015610a3e57610a2c84848484818110610a1757610a176134d9565b90506020020160208101906108529190612cae565b80610a36816134a5565b9150506109f9565b50505050565b600082815260656020526040902060010154610a608133611dbc565b610a6a8383611f3c565b505050565b6000805160206135ee833981519152610a888133611dbc565b60975460ff16610ab65760405160e560020a62461bcd028152600401610aad90613200565b60405180910390fd5b60cc54821015610adb5760405160e560020a62461bcd028152600401610aad906132cb565b60d554821115610b305760405160e560020a62461bcd02815260206004820152601f60248201527f6576656e744964206d757374206265203c3d20696e7075744576656e744964006044820152606401610aad565b610b3b60018361344b565b60d5555b600082815260cb602052604090206001015415610b8b57600082815260cb6020526040812090610b6f8282612bce565b5060006001919091015581610b83816134a5565b925050610b3f565b5050565b600160a060020a0381163314610c105760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610aad565b610b8b8282611fc2565b6000805160206135ee833981519152610c338133611dbc565b5060d08054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206135ee833981519152610c6f8133611dbc565b610c77612029565b50565b6000805160206135ee833981519152610c938133611dbc565b8160d35460d754610ca4919061342c565b610cae9190613407565b60d7555060d355565b6000805160206135ae833981519152610cd08133611dbc565b60975460ff1615610cf65760405160e560020a62461bcd028152600401610aad90613237565b610cff84612098565b60405184907f196c47048e38df7a4fe6e581c8f4f2e2ba67ac0dd45b90da756e97bd61d9dd3b90600090a2610a3e8383866120fd565b6000805160206135ee833981519152610d4e8133611dbc565b8160005b818110156109ef5760cd6000868684818110610d7057610d706134d9565b9050602002016020810190610d859190612cae565b600160a060020a0316815260208101919091526040016000208054600160a060020a031916905580610db6816134a5565b915050610d52565b600054610100900460ff1680610dd7575060005460ff16155b610df65760405160e560020a62461bcd028152600401610aad9061326e565b600054610100900460ff16158015610e18576000805461ffff19166101011790555b610e218261218b565b8015610b8b576000805461ff00191690555050565b60ca54610e885760405160e560020a62461bcd02815260206004820152600e60248201527f517565756520697320656d7074790000000000000000000000000000000000006044820152606401610aad565b60d68054906000610e98836134a5565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca604051610ecc919061315d565b60405180910390a2610ee060ca6000612bce565b565b60008051602061358e833981519152610efb8133611dbc565b610c776123a5565b6000805160206135ee833981519152610f1c8133611dbc565b50600160a060020a03918216600090815260cd602052604090208054600160a060020a03191691909216179055565b60975460ff1615610f715760405160e560020a62461bcd028152600401610aad90613237565b60cc545b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b8282101561100357600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101610fa9565b505050508152602001600182015481525050905080602001516000148061102d5750428160200151115b15611038575060cc55565b805161104390612400565b600082815260cb602052604081209061105c8282612bce565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a2508061109b816134a5565b915050610f75565b6000805160206135ee8339815191526110bc8133611dbc565b50600160a060020a0316600090815260cd602052604090208054600160a060020a0319169055565b3330146111365760405160e560020a62461bcd02815260206004820152601c60248201527f54686973206d6574686f642072657175697265206d756c7469736967000000006044820152606401610aad565b611141600033612694565b6111596000805160206135ae833981519152826115e2565b61117260008051602061358e833981519152878761269e565b61118a6000805160206135ce83398151915285612694565b6111a26000805160206135ae83398151915284612694565b6111ad6000836115e2565b505050505050565b60ce54600160a060020a03908116600090815260cd602052604090205416806112235760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610aad565b61122d82846133ef565b341161127e5760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c7565203c3d206665650000000000000000000000000000006044820152606401610aad565b60008261128b853461344b565b611295919061344b565b60ce549091506112b290600160a060020a031687878787866126e6565b60cf54604051600160a060020a039091169085156108fc029086906000818181858888f193505050501580156112ec573d6000803e3d6000fd5b5060d054604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611327573d6000803e3d6000fd5b5060ce60009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0826040518263ffffffff1660e060020a0281526004016000604051808303818588803b15801561137b57600080fd5b505af115801561138f573d6000803e3d6000fd5b505060408051606081018252600160a060020a0380881682528c81166020830190815282840188815260ca80546001810182556000918252945160039095027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054968616600160a060020a031997881617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee2840180549190951695169490941790925590517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d65491513395507f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f44494506114cc9350879087908b908b90958652600160a060020a0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b60405180910390a26114dc61287a565b50505050505050565b6000918252606560209081526040808420600160a060020a0393909316845291905290205460ff1690565b6000805160206135ee8339815191526115298133611dbc565b5060d455565b6000805160206135ee8339815191526115488133611dbc565b5060cf8054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206135ee8339815191526115848133611dbc565b60975460ff166115a95760405160e560020a62461bcd028152600401610aad90613200565b60cc548210156115ce5760405160e560020a62461bcd028152600401610aad906132cb565b6115d960018361344b565b60d5555060cc55565b6000828152606560205260409020600101546115fe8133611dbc565b610a6a8383611fc2565b6000838152606560205260409020600101546116248133611dbc565b610a3e84848461269e565b604080518082019091526060815260006020820152600082815260cb60209081526040808320815181546060948102820185018452928101838152909491938593919285929185015b828210156116d257600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611678565b5050505081526020016001820154815250509050919050565b6000805160206135ee8339815191526117048133611dbc565b5060c955565b60975460ff16156117305760405160e560020a62461bcd028152600401610aad90613237565b60cc5481146117845760405160e560020a62461bcd02815260206004820152601c60248201527f63616e20756e6c6f636b206f6e6c79206f6c64657374206576656e74000000006044820152606401610aad565b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b8282101561181257600084815260209081902060408051606081018252600386029092018054600160a060020a039081168452600180830154909116848601526002909101549183019190915290835290920191016117b8565b5050505081526020016001820154815250509050600081602001511161187d5760405160e560020a62461bcd02815260206004820181905260248201527f6e6f206c6f636b6564207472616e7366657273207769746820746869732069646044820152606401610aad565b428160200151106118d35760405160e560020a62461bcd02815260206004820152601b60248201527f6c6f636b54696d6520686173206e6f74207965742070617373656400000000006044820152606401610aad565b80516118de90612400565b600082815260cb60205260408120906118f78282612bce565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a26119368260016133ef565b60cc555050565b600085156119d2576000805260cd6020527fcd565b10a72538d86f6d352f37ebc5dff31587960b12c0afe00fd03947a6932a54600160a060020a038a81169116146119cd5760405160e560020a62461bcd02815260206004820152601f60248201527f546f6b656e206e6f7420706f696e7420746f206e617469766520746f6b656e006044820152606401610aad565b611a3e565b50600160a060020a03808916600090815260cd60205260409020541680611a3e5760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610aad565b611a4882846133ef565b3414611a995760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c756520213d206665650000000000000000000000000000006044820152606401610aad565b60008711611aec5760405160e560020a62461bcd02815260206004820152601160248201527f43616e6e6f7420776974686472617720300000000000000000000000000000006044820152606401610aad565b611afa89868686868c6126e6565b60cf54604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611b34573d6000803e3d6000fd5b5060d054604051600160a060020a039091169083156108fc029084906000818181858888f19350505050158015611b6f573d6000803e3d6000fd5b506040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101889052600160a060020a038a16906323b872dd90606401602060405180830381600087803b158015611bd757600080fd5b505af1158015611beb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c0f9190612f3b565b611c5e5760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610aad565b6040805160608082018352600160a060020a038481168084528c821660208086019182528587018e815260ca8054600181018255600091909152965160039097027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054988716600160a060020a0319998a1617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee284018054918716919098161790965594517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d6548551908152918e16938201939093529283019190915281018890526080810184905260a0810183905233907f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f4449060c00160405180910390a2611d9261287a565b505050505050505050565b6000805160206135ee833981519152611db68133611dbc565b5060d255565b611dc682826114e5565b610b8b57611dde81600160a060020a031660146128f2565b611de98360206128f2565b604051602001611dfa9291906130dc565b60408051601f198184030181529082905260e560020a62461bcd028252610aad916004016131cd565b828114611e9b5760405160e560020a62461bcd02815260206004820152603f60248201527f73697a6573206f6620746f6b656e5468697341646472657373657320616e642060448201527f746f6b656e53696465416464726573736573206d7573742062652073616d65006064820152608401610aad565b8260005b818110156111ad57838382818110611eb957611eb96134d9565b9050602002016020810190611ece9190612cae565b60cd6000888885818110611ee457611ee46134d9565b9050602002016020810190611ef99190612cae565b600160a060020a03908116825260208201929092526040016000208054600160a060020a0319169290911691909117905580611f34816134a5565b915050611e9f565b611f4682826114e5565b610b8b576000828152606560209081526040808320600160a060020a03851684529091529020805460ff19166001179055611f7e3390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611fcc82826114e5565b15610b8b576000828152606560209081526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60975460ff1661204e5760405160e560020a62461bcd028152600401610aad90613200565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051600160a060020a03909116815260200160405180910390a1565b60d5600081546120a7906134a5565b91829055508114610c775760405160e560020a62461bcd02815260206004820152601460248201527f4576656e744964206f7574206f66206f726465720000000000000000000000006044820152606401610aad565b60d45461210a90426133ef565b600082815260cb60205260408120600101919091555b82811015610a3e57600082815260cb60205260409020848483818110612148576121486134d9565b835460018101855560009485526020909420606090910292909201926003029091019050612176828261350b565b50508080612183906134a5565b915050612120565b600054610100900460ff16806121a4575060005460ff16155b6121c35760405160e560020a62461bcd028152600401610aad9061326e565b600054610100900460ff161580156121e5576000805461ffff19166101011790555b6121f0600030612694565b6122086000805160206135ee83398151915233612694565b61222f6000805160206135ae83398151915261222a6040850160208601612cae565b612694565b61225360008051602061358e83398151915261224e60408501856133a6565b61269e565b6122756000805160206135ce83398151915261222a6080850160608601612cae565b61229761228560a08401846133a6565b61229260c08601866133a6565b611e23565b6122a760a0830160808401612cae565b60ce8054600160a060020a031916600160a060020a03929092169190911790556122d46020830183612cae565b60d18054600160a060020a031916600160a060020a0392909216919091179055612305610100830160e08401612cae565b60cf8054600160a060020a031916600160a060020a039290921691909117905561233761012083016101008401612cae565b60d08054600160a060020a031916600160a060020a039290921691909117905561016082013560d25561012082013560d381905561014083013560d455600160cc81905560d655600360c95561238d9042613407565b60d7558015610b8b576000805461ff00191690555050565b60975460ff16156123cb5760405160e560020a62461bcd028152600401610aad90613237565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861207b3390565b60005b8151811015610b8b576000600160a060020a0316828281518110612429576124296134d9565b602002602001015160000151600160a060020a031614156125455760ce548251600160a060020a0390911690632e1a7d4d9084908490811061246d5761246d6134d9565b6020026020010151604001516040518263ffffffff1660e060020a02815260040161249a91815260200190565b600060405180830381600087803b1580156124b457600080fd5b505af11580156124c8573d6000803e3d6000fd5b505050508181815181106124de576124de6134d9565b602002602001015160200151600160a060020a03166108fc838381518110612508576125086134d9565b6020026020010151604001519081150290604051600060405180830381858888f1935050505015801561253f573d6000803e3d6000fd5b50612682565b818181518110612557576125576134d9565b602002602001015160000151600160a060020a031663a9059cbb838381518110612583576125836134d9565b6020026020010151602001518484815181106125a1576125a16134d9565b6020026020010151604001516040518363ffffffff1660e060020a0281526004016125e1929190600160a060020a03929092168252602082015260400190565b602060405180830381600087803b1580156125fb57600080fd5b505af115801561260f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126339190612f3b565b6126825760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610aad565b8061268c816134a5565b915050612403565b610b8b8282611f3c565b60005b81811015610a3e576126d4848484848181106126bf576126bf6134d9565b905060200201602081019061222a9190612cae565b806126de816134a5565b9150506126a1565b600080806126f661070842613407565b905060005b60c95481101561282e576040516c01000000000000000000000000600160a060020a038c160260208201526034810183905260548101889052607481018790526094810186905260b40160408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c016040516020818303038152906040528051906020012093506127e6848a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612b4392505050565b92506128006000805160206135ce833981519152846114e5565b1561280e57505050506111ad565b816128188161348e565b9250508080612826906134a5565b9150506126fb565b5060405160e560020a62461bcd02815260206004820152601660248201527f5369676e617475726520636865636b206661696c6564000000000000000000006044820152606401610aad565b600060d3544261288a9190613407565b905060d7548114610c775760d680549060006128a5836134a5565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca6040516128d9919061315d565b60405180910390a26128ed60ca6000612bce565b60d755565b6060600061290183600261342c565b61290c9060026133ef565b67ffffffffffffffff811115612924576129246134f2565b6040519080825280601f01601f19166020018201604052801561294e576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612985576129856134d9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106129e8576129e86134d9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612a2484600261342c565b612a2f9060016133ef565b90505b6001811115612aea577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612a7057612a706134d9565b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110612aa557612aa56134d9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350601090940493612ae38161348e565b9050612a32565b508315612b3c5760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610aad565b9392505050565b6020810151604082015160608301516000929190831a601b811015612b6657601b015b60408051600081526020810180835288905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa158015612bb9573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b5080546000825560030290600052602060002090810190610c7791905b80821115612c1d578054600160a060020a03199081168255600182018054909116905560006002820155600301612beb565b5090565b60008083601f840112612c3357600080fd5b50813567ffffffffffffffff811115612c4b57600080fd5b6020830191508360208083028501011115612c6557600080fd5b9250929050565b60008083601f840112612c7e57600080fd5b50813567ffffffffffffffff811115612c9657600080fd5b602083019150836020828501011115612c6557600080fd5b600060208284031215612cc057600080fd5b8135612b3c8161356a565b60008060408385031215612cde57600080fd5b8235612ce98161356a565b91506020830135612cf98161356a565b809150509250929050565b60008060008060008060008060e0898b031215612d2057600080fd5b8835612d2b8161356a565b97506020890135612d3b8161356a565b9650604089013595506060890135612d528161357f565b9450608089013567ffffffffffffffff811115612d6e57600080fd5b612d7a8b828c01612c6c565b999c989b5096999598969760a08701359660c0013595509350505050565b600080600080600060808688031215612db057600080fd5b8535612dbb8161356a565b9450602086013567ffffffffffffffff811115612dd757600080fd5b612de388828901612c6c565b9699909850959660408101359660609091013595509350505050565b60008060208385031215612e1257600080fd5b823567ffffffffffffffff811115612e2957600080fd5b612e3585828601612c21565b90969095509350505050565b60008060008060008060a08789031215612e5a57600080fd5b863567ffffffffffffffff811115612e7157600080fd5b612e7d89828a01612c21565b9097509550506020870135612e918161356a565b93506040870135612ea18161356a565b92506060870135612eb18161356a565b91506080870135612ec18161356a565b809150509295509295509295565b60008060008060408587031215612ee557600080fd5b843567ffffffffffffffff80821115612efd57600080fd5b612f0988838901612c21565b90965094506020870135915080821115612f2257600080fd5b50612f2f87828801612c21565b95989497509550505050565b600060208284031215612f4d57600080fd5b8151612b3c8161357f565b600060208284031215612f6a57600080fd5b5035919050565b60008060408385031215612f8457600080fd5b823591506020830135612cf98161356a565b600080600060408486031215612fab57600080fd5b83359250602084013567ffffffffffffffff811115612fc957600080fd5b612fd586828701612c21565b9497909650939450505050565b600060208284031215612ff457600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1981168114612b3c57600080fd5b60006020828403121561303357600080fd5b813567ffffffffffffffff81111561304a57600080fd5b82016101808185031215612b3c57600080fd5b60008060006040848603121561307257600080fd5b83359250602084013567ffffffffffffffff8082111561309157600080fd5b818601915086601f8301126130a557600080fd5b8135818111156130b457600080fd5b8760206060830285010111156130c957600080fd5b6020830194508093505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613114816017850160208801613462565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613151816028840160208801613462565b01602801949350505050565b60006020808301818452808554808352604092508286019150866000528360002060005b828110156131c0578154600160a060020a0390811685526001808401549091168786015260028301548686015260609094019360039092019101613181565b5091979650505050505050565b60208152600082518060208401526131ec816040850160208701613462565b601f01601f19169190910160400192915050565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b60208082526026908201527f6576656e744964206d757374206265203e3d206f6c646573744c6f636b65644560408201527f76656e7449640000000000000000000000000000000000000000000000000000606082015260800190565b6000602080835260608084018551604080858801528282518085526080890191508684019450600093505b808410156133905784518051600160a060020a03908116845288820151168884015283015183830152938601936001939093019290850190613353565b5094909701519590960194909452509392505050565b6000808335601e198436030181126133bd57600080fd5b83018035915067ffffffffffffffff8211156133d857600080fd5b6020908101925081023603821315612c6557600080fd5b60008219821115613402576134026134c0565b500190565b6000826134275760e060020a634e487b7102600052601260045260246000fd5b500490565b6000816000190483118215151615613446576134466134c0565b500290565b60008282101561345d5761345d6134c0565b500390565b60005b8381101561347d578181015183820152602001613465565b83811115610a3e5750506000910152565b60008161349d5761349d6134c0565b506000190190565b60006000198214156134b9576134b96134c0565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fd5b81356135168161356a565b8154600160a060020a031916600160a060020a03821617825550602082013561353e8161356a565b600182018054600160a060020a031916600160a060020a03831617905550604082013560028201555050565b600160a060020a0381168114610c7757600080fd5b8015158114610c7757600080fdfeb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887ea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220f119cfdf09ef1c5c8647b046a35b30b1c02a33d603e5f16512bf2873ac3ddf4464736f6c63430008060033", "deployedBytecode": "0x6080604052600436106102ec5760003560e060020a90048063853890ae11610194578063b87330e9116100e0578063deb9a3a211610099578063f700558711610073578063f7005587146108c4578063f862b7eb146108e4578063f8b7443314610904578063fd5d2ef31461091757600080fd5b8063deb9a3a214610857578063e31be08714610877578063f33fe10f146108a457600080fd5b8063b87330e9146107a9578063ba8bbbe0146107c9578063baeebe75146107df578063cf3317d3146107f5578063d3b89f4914610815578063d547741f1461083757600080fd5b806391d148541161014d57806399b5bb641161012757806399b5bb6414610726578063a217fddf1461073c578063a9b1cf0b14610751578063b6d3385e1461077357600080fd5b806391d14854146106d0578063924cf6e0146106f057806396cf52271461070657600080fd5b8063853890ae1461063257806386d7679e146106525780638ac1f86f146106685780638e5df9c71461067d5780638ff550e81461069d57806391c5bc0a146106bd57600080fd5b8063390d5388116102535780635249a7051161020c578063746b5c42116101e6578063746b5c42146105c657806375b238fc146105db5780637df8b802146105fd5780638456cb591461061d57600080fd5b80635249a7051461056e5780635a5f55bf1461058e5780635c975abb146105ae57600080fd5b8063390d5388146104a95780633928b296146104c95780633f4ba83a146104e957806342180fb8146104fe5780634a1856de1461051e5780635119b0ef1461054e57600080fd5b8063297c2677116102a5578063297c2677146103e55780632bbba847146103fb5780632f2ff15d14610411578063304561bb14610431578063331a891a1461046957806336568abe1461048957600080fd5b806301ffc9a7146102f8578063044218231461032d57806309fce3561461035d5780630d6680871461037f578063196f0f6214610395578063248a9ca3146103b557600080fd5b366102f357005b600080fd5b34801561030457600080fd5b50610318610313366004612fe2565b610937565b60405190151581526020015b60405180910390f35b34801561033957600080fd5b5061034f6000805160206135ae83398151915281565b604051908152602001610324565b34801561036957600080fd5b5061037d610378366004612ecf565b6109ca565b005b34801561038b57600080fd5b5061034f60d45481565b3480156103a157600080fd5b5061037d6103b0366004612f96565b6109f6565b3480156103c157600080fd5b5061034f6103d0366004612f58565b60009081526065602052604090206001015490565b3480156103f157600080fd5b5061034f60d65481565b34801561040757600080fd5b5060ca5415610318565b34801561041d57600080fd5b5061037d61042c366004612f71565b610a44565b34801561043d57600080fd5b5060cf5461045190600160a060020a031681565b604051600160a060020a039091168152602001610324565b34801561047557600080fd5b5061037d610484366004612f58565b610a6f565b34801561049557600080fd5b5061037d6104a4366004612f71565b610b8f565b3480156104b557600080fd5b5060d05461045190600160a060020a031681565b3480156104d557600080fd5b5061037d6104e4366004612cae565b610c1a565b3480156104f557600080fd5b5061037d610c56565b34801561050a57600080fd5b5061037d610519366004612f58565b610c7a565b34801561052a57600080fd5b5061034f610539366004612f58565b60cb6020526000908152604090206001015481565b34801561055a57600080fd5b5061037d61056936600461305d565b610cb7565b34801561057a57600080fd5b5061037d610589366004612dff565b610d35565b34801561059a57600080fd5b5061037d6105a9366004613021565b610dbe565b3480156105ba57600080fd5b5060975460ff16610318565b3480156105d257600080fd5b5061037d610e36565b3480156105e757600080fd5b5061034f6000805160206135ee83398151915281565b34801561060957600080fd5b5060ce5461045190600160a060020a031681565b34801561062957600080fd5b5061037d610ee2565b34801561063e57600080fd5b5061037d61064d366004612ccb565b610f03565b34801561065e57600080fd5b5061034f60d75481565b34801561067457600080fd5b5061037d610f4b565b34801561068957600080fd5b5061037d610698366004612cae565b6110a3565b3480156106a957600080fd5b5061037d6106b8366004612e41565b6110e4565b61037d6106cb366004612d98565b6111b5565b3480156106dc57600080fd5b506103186106eb366004612f71565b6114e5565b3480156106fc57600080fd5b5061034f60d25481565b34801561071257600080fd5b5061037d610721366004612f58565b611510565b34801561073257600080fd5b5061034f60d55481565b34801561074857600080fd5b5061034f600081565b34801561075d57600080fd5b5061034f60008051602061358e83398151915281565b34801561077f57600080fd5b5061045161078e366004612cae565b60cd60205260009081526040902054600160a060020a031681565b3480156107b557600080fd5b5061037d6107c4366004612cae565b61152f565b3480156107d557600080fd5b5061034f60cc5481565b3480156107eb57600080fd5b5061034f60d35481565b34801561080157600080fd5b5061037d610810366004612f58565b61156b565b34801561082157600080fd5b5061034f6000805160206135ce83398151915281565b34801561084357600080fd5b5061037d610852366004612f71565b6115e2565b34801561086357600080fd5b5061037d610872366004612f96565b611608565b34801561088357600080fd5b50610897610892366004612f58565b61162f565b6040516103249190613328565b3480156108b057600080fd5b5060d15461045190600160a060020a031681565b3480156108d057600080fd5b5061037d6108df366004612f58565b6116eb565b3480156108f057600080fd5b5061037d6108ff366004612f58565b61170a565b61037d610912366004612d04565b61193d565b34801561092357600080fd5b5061037d610932366004612f58565b611d9d565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b0000000000000000000000000000000000000000000000000000000014806109c457507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b6000805160206135ee8339815191526109e38133611dbc565b6109ef85858585611e23565b5050505050565b60005b81811015610a3e57610a2c84848484818110610a1757610a176134d9565b90506020020160208101906108529190612cae565b80610a36816134a5565b9150506109f9565b50505050565b600082815260656020526040902060010154610a608133611dbc565b610a6a8383611f3c565b505050565b6000805160206135ee833981519152610a888133611dbc565b60975460ff16610ab65760405160e560020a62461bcd028152600401610aad90613200565b60405180910390fd5b60cc54821015610adb5760405160e560020a62461bcd028152600401610aad906132cb565b60d554821115610b305760405160e560020a62461bcd02815260206004820152601f60248201527f6576656e744964206d757374206265203c3d20696e7075744576656e744964006044820152606401610aad565b610b3b60018361344b565b60d5555b600082815260cb602052604090206001015415610b8b57600082815260cb6020526040812090610b6f8282612bce565b5060006001919091015581610b83816134a5565b925050610b3f565b5050565b600160a060020a0381163314610c105760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610aad565b610b8b8282611fc2565b6000805160206135ee833981519152610c338133611dbc565b5060d08054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206135ee833981519152610c6f8133611dbc565b610c77612029565b50565b6000805160206135ee833981519152610c938133611dbc565b8160d35460d754610ca4919061342c565b610cae9190613407565b60d7555060d355565b6000805160206135ae833981519152610cd08133611dbc565b60975460ff1615610cf65760405160e560020a62461bcd028152600401610aad90613237565b610cff84612098565b60405184907f196c47048e38df7a4fe6e581c8f4f2e2ba67ac0dd45b90da756e97bd61d9dd3b90600090a2610a3e8383866120fd565b6000805160206135ee833981519152610d4e8133611dbc565b8160005b818110156109ef5760cd6000868684818110610d7057610d706134d9565b9050602002016020810190610d859190612cae565b600160a060020a0316815260208101919091526040016000208054600160a060020a031916905580610db6816134a5565b915050610d52565b600054610100900460ff1680610dd7575060005460ff16155b610df65760405160e560020a62461bcd028152600401610aad9061326e565b600054610100900460ff16158015610e18576000805461ffff19166101011790555b610e218261218b565b8015610b8b576000805461ff00191690555050565b60ca54610e885760405160e560020a62461bcd02815260206004820152600e60248201527f517565756520697320656d7074790000000000000000000000000000000000006044820152606401610aad565b60d68054906000610e98836134a5565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca604051610ecc919061315d565b60405180910390a2610ee060ca6000612bce565b565b60008051602061358e833981519152610efb8133611dbc565b610c776123a5565b6000805160206135ee833981519152610f1c8133611dbc565b50600160a060020a03918216600090815260cd602052604090208054600160a060020a03191691909216179055565b60975460ff1615610f715760405160e560020a62461bcd028152600401610aad90613237565b60cc545b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b8282101561100357600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101610fa9565b505050508152602001600182015481525050905080602001516000148061102d5750428160200151115b15611038575060cc55565b805161104390612400565b600082815260cb602052604081209061105c8282612bce565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a2508061109b816134a5565b915050610f75565b6000805160206135ee8339815191526110bc8133611dbc565b50600160a060020a0316600090815260cd602052604090208054600160a060020a0319169055565b3330146111365760405160e560020a62461bcd02815260206004820152601c60248201527f54686973206d6574686f642072657175697265206d756c7469736967000000006044820152606401610aad565b611141600033612694565b6111596000805160206135ae833981519152826115e2565b61117260008051602061358e833981519152878761269e565b61118a6000805160206135ce83398151915285612694565b6111a26000805160206135ae83398151915284612694565b6111ad6000836115e2565b505050505050565b60ce54600160a060020a03908116600090815260cd602052604090205416806112235760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610aad565b61122d82846133ef565b341161127e5760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c7565203c3d206665650000000000000000000000000000006044820152606401610aad565b60008261128b853461344b565b611295919061344b565b60ce549091506112b290600160a060020a031687878787866126e6565b60cf54604051600160a060020a039091169085156108fc029086906000818181858888f193505050501580156112ec573d6000803e3d6000fd5b5060d054604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611327573d6000803e3d6000fd5b5060ce60009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0826040518263ffffffff1660e060020a0281526004016000604051808303818588803b15801561137b57600080fd5b505af115801561138f573d6000803e3d6000fd5b505060408051606081018252600160a060020a0380881682528c81166020830190815282840188815260ca80546001810182556000918252945160039095027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054968616600160a060020a031997881617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee2840180549190951695169490941790925590517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d65491513395507f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f44494506114cc9350879087908b908b90958652600160a060020a0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b60405180910390a26114dc61287a565b50505050505050565b6000918252606560209081526040808420600160a060020a0393909316845291905290205460ff1690565b6000805160206135ee8339815191526115298133611dbc565b5060d455565b6000805160206135ee8339815191526115488133611dbc565b5060cf8054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206135ee8339815191526115848133611dbc565b60975460ff166115a95760405160e560020a62461bcd028152600401610aad90613200565b60cc548210156115ce5760405160e560020a62461bcd028152600401610aad906132cb565b6115d960018361344b565b60d5555060cc55565b6000828152606560205260409020600101546115fe8133611dbc565b610a6a8383611fc2565b6000838152606560205260409020600101546116248133611dbc565b610a3e84848461269e565b604080518082019091526060815260006020820152600082815260cb60209081526040808320815181546060948102820185018452928101838152909491938593919285929185015b828210156116d257600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101611678565b5050505081526020016001820154815250509050919050565b6000805160206135ee8339815191526117048133611dbc565b5060c955565b60975460ff16156117305760405160e560020a62461bcd028152600401610aad90613237565b60cc5481146117845760405160e560020a62461bcd02815260206004820152601c60248201527f63616e20756e6c6f636b206f6e6c79206f6c64657374206576656e74000000006044820152606401610aad565b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b8282101561181257600084815260209081902060408051606081018252600386029092018054600160a060020a039081168452600180830154909116848601526002909101549183019190915290835290920191016117b8565b5050505081526020016001820154815250509050600081602001511161187d5760405160e560020a62461bcd02815260206004820181905260248201527f6e6f206c6f636b6564207472616e7366657273207769746820746869732069646044820152606401610aad565b428160200151106118d35760405160e560020a62461bcd02815260206004820152601b60248201527f6c6f636b54696d6520686173206e6f74207965742070617373656400000000006044820152606401610aad565b80516118de90612400565b600082815260cb60205260408120906118f78282612bce565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a26119368260016133ef565b60cc555050565b600085156119d2576000805260cd6020527fcd565b10a72538d86f6d352f37ebc5dff31587960b12c0afe00fd03947a6932a54600160a060020a038a81169116146119cd5760405160e560020a62461bcd02815260206004820152601f60248201527f546f6b656e206e6f7420706f696e7420746f206e617469766520746f6b656e006044820152606401610aad565b611a3e565b50600160a060020a03808916600090815260cd60205260409020541680611a3e5760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610aad565b611a4882846133ef565b3414611a995760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c756520213d206665650000000000000000000000000000006044820152606401610aad565b60008711611aec5760405160e560020a62461bcd02815260206004820152601160248201527f43616e6e6f7420776974686472617720300000000000000000000000000000006044820152606401610aad565b611afa89868686868c6126e6565b60cf54604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611b34573d6000803e3d6000fd5b5060d054604051600160a060020a039091169083156108fc029084906000818181858888f19350505050158015611b6f573d6000803e3d6000fd5b506040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101889052600160a060020a038a16906323b872dd90606401602060405180830381600087803b158015611bd757600080fd5b505af1158015611beb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c0f9190612f3b565b611c5e5760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610aad565b6040805160608082018352600160a060020a038481168084528c821660208086019182528587018e815260ca8054600181018255600091909152965160039097027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054988716600160a060020a0319998a1617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee284018054918716919098161790965594517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d6548551908152918e16938201939093529283019190915281018890526080810184905260a0810183905233907f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f4449060c00160405180910390a2611d9261287a565b505050505050505050565b6000805160206135ee833981519152611db68133611dbc565b5060d255565b611dc682826114e5565b610b8b57611dde81600160a060020a031660146128f2565b611de98360206128f2565b604051602001611dfa9291906130dc565b60408051601f198184030181529082905260e560020a62461bcd028252610aad916004016131cd565b828114611e9b5760405160e560020a62461bcd02815260206004820152603f60248201527f73697a6573206f6620746f6b656e5468697341646472657373657320616e642060448201527f746f6b656e53696465416464726573736573206d7573742062652073616d65006064820152608401610aad565b8260005b818110156111ad57838382818110611eb957611eb96134d9565b9050602002016020810190611ece9190612cae565b60cd6000888885818110611ee457611ee46134d9565b9050602002016020810190611ef99190612cae565b600160a060020a03908116825260208201929092526040016000208054600160a060020a0319169290911691909117905580611f34816134a5565b915050611e9f565b611f4682826114e5565b610b8b576000828152606560209081526040808320600160a060020a03851684529091529020805460ff19166001179055611f7e3390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611fcc82826114e5565b15610b8b576000828152606560209081526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60975460ff1661204e5760405160e560020a62461bcd028152600401610aad90613200565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051600160a060020a03909116815260200160405180910390a1565b60d5600081546120a7906134a5565b91829055508114610c775760405160e560020a62461bcd02815260206004820152601460248201527f4576656e744964206f7574206f66206f726465720000000000000000000000006044820152606401610aad565b60d45461210a90426133ef565b600082815260cb60205260408120600101919091555b82811015610a3e57600082815260cb60205260409020848483818110612148576121486134d9565b835460018101855560009485526020909420606090910292909201926003029091019050612176828261350b565b50508080612183906134a5565b915050612120565b600054610100900460ff16806121a4575060005460ff16155b6121c35760405160e560020a62461bcd028152600401610aad9061326e565b600054610100900460ff161580156121e5576000805461ffff19166101011790555b6121f0600030612694565b6122086000805160206135ee83398151915233612694565b61222f6000805160206135ae83398151915261222a6040850160208601612cae565b612694565b61225360008051602061358e83398151915261224e60408501856133a6565b61269e565b6122756000805160206135ce83398151915261222a6080850160608601612cae565b61229761228560a08401846133a6565b61229260c08601866133a6565b611e23565b6122a760a0830160808401612cae565b60ce8054600160a060020a031916600160a060020a03929092169190911790556122d46020830183612cae565b60d18054600160a060020a031916600160a060020a0392909216919091179055612305610100830160e08401612cae565b60cf8054600160a060020a031916600160a060020a039290921691909117905561233761012083016101008401612cae565b60d08054600160a060020a031916600160a060020a039290921691909117905561016082013560d25561012082013560d381905561014083013560d455600160cc81905560d655600360c95561238d9042613407565b60d7558015610b8b576000805461ff00191690555050565b60975460ff16156123cb5760405160e560020a62461bcd028152600401610aad90613237565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861207b3390565b60005b8151811015610b8b576000600160a060020a0316828281518110612429576124296134d9565b602002602001015160000151600160a060020a031614156125455760ce548251600160a060020a0390911690632e1a7d4d9084908490811061246d5761246d6134d9565b6020026020010151604001516040518263ffffffff1660e060020a02815260040161249a91815260200190565b600060405180830381600087803b1580156124b457600080fd5b505af11580156124c8573d6000803e3d6000fd5b505050508181815181106124de576124de6134d9565b602002602001015160200151600160a060020a03166108fc838381518110612508576125086134d9565b6020026020010151604001519081150290604051600060405180830381858888f1935050505015801561253f573d6000803e3d6000fd5b50612682565b818181518110612557576125576134d9565b602002602001015160000151600160a060020a031663a9059cbb838381518110612583576125836134d9565b6020026020010151602001518484815181106125a1576125a16134d9565b6020026020010151604001516040518363ffffffff1660e060020a0281526004016125e1929190600160a060020a03929092168252602082015260400190565b602060405180830381600087803b1580156125fb57600080fd5b505af115801561260f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126339190612f3b565b6126825760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610aad565b8061268c816134a5565b915050612403565b610b8b8282611f3c565b60005b81811015610a3e576126d4848484848181106126bf576126bf6134d9565b905060200201602081019061222a9190612cae565b806126de816134a5565b9150506126a1565b600080806126f661070842613407565b905060005b60c95481101561282e576040516c01000000000000000000000000600160a060020a038c160260208201526034810183905260548101889052607481018790526094810186905260b40160408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c016040516020818303038152906040528051906020012093506127e6848a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612b4392505050565b92506128006000805160206135ce833981519152846114e5565b1561280e57505050506111ad565b816128188161348e565b9250508080612826906134a5565b9150506126fb565b5060405160e560020a62461bcd02815260206004820152601660248201527f5369676e617475726520636865636b206661696c6564000000000000000000006044820152606401610aad565b600060d3544261288a9190613407565b905060d7548114610c775760d680549060006128a5836134a5565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca6040516128d9919061315d565b60405180910390a26128ed60ca6000612bce565b60d755565b6060600061290183600261342c565b61290c9060026133ef565b67ffffffffffffffff811115612924576129246134f2565b6040519080825280601f01601f19166020018201604052801561294e576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612985576129856134d9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106129e8576129e86134d9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612a2484600261342c565b612a2f9060016133ef565b90505b6001811115612aea577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612a7057612a706134d9565b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110612aa557612aa56134d9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350601090940493612ae38161348e565b9050612a32565b508315612b3c5760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610aad565b9392505050565b6020810151604082015160608301516000929190831a601b811015612b6657601b015b60408051600081526020810180835288905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa158015612bb9573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b5080546000825560030290600052602060002090810190610c7791905b80821115612c1d578054600160a060020a03199081168255600182018054909116905560006002820155600301612beb565b5090565b60008083601f840112612c3357600080fd5b50813567ffffffffffffffff811115612c4b57600080fd5b6020830191508360208083028501011115612c6557600080fd5b9250929050565b60008083601f840112612c7e57600080fd5b50813567ffffffffffffffff811115612c9657600080fd5b602083019150836020828501011115612c6557600080fd5b600060208284031215612cc057600080fd5b8135612b3c8161356a565b60008060408385031215612cde57600080fd5b8235612ce98161356a565b91506020830135612cf98161356a565b809150509250929050565b60008060008060008060008060e0898b031215612d2057600080fd5b8835612d2b8161356a565b97506020890135612d3b8161356a565b9650604089013595506060890135612d528161357f565b9450608089013567ffffffffffffffff811115612d6e57600080fd5b612d7a8b828c01612c6c565b999c989b5096999598969760a08701359660c0013595509350505050565b600080600080600060808688031215612db057600080fd5b8535612dbb8161356a565b9450602086013567ffffffffffffffff811115612dd757600080fd5b612de388828901612c6c565b9699909850959660408101359660609091013595509350505050565b60008060208385031215612e1257600080fd5b823567ffffffffffffffff811115612e2957600080fd5b612e3585828601612c21565b90969095509350505050565b60008060008060008060a08789031215612e5a57600080fd5b863567ffffffffffffffff811115612e7157600080fd5b612e7d89828a01612c21565b9097509550506020870135612e918161356a565b93506040870135612ea18161356a565b92506060870135612eb18161356a565b91506080870135612ec18161356a565b809150509295509295509295565b60008060008060408587031215612ee557600080fd5b843567ffffffffffffffff80821115612efd57600080fd5b612f0988838901612c21565b90965094506020870135915080821115612f2257600080fd5b50612f2f87828801612c21565b95989497509550505050565b600060208284031215612f4d57600080fd5b8151612b3c8161357f565b600060208284031215612f6a57600080fd5b5035919050565b60008060408385031215612f8457600080fd5b823591506020830135612cf98161356a565b600080600060408486031215612fab57600080fd5b83359250602084013567ffffffffffffffff811115612fc957600080fd5b612fd586828701612c21565b9497909650939450505050565b600060208284031215612ff457600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1981168114612b3c57600080fd5b60006020828403121561303357600080fd5b813567ffffffffffffffff81111561304a57600080fd5b82016101808185031215612b3c57600080fd5b60008060006040848603121561307257600080fd5b83359250602084013567ffffffffffffffff8082111561309157600080fd5b818601915086601f8301126130a557600080fd5b8135818111156130b457600080fd5b8760206060830285010111156130c957600080fd5b6020830194508093505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613114816017850160208801613462565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613151816028840160208801613462565b01602801949350505050565b60006020808301818452808554808352604092508286019150866000528360002060005b828110156131c0578154600160a060020a0390811685526001808401549091168786015260028301548686015260609094019360039092019101613181565b5091979650505050505050565b60208152600082518060208401526131ec816040850160208701613462565b601f01601f19169190910160400192915050565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b60208082526026908201527f6576656e744964206d757374206265203e3d206f6c646573744c6f636b65644560408201527f76656e7449640000000000000000000000000000000000000000000000000000606082015260800190565b6000602080835260608084018551604080858801528282518085526080890191508684019450600093505b808410156133905784518051600160a060020a03908116845288820151168884015283015183830152938601936001939093019290850190613353565b5094909701519590960194909452509392505050565b6000808335601e198436030181126133bd57600080fd5b83018035915067ffffffffffffffff8211156133d857600080fd5b6020908101925081023603821315612c6557600080fd5b60008219821115613402576134026134c0565b500190565b6000826134275760e060020a634e487b7102600052601260045260246000fd5b500490565b6000816000190483118215151615613446576134466134c0565b500290565b60008282101561345d5761345d6134c0565b500390565b60005b8381101561347d578181015183820152602001613465565b83811115610a3e5750506000910152565b60008161349d5761349d6134c0565b506000190190565b60006000198214156134b9576134b96134c0565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fd5b81356135168161356a565b8154600160a060020a031916600160a060020a03821617825550602082013561353e8161356a565b600182018054600160a060020a031916600160a060020a03831617905550604082013560028201555050565b600160a060020a0381168114610c7757600080fd5b8015158114610c7757600080fdfeb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887ea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220f119cfdf09ef1c5c8647b046a35b30b1c02a33d603e5f16512bf2873ac3ddf4464736f6c63430008060033", @@ -1247,7 +1247,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 6726, + "astId": 2748, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "signatureFeeCheckNumber", "offset": 0, @@ -1255,23 +1255,23 @@ "type": "t_uint256" }, { - "astId": 6730, + "astId": 2752, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "queue", "offset": 0, "slot": "202", - "type": "t_array(t_struct(Transfer)7932_storage)dyn_storage" + "type": "t_array(t_struct(Transfer)3954_storage)dyn_storage" }, { - "astId": 6735, + "astId": 2757, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "lockedTransfers", "offset": 0, "slot": "203", - "type": "t_mapping(t_uint256,t_struct(LockedTransfers)7949_storage)" + "type": "t_mapping(t_uint256,t_struct(LockedTransfers)3971_storage)" }, { - "astId": 6737, + "astId": 2759, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "oldestLockedEventId", "offset": 0, @@ -1279,7 +1279,7 @@ "type": "t_uint256" }, { - "astId": 6741, + "astId": 2763, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "tokenAddresses", "offset": 0, @@ -1287,7 +1287,7 @@ "type": "t_mapping(t_address,t_address)" }, { - "astId": 6743, + "astId": 2765, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "wrapperAddress", "offset": 0, @@ -1295,7 +1295,7 @@ "type": "t_address" }, { - "astId": 6745, + "astId": 2767, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "transferFeeRecipient", "offset": 0, @@ -1303,7 +1303,7 @@ "type": "t_address_payable" }, { - "astId": 6747, + "astId": 2769, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "bridgeFeeRecipient", "offset": 0, @@ -1311,7 +1311,7 @@ "type": "t_address_payable" }, { - "astId": 6749, + "astId": 2771, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "sideBridgeAddress", "offset": 0, @@ -1319,7 +1319,7 @@ "type": "t_address" }, { - "astId": 6751, + "astId": 2773, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "minSafetyBlocks", "offset": 0, @@ -1327,7 +1327,7 @@ "type": "t_uint256" }, { - "astId": 6753, + "astId": 2775, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "timeframeSeconds", "offset": 0, @@ -1335,7 +1335,7 @@ "type": "t_uint256" }, { - "astId": 6755, + "astId": 2777, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "lockTime", "offset": 0, @@ -1343,7 +1343,7 @@ "type": "t_uint256" }, { - "astId": 6757, + "astId": 2779, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "inputEventId", "offset": 0, @@ -1351,7 +1351,7 @@ "type": "t_uint256" }, { - "astId": 6759, + "astId": 2781, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "outputEventId", "offset": 0, @@ -1359,7 +1359,7 @@ "type": "t_uint256" }, { - "astId": 6761, + "astId": 2783, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "lastTimeframe", "offset": 0, @@ -1367,7 +1367,7 @@ "type": "t_uint256" }, { - "astId": 7922, + "astId": 3944, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "__gap", "offset": 0, @@ -1375,7 +1375,7 @@ "type": "t_array(t_uint256)15_storage" }, { - "astId": 6656, + "astId": 2678, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "___gap", "offset": 0, @@ -1394,8 +1394,8 @@ "label": "address payable", "numberOfBytes": "20" }, - "t_array(t_struct(Transfer)7932_storage)dyn_storage": { - "base": "t_struct(Transfer)7932_storage", + "t_array(t_struct(Transfer)3954_storage)dyn_storage": { + "base": "t_struct(Transfer)3954_storage", "encoding": "dynamic_array", "label": "struct CommonStructs.Transfer[]", "numberOfBytes": "32" @@ -1449,27 +1449,27 @@ "numberOfBytes": "32", "value": "t_struct(RoleData)43_storage" }, - "t_mapping(t_uint256,t_struct(LockedTransfers)7949_storage)": { + "t_mapping(t_uint256,t_struct(LockedTransfers)3971_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct CommonStructs.LockedTransfers)", "numberOfBytes": "32", - "value": "t_struct(LockedTransfers)7949_storage" + "value": "t_struct(LockedTransfers)3971_storage" }, - "t_struct(LockedTransfers)7949_storage": { + "t_struct(LockedTransfers)3971_storage": { "encoding": "inplace", "label": "struct CommonStructs.LockedTransfers", "members": [ { - "astId": 7946, + "astId": 3968, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "transfers", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Transfer)7932_storage)dyn_storage" + "type": "t_array(t_struct(Transfer)3954_storage)dyn_storage" }, { - "astId": 7948, + "astId": 3970, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "endTimestamp", "offset": 0, @@ -1502,12 +1502,12 @@ ], "numberOfBytes": "64" }, - "t_struct(Transfer)7932_storage": { + "t_struct(Transfer)3954_storage": { "encoding": "inplace", "label": "struct CommonStructs.Transfer", "members": [ { - "astId": 7927, + "astId": 3949, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "tokenAddress", "offset": 0, @@ -1515,7 +1515,7 @@ "type": "t_address" }, { - "astId": 7929, + "astId": 3951, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "toAddress", "offset": 0, @@ -1523,7 +1523,7 @@ "type": "t_address" }, { - "astId": 7931, + "astId": 3953, "contract": "contracts/networks/BSC_BscBridge.sol:BSC_BscBridge", "label": "amount", "offset": 0, diff --git a/contracts/deployments/test/bsc/BSC_BscBridge_Proxy.json b/contracts/deployments/test/bsc/BSC_BscBridge_Proxy.json index b375224a..f60d9a92 100644 --- a/contracts/deployments/test/bsc/BSC_BscBridge_Proxy.json +++ b/contracts/deployments/test/bsc/BSC_BscBridge_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", "abi": [ { "inputs": [ @@ -615,50 +615,65 @@ "type": "receive" } ], - "transactionHash": "0xd7cf208cc6ff8fbaa4433a9ffba90e234b4636907435ab46262aa1a12186c347", + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", - "transactionIndex": 8, - "gasUsed": "2753579", - "logsBloom": "0x00000004000000000000002000000000400004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000002000000000020000000000000020000000000100000020000000000000000000800000000000000000808000000000000000000002000000000000000000000004000000000000000020000000000000020000020000000000000040000000000000000000000000000001000000000000000000020400000000000000000000000000000000000000100000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0fb826f64b00042c1deb0f63033536c72174c45b3f7d6996d64c5c4df0327bcd", - "transactionHash": "0xd7cf208cc6ff8fbaa4433a9ffba90e234b4636907435ab46262aa1a12186c347", + "contractAddress": "0x8619f5E8315aff3E7Eba238492906329414084Da", + "transactionIndex": 3, + "gasUsed": "2483268", + "logsBloom": "0x00000004000000040000002000000000400000000000000000004000000000080000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000002008000000020000000000000001000000400000004020000000000000000000800000000000000000800000000000000000000202000000000000000000000004000000000000000020000000800000000000020000020000000041000000020000000000000000000001000000000000000000020400000000000000000000000000000000000000100000000000020000000000000000000000000000000000000000000c00000000000000000000000", + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060", + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", "logs": [ { - "transactionIndex": 8, - "blockNumber": 23637484, - "transactionHash": "0xd7cf208cc6ff8fbaa4433a9ffba90e234b4636907435ab46262aa1a12186c347", - "address": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", + "transactionIndex": 3, + "blockNumber": 28469797, + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000004f30e523254d5d609d17bfa610be5a39bda40166" + "0x000000000000000000000000c3b24de6c62f16a2d6d8ab334f9b2c92d826bd74" ], "data": "0x", - "logIndex": 7, - "blockHash": "0x0fb826f64b00042c1deb0f63033536c72174c45b3f7d6996d64c5c4df0327bcd" + "logIndex": 2, + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060" }, { - "transactionIndex": 8, - "blockNumber": 23637484, - "transactionHash": "0xd7cf208cc6ff8fbaa4433a9ffba90e234b4636907435ab46262aa1a12186c347", - "address": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", + "transactionIndex": 3, + "blockNumber": 28469797, + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000008619f5e8315aff3e7eba238492906329414084da", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060" + }, + { + "transactionIndex": 3, + "blockNumber": 28469797, + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", - "logIndex": 8, - "blockHash": "0x0fb826f64b00042c1deb0f63033536c72174c45b3f7d6996d64c5c4df0327bcd" + "logIndex": 4, + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060" }, { - "transactionIndex": 8, - "blockNumber": 23637484, - "transactionHash": "0xd7cf208cc6ff8fbaa4433a9ffba90e234b4636907435ab46262aa1a12186c347", - "address": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", + "transactionIndex": 3, + "blockNumber": 28469797, + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", @@ -666,40 +681,55 @@ "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", - "logIndex": 9, - "blockHash": "0x0fb826f64b00042c1deb0f63033536c72174c45b3f7d6996d64c5c4df0327bcd" + "logIndex": 5, + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060" }, { - "transactionIndex": 8, - "blockNumber": 23637484, - "transactionHash": "0xd7cf208cc6ff8fbaa4433a9ffba90e234b4636907435ab46262aa1a12186c347", - "address": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", + "transactionIndex": 3, + "blockNumber": 28469797, + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0xb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", - "logIndex": 10, - "blockHash": "0x0fb826f64b00042c1deb0f63033536c72174c45b3f7d6996d64c5c4df0327bcd" + "logIndex": 6, + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060" + }, + { + "transactionIndex": 3, + "blockNumber": 28469797, + "transactionHash": "0x2f33eba8590ac1f8e65f3a6c84a24f2df1685f403b5355e0dfa9db3e882bd5e7", + "address": "0x8619f5E8315aff3E7Eba238492906329414084Da", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0x855ab63f221c84a24d380593fde432e602b67ff4ceba2b0719315c5af7726060" } ], - "blockNumber": 23637484, - "cumulativeGasUsed": "3205652", + "blockNumber": 28469797, + "cumulativeGasUsed": "2602622", "status": 1, "byzantium": true }, "args": [ - "0x4F30e523254d5d609D17BFa610Be5A39bDA40166", - "0x169e7a9900000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000000000f0002d02acfe900f1e256bc2f3458701ec3a0c8689471bb4b056a290d3366bc25d20000000000000000000000000000000000000000000000000000000000000002000000000000000000000000a09de74437d2453df47def3f5c2d14cd3f0cf8c0000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000008601876f8a6dccae5ce8cf154f710e09c3f0f2c800000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000daa9ee2ab371e31a75faf93d0b859561a5d8a58f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000008601876f8a6dccae5ce8cf154f710e09c3f0f2c80000000000000000000000003a5633bae0243bb360e25624dc6dfd241333b5750000000000000000000000000000000000000000000000000000000000000004000000000000000000000000da9bb33f9e3334781f3e4fce310288d7db3ed29a000000000000000000000000daa9ee2ab371e31a75faf93d0b859561a5d8a58f000000000000000000000000d52f6e6ad16904a23e5ca0309098652502ca97e800000000000000000000000056a79d39fc414ff11ebb30d6a5367ea5da8c6fe9000000000000000000000000000000000000000000000000000000000000000d000000000000000000000000311b7e7d0795c9697c6ed20b962f844e1e1f08ba0000000000000000000000005a16b69a09013c077a70fc62a3705dbf1b60c2b000000000000000000000000091a48ebafb1c6bc89000b0f63850bef1258a082b000000000000000000000000042cab4fe91f0fb00936a2b9b262a1f9cf88aad200000000000000000000000062291e77dc079897751e26a9f6b3bc4630d7454c000000000000000000000000a373f89f90ecef9f430719ed83ed49722b98fd0900000000000000000000000051213f81319e42f6296c29beea1245c5f78f2def000000000000000000000000de3939bee9a4b0ab8272bdd06d6b6e7e917fb51400000000000000000000000052ab486a5067cd8e2705dbc90ed72d6da549d0eb000000000000000000000000a5384d3e54880eb433361f516e0aeb08ad1b58a3000000000000000000000000f4b075fdf227219ff2f72fe87641adcdfdc019bc000000000000000000000000c1e639642a242396c420c4880abb3599fb69d242000000000000000000000000fcf23c040142999e1c9894b421544aaa5805a21b", + "0xc3B24De6c62f16A2D6D8AB334F9b2c92D826BD74", + "0x5a5f55bf0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000dc103bf9a3789f78958f365321f3ba07e369667a000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000000000000000000000000000000000000000000180000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000003050a5cbe1ec89917933476a99962a40e802b89c00000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000c61d0cfadc9be2ef05288d04ebcc8ec8035d7ac600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003050a5cbe1ec89917933476a99962a40e802b89c0000000000000000000000009ce86a22e9a89a4d716ee23d057389c3df3e26a500000000000000000000000062c6e4534594ad39307fe654d5260f12010a297e000000000000000000000000446c2dae148049e53d0489a8cc0d7e55cf3da5df00000000000000000000000000000000000000000000000000000000000000060000000000000000000000007cee2ae3042d2c646aa24facfa92dfee589046f0000000000000000000000000c61d0cfadc9be2ef05288d04ebcc8ec8035d7ac6000000000000000000000000871c1f199bd17f1cbed559de974a7f1568b6e1ea000000000000000000000000952b98dbda3319bf0e339cc9cc574ff768f80f3c0000000000000000000000001bb13b68dba3571415b4092802777b5ca15de897000000000000000000000000fb069affe6e75674fabf67108e9094fb988a31d9", [ "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" ], 1 ], "numDeployments": 1, - "solcInputHash": "63b1c355e88e8fd19ebe2cd692a8475b", + "solcInputHash": "54d2ddebdc6c37a1b4fd5c90d287707b", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Confirmation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Execution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"ExecutionFailure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerAddition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerRemoval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"required\",\"type\":\"uint256\"}],\"name\":\"RequirementChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Revocation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Submission\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"MAX_OWNER_COUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"_upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"name\":\"changeRequirement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"confirmTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"confirmations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmationCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmations\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"_confirmations\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"to\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_transactionIds\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"isConfirmed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"owners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"replaceOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"required\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"revokeConfirmation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"submitTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addOwner(address)\":{\"details\":\"Allows to add a new owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of new owner.\"}},\"changeRequirement(uint256)\":{\"details\":\"Allows to change the number of required confirmations. Transaction has to be sent by wallet.\",\"params\":{\"_required\":\"Number of required confirmations.\"}},\"confirmTransaction(uint256)\":{\"details\":\"Allows an owner to confirm a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"executeTransaction(uint256)\":{\"details\":\"Allows anyone to execute a confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"getConfirmationCount(uint256)\":{\"details\":\"Returns number of confirmations of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"count\":\"Number of confirmations.\"}},\"getConfirmations(uint256)\":{\"details\":\"Returns array with owner addresses, which confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_confirmations\":\"Returns array of owner addresses.\"}},\"getOwners()\":{\"details\":\"Returns list of owners.\",\"returns\":{\"_0\":\"List of owner addresses.\"}},\"getTransactionCount(bool,bool)\":{\"details\":\"Returns total number of transactions after filers are applied.\",\"params\":{\"executed\":\"Include executed transactions.\",\"pending\":\"Include pending transactions.\"},\"returns\":{\"count\":\"Total number of transactions after filters are applied.\"}},\"getTransactionIds(uint256,uint256,bool,bool)\":{\"details\":\"Returns list of transaction IDs in defined range.\",\"params\":{\"executed\":\"Include executed transactions.\",\"from\":\"Index start position of transaction array.\",\"pending\":\"Include pending transactions.\",\"to\":\"Index end position of transaction array.\"},\"returns\":{\"_transactionIds\":\"Returns array of transaction IDs.\"}},\"isConfirmed(uint256)\":{\"details\":\"Returns the confirmation status of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_0\":\"Confirmation status.\"}},\"removeOwner(address)\":{\"details\":\"Allows to remove an owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of owner.\"}},\"replaceOwner(address,address)\":{\"details\":\"Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\",\"params\":{\"newOwner\":\"Address of new owner.\",\"owner\":\"Address of owner to be replaced.\"}},\"revokeConfirmation(uint256)\":{\"details\":\"Allows an owner to revoke a confirmation for a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"submitTransaction(address,uint256,bytes)\":{\"details\":\"Allows an owner to submit and confirm a transaction.\",\"params\":{\"data\":\"Transaction data payload.\",\"destination\":\"Transaction target address.\",\"value\":\"Transaction ether value.\"},\"returns\":{\"transactionId\":\"Returns transaction ID.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/utils/Proxy.sol\":\"ProxyMultiSig\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \\\"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(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) 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 require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/utils/MultiSigWallet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\n\\ncontract MultiSigWallet {\\n\\n /*\\n * Events\\n */\\n event Confirmation(address indexed sender, uint indexed transactionId);\\n event Revocation(address indexed sender, uint indexed transactionId);\\n event Submission(uint indexed transactionId);\\n event Execution(uint indexed transactionId);\\n event ExecutionFailure(uint indexed transactionId);\\n event OwnerAddition(address indexed owner);\\n event OwnerRemoval(address indexed owner);\\n event RequirementChange(uint required);\\n\\n /*\\n * Constants\\n */\\n uint constant public MAX_OWNER_COUNT = 50;\\n\\n /*\\n * Storage\\n */\\n mapping(uint => Transaction) public transactions;\\n mapping(uint => mapping(address => bool)) public confirmations;\\n mapping(address => bool) public isOwner;\\n address[] public owners;\\n uint public required;\\n uint public transactionCount;\\n\\n struct Transaction {\\n address destination;\\n uint value;\\n bytes data;\\n bool executed;\\n }\\n\\n /*\\n * Modifiers\\n */\\n modifier onlyWallet() {\\n require(msg.sender == address(this));\\n _;\\n }\\n\\n modifier ownerDoesNotExist(address owner) {\\n require(!isOwner[owner]);\\n _;\\n }\\n\\n modifier ownerExists(address owner) {\\n require(isOwner[owner]);\\n _;\\n }\\n\\n modifier transactionExists(uint transactionId) {\\n require(transactions[transactionId].destination != address(0));\\n _;\\n }\\n\\n modifier confirmed(uint transactionId, address owner) {\\n require(confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notConfirmed(uint transactionId, address owner) {\\n require(!confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notExecuted(uint transactionId) {\\n require(!transactions[transactionId].executed);\\n _;\\n }\\n\\n modifier notNull(address _address) {\\n require(_address != address(0));\\n _;\\n }\\n\\n modifier validRequirement(uint ownerCount, uint _required) {\\n require(ownerCount <= MAX_OWNER_COUNT\\n && _required <= ownerCount\\n && _required != 0\\n && ownerCount != 0);\\n _;\\n }\\n\\n /*\\n * Public functions\\n */\\n /// @dev Contract constructor sets initial owners and required number of confirmations.\\n /// @param _owners List of initial owners.\\n /// @param _required Number of required confirmations.\\n constructor(address[] memory _owners, uint _required)\\n validRequirement(_owners.length, _required)\\n {\\n for (uint i = 0; i < _owners.length; i++) {\\n require(!isOwner[_owners[i]] && _owners[i] != address(0));\\n isOwner[_owners[i]] = true;\\n }\\n owners = _owners;\\n required = _required;\\n }\\n\\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of new owner.\\n function addOwner(address owner)\\n public\\n onlyWallet\\n ownerDoesNotExist(owner)\\n notNull(owner)\\n validRequirement(owners.length + 1, required)\\n {\\n isOwner[owner] = true;\\n owners.push(owner);\\n emit OwnerAddition(owner);\\n }\\n\\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner.\\n function removeOwner(address owner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n {\\n isOwner[owner] = false;\\n for (uint i = 0; i < owners.length - 1; i++)\\n if (owners[i] == owner) {\\n owners[i] = owners[owners.length - 1];\\n break;\\n }\\n owners.pop();\\n if (required > owners.length)\\n changeRequirement(owners.length);\\n emit OwnerRemoval(owner);\\n }\\n\\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner to be replaced.\\n /// @param newOwner Address of new owner.\\n function replaceOwner(address owner, address newOwner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n ownerDoesNotExist(newOwner)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (owners[i] == owner) {\\n owners[i] = newOwner;\\n break;\\n }\\n isOwner[owner] = false;\\n isOwner[newOwner] = true;\\n emit OwnerRemoval(owner);\\n emit OwnerAddition(newOwner);\\n }\\n\\n /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\\n /// @param _required Number of required confirmations.\\n function changeRequirement(uint _required)\\n public\\n onlyWallet\\n validRequirement(owners.length, _required)\\n {\\n required = _required;\\n emit RequirementChange(_required);\\n }\\n\\n /// @dev Allows an owner to submit and confirm a transaction.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function submitTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) public returns (uint transactionId)\\n {\\n transactionId = addTransaction(destination, value, data);\\n confirmTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to confirm a transaction.\\n /// @param transactionId Transaction ID.\\n function confirmTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n transactionExists(transactionId)\\n notConfirmed(transactionId, msg.sender)\\n {\\n confirmations[transactionId][msg.sender] = true;\\n emit Confirmation(msg.sender, transactionId);\\n executeTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to revoke a confirmation for a transaction.\\n /// @param transactionId Transaction ID.\\n function revokeConfirmation(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n confirmations[transactionId][msg.sender] = false;\\n emit Revocation(msg.sender, transactionId);\\n }\\n\\n /// @dev Allows anyone to execute a confirmed transaction.\\n /// @param transactionId Transaction ID.\\n function executeTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n if (isConfirmed(transactionId)) {\\n Transaction storage txn = transactions[transactionId];\\n txn.executed = true;\\n if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\\n emit Execution(transactionId);\\n else {\\n emit ExecutionFailure(transactionId);\\n txn.executed = false;\\n }\\n }\\n }\\n\\n // call has been separated into its own function in order to take advantage\\n // of the Solidity's code generator to produce a loop that copies tx.data into memory.\\n function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) {\\n bool result;\\n assembly {\\n let x := mload(0x40) // \\\"Allocate\\\" memory for output (0x40 is where \\\"free memory\\\" pointer is stored by convention)\\n let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\\n result := call(\\n sub(gas(), 36810), // 34710 is the value that solidity is currently emitting // todo\\n // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\\n // callNewAccountGas (25000, in case the destination address does not exist and needs creating) +\\n // gasSLoadEIP2929 (2100)\\n\\n destination,\\n value,\\n d,\\n dataLength, // Size of the input (in bytes) - this is what fixes the padding problem\\n x,\\n 0 // Output is ignored, therefore the output size is zero\\n )\\n }\\n return result;\\n }\\n\\n /// @dev Returns the confirmation status of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return Confirmation status.\\n function isConfirmed(uint transactionId) public view returns (bool)\\n {\\n uint count = 0;\\n for (uint i = 0; i < owners.length; i++) {\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n if (count == required)\\n return true;\\n }\\n return false;\\n }\\n\\n /*\\n * Internal functions\\n */\\n /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function addTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) internal\\n notNull(destination) returns (uint transactionId)\\n {\\n transactionId = transactionCount;\\n transactions[transactionId] = Transaction({\\n destination : destination,\\n value : value,\\n data : data,\\n executed : false\\n });\\n transactionCount += 1;\\n emit Submission(transactionId);\\n }\\n\\n /*\\n * Web3 call functions\\n */\\n /// @dev Returns number of confirmations of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return count Number of confirmations.\\n function getConfirmationCount(uint transactionId)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n }\\n\\n /// @dev Returns total number of transactions after filers are applied.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return count Total number of transactions after filters are applied.\\n function getTransactionCount(bool pending, bool executed)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n count += 1;\\n }\\n\\n /// @dev Returns list of owners.\\n /// @return List of owner addresses.\\n function getOwners() public view returns (address[] memory)\\n {\\n return owners;\\n }\\n\\n /// @dev Returns array with owner addresses, which confirmed transaction.\\n /// @param transactionId Transaction ID.\\n /// @return _confirmations Returns array of owner addresses.\\n function getConfirmations(uint transactionId) public view\\n returns (address[] memory _confirmations)\\n {\\n address[] memory confirmationsTemp = new address[](owners.length);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]]) {\\n confirmationsTemp[count] = owners[i];\\n count += 1;\\n }\\n _confirmations = new address[](count);\\n for (i = 0; i < count; i++)\\n _confirmations[i] = confirmationsTemp[i];\\n }\\n\\n /// @dev Returns list of transaction IDs in defined range.\\n /// @param from Index start position of transaction array.\\n /// @param to Index end position of transaction array.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return _transactionIds Returns array of transaction IDs.\\n function getTransactionIds(uint from, uint to, bool pending, bool executed)\\n public\\n view\\n returns (uint[] memory _transactionIds)\\n {\\n uint[] memory transactionIdsTemp = new uint[](transactionCount);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n {\\n transactionIdsTemp[count] = i;\\n count += 1;\\n }\\n _transactionIds = new uint[](to - from);\\n for (i = from; i < to; i++)\\n _transactionIds[i - from] = transactionIdsTemp[i];\\n }\\n}\\n\",\"keccak256\":\"0x1630487b4e9acd29e4c4ea04eff94b838660e39d009c0668c5213c209fb2f883\",\"license\":\"MIT\"},\"contracts/utils/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/proxy/Proxy.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport \\\"./MultiSigWallet.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\n\\ncontract ProxyMultiSig is Proxy, MultiSigWallet {\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n bytes32 private constant ADMIN_STORAGE_LOCATION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n bytes4 private constant _UPGRADE_TO_AND_CALL_SIGNATURE = bytes4(keccak256(\\\"_upgradeToAndCall(address,bytes)\\\"));\\n\\n event Upgraded(address indexed implementation);\\n\\n\\n constructor(\\n address _logic,\\n bytes memory _data,\\n address[] memory owners,\\n uint _required\\n\\n ) MultiSigWallet(owners, _required) {\\n // Cannot use _upgradeToAndCall because of onlyWallet modifier\\n _upgradeTo(_logic);\\n if (_data.length > 0) {\\n Address.functionDelegateCall(_logic, _data);\\n }\\n\\n StorageSlot.getAddressSlot(ADMIN_STORAGE_LOCATION).value = msg.sender; // trick the hardhat-deploy\\n }\\n\\n\\n function implementation() external view returns (address) {\\n return _implementation();\\n }\\n\\n function upgradeTo(address newImplementation) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, bytes(\\\"\\\"))\\n );\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, data)\\n );\\n }\\n\\n function _upgradeToAndCall(address newImplementation, bytes memory data) external onlyWallet payable {\\n _upgradeTo(newImplementation);\\n if (data.length > 0) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n function _upgradeTo(address newImplementation) internal {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n emit Upgraded(newImplementation);\\n }\\n\\n function _implementation() internal view override returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n}\\n\",\"keccak256\":\"0x9e2738f9167ae4a747ac4e8622c443ad735a257630293dee633535dae02863d5\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200285f3803806200285f833981016040819052620000349162000645565b8181815181603282111580156200004b5750818111155b80156200005757508015155b80156200006357508115155b6200006d57600080fd5b60005b845181101562000163576002600086838151811062000093576200009362000821565b602090810291909101810151600160a060020a031682528101919091526040016000205460ff16158015620000f757506000600160a060020a0316858281518110620000e357620000e362000821565b6020026020010151600160a060020a031614155b6200010157600080fd5b6001600260008784815181106200011c576200011c62000821565b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055806200015a81620007de565b91505062000070565b5083516200017990600390602087019062000511565b5050506004555062000194846401000000006200021b810204565b825115620001b857620001b68484640100000000620015686200034a82021704565b505b33620001f27fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a0392909216919091179055506200087f92505050565b6200023481640100000000620015906200038582021704565b620002c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b80620003007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a03928316179055604051908216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200037b838360405180606001604052806027815260200162002838602791396401000000006200038b810204565b9392505050565b90565b3b151590565b6060620003a18464010000000062000385810204565b6200042f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401620002bd565b60008085600160a060020a0316856040516200044c919062000725565b600060405180830381855af49150503d806000811462000489576040519150601f19603f3d011682016040523d82523d6000602084013e6200048e565b606091505b5091509150620004af828286620004b9640100000000026401000000009004565b9695505050505050565b60608315620004ca5750816200037b565b825115620004db5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002bd919062000743565b82805482825590600052602060002090810192821562000569579160200282015b82811115620005695782518254600160a060020a031916600160a060020a0390911617825560209092019160019091019062000532565b50620005779291506200057b565b5090565b5b808211156200057757600081556001016200057c565b8051600160a060020a0381168114620005aa57600080fd5b919050565b600082601f830112620005c157600080fd5b815160206001604060020a03821115620005df57620005df62000850565b808202620005ef82820162000778565b8381528281019086840183880185018910156200060b57600080fd5b600093505b858410156200063957620006248162000592565b83526001939093019291840191840162000610565b50979650505050505050565b600080600080608085870312156200065c57600080fd5b620006678562000592565b935060208501516001604060020a03808211156200068457600080fd5b818701915087601f8301126200069957600080fd5b815181811115620006ae57620006ae62000850565b620006c3601f8201601f191660200162000778565b818152896020838601011115620006d957600080fd5b620006ec826020830160208701620007ab565b6040890151909650925050808211156200070557600080fd5b506200071487828801620005af565b606096909601519497939650505050565b6000825162000739818460208701620007ab565b9190910192915050565b602081526000825180602084015262000764816040850160208701620007ab565b601f01601f19169190910160400192915050565b604051601f8201601f191681016001604060020a0381118282101715620007a357620007a362000850565b604052919050565b60005b83811015620007c8578181015183820152602001620007ae565b83811115620007d8576000848401525b50505050565b60006000198214156200081a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611fa9806200088f6000396000f3fe608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033", @@ -826,15 +856,15 @@ "storageLayout": { "storage": [ { - "astId": 9567, + "astId": 454, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "transactions", "offset": 0, "slot": "0", - "type": "t_mapping(t_uint256,t_struct(Transaction)9593_storage)" + "type": "t_mapping(t_uint256,t_struct(Transaction)480_storage)" }, { - "astId": 9573, + "astId": 460, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "confirmations", "offset": 0, @@ -842,7 +872,7 @@ "type": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" }, { - "astId": 9577, + "astId": 464, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "isOwner", "offset": 0, @@ -850,7 +880,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 9580, + "astId": 467, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "owners", "offset": 0, @@ -858,7 +888,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 9582, + "astId": 469, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "required", "offset": 0, @@ -866,7 +896,7 @@ "type": "t_uint256" }, { - "astId": 9584, + "astId": 471, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "transactionCount", "offset": 0, @@ -910,19 +940,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_bool)" }, - "t_mapping(t_uint256,t_struct(Transaction)9593_storage)": { + "t_mapping(t_uint256,t_struct(Transaction)480_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct MultiSigWallet.Transaction)", "numberOfBytes": "32", - "value": "t_struct(Transaction)9593_storage" + "value": "t_struct(Transaction)480_storage" }, - "t_struct(Transaction)9593_storage": { + "t_struct(Transaction)480_storage": { "encoding": "inplace", "label": "struct MultiSigWallet.Transaction", "members": [ { - "astId": 9586, + "astId": 473, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "destination", "offset": 0, @@ -930,7 +960,7 @@ "type": "t_address" }, { - "astId": 9588, + "astId": 475, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "value", "offset": 0, @@ -938,7 +968,7 @@ "type": "t_uint256" }, { - "astId": 9590, + "astId": 477, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "data", "offset": 0, @@ -946,7 +976,7 @@ "type": "t_bytes_storage" }, { - "astId": 9592, + "astId": 479, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "executed", "offset": 0, @@ -963,4 +993,4 @@ } } } -} +} \ No newline at end of file diff --git a/contracts/deployments/test/bsc/BUSD.json b/contracts/deployments/test/bsc/BUSD.json index 7ad9b8ec..f9ea10c2 100644 --- a/contracts/deployments/test/bsc/BUSD.json +++ b/contracts/deployments/test/bsc/BUSD.json @@ -1,5 +1,5 @@ { - "address": "0x7E0F09c8c2aAf4743B57355edb051F5E5ED6F73d", + "address": "0x446c2daE148049E53D0489A8cc0D7E55CF3Da5df", "abi": [ { "inputs": [ @@ -311,19 +311,19 @@ "type": "function" } ], - "transactionHash": "0x9ec56f3b6cbb79aeb1e59c22a90a7e5e1b135b9f757e4979ba8c3cdcfeed85da", + "transactionHash": "0xc00021cbd80745593b3d6bf19484b92e96a6439f1caf4b901b54d667db231eee", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x7E0F09c8c2aAf4743B57355edb051F5E5ED6F73d", - "transactionIndex": 2, + "contractAddress": "0x446c2daE148049E53D0489A8cc0D7E55CF3Da5df", + "transactionIndex": 0, "gasUsed": "729131", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x16ef2eb2db0141f0380422c884ba8cc4440d38f21e6f673aab5964969674a665", - "transactionHash": "0x9ec56f3b6cbb79aeb1e59c22a90a7e5e1b135b9f757e4979ba8c3cdcfeed85da", + "blockHash": "0x0ca809c5099cab4540611fb582fb426fc550f60bf16b8b6c4a3627b97236032e", + "transactionHash": "0xc00021cbd80745593b3d6bf19484b92e96a6439f1caf4b901b54d667db231eee", "logs": [], - "blockNumber": 24244050, - "cumulativeGasUsed": "798544", + "blockNumber": 28469770, + "cumulativeGasUsed": "729131", "status": 1, "byzantium": true }, @@ -333,7 +333,7 @@ 18 ], "numDeployments": 1, - "solcInputHash": "14835e48c656ebed02c4fc9389a12566", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/contracts_for_tests/MintableERC20.sol\":\"MintableERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/contracts_for_tests/MintableERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ncontract MintableERC20 is ERC20 {\\n uint8 _decimals;\\n\\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function mint(address to, uint256 amount) public {\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0x2c98fb67e868a6ec093346b029e1bacb57b6200aa1c37035f04298ad6eea4851\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b5060405162000de338038062000de38339810160408190526200003491620001e1565b8251839083906200004d90600390602085019062000084565b5080516200006390600490602084019062000084565b50506005805460ff191660ff939093169290921790915550620002eb915050565b828054620000929062000266565b90600052602060002090601f016020900481019282620000b6576000855562000101565b82601f10620000d157805160ff191683800117855562000101565b8280016001018555821562000101579182015b8281111562000101578251825591602001919060010190620000e4565b506200010f92915062000113565b5090565b5b808211156200010f576000815560010162000114565b600082601f8301126200013c57600080fd5b81516001604060020a0380821115620001595762000159620002bc565b604051601f8301601f19908116603f01168101908282118183101715620001845762000184620002bc565b81604052838152602092508683858801011115620001a157600080fd5b600091505b83821015620001c55785820183015181830184015290820190620001a6565b83821115620001d75760008385830101525b9695505050505050565b600080600060608486031215620001f757600080fd5b83516001604060020a03808211156200020f57600080fd5b6200021d878388016200012a565b945060208601519150808211156200023457600080fd5b5062000243868287016200012a565b925050604084015160ff811681146200025b57600080fd5b809150509250925092565b6002810460018216806200027b57607f821691505b60208210811415620002b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610ae880620002fb6000396000f3fe608060405234801561001057600080fd5b50600436106100d1576000357c01000000000000000000000000000000000000000000000000000000009004806340c10f191161008e57806340c10f191461016457806370a082311461017957806395d89b41146101a2578063a457c2d7146101aa578063a9059cbb146101bd578063dd62ed3e146101d057600080fd5b806306fdde03146100d6578063095ea7b3146100f457806318160ddd1461011757806323b872dd14610129578063313ce5671461013c5780633950935114610151575b600080fd5b6100de610209565b6040516100eb91906109ca565b60405180910390f35b6101076101023660046109a0565b61029b565b60405190151581526020016100eb565b6002545b6040519081526020016100eb565b610107610137366004610964565b6102b1565b60055460405160ff90911681526020016100eb565b61010761015f3660046109a0565b610378565b6101776101723660046109a0565b6103b4565b005b61011b61018736600461090f565b600160a060020a031660009081526020819052604090205490565b6100de6103c2565b6101076101b83660046109a0565b6103d1565b6101076101cb3660046109a0565b610485565b61011b6101de366004610931565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461021890610a5e565b80601f016020809104026020016040519081016040528092919081815260200182805461024490610a5e565b80156102915780601f1061026657610100808354040283529160200191610291565b820191906000526020600020905b81548152906001019060200180831161027457829003601f168201915b5050505050905090565b60006102a8338484610492565b50600192915050565b60006102be8484846105f0565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156103605760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61036d8533858403610492565b506001949350505050565b336000818152600160209081526040808320600160a060020a038716845290915281205490916102a89185906103af908690610a1f565b610492565b6103be8282610811565b5050565b60606004805461021890610a5e565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561046e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610357565b61047b3385858403610492565b5060019392505050565b60006102a83384846105f0565b600160a060020a0383166105105760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a03821661058f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831661066f5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0382166106ee5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038316600090815260208190526040902054818110156107805760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038085166000908152602081905260408082208585039055918516815290812080548492906107b7908490610a1f565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161080391815260200190565b60405180910390a350505050565b600160a060020a03821661086a5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610357565b806002600082825461087c9190610a1f565b9091555050600160a060020a038216600090815260208190526040812080548392906108a9908490610a1f565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a038116811461090a57600080fd5b919050565b60006020828403121561092157600080fd5b61092a826108f3565b9392505050565b6000806040838503121561094457600080fd5b61094d836108f3565b915061095b602084016108f3565b90509250929050565b60008060006060848603121561097957600080fd5b610982846108f3565b9250610990602085016108f3565b9150604084013590509250925092565b600080604083850312156109b357600080fd5b6109bc836108f3565b946020939093013593505050565b600060208083528351808285015260005b818110156109f7578581018301518582016040015282016109db565b81811115610a09576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610a59577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b600281046001821680610a7257607f821691505b60208210811415610aac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea264697066735822122078b31f04c5d7da08a395798c3b485cacdeabad33239343694adc13bd09258f3064736f6c63430008060033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d1576000357c01000000000000000000000000000000000000000000000000000000009004806340c10f191161008e57806340c10f191461016457806370a082311461017957806395d89b41146101a2578063a457c2d7146101aa578063a9059cbb146101bd578063dd62ed3e146101d057600080fd5b806306fdde03146100d6578063095ea7b3146100f457806318160ddd1461011757806323b872dd14610129578063313ce5671461013c5780633950935114610151575b600080fd5b6100de610209565b6040516100eb91906109ca565b60405180910390f35b6101076101023660046109a0565b61029b565b60405190151581526020016100eb565b6002545b6040519081526020016100eb565b610107610137366004610964565b6102b1565b60055460405160ff90911681526020016100eb565b61010761015f3660046109a0565b610378565b6101776101723660046109a0565b6103b4565b005b61011b61018736600461090f565b600160a060020a031660009081526020819052604090205490565b6100de6103c2565b6101076101b83660046109a0565b6103d1565b6101076101cb3660046109a0565b610485565b61011b6101de366004610931565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461021890610a5e565b80601f016020809104026020016040519081016040528092919081815260200182805461024490610a5e565b80156102915780601f1061026657610100808354040283529160200191610291565b820191906000526020600020905b81548152906001019060200180831161027457829003601f168201915b5050505050905090565b60006102a8338484610492565b50600192915050565b60006102be8484846105f0565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156103605760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61036d8533858403610492565b506001949350505050565b336000818152600160209081526040808320600160a060020a038716845290915281205490916102a89185906103af908690610a1f565b610492565b6103be8282610811565b5050565b60606004805461021890610a5e565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561046e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610357565b61047b3385858403610492565b5060019392505050565b60006102a83384846105f0565b600160a060020a0383166105105760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a03821661058f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831661066f5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0382166106ee5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038316600090815260208190526040902054818110156107805760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038085166000908152602081905260408082208585039055918516815290812080548492906107b7908490610a1f565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161080391815260200190565b60405180910390a350505050565b600160a060020a03821661086a5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610357565b806002600082825461087c9190610a1f565b9091555050600160a060020a038216600090815260208190526040812080548392906108a9908490610a1f565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a038116811461090a57600080fd5b919050565b60006020828403121561092157600080fd5b61092a826108f3565b9392505050565b6000806040838503121561094457600080fd5b61094d836108f3565b915061095b602084016108f3565b90509250929050565b60008060006060848603121561097957600080fd5b610982846108f3565b9250610990602085016108f3565b9150604084013590509250925092565b600080604083850312156109b357600080fd5b6109bc836108f3565b946020939093013593505050565b600060208083528351808285015260005b818110156109f7578581018301518582016040015282016109db565b81811115610a09576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610a59577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b600281046001821680610a7257607f821691505b60208210811415610aac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea264697066735822122078b31f04c5d7da08a395798c3b485cacdeabad33239343694adc13bd09258f3064736f6c63430008060033", @@ -384,7 +384,7 @@ "storageLayout": { "storage": [ { - "astId": 991, + "astId": 1371, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_balances", "offset": 0, @@ -392,7 +392,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 997, + "astId": 1377, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_allowances", "offset": 0, @@ -400,7 +400,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 999, + "astId": 1379, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_totalSupply", "offset": 0, @@ -408,7 +408,7 @@ "type": "t_uint256" }, { - "astId": 1001, + "astId": 1381, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_name", "offset": 0, @@ -416,7 +416,7 @@ "type": "t_string_storage" }, { - "astId": 1003, + "astId": 1383, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_symbol", "offset": 0, @@ -424,7 +424,7 @@ "type": "t_string_storage" }, { - "astId": 8499, + "astId": 4256, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_decimals", "offset": 0, diff --git a/contracts/deployments/test/bsc/SAMB.json b/contracts/deployments/test/bsc/SAMB.json index df2f39ba..38ef2e13 100644 --- a/contracts/deployments/test/bsc/SAMB.json +++ b/contracts/deployments/test/bsc/SAMB.json @@ -1,5 +1,5 @@ { - "address": "0xDAA9Ee2aB371E31a75Faf93D0b859561a5D8a58f", + "address": "0xC61D0CfaDc9bE2EF05288D04EbCC8ec8035D7aC6", "abi": [ { "inputs": [ @@ -176,19 +176,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "bridgeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "decimals", @@ -389,22 +376,22 @@ "type": "function" } ], - "transactionHash": "0x27d14e6360a4283788d42e930569472a5459fc09f276ac419b98e75c9cff8d21", + "transactionHash": "0x345e5313ab1886ff071f253e6d389c0925c33320a26cfbb4803c27260fd1df9c", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0xDAA9Ee2aB371E31a75Faf93D0b859561a5D8a58f", - "transactionIndex": 3, - "gasUsed": "1041291", - "logsBloom": "0x00000000000000000000002000000000000000000000000010800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000002000000000000000000000000000000000000000000000000000000000000020000000080000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x954962f8e995a092f632af4cfb83f77c4ff5eca7fa22fe9cc7eee4228d3d8b85", - "transactionHash": "0x27d14e6360a4283788d42e930569472a5459fc09f276ac419b98e75c9cff8d21", + "contractAddress": "0xC61D0CfaDc9bE2EF05288D04EbCC8ec8035D7aC6", + "transactionIndex": 4, + "gasUsed": "1004325", + "logsBloom": "0x00000000000000000000002000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000080000000000000000000000400000002000000000002000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x96074d00685ec94b431ad442bb47ef0391340442c707edda14d18f0b19374a41", + "transactionHash": "0x345e5313ab1886ff071f253e6d389c0925c33320a26cfbb4803c27260fd1df9c", "logs": [ { - "transactionIndex": 3, - "blockNumber": 23637452, - "transactionHash": "0x27d14e6360a4283788d42e930569472a5459fc09f276ac419b98e75c9cff8d21", - "address": "0xDAA9Ee2aB371E31a75Faf93D0b859561a5D8a58f", + "transactionIndex": 4, + "blockNumber": 28469785, + "transactionHash": "0x345e5313ab1886ff071f253e6d389c0925c33320a26cfbb4803c27260fd1df9c", + "address": "0xC61D0CfaDc9bE2EF05288D04EbCC8ec8035D7aC6", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -412,11 +399,11 @@ ], "data": "0x", "logIndex": 1, - "blockHash": "0x954962f8e995a092f632af4cfb83f77c4ff5eca7fa22fe9cc7eee4228d3d8b85" + "blockHash": "0x96074d00685ec94b431ad442bb47ef0391340442c707edda14d18f0b19374a41" } ], - "blockNumber": 23637452, - "cumulativeGasUsed": "1140539", + "blockNumber": 28469785, + "cumulativeGasUsed": "1155779", "status": 1, "byzantium": true }, @@ -427,10 +414,10 @@ "0x0000000000000000000000000000000000000000" ], "numDeployments": 1, - "solcInputHash": "13963204c1e3ae6f33bd8024ced50cd9", - "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"bridgeAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeAddress_\",\"type\":\"address\"}],\"name\":\"setBridgeAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20.sol\":\"BridgeERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20 is ERC20, Ownable {\\n address public bridgeAddress; // address of bridge contract on this network\\n uint public bridgeBalance; // locked tokens on the bridge\\n\\n uint8 _decimals;\\n\\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\\n ERC20(name_, symbol_)\\n Ownable() {\\n bridgeAddress = bridgeAddress_;\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\\n bridgeAddress = bridgeAddress_;\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n if (sender == bridgeAddress) {\\n // user transfer tokens to ambrosus => need to mint it\\n\\n // same amount locked on side bridge\\n bridgeBalance += amount;\\n\\n _mint(recipient, amount);\\n } else if (recipient == bridgeAddress) {\\n // user withdraw tokens from ambrosus => need to burn it\\n\\n // side bridge must have enough tokens to send\\n require(bridgeBalance >= amount, \\\"not enough locked tokens on bridge\\\");\\n bridgeBalance -= amount;\\n\\n _burn(sender, amount);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0a37a41cff8f5797f2cb10e75c95e76634ea63997e13f19e8a1ece497ad05bfe\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b50604051620013ce380380620013ce833981016040819052620000349162000282565b8351849084906200004d90600390602085019062000125565b5080516200006390600490602084019062000125565b5050506200009262000083620000cf640100000000026401000000009004565b640100000000620000d3810204565b60068054600160a060020a031916600160a060020a03929092169190911790556008805460ff191660ff9290921691909117905550620003ab9050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001339062000326565b90600052602060002090601f016020900481019282620001575760008555620001a2565b82601f106200017257805160ff1916838001178555620001a2565b82800160010185558215620001a2579182015b82811115620001a257825182559160200191906001019062000185565b50620001b0929150620001b4565b5090565b5b80821115620001b05760008155600101620001b5565b600082601f830112620001dd57600080fd5b81516001604060020a0380821115620001fa57620001fa6200037c565b604051601f8301601f19908116603f011681019082821181831017156200022557620002256200037c565b816040528381526020925086838588010111156200024257600080fd5b600091505b8382101562000266578582018301518183018401529082019062000247565b83821115620002785760008385830101525b9695505050505050565b600080600080608085870312156200029957600080fd5b84516001604060020a0380821115620002b157600080fd5b620002bf88838901620001cb565b95506020870151915080821115620002d657600080fd5b50620002e587828801620001cb565b935050604085015160ff81168114620002fd57600080fd5b6060860151909250600160a060020a03811681146200031b57600080fd5b939692955090935050565b6002810460018216806200033b57607f821691505b6020821081141562000376577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61101380620003bb6000396000f3fe608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a3c573eb1161008e578063a3c573eb14610237578063a457c2d71461024a578063a9059cbb1461025d578063dd62ed3e14610270578063f2fde38b146102a957600080fd5b8063715018a6146101ed5780637f5a22f9146101f75780638da5cb5b1461020a57806395d89b411461022f57600080fd5b8063313ce567116100fb578063313ce5671461019357806339509351146101a85780633b1f6a01146101bb57806370a08231146101c457600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e57806323b872dd14610180575b600080fd5b6101356102bc565b6040516101429190610ea1565b60405180910390f35b61015e610159366004610e77565b61034e565b6040519015158152602001610142565b6002545b604051908152602001610142565b61015e61018e366004610e3b565b610364565b60085460405160ff9091168152602001610142565b61015e6101b6366004610e77565b61042b565b61017260075481565b6101726101d2366004610de6565b600160a060020a031660009081526020819052604090205490565b6101f5610467565b005b6101f5610205366004610de6565b6104a0565b600554600160a060020a03165b604051600160a060020a039091168152602001610142565b6101356104fc565b60065461021790600160a060020a031681565b61015e610258366004610e77565b61050b565b61015e61026b366004610e77565b6105bf565b61017261027e366004610e08565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6101f56102b7366004610de6565b6105cc565b6060600380546102cb90610f5a565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790610f5a565b80156103445780601f1061031957610100808354040283529160200191610344565b820191906000526020600020905b81548152906001019060200180831161032757829003601f168201915b5050505050905090565b600061035b338484610684565b50600192915050565b60006103718484846107e2565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104135760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104208533858403610684565b506001949350505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161035b918590610462908690610f2b565b610684565b600554600160a060020a031633146104945760405160e560020a62461bcd02815260040161040a90610ef6565b61049e60006108dd565b565b600554600160a060020a031633146104cd5760405160e560020a62461bcd02815260040161040a90610ef6565b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6060600480546102cb90610f5a565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105a85760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161040a565b6105b53385858403610684565b5060019392505050565b600061035b3384846107e2565b600554600160a060020a031633146105f95760405160e560020a62461bcd02815260040161040a90610ef6565b600160a060020a0381166106785760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161040a565b610681816108dd565b50565b600160a060020a0383166107025760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a0382166107815760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600654600160a060020a038481169116141561081f57806007600082825461080a9190610f2b565b9091555061081a9050828261093c565b505050565b600654600160a060020a03838116911614156108d2578060075410156108b05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f6765000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b80600760008282546108c29190610f43565b9091555061081a90508382610a1e565b61081a838383610ba9565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600160a060020a0382166109955760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161040a565b80600260008282546109a79190610f2b565b9091555050600160a060020a038216600090815260208190526040812080548392906109d4908490610f2b565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610a9d5760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a03821660009081526020819052604090205481811015610b2f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f6365000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a0383166000908152602081905260408120838303905560028054849290610b5e908490610f43565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610c285760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a038216610ca75760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a03831660009081526020819052604090205481811015610d395760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610d70908490610f2b565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610dbc91815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610de157600080fd5b919050565b600060208284031215610df857600080fd5b610e0182610dca565b9392505050565b60008060408385031215610e1b57600080fd5b610e2483610dca565b9150610e3260208401610dca565b90509250929050565b600080600060608486031215610e5057600080fd5b610e5984610dca565b9250610e6760208501610dca565b9150604084013590509250925092565b60008060408385031215610e8a57600080fd5b610e9383610dca565b946020939093013593505050565b600060208083528351808285015260005b81811015610ece57858101830151858201604001528201610eb2565b81811115610ee0576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610f3e57610f3e610fae565b500190565b600082821015610f5557610f55610fae565b500390565b600281046001821680610f6e57607f821691505b60208210811415610fa8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea264697066735822122039233cab17b837d41ed7bb27cb0f83b1f84c94b26a8d35bfcf956593eebbb43f64736f6c63430008060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a3c573eb1161008e578063a3c573eb14610237578063a457c2d71461024a578063a9059cbb1461025d578063dd62ed3e14610270578063f2fde38b146102a957600080fd5b8063715018a6146101ed5780637f5a22f9146101f75780638da5cb5b1461020a57806395d89b411461022f57600080fd5b8063313ce567116100fb578063313ce5671461019357806339509351146101a85780633b1f6a01146101bb57806370a08231146101c457600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e57806323b872dd14610180575b600080fd5b6101356102bc565b6040516101429190610ea1565b60405180910390f35b61015e610159366004610e77565b61034e565b6040519015158152602001610142565b6002545b604051908152602001610142565b61015e61018e366004610e3b565b610364565b60085460405160ff9091168152602001610142565b61015e6101b6366004610e77565b61042b565b61017260075481565b6101726101d2366004610de6565b600160a060020a031660009081526020819052604090205490565b6101f5610467565b005b6101f5610205366004610de6565b6104a0565b600554600160a060020a03165b604051600160a060020a039091168152602001610142565b6101356104fc565b60065461021790600160a060020a031681565b61015e610258366004610e77565b61050b565b61015e61026b366004610e77565b6105bf565b61017261027e366004610e08565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6101f56102b7366004610de6565b6105cc565b6060600380546102cb90610f5a565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790610f5a565b80156103445780601f1061031957610100808354040283529160200191610344565b820191906000526020600020905b81548152906001019060200180831161032757829003601f168201915b5050505050905090565b600061035b338484610684565b50600192915050565b60006103718484846107e2565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104135760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104208533858403610684565b506001949350505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161035b918590610462908690610f2b565b610684565b600554600160a060020a031633146104945760405160e560020a62461bcd02815260040161040a90610ef6565b61049e60006108dd565b565b600554600160a060020a031633146104cd5760405160e560020a62461bcd02815260040161040a90610ef6565b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6060600480546102cb90610f5a565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105a85760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161040a565b6105b53385858403610684565b5060019392505050565b600061035b3384846107e2565b600554600160a060020a031633146105f95760405160e560020a62461bcd02815260040161040a90610ef6565b600160a060020a0381166106785760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161040a565b610681816108dd565b50565b600160a060020a0383166107025760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a0382166107815760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600654600160a060020a038481169116141561081f57806007600082825461080a9190610f2b565b9091555061081a9050828261093c565b505050565b600654600160a060020a03838116911614156108d2578060075410156108b05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f6765000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b80600760008282546108c29190610f43565b9091555061081a90508382610a1e565b61081a838383610ba9565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600160a060020a0382166109955760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161040a565b80600260008282546109a79190610f2b565b9091555050600160a060020a038216600090815260208190526040812080548392906109d4908490610f2b565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610a9d5760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a03821660009081526020819052604090205481811015610b2f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f6365000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a0383166000908152602081905260408120838303905560028054849290610b5e908490610f43565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610c285760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a038216610ca75760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a03831660009081526020819052604090205481811015610d395760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610d70908490610f2b565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610dbc91815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610de157600080fd5b919050565b600060208284031215610df857600080fd5b610e0182610dca565b9392505050565b60008060408385031215610e1b57600080fd5b610e2483610dca565b9150610e3260208401610dca565b90509250929050565b600080600060608486031215610e5057600080fd5b610e5984610dca565b9250610e6760208501610dca565b9150604084013590509250925092565b60008060408385031215610e8a57600080fd5b610e9383610dca565b946020939093013593505050565b600060208083528351808285015260005b81811015610ece57858101830151858201604001528201610eb2565b81811115610ee0576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610f3e57610f3e610fae565b500190565b600082821015610f5557610f55610fae565b500390565b600281046001821680610f6e57607f821691505b60208210811415610fa8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea264697066735822122039233cab17b837d41ed7bb27cb0f83b1f84c94b26a8d35bfcf956593eebbb43f64736f6c63430008060033", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", + "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"bridgeAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeAddress_\",\"type\":\"address\"}],\"name\":\"setBridgeAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20.sol\":\"BridgeERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20 is ERC20, Ownable {\\n address public bridgeAddress; // address of bridge contract on this network\\n\\n uint8 _decimals;\\n\\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\\n ERC20(name_, symbol_)\\n Ownable() {\\n bridgeAddress = bridgeAddress_;\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\\n bridgeAddress = bridgeAddress_;\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n if (sender == bridgeAddress) {\\n // user transfer tokens to ambrosus => need to mint it\\n _mint(recipient, amount);\\n } else if (recipient == bridgeAddress) {\\n // user withdraw tokens from ambrosus => need to burn it\\n _burn(sender, amount);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xef05c4f9e5b12e19b3aafdb903f55ec177e2f8f84f67dd221cc968d7d45c9bde\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620013373803806200133783398101604081905262000034916200028f565b8351849084906200004d90600390602085019062000132565b5080516200006390600490602084019062000132565b5050506200009262000083620000dc640100000000026401000000009004565b640100000000620000e0810204565b6006805460ff9093167401000000000000000000000000000000000000000002600160a860020a0319909316600160a060020a039092169190911791909117905550620003b89050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001409062000333565b90600052602060002090601f016020900481019282620001645760008555620001af565b82601f106200017f57805160ff1916838001178555620001af565b82800160010185558215620001af579182015b82811115620001af57825182559160200191906001019062000192565b50620001bd929150620001c1565b5090565b5b80821115620001bd5760008155600101620001c2565b600082601f830112620001ea57600080fd5b81516001604060020a038082111562000207576200020762000389565b604051601f8301601f19908116603f0116810190828211818310171562000232576200023262000389565b816040528381526020925086838588010111156200024f57600080fd5b600091505b8382101562000273578582018301518183018401529082019062000254565b83821115620002855760008385830101525b9695505050505050565b60008060008060808587031215620002a657600080fd5b84516001604060020a0380821115620002be57600080fd5b620002cc88838901620001d8565b95506020870151915080821115620002e357600080fd5b50620002f287828801620001d8565b935050604085015160ff811681146200030a57600080fd5b6060860151909250600160a060020a03811681146200032857600080fd5b939692955090935050565b6002810460018216806200034857607f821691505b6020821081141562000383577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610f6f80620003c86000396000f3fe608060405234801561001057600080fd5b506004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900480637f5a22f9116100b4578063a457c2d711610083578063a457c2d714610251578063a9059cbb14610264578063dd62ed3e14610277578063f2fde38b146102b057600080fd5b80637f5a22f9146101fe5780638da5cb5b1461021157806395d89b4114610236578063a3c573eb1461023e57600080fd5b8063313ce567116100f0578063313ce5671461018857806339509351146101b857806370a08231146101cb578063715018a6146101f457600080fd5b806306fdde0314610122578063095ea7b31461014057806318160ddd1461016357806323b872dd14610175575b600080fd5b61012a6102c3565b6040516101379190610dfd565b60405180910390f35b61015361014e366004610dd3565b610355565b6040519015158152602001610137565b6002545b604051908152602001610137565b610153610183366004610d97565b61036b565b60065474010000000000000000000000000000000000000000900460ff1660405160ff9091168152602001610137565b6101536101c6366004610dd3565b610432565b6101676101d9366004610d42565b600160a060020a031660009081526020819052604090205490565b6101fc61046e565b005b6101fc61020c366004610d42565b6104a7565b600554600160a060020a03165b604051600160a060020a039091168152602001610137565b61012a610503565b60065461021e90600160a060020a031681565b61015361025f366004610dd3565b610512565b610153610272366004610dd3565b6105c6565b610167610285366004610d64565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6101fc6102be366004610d42565b6105d3565b6060600380546102d290610eb6565b80601f01602080910402602001604051908101604052809291908181526020018280546102fe90610eb6565b801561034b5780601f106103205761010080835404028352916020019161034b565b820191906000526020600020905b81548152906001019060200180831161032e57829003601f168201915b5050505050905090565b600061036233848461068b565b50600192915050565b60006103788484846107e9565b600160a060020a03841660009081526001602090815260408083203384529091529020548281101561041a5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610427853385840361068b565b506001949350505050565b336000818152600160209081526040808320600160a060020a03871684529091528120549091610362918590610469908690610e87565b61068b565b600554600160a060020a0316331461049b5760405160e560020a62461bcd02815260040161041190610e52565b6104a56000610839565b565b600554600160a060020a031633146104d45760405160e560020a62461bcd02815260040161041190610e52565b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6060600480546102d290610eb6565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105af5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610411565b6105bc338585840361068b565b5060019392505050565b60006103623384846107e9565b600554600160a060020a031633146106005760405160e560020a62461bcd02815260040161041190610e52565b600160a060020a03811661067f5760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610411565b61068881610839565b50565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600654600160a060020a038481169116141561080e576108098282610898565b505050565b600654600160a060020a038381169116141561082e57610809838261097a565b610809838383610b05565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600160a060020a0382166108f15760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610411565b80600260008282546109039190610e87565b9091555050600160a060020a03821660009081526020819052604081208054839290610930908490610e87565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a0382166109f95760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a03821660009081526020819052604090205481811015610a8b5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a0383166000908152602081905260408120838303905560028054849290610aba908490610e9f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610b845760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a038216610c035760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a03831660009081526020819052604090205481811015610c955760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610ccc908490610e87565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d1891815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610d3d57600080fd5b919050565b600060208284031215610d5457600080fd5b610d5d82610d26565b9392505050565b60008060408385031215610d7757600080fd5b610d8083610d26565b9150610d8e60208401610d26565b90509250929050565b600080600060608486031215610dac57600080fd5b610db584610d26565b9250610dc360208501610d26565b9150604084013590509250925092565b60008060408385031215610de657600080fd5b610def83610d26565b946020939093013593505050565b600060208083528351808285015260005b81811015610e2a57858101830151858201604001528201610e0e565b81811115610e3c576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610e9a57610e9a610f0a565b500190565b600082821015610eb157610eb1610f0a565b500390565b600281046001821680610eca57607f821691505b60208210811415610f04577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220acec37cfcec7bc4c41abf4c4cedec7169090aad5f2764d4290d98cf4a8259e8964736f6c63430008060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900480637f5a22f9116100b4578063a457c2d711610083578063a457c2d714610251578063a9059cbb14610264578063dd62ed3e14610277578063f2fde38b146102b057600080fd5b80637f5a22f9146101fe5780638da5cb5b1461021157806395d89b4114610236578063a3c573eb1461023e57600080fd5b8063313ce567116100f0578063313ce5671461018857806339509351146101b857806370a08231146101cb578063715018a6146101f457600080fd5b806306fdde0314610122578063095ea7b31461014057806318160ddd1461016357806323b872dd14610175575b600080fd5b61012a6102c3565b6040516101379190610dfd565b60405180910390f35b61015361014e366004610dd3565b610355565b6040519015158152602001610137565b6002545b604051908152602001610137565b610153610183366004610d97565b61036b565b60065474010000000000000000000000000000000000000000900460ff1660405160ff9091168152602001610137565b6101536101c6366004610dd3565b610432565b6101676101d9366004610d42565b600160a060020a031660009081526020819052604090205490565b6101fc61046e565b005b6101fc61020c366004610d42565b6104a7565b600554600160a060020a03165b604051600160a060020a039091168152602001610137565b61012a610503565b60065461021e90600160a060020a031681565b61015361025f366004610dd3565b610512565b610153610272366004610dd3565b6105c6565b610167610285366004610d64565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6101fc6102be366004610d42565b6105d3565b6060600380546102d290610eb6565b80601f01602080910402602001604051908101604052809291908181526020018280546102fe90610eb6565b801561034b5780601f106103205761010080835404028352916020019161034b565b820191906000526020600020905b81548152906001019060200180831161032e57829003601f168201915b5050505050905090565b600061036233848461068b565b50600192915050565b60006103788484846107e9565b600160a060020a03841660009081526001602090815260408083203384529091529020548281101561041a5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610427853385840361068b565b506001949350505050565b336000818152600160209081526040808320600160a060020a03871684529091528120549091610362918590610469908690610e87565b61068b565b600554600160a060020a0316331461049b5760405160e560020a62461bcd02815260040161041190610e52565b6104a56000610839565b565b600554600160a060020a031633146104d45760405160e560020a62461bcd02815260040161041190610e52565b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6060600480546102d290610eb6565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105af5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610411565b6105bc338585840361068b565b5060019392505050565b60006103623384846107e9565b600554600160a060020a031633146106005760405160e560020a62461bcd02815260040161041190610e52565b600160a060020a03811661067f5760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610411565b61068881610839565b50565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600654600160a060020a038481169116141561080e576108098282610898565b505050565b600654600160a060020a038381169116141561082e57610809838261097a565b610809838383610b05565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600160a060020a0382166108f15760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610411565b80600260008282546109039190610e87565b9091555050600160a060020a03821660009081526020819052604081208054839290610930908490610e87565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a0382166109f95760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a03821660009081526020819052604090205481811015610a8b5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a0383166000908152602081905260408120838303905560028054849290610aba908490610e9f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610b845760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a038216610c035760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a03831660009081526020819052604090205481811015610c955760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610ccc908490610e87565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d1891815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610d3d57600080fd5b919050565b600060208284031215610d5457600080fd5b610d5d82610d26565b9392505050565b60008060408385031215610d7757600080fd5b610d8083610d26565b9150610d8e60208401610d26565b90509250929050565b600080600060608486031215610dac57600080fd5b610db584610d26565b9250610dc360208501610d26565b9150604084013590509250925092565b60008060408385031215610de657600080fd5b610def83610d26565b946020939093013593505050565b600060208083528351808285015260005b81811015610e2a57858101830151858201604001528201610e0e565b81811115610e3c576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610e9a57610e9a610f0a565b500190565b600082821015610eb157610eb1610f0a565b500390565b600281046001821680610eca57607f821691505b60208210811415610f04577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220acec37cfcec7bc4c41abf4c4cedec7169090aad5f2764d4290d98cf4a8259e8964736f6c63430008060033", "devdoc": { "kind": "dev", "methods": { @@ -487,7 +474,7 @@ "storageLayout": { "storage": [ { - "astId": 991, + "astId": 1371, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_balances", "offset": 0, @@ -495,7 +482,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 997, + "astId": 1377, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_allowances", "offset": 0, @@ -503,7 +490,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 999, + "astId": 1379, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_totalSupply", "offset": 0, @@ -511,7 +498,7 @@ "type": "t_uint256" }, { - "astId": 1001, + "astId": 1381, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_name", "offset": 0, @@ -519,7 +506,7 @@ "type": "t_string_storage" }, { - "astId": 1003, + "astId": 1383, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_symbol", "offset": 0, @@ -527,7 +514,7 @@ "type": "t_string_storage" }, { - "astId": 879, + "astId": 1259, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_owner", "offset": 0, @@ -535,7 +522,7 @@ "type": "t_address" }, { - "astId": 9077, + "astId": 4767, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "bridgeAddress", "offset": 0, @@ -543,19 +530,11 @@ "type": "t_address" }, { - "astId": 9079, - "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", - "label": "bridgeBalance", - "offset": 0, - "slot": "7", - "type": "t_uint256" - }, - { - "astId": 9081, + "astId": 4769, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_decimals", - "offset": 0, - "slot": "8", + "offset": 20, + "slot": "6", "type": "t_uint8" } ], diff --git a/contracts/deployments/test/bsc/USDC.json b/contracts/deployments/test/bsc/USDC.json index c3b93722..07ae7b04 100644 --- a/contracts/deployments/test/bsc/USDC.json +++ b/contracts/deployments/test/bsc/USDC.json @@ -1,5 +1,5 @@ { - "address": "0x3a5633bAE0243bB360e25624DC6dFd241333B575", + "address": "0x9CE86a22E9a89a4d716Ee23d057389c3df3E26A5", "abi": [ { "inputs": [ @@ -311,19 +311,19 @@ "type": "function" } ], - "transactionHash": "0x5f75ee46a859c0e3f761e8e0c34c2f2316637d75814c7011b44fb47ec42c87f1", + "transactionHash": "0xb05825437d8a73068bf0780027c23afcb29c4a128d8481cb1855ed0b31773f1d", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x3a5633bAE0243bB360e25624DC6dFd241333B575", - "transactionIndex": 5, + "contractAddress": "0x9CE86a22E9a89a4d716Ee23d057389c3df3E26A5", + "transactionIndex": 3, "gasUsed": "729107", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5f7bd4e338bef1f64bb6fa8b08b1a4a6e98bb17a996ed5bec7c53c3b2bc86801", - "transactionHash": "0x5f75ee46a859c0e3f761e8e0c34c2f2316637d75814c7011b44fb47ec42c87f1", + "blockHash": "0x5d48a71d9c0fe07af1c34042b97679dbc51fb686841dec286ba347f0e0e88c04", + "transactionHash": "0xb05825437d8a73068bf0780027c23afcb29c4a128d8481cb1855ed0b31773f1d", "logs": [], - "blockNumber": 23637446, - "cumulativeGasUsed": "885227", + "blockNumber": 28469766, + "cumulativeGasUsed": "804235", "status": 1, "byzantium": true }, @@ -333,7 +333,7 @@ 18 ], "numDeployments": 1, - "solcInputHash": "13963204c1e3ae6f33bd8024ced50cd9", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/contracts_for_tests/MintableERC20.sol\":\"MintableERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/contracts_for_tests/MintableERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ncontract MintableERC20 is ERC20 {\\n uint8 _decimals;\\n\\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function mint(address to, uint256 amount) public {\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0x2c98fb67e868a6ec093346b029e1bacb57b6200aa1c37035f04298ad6eea4851\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b5060405162000de338038062000de38339810160408190526200003491620001e1565b8251839083906200004d90600390602085019062000084565b5080516200006390600490602084019062000084565b50506005805460ff191660ff939093169290921790915550620002eb915050565b828054620000929062000266565b90600052602060002090601f016020900481019282620000b6576000855562000101565b82601f10620000d157805160ff191683800117855562000101565b8280016001018555821562000101579182015b8281111562000101578251825591602001919060010190620000e4565b506200010f92915062000113565b5090565b5b808211156200010f576000815560010162000114565b600082601f8301126200013c57600080fd5b81516001604060020a0380821115620001595762000159620002bc565b604051601f8301601f19908116603f01168101908282118183101715620001845762000184620002bc565b81604052838152602092508683858801011115620001a157600080fd5b600091505b83821015620001c55785820183015181830184015290820190620001a6565b83821115620001d75760008385830101525b9695505050505050565b600080600060608486031215620001f757600080fd5b83516001604060020a03808211156200020f57600080fd5b6200021d878388016200012a565b945060208601519150808211156200023457600080fd5b5062000243868287016200012a565b925050604084015160ff811681146200025b57600080fd5b809150509250925092565b6002810460018216806200027b57607f821691505b60208210811415620002b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610ae880620002fb6000396000f3fe608060405234801561001057600080fd5b50600436106100d1576000357c01000000000000000000000000000000000000000000000000000000009004806340c10f191161008e57806340c10f191461016457806370a082311461017957806395d89b41146101a2578063a457c2d7146101aa578063a9059cbb146101bd578063dd62ed3e146101d057600080fd5b806306fdde03146100d6578063095ea7b3146100f457806318160ddd1461011757806323b872dd14610129578063313ce5671461013c5780633950935114610151575b600080fd5b6100de610209565b6040516100eb91906109ca565b60405180910390f35b6101076101023660046109a0565b61029b565b60405190151581526020016100eb565b6002545b6040519081526020016100eb565b610107610137366004610964565b6102b1565b60055460405160ff90911681526020016100eb565b61010761015f3660046109a0565b610378565b6101776101723660046109a0565b6103b4565b005b61011b61018736600461090f565b600160a060020a031660009081526020819052604090205490565b6100de6103c2565b6101076101b83660046109a0565b6103d1565b6101076101cb3660046109a0565b610485565b61011b6101de366004610931565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461021890610a5e565b80601f016020809104026020016040519081016040528092919081815260200182805461024490610a5e565b80156102915780601f1061026657610100808354040283529160200191610291565b820191906000526020600020905b81548152906001019060200180831161027457829003601f168201915b5050505050905090565b60006102a8338484610492565b50600192915050565b60006102be8484846105f0565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156103605760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61036d8533858403610492565b506001949350505050565b336000818152600160209081526040808320600160a060020a038716845290915281205490916102a89185906103af908690610a1f565b610492565b6103be8282610811565b5050565b60606004805461021890610a5e565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561046e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610357565b61047b3385858403610492565b5060019392505050565b60006102a83384846105f0565b600160a060020a0383166105105760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a03821661058f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831661066f5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0382166106ee5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038316600090815260208190526040902054818110156107805760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038085166000908152602081905260408082208585039055918516815290812080548492906107b7908490610a1f565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161080391815260200190565b60405180910390a350505050565b600160a060020a03821661086a5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610357565b806002600082825461087c9190610a1f565b9091555050600160a060020a038216600090815260208190526040812080548392906108a9908490610a1f565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a038116811461090a57600080fd5b919050565b60006020828403121561092157600080fd5b61092a826108f3565b9392505050565b6000806040838503121561094457600080fd5b61094d836108f3565b915061095b602084016108f3565b90509250929050565b60008060006060848603121561097957600080fd5b610982846108f3565b9250610990602085016108f3565b9150604084013590509250925092565b600080604083850312156109b357600080fd5b6109bc836108f3565b946020939093013593505050565b600060208083528351808285015260005b818110156109f7578581018301518582016040015282016109db565b81811115610a09576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610a59577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b600281046001821680610a7257607f821691505b60208210811415610aac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea264697066735822122078b31f04c5d7da08a395798c3b485cacdeabad33239343694adc13bd09258f3064736f6c63430008060033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d1576000357c01000000000000000000000000000000000000000000000000000000009004806340c10f191161008e57806340c10f191461016457806370a082311461017957806395d89b41146101a2578063a457c2d7146101aa578063a9059cbb146101bd578063dd62ed3e146101d057600080fd5b806306fdde03146100d6578063095ea7b3146100f457806318160ddd1461011757806323b872dd14610129578063313ce5671461013c5780633950935114610151575b600080fd5b6100de610209565b6040516100eb91906109ca565b60405180910390f35b6101076101023660046109a0565b61029b565b60405190151581526020016100eb565b6002545b6040519081526020016100eb565b610107610137366004610964565b6102b1565b60055460405160ff90911681526020016100eb565b61010761015f3660046109a0565b610378565b6101776101723660046109a0565b6103b4565b005b61011b61018736600461090f565b600160a060020a031660009081526020819052604090205490565b6100de6103c2565b6101076101b83660046109a0565b6103d1565b6101076101cb3660046109a0565b610485565b61011b6101de366004610931565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461021890610a5e565b80601f016020809104026020016040519081016040528092919081815260200182805461024490610a5e565b80156102915780601f1061026657610100808354040283529160200191610291565b820191906000526020600020905b81548152906001019060200180831161027457829003601f168201915b5050505050905090565b60006102a8338484610492565b50600192915050565b60006102be8484846105f0565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156103605760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61036d8533858403610492565b506001949350505050565b336000818152600160209081526040808320600160a060020a038716845290915281205490916102a89185906103af908690610a1f565b610492565b6103be8282610811565b5050565b60606004805461021890610a5e565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561046e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610357565b61047b3385858403610492565b5060019392505050565b60006102a83384846105f0565b600160a060020a0383166105105760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a03821661058f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831661066f5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0382166106ee5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038316600090815260208190526040902054818110156107805760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038085166000908152602081905260408082208585039055918516815290812080548492906107b7908490610a1f565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161080391815260200190565b60405180910390a350505050565b600160a060020a03821661086a5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610357565b806002600082825461087c9190610a1f565b9091555050600160a060020a038216600090815260208190526040812080548392906108a9908490610a1f565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a038116811461090a57600080fd5b919050565b60006020828403121561092157600080fd5b61092a826108f3565b9392505050565b6000806040838503121561094457600080fd5b61094d836108f3565b915061095b602084016108f3565b90509250929050565b60008060006060848603121561097957600080fd5b610982846108f3565b9250610990602085016108f3565b9150604084013590509250925092565b600080604083850312156109b357600080fd5b6109bc836108f3565b946020939093013593505050565b600060208083528351808285015260005b818110156109f7578581018301518582016040015282016109db565b81811115610a09576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610a59577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b600281046001821680610a7257607f821691505b60208210811415610aac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea264697066735822122078b31f04c5d7da08a395798c3b485cacdeabad33239343694adc13bd09258f3064736f6c63430008060033", @@ -384,7 +384,7 @@ "storageLayout": { "storage": [ { - "astId": 991, + "astId": 1371, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_balances", "offset": 0, @@ -392,7 +392,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 997, + "astId": 1377, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_allowances", "offset": 0, @@ -400,7 +400,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 999, + "astId": 1379, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_totalSupply", "offset": 0, @@ -408,7 +408,7 @@ "type": "t_uint256" }, { - "astId": 1001, + "astId": 1381, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_name", "offset": 0, @@ -416,7 +416,7 @@ "type": "t_string_storage" }, { - "astId": 1003, + "astId": 1383, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_symbol", "offset": 0, @@ -424,7 +424,7 @@ "type": "t_string_storage" }, { - "astId": 8419, + "astId": 4256, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_decimals", "offset": 0, diff --git a/contracts/deployments/test/bsc/USDT.json b/contracts/deployments/test/bsc/USDT.json new file mode 100644 index 00000000..f8188e23 --- /dev/null +++ b/contracts/deployments/test/bsc/USDT.json @@ -0,0 +1,472 @@ +{ + "address": "0x62c6e4534594aD39307FE654D5260f12010A297E", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x3a0cf4229b9de60560eb03bab20340e1952d7430c976b79d18e967b416fc15c0", + "receipt": { + "to": null, + "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "contractAddress": "0x62c6e4534594aD39307FE654D5260f12010A297E", + "transactionIndex": 6, + "gasUsed": "729131", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3fc1e659beb7e51c43aaafc7f3e807a1ae5847fdbd06acdf922e1728201eca26", + "transactionHash": "0x3a0cf4229b9de60560eb03bab20340e1952d7430c976b79d18e967b416fc15c0", + "logs": [], + "blockNumber": 28469768, + "cumulativeGasUsed": "1276056", + "status": 1, + "byzantium": true + }, + "args": [ + "Tether USD", + "USDT", + 18 + ], + "numDeployments": 1, + "solcInputHash": "af3862e0ddcca2861ee723b668139921", + "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/contracts_for_tests/MintableERC20.sol\":\"MintableERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/contracts_for_tests/MintableERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ncontract MintableERC20 is ERC20 {\\n uint8 _decimals;\\n\\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function mint(address to, uint256 amount) public {\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0x2c98fb67e868a6ec093346b029e1bacb57b6200aa1c37035f04298ad6eea4851\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000de338038062000de38339810160408190526200003491620001e1565b8251839083906200004d90600390602085019062000084565b5080516200006390600490602084019062000084565b50506005805460ff191660ff939093169290921790915550620002eb915050565b828054620000929062000266565b90600052602060002090601f016020900481019282620000b6576000855562000101565b82601f10620000d157805160ff191683800117855562000101565b8280016001018555821562000101579182015b8281111562000101578251825591602001919060010190620000e4565b506200010f92915062000113565b5090565b5b808211156200010f576000815560010162000114565b600082601f8301126200013c57600080fd5b81516001604060020a0380821115620001595762000159620002bc565b604051601f8301601f19908116603f01168101908282118183101715620001845762000184620002bc565b81604052838152602092508683858801011115620001a157600080fd5b600091505b83821015620001c55785820183015181830184015290820190620001a6565b83821115620001d75760008385830101525b9695505050505050565b600080600060608486031215620001f757600080fd5b83516001604060020a03808211156200020f57600080fd5b6200021d878388016200012a565b945060208601519150808211156200023457600080fd5b5062000243868287016200012a565b925050604084015160ff811681146200025b57600080fd5b809150509250925092565b6002810460018216806200027b57607f821691505b60208210811415620002b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610ae880620002fb6000396000f3fe608060405234801561001057600080fd5b50600436106100d1576000357c01000000000000000000000000000000000000000000000000000000009004806340c10f191161008e57806340c10f191461016457806370a082311461017957806395d89b41146101a2578063a457c2d7146101aa578063a9059cbb146101bd578063dd62ed3e146101d057600080fd5b806306fdde03146100d6578063095ea7b3146100f457806318160ddd1461011757806323b872dd14610129578063313ce5671461013c5780633950935114610151575b600080fd5b6100de610209565b6040516100eb91906109ca565b60405180910390f35b6101076101023660046109a0565b61029b565b60405190151581526020016100eb565b6002545b6040519081526020016100eb565b610107610137366004610964565b6102b1565b60055460405160ff90911681526020016100eb565b61010761015f3660046109a0565b610378565b6101776101723660046109a0565b6103b4565b005b61011b61018736600461090f565b600160a060020a031660009081526020819052604090205490565b6100de6103c2565b6101076101b83660046109a0565b6103d1565b6101076101cb3660046109a0565b610485565b61011b6101de366004610931565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461021890610a5e565b80601f016020809104026020016040519081016040528092919081815260200182805461024490610a5e565b80156102915780601f1061026657610100808354040283529160200191610291565b820191906000526020600020905b81548152906001019060200180831161027457829003601f168201915b5050505050905090565b60006102a8338484610492565b50600192915050565b60006102be8484846105f0565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156103605760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61036d8533858403610492565b506001949350505050565b336000818152600160209081526040808320600160a060020a038716845290915281205490916102a89185906103af908690610a1f565b610492565b6103be8282610811565b5050565b60606004805461021890610a5e565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561046e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610357565b61047b3385858403610492565b5060019392505050565b60006102a83384846105f0565b600160a060020a0383166105105760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a03821661058f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831661066f5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0382166106ee5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038316600090815260208190526040902054818110156107805760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038085166000908152602081905260408082208585039055918516815290812080548492906107b7908490610a1f565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161080391815260200190565b60405180910390a350505050565b600160a060020a03821661086a5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610357565b806002600082825461087c9190610a1f565b9091555050600160a060020a038216600090815260208190526040812080548392906108a9908490610a1f565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a038116811461090a57600080fd5b919050565b60006020828403121561092157600080fd5b61092a826108f3565b9392505050565b6000806040838503121561094457600080fd5b61094d836108f3565b915061095b602084016108f3565b90509250929050565b60008060006060848603121561097957600080fd5b610982846108f3565b9250610990602085016108f3565b9150604084013590509250925092565b600080604083850312156109b357600080fd5b6109bc836108f3565b946020939093013593505050565b600060208083528351808285015260005b818110156109f7578581018301518582016040015282016109db565b81811115610a09576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610a59577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b600281046001821680610a7257607f821691505b60208210811415610aac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea264697066735822122078b31f04c5d7da08a395798c3b485cacdeabad33239343694adc13bd09258f3064736f6c63430008060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d1576000357c01000000000000000000000000000000000000000000000000000000009004806340c10f191161008e57806340c10f191461016457806370a082311461017957806395d89b41146101a2578063a457c2d7146101aa578063a9059cbb146101bd578063dd62ed3e146101d057600080fd5b806306fdde03146100d6578063095ea7b3146100f457806318160ddd1461011757806323b872dd14610129578063313ce5671461013c5780633950935114610151575b600080fd5b6100de610209565b6040516100eb91906109ca565b60405180910390f35b6101076101023660046109a0565b61029b565b60405190151581526020016100eb565b6002545b6040519081526020016100eb565b610107610137366004610964565b6102b1565b60055460405160ff90911681526020016100eb565b61010761015f3660046109a0565b610378565b6101776101723660046109a0565b6103b4565b005b61011b61018736600461090f565b600160a060020a031660009081526020819052604090205490565b6100de6103c2565b6101076101b83660046109a0565b6103d1565b6101076101cb3660046109a0565b610485565b61011b6101de366004610931565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461021890610a5e565b80601f016020809104026020016040519081016040528092919081815260200182805461024490610a5e565b80156102915780601f1061026657610100808354040283529160200191610291565b820191906000526020600020905b81548152906001019060200180831161027457829003601f168201915b5050505050905090565b60006102a8338484610492565b50600192915050565b60006102be8484846105f0565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156103605760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61036d8533858403610492565b506001949350505050565b336000818152600160209081526040808320600160a060020a038716845290915281205490916102a89185906103af908690610a1f565b610492565b6103be8282610811565b5050565b60606004805461021890610a5e565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561046e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610357565b61047b3385858403610492565b5060019392505050565b60006102a83384846105f0565b600160a060020a0383166105105760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a03821661058f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831661066f5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0382166106ee5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038316600090815260208190526040902054818110156107805760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038085166000908152602081905260408082208585039055918516815290812080548492906107b7908490610a1f565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161080391815260200190565b60405180910390a350505050565b600160a060020a03821661086a5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610357565b806002600082825461087c9190610a1f565b9091555050600160a060020a038216600090815260208190526040812080548392906108a9908490610a1f565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a038116811461090a57600080fd5b919050565b60006020828403121561092157600080fd5b61092a826108f3565b9392505050565b6000806040838503121561094457600080fd5b61094d836108f3565b915061095b602084016108f3565b90509250929050565b60008060006060848603121561097957600080fd5b610982846108f3565b9250610990602085016108f3565b9150604084013590509250925092565b600080604083850312156109b357600080fd5b6109bc836108f3565b946020939093013593505050565b600060208083528351808285015260005b818110156109f7578581018301518582016040015282016109db565b81811115610a09576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610a59577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b600281046001821680610a7257607f821691505b60208210811415610aac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea264697066735822122078b31f04c5d7da08a395798c3b485cacdeabad33239343694adc13bd09258f3064736f6c63430008060033", + "devdoc": { + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "name()": { + "details": "Returns the name of the token." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1371, + "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1377, + "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", + "label": "_allowances", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1379, + "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", + "label": "_totalSupply", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 1381, + "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 1383, + "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", + "label": "_symbol", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 4256, + "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", + "label": "_decimals", + "offset": 0, + "slot": "5", + "type": "t_uint8" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/contracts/deployments/test/bsc/WBNB.json b/contracts/deployments/test/bsc/WBNB.json index c492c566..84acab61 100644 --- a/contracts/deployments/test/bsc/WBNB.json +++ b/contracts/deployments/test/bsc/WBNB.json @@ -1,5 +1,5 @@ { - "address": "0x8601876F8A6DCcAE5Ce8Cf154f710E09c3f0f2c8", + "address": "0x3050A5cBe1ec89917933476a99962A40e802B89C", "abi": [ { "inputs": [ @@ -346,19 +346,19 @@ "type": "function" } ], - "transactionHash": "0x5d2beeabfcefd241058b1828ebdef0b1210273506ae55b90b4a47a669cba12ac", + "transactionHash": "0x2f24fb2530852f037c1313a19c367bf983ba55e7aa74565966c555e4082b151e", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x8601876F8A6DCcAE5Ce8Cf154f710E09c3f0f2c8", - "transactionIndex": 6, + "contractAddress": "0x3050A5cBe1ec89917933476a99962A40e802B89C", + "transactionIndex": 0, "gasUsed": "874732", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb74ff64c7f7945822219b71ca1f1dad9bd30f00ca379e9c8c3807b77bd426c31", - "transactionHash": "0x5d2beeabfcefd241058b1828ebdef0b1210273506ae55b90b4a47a669cba12ac", + "blockHash": "0x64cab05d968c5805caa0d35eb59c30b68fea4ce7a3c9b1a2a93ce307f2173180", + "transactionHash": "0x2f24fb2530852f037c1313a19c367bf983ba55e7aa74565966c555e4082b151e", "logs": [], - "blockNumber": 23637449, - "cumulativeGasUsed": "1358667", + "blockNumber": 28469764, + "cumulativeGasUsed": "874732", "status": 1, "byzantium": true }, @@ -367,7 +367,7 @@ "WBNB" ], "numDeployments": 1, - "solcInputHash": "13963204c1e3ae6f33bd8024ced50cd9", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/sAMB.sol\":\"sAMB\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/IWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\ninterface IWrapper {\\n event Deposit(address indexed dst, uint amount);\\n event Withdrawal(address indexed src, uint amount);\\n\\n function deposit() external payable;\\n\\n function withdraw(uint amount) external;\\n}\\n\",\"keccak256\":\"0xbe5bc17241b9a14b78e18e4562e2a4c02e2b941fae0f1a896bbd795e49af136e\",\"license\":\"MIT\"},\"contracts/tokens/sAMB.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"./IWrapper.sol\\\";\\n\\ncontract sAMB is IWrapper, ERC20 {\\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\\n\\n function deposit() public override payable {\\n _mint(msg.sender, msg.value);\\n\\n emit Deposit(msg.sender, msg.value);\\n }\\n\\n function withdraw(uint amount) public override {\\n _burn(msg.sender, amount);\\n payable(msg.sender).transfer(amount);\\n\\n emit Withdrawal(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x90133b5fc764016576f455329dda29434c23704c3102d2d83961f89ae65890d6\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b50604051620010bd380380620010bd8339810160408190526200003491620001cb565b8151829082906200004d9060039060208501906200006e565b508051620000639060049060208401906200006e565b5050505050620002ba565b8280546200007c9062000235565b90600052602060002090601f016020900481019282620000a05760008555620000eb565b82601f10620000bb57805160ff1916838001178555620000eb565b82800160010185558215620000eb579182015b82811115620000eb578251825591602001919060010190620000ce565b50620000f9929150620000fd565b5090565b5b80821115620000f95760008155600101620000fe565b600082601f8301126200012657600080fd5b81516001604060020a03808211156200014357620001436200028b565b604051601f8301601f19908116603f011681019082821181831017156200016e576200016e6200028b565b816040528381526020925086838588010111156200018b57600080fd5b600091505b83821015620001af578582018301518183018401529082019062000190565b83821115620001c15760008385830101525b9695505050505050565b60008060408385031215620001df57600080fd5b82516001604060020a0380821115620001f757600080fd5b620002058683870162000114565b935060208501519150808211156200021c57600080fd5b506200022b8582860162000114565b9150509250929050565b6002810460018216806200024a57607f821691505b6020821081141562000285577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610df380620002ca6000396000f3fe6080604052600436106100df576000357c010000000000000000000000000000000000000000000000000000000090048063395093511161009c578063a457c2d711610076578063a457c2d714610227578063a9059cbb14610247578063d0e30db014610267578063dd62ed3e1461026f57600080fd5b806339509351146101bc57806370a08231146101dc57806395d89b411461021257600080fd5b806306fdde03146100e4578063095ea7b31461010f57806318160ddd1461013f57806323b872dd1461015e5780632e1a7d4d1461017e578063313ce567146101a0575b600080fd5b3480156100f057600080fd5b506100f96102b5565b6040516101069190610cb6565b60405180910390f35b34801561011b57600080fd5b5061012f61012a366004610c73565b610347565b6040519015158152602001610106565b34801561014b57600080fd5b506002545b604051908152602001610106565b34801561016a57600080fd5b5061012f610179366004610c37565b61035d565b34801561018a57600080fd5b5061019e610199366004610c9d565b610424565b005b3480156101ac57600080fd5b5060405160128152602001610106565b3480156101c857600080fd5b5061012f6101d7366004610c73565b610494565b3480156101e857600080fd5b506101506101f7366004610be2565b600160a060020a031660009081526020819052604090205490565b34801561021e57600080fd5b506100f96104d0565b34801561023357600080fd5b5061012f610242366004610c73565b6104df565b34801561025357600080fd5b5061012f610262366004610c73565b610593565b61019e6105a0565b34801561027b57600080fd5b5061015061028a366004610c04565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546102c490610d3a565b80601f01602080910402602001604051908101604052809291908181526020018280546102f090610d3a565b801561033d5780601f106103125761010080835404028352916020019161033d565b820191906000526020600020905b81548152906001019060200180831161032057829003601f168201915b5050505050905090565b60006103543384846105e1565b50600192915050565b600061036a848484610740565b600160a060020a03841660009081526001602090815260408083203384529091529020548281101561040c5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61041985338584036105e1565b506001949350505050565b61042e3382610961565b604051339082156108fc029083906000818181858888f1935050505015801561045b573d6000803e3d6000fd5b5060405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a250565b336000818152600160209081526040808320600160a060020a038716845290915281205490916103549185906104cb908690610d0b565b6105e1565b6060600480546102c490610d3a565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561057c5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610403565b61058933858584036105e1565b5060019392505050565b6000610354338484610740565b6105aa3334610ae4565b60405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b600160a060020a03831661065f5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0382166106de5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600160a060020a0383166107bf5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03821661083e5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a038316600090815260208190526040902054818110156108d05760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610907908490610d0b565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161095391815260200190565b60405180910390a350505050565b600160a060020a0382166109e05760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03821660009081526020819052604090205481811015610a725760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0383166000908152602081905260408120838303905560028054849290610aa1908490610d23565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610733565b600160a060020a038216610b3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610403565b8060026000828254610b4f9190610d0b565b9091555050600160a060020a03821660009081526020819052604081208054839290610b7c908490610d0b565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a0381168114610bdd57600080fd5b919050565b600060208284031215610bf457600080fd5b610bfd82610bc6565b9392505050565b60008060408385031215610c1757600080fd5b610c2083610bc6565b9150610c2e60208401610bc6565b90509250929050565b600080600060608486031215610c4c57600080fd5b610c5584610bc6565b9250610c6360208501610bc6565b9150604084013590509250925092565b60008060408385031215610c8657600080fd5b610c8f83610bc6565b946020939093013593505050565b600060208284031215610caf57600080fd5b5035919050565b600060208083528351808285015260005b81811015610ce357858101830151858201604001528201610cc7565b81811115610cf5576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610d1e57610d1e610d8e565b500190565b600082821015610d3557610d35610d8e565b500390565b600281046001821680610d4e57607f821691505b60208210811415610d88577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220f75853fc2637d5ca8248502a85a7f949947d4ce8824b83a6ae12f18058d32b2c64736f6c63430008060033", "deployedBytecode": "0x6080604052600436106100df576000357c010000000000000000000000000000000000000000000000000000000090048063395093511161009c578063a457c2d711610076578063a457c2d714610227578063a9059cbb14610247578063d0e30db014610267578063dd62ed3e1461026f57600080fd5b806339509351146101bc57806370a08231146101dc57806395d89b411461021257600080fd5b806306fdde03146100e4578063095ea7b31461010f57806318160ddd1461013f57806323b872dd1461015e5780632e1a7d4d1461017e578063313ce567146101a0575b600080fd5b3480156100f057600080fd5b506100f96102b5565b6040516101069190610cb6565b60405180910390f35b34801561011b57600080fd5b5061012f61012a366004610c73565b610347565b6040519015158152602001610106565b34801561014b57600080fd5b506002545b604051908152602001610106565b34801561016a57600080fd5b5061012f610179366004610c37565b61035d565b34801561018a57600080fd5b5061019e610199366004610c9d565b610424565b005b3480156101ac57600080fd5b5060405160128152602001610106565b3480156101c857600080fd5b5061012f6101d7366004610c73565b610494565b3480156101e857600080fd5b506101506101f7366004610be2565b600160a060020a031660009081526020819052604090205490565b34801561021e57600080fd5b506100f96104d0565b34801561023357600080fd5b5061012f610242366004610c73565b6104df565b34801561025357600080fd5b5061012f610262366004610c73565b610593565b61019e6105a0565b34801561027b57600080fd5b5061015061028a366004610c04565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546102c490610d3a565b80601f01602080910402602001604051908101604052809291908181526020018280546102f090610d3a565b801561033d5780601f106103125761010080835404028352916020019161033d565b820191906000526020600020905b81548152906001019060200180831161032057829003601f168201915b5050505050905090565b60006103543384846105e1565b50600192915050565b600061036a848484610740565b600160a060020a03841660009081526001602090815260408083203384529091529020548281101561040c5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61041985338584036105e1565b506001949350505050565b61042e3382610961565b604051339082156108fc029083906000818181858888f1935050505015801561045b573d6000803e3d6000fd5b5060405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a250565b336000818152600160209081526040808320600160a060020a038716845290915281205490916103549185906104cb908690610d0b565b6105e1565b6060600480546102c490610d3a565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561057c5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610403565b61058933858584036105e1565b5060019392505050565b6000610354338484610740565b6105aa3334610ae4565b60405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b600160a060020a03831661065f5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0382166106de5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600160a060020a0383166107bf5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03821661083e5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a038316600090815260208190526040902054818110156108d05760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610907908490610d0b565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161095391815260200190565b60405180910390a350505050565b600160a060020a0382166109e05760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03821660009081526020819052604090205481811015610a725760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0383166000908152602081905260408120838303905560028054849290610aa1908490610d23565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610733565b600160a060020a038216610b3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610403565b8060026000828254610b4f9190610d0b565b9091555050600160a060020a03821660009081526020819052604081208054839290610b7c908490610d0b565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a0381168114610bdd57600080fd5b919050565b600060208284031215610bf457600080fd5b610bfd82610bc6565b9392505050565b60008060408385031215610c1757600080fd5b610c2083610bc6565b9150610c2e60208401610bc6565b90509250929050565b600080600060608486031215610c4c57600080fd5b610c5584610bc6565b9250610c6360208501610bc6565b9150604084013590509250925092565b60008060408385031215610c8657600080fd5b610c8f83610bc6565b946020939093013593505050565b600060208284031215610caf57600080fd5b5035919050565b600060208083528351808285015260005b81811015610ce357858101830151858201604001528201610cc7565b81811115610cf5576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610d1e57610d1e610d8e565b500190565b600082821015610d3557610d35610d8e565b500390565b600281046001821680610d4e57607f821691505b60208210811415610d88577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220f75853fc2637d5ca8248502a85a7f949947d4ce8824b83a6ae12f18058d32b2c64736f6c63430008060033", @@ -418,7 +418,7 @@ "storageLayout": { "storage": [ { - "astId": 991, + "astId": 1371, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_balances", "offset": 0, @@ -426,7 +426,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 997, + "astId": 1377, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_allowances", "offset": 0, @@ -434,7 +434,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 999, + "astId": 1379, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_totalSupply", "offset": 0, @@ -442,7 +442,7 @@ "type": "t_uint256" }, { - "astId": 1001, + "astId": 1381, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_name", "offset": 0, @@ -450,7 +450,7 @@ "type": "t_string_storage" }, { - "astId": 1003, + "astId": 1383, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_symbol", "offset": 0, diff --git a/contracts/deployments/test/bsc/solcInputs/13963204c1e3ae6f33bd8024ced50cd9.json b/contracts/deployments/test/bsc/solcInputs/13963204c1e3ae6f33bd8024ced50cd9.json deleted file mode 100644 index a2474623..00000000 --- a/contracts/deployments/test/bsc/solcInputs/13963204c1e3ae6f33bd8024ced50cd9.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/checks/CheckAura.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckAura is Initializable {\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n bytes1 constant STEP_PREFIX = 0x84;\n bytes2 constant SIGNATURE_PREFIX = 0xB841;\n\n address[] public validatorSet;\n address validatorSetAddress;\n bytes32 public lastProcessedBlock; // actually latest processed block in which *vs change event* emitted\n uint public minSafetyBlocksValidators;\n\n\n struct BlockAura {\n bytes3 p0Seal;\n bytes3 p0Bare;\n\n bytes32 parentHash;\n bytes p2;\n bytes32 receiptHash;\n bytes p3;\n\n bytes4 step;\n bytes signature; // todo maybe pass s r v values?\n\n uint64 finalizedVs;\n }\n\n\n struct ValidatorSetChange {\n address deltaAddress;\n uint16 deltaIndex; // add if 0, else remove\n }\n\n struct ValidatorSetProof {\n bytes[] receiptProof;\n ValidatorSetChange[] changes;\n uint64 eventBlock;\n }\n\n struct AuraProof {\n BlockAura[] blocks;\n CommonStructs.TransferProof transfer;\n ValidatorSetProof[] vsChanges;\n uint64 transferEventBlock;\n }\n\n\n function __CheckAura_init(\n address[] calldata initialValidators_,\n address validatorSetAddress_,\n bytes32 lastProcessedBlock_,\n uint minSafetyBlocksValidators_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n validatorSet = initialValidators_;\n validatorSetAddress = validatorSetAddress_;\n lastProcessedBlock = lastProcessedBlock_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n\n\n /*\n AuraProof.blocks contains:\n - blocks for validate validatorSet change event, in that order:\n - block with `InitiateChange` events (contains list of all validators)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize; have `finalizedVs` != 0\n * repeated for each vs change event; all events must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n AuraProof.vsChanges contains changes in validator set and receiptProof for validation.\n block.finalizedVs-1 is index in AuraProof.vsChanges array\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between vsChange events\n If there are no errors, the transfer is considered valid\n */\n function checkAura_(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n\n bytes32 parentHash;\n bytes32 receiptHash;\n\n // auraProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (auraProof.transfer.eventId != 0) {\n receiptHash = calcTransferReceiptsHash(auraProof.transfer, sideBridgeAddress);\n require(auraProof.blocks[auraProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(auraProof.blocks.length - auraProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < auraProof.blocks.length; i++) {\n BlockAura calldata block_ = auraProof.blocks[i];\n\n // check that parentHash is correct\n if (block_.parentHash != parentHash) {\n // we can ignore wrong parentHash if:\n // - it's NOT safety blocks for transfer event\n // - it's first block (don't know parentHash)\n // - it's finalizing block (there is gap BEFORE finalizing block)\n // - it's next block after finalizing (there is gap AFTER finalizing block)\n // else, raise error\n\n if (i > auraProof.transferEventBlock || // safety blocks for transfer event\n (i != 0 && // not first block\n block_.finalizedVs == 0 && // not finalizing block\n auraProof.blocks[i-1].finalizedVs == 0) // not next block after finalizing\n )\n revert(\"Wrong parent hash\");\n }\n\n // check validator for this block\n // calc block hash for this block\n parentHash = checkBlock(block_);\n\n // if this block is finalizing block\n // 0 means no events should be finalized, so indexes are shifted by 1\n if (block_.finalizedVs != 0) {\n // vs changes in that block\n ValidatorSetProof calldata vsProof = auraProof.vsChanges[block_.finalizedVs - 1];\n\n // apply vs changes\n for (uint k = 0; k < vsProof.changes.length; k++)\n applyVsChange(vsProof.changes[k]);\n\n // check proof\n receiptHash = calcValidatorSetReceiptHash(vsProof.receiptProof, validatorSetAddress, validatorSet);\n require(auraProof.blocks[vsProof.eventBlock].receiptHash == receiptHash, \"Wrong VS receipt hash\");\n require(i - vsProof.eventBlock >= minSafetyBlocksValidators, \"Few safety blocks validators\");\n }\n\n }\n\n // save block.parentHash in which latest processed vsChange event emitted\n if (auraProof.vsChanges.length > 0) {\n lastProcessedBlock = auraProof.blocks[auraProof.vsChanges[auraProof.vsChanges.length - 1].eventBlock].parentHash;\n }\n }\n\n function getValidatorSet() public view returns (address[] memory) {\n return validatorSet;\n }\n\n function applyVsChange(ValidatorSetChange calldata vsEvent) internal {\n if (vsEvent.deltaIndex == 0) {// add validator\n validatorSet.push(vsEvent.deltaAddress);\n } else {// delete validator\n uint index = uint(vsEvent.deltaIndex - 1);\n validatorSet[index] = validatorSet[validatorSet.length - 1];\n validatorSet.pop();\n }\n }\n\n function checkBlock(BlockAura calldata block_) internal view returns (bytes32) {\n (bytes32 bareHash, bytes32 sealHash) = calcBlockHash(block_);\n\n address validator = validatorSet[bytesToUint(block_.step) % validatorSet.length];\n require(ecdsaRecover(bareHash, block_.signature) == validator, \"Failed to verify sign\");\n\n return sealHash;\n }\n\n function calcBlockHash(BlockAura calldata block_) internal pure returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p2, block_.receiptHash, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Bare, commonRlp)),\n // hash with seal, for prevHash check\n keccak256(abi.encodePacked(block_.p0Seal, commonRlp, STEP_PREFIX, block_.step, SIGNATURE_PREFIX, block_.signature))\n );\n }\n\n\n function calcValidatorSetReceiptHash(bytes[] calldata receiptProof, address validatorSetAddress_, address[] storage vSet) private pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n receiptProof[0],\n validatorSetAddress_,\n receiptProof[1],\n abi.encode(vSet),\n receiptProof[2]\n ));\n return calcReceiptsHash(receiptProof, el, 3);\n }\n\n function bytesToUint(bytes4 b) internal pure returns (uint){\n return uint(uint32(b));\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckReceiptsProof.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\n// check readme for focs\nfunction calcReceiptsHash(bytes[] calldata proof, bytes32 el, uint proofStart) pure returns (bytes32) {\n bytes memory s;\n\n for (uint i = proofStart; i < proof.length; i += 2) {\n s = abi.encodePacked(proof[i], el, proof[i + 1]);\n el = (s.length > 32) ? keccak256(s) : bytes32(s);\n }\n\n return el;\n}\n\n\nfunction calcTransferReceiptsHash(CommonStructs.TransferProof calldata p, address eventContractAddress) pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n p.receiptProof[0],\n eventContractAddress,\n p.receiptProof[1],\n toBinary(p.eventId),\n p.receiptProof[2],\n abi.encode(p.transfers),\n p.receiptProof[3]\n ));\n return calcReceiptsHash(p.receiptProof, el, 4);\n // start from proof[4]\n}\n\n\nfunction toBinary(uint _x) pure returns (bytes memory) {\n bytes memory b = new bytes(32);\n assembly {\n mstore(add(b, 32), _x)\n }\n uint i;\n for (i = 0; i < 32; i++) {\n if (b[i] != 0) {\n break;\n }\n }\n bytes memory res = new bytes(32 - i);\n for (uint j = 0; j < res.length; j++) {\n res[j] = b[i++];\n }\n return res;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" - }, - "contracts/checks/SignatureCheck.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" - }, - "contracts/common/CommonStructs.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address adminAddress;\n address relayAddress; address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" - }, - "contracts/networks/_AuraReceiver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract _AuraReceiver is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n}\n" - }, - "contracts/common/CommonBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // OWNER_ROLE must be DEFAULT_ADMIN_ROLE because by default only this role able to grant or revoke other roles\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\"); // can submit transfers\n bytes32 public constant WATCHDOG_ROLE = keccak256(\"WATCHDOG_ROLE\"); // can pause contract\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\"FEE_PROVIDER_ROLE\"); // fee signatures must be signed by this role\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable public transferFeeRecipient;\n address payable public bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRole(ADMIN_ROLE, args.adminAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId **and all after it**\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n require(eventId <= inputEventId, \"eventId must be <= inputEventId\");\n\n // now waiting for submitting a new transfer with `eventId` id\n inputEventId = eventId - 1;\n\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n\n }\n\n // pretend like bridge already receive and process all transfers up to `eventId` id\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\n }\n\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(WATCHDOG_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(FEE_PROVIDER_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" - }, - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\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, _msgSender());\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(IAccessControlUpgradeable).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" - }, - "contracts/tokens/IWrapper.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 IERC165Upgradeable {\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" - }, - "contracts/networks/ETH_EthBridge_AURA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract ETH_EthBridge_AURA is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/BSC_BscBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract BSC_BscBridge is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/ETH_EthBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract ETH_EthBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata _watchdogs,\n address _fee_provider\n ) public initializer {\n __CommonBridge_init(args);\n setWatchdogsAndFeeProvider(_watchdogs, _fee_provider);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n setWatchdogsAndFeeProvider(_watchdogs, _fee_provider);\n }\n\n function setWatchdogsAndFeeProvider(\n address[] calldata _watchdogs,\n address _fee_provider\n ) public onlyRole(ADMIN_ROLE) whenNotPaused {\n for (uint i = 0; i < _watchdogs.length; i++)\n _setupRole(WATCHDOG_ROLE, _watchdogs[i]);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n\n\n}\n" - }, - "contracts/checks/CheckUntrustless2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\ncontract CheckUntrustless2 {\n // this contract do nothing, but i think it's required to inheritance from it\n // todo check this\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckUntrustless.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckUntrustless {\n uint public confirmationsThreshold;\n\n // [hash of (eventId, transfers)] => [relayAddress] => isConfirmed\n mapping(bytes32 => mapping(address => bool)) public confirmations;\n\n // using this instead of RELAY_ROLE coz it simpler\n address[] public relays;\n\n event RelayAdd(address indexed relay);\n event RelayRemove(address indexed relay);\n event ThresholdChange(uint newThreshold);\n event RelayConfirmation(address indexed sender, uint indexed eventId, bytes32 hash);\n\n // return true if current call reach confirmationsThreshold\n function checkUntrustless_(uint eventId, CommonStructs.Transfer[] calldata transfers) internal returns (bool) {\n require(isRelay(msg.sender), \"You not in relay whitelist\");\n\n bytes32 hash = transfersHash(eventId, transfers);\n require(confirmations[hash][msg.sender] == false, \"You have already confirmed this\");\n\n uint confirmCount = confirmedCount(hash);\n require(confirmCount < confirmationsThreshold, \"Already confirmed\");\n\n confirmations[hash][msg.sender] = true;\n emit RelayConfirmation(msg.sender, eventId, hash);\n\n // +1 coz current relay confirmed just now\n return confirmCount + 1 >= confirmationsThreshold;\n }\n\n\n function isConfirmedByRelay(address relay, uint eventId, CommonStructs.Transfer[] calldata transfers) public view returns (bool) {\n bytes32 hash = transfersHash(eventId, transfers);\n return confirmations[hash][relay];\n }\n\n\n function confirmedCount(bytes32 hash) public view returns (uint) {\n uint res;\n for (uint i = 0; i < relays.length; i++)\n if (confirmations[hash][relays[i]])\n res++;\n return res;\n }\n\n\n function isRelay(address relay) public view returns (bool){\n for (uint i = 0; i < relays.length; i++)\n if (relays[i] == relay)\n return true;\n return false;\n }\n\n function getRelays() public view returns (address[] memory) {\n return relays;\n }\n\n function transfersHash(uint eventId, CommonStructs.Transfer[] calldata transfers) public pure returns (bytes32) {\n bytes memory payload = abi.encodePacked(eventId);\n\n // i guess we can hash transfers only in this way\n for (uint i = 0; i < transfers.length; i++)\n payload = abi.encodePacked(payload, transfers[i].amount, transfers[i].toAddress, transfers[i].tokenAddress);\n\n return keccak256(payload);\n }\n\n\n function _setRelaysAndConfirmations(address[] memory toRemove, address[] memory toAdd, uint _confirmations) internal {\n for (uint i = 0; i < toRemove.length; i++)\n _removeRelay(toRemove[i]);\n for (uint i = 0; i < toAdd.length; i++)\n _addRelay(toAdd[i]);\n\n if (confirmationsThreshold != _confirmations) {\n confirmationsThreshold = _confirmations;\n emit ThresholdChange(_confirmations);\n }\n }\n\n function _removeRelay(address relay) internal {\n for (uint i = 0; i < relays.length; i++) {\n if (relays[i] == relay) {\n relays[i] = relays[relays.length - 1];\n relays.pop();\n emit RelayRemove(relay);\n return;\n }\n }\n revert(\"Not a relay\");\n }\n\n function _addRelay(address relay) internal {\n require(!isRelay(relay), \"Already relay\");\n relays.push(relay);\n emit RelayAdd(relay);\n }\n\n uint256[15] private ___gap;\n\n}\n" - }, - "contracts/networks/ETH_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless.sol\";\n\n\ncontract ETH_AmbBridge is CommonBridge, CheckUntrustless {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint _confirmations,\n address[] calldata _relays\n ) public initializer {\n __CommonBridge_init(args);\n _setRelaysAndConfirmations(new address[](0), _relays, _confirmations);\n }\n\n function upgrade(\n uint _confirmations,\n address[] memory _relays\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n // _setRelaysAndConfirmations don't work during upgrade and nobody knows why\n relays = _relays;\n confirmationsThreshold = _confirmations;\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public whenNotPaused {\n // relay \"role\" checked at CheckUntrustless contract\n require(eventId == inputEventId + 1, \"EventId out of order\");\n\n bool confirm = checkUntrustless_(eventId, transfers);\n if (confirm) {// required count of confirmations reached\n ++inputEventId;\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n // todo need lock?\n }\n }\n\n function setRelaysAndConfirmations(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n require(msg.sender == address(this), \"This method require multisig\");\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n\n}\n" - }, - "contracts/contracts_for_tests/CheckUntrustlessTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckUntrustless.sol\";\n\ncontract CheckUntrustlessTest is CheckUntrustless {\n constructor() {}\n\n event checkUntrustlessTestResult(bool result);\n\n function checkUntrustlessTest(uint eventId, CommonStructs.Transfer[] calldata transfers) public {\n emit checkUntrustlessTestResult(checkUntrustless_(eventId, transfers));\n }\n\n function setRelaysAndConfirmationsTest(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n}\n" - }, - "contracts/checks/CheckPoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"./CheckPoW_Ethash.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckPoW is Initializable, Ethash {\n struct BlockPoW {\n bytes3 p0WithNonce;\n bytes3 p0WithoutNonce;\n\n bytes p1;\n bytes32 parentOrReceiptHash;\n bytes p2;\n bytes difficulty;\n bytes p3;\n bytes number;\n bytes p4; // end when extra end\n bytes p5; // after extra\n bytes nonce;\n bytes p6;\n\n uint[] dataSetLookup;\n uint[] witnessForLookup;\n }\n\n struct PoWProof {\n BlockPoW[] blocks;\n CommonStructs.TransferProof transfer;\n }\n\n uint256 minimumDifficulty;\n\n function __CheckPoW_init(\n uint256 minimumDifficulty_\n ) internal initializer {\n minimumDifficulty = minimumDifficulty_;\n }\n\n /*\n PoWProof.blocks contains:\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, checking it pow hash.\n Each block parentHash must be equal to the hash of the previous block.\n If there are no errors, the transfer is considered valid\n */\n function checkPoW_(PoWProof calldata powProof, address sideBridgeAddress) internal view\n {\n bytes32 hash = calcTransferReceiptsHash(powProof.transfer, sideBridgeAddress);\n for (uint i = 0; i < powProof.blocks.length; i++) {\n require(powProof.blocks[i].parentOrReceiptHash == hash, \"parentHash or receiptHash wrong\");\n hash = blockHash(powProof.blocks[i]);\n\n verifyEthash(powProof.blocks[i]);\n }\n }\n\n\n function verifyEthash(BlockPoW calldata block_) internal view {\n uint difficulty = bytesToUint(block_.difficulty);\n require(difficulty >= minimumDifficulty, \"difficulty too low\");\n verifyPoW(\n bytesToUint(block_.number),\n blockHashWithoutNonce(block_),\n bytesToUint(block_.nonce),\n difficulty,\n block_.dataSetLookup,\n block_.witnessForLookup\n );\n }\n\n function blockHash(BlockPoW calldata block_) internal pure returns (bytes32) {\n // Note: too much arguments in abi.encodePacked() function cause CompilerError: Stack too deep...\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2,\n block_.difficulty,\n block_.p3\n ),\n abi.encodePacked(\n block_.number,\n block_.p4,\n block_.p5,\n block_.nonce,\n block_.p6\n )\n ));\n }\n\n function blockHashWithoutNonce(BlockPoW calldata block_) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithoutNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2\n ),\n abi.encodePacked(\n block_.difficulty,\n block_.p3,\n block_.number,\n block_.p4,\n block_.p6\n )\n ));\n }\n\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckPoW_Ethash.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n/// @dev These contracts are used to verify Proof of Work within a smart contract.\n/// The algorithms have been extracted from the implementation of smart pool (https://github.com/smartpool)\ncontract SHA3_512 {\n constructor() {}\n\n function keccak_f(uint[25] memory A) pure private returns (uint[25] memory) {\n uint[25] memory B;\n uint[5] memory C;\n uint[5] memory D;\n\n uint[24] memory RC = [\n uint(0x0000000000000001),\n 0x0000000000008082,\n 0x800000000000808A,\n 0x8000000080008000,\n 0x000000000000808B,\n 0x0000000080000001,\n 0x8000000080008081,\n 0x8000000000008009,\n 0x000000000000008A,\n 0x0000000000000088,\n 0x0000000080008009,\n 0x000000008000000A,\n 0x000000008000808B,\n 0x800000000000008B,\n 0x8000000000008089,\n 0x8000000000008003,\n 0x8000000000008002,\n 0x8000000000000080,\n 0x000000000000800A,\n 0x800000008000000A,\n 0x8000000080008081,\n 0x8000000000008080,\n 0x0000000080000001,\n 0x8000000080008008];\n\n for (uint i = 0; i < 24; i++) {\n\n C[0] = A[0] ^ A[1] ^ A[2] ^ A[3] ^ A[4];\n C[1] = A[5] ^ A[6] ^ A[7] ^ A[8] ^ A[9];\n C[2] = A[10] ^ A[11] ^ A[12] ^ A[13] ^ A[14];\n C[3] = A[15] ^ A[16] ^ A[17] ^ A[18] ^ A[19];\n C[4] = A[20] ^ A[21] ^ A[22] ^ A[23] ^ A[24];\n\n D[0] = C[4] ^ ((C[1] * 2) & 0xffffffffffffffff | (C[1] / (2 ** 63)));\n D[1] = C[0] ^ ((C[2] * 2) & 0xffffffffffffffff | (C[2] / (2 ** 63)));\n D[2] = C[1] ^ ((C[3] * 2) & 0xffffffffffffffff | (C[3] / (2 ** 63)));\n D[3] = C[2] ^ ((C[4] * 2) & 0xffffffffffffffff | (C[4] / (2 ** 63)));\n D[4] = C[3] ^ ((C[0] * 2) & 0xffffffffffffffff | (C[0] / (2 ** 63)));\n\n A[0] = A[0] ^ D[0];\n A[1] = A[1] ^ D[0];\n A[2] = A[2] ^ D[0];\n A[3] = A[3] ^ D[0];\n A[4] = A[4] ^ D[0];\n A[5] = A[5] ^ D[1];\n A[6] = A[6] ^ D[1];\n A[7] = A[7] ^ D[1];\n A[8] = A[8] ^ D[1];\n A[9] = A[9] ^ D[1];\n A[10] = A[10] ^ D[2];\n A[11] = A[11] ^ D[2];\n A[12] = A[12] ^ D[2];\n A[13] = A[13] ^ D[2];\n A[14] = A[14] ^ D[2];\n A[15] = A[15] ^ D[3];\n A[16] = A[16] ^ D[3];\n A[17] = A[17] ^ D[3];\n A[18] = A[18] ^ D[3];\n A[19] = A[19] ^ D[3];\n A[20] = A[20] ^ D[4];\n A[21] = A[21] ^ D[4];\n A[22] = A[22] ^ D[4];\n A[23] = A[23] ^ D[4];\n A[24] = A[24] ^ D[4];\n\n /*Rho and pi steps*/\n B[0] = A[0];\n B[8] = ((A[1] * (2 ** 36)) & 0xffffffffffffffff | (A[1] / (2 ** 28)));\n B[11] = ((A[2] * (2 ** 3)) & 0xffffffffffffffff | (A[2] / (2 ** 61)));\n B[19] = ((A[3] * (2 ** 41)) & 0xffffffffffffffff | (A[3] / (2 ** 23)));\n B[22] = ((A[4] * (2 ** 18)) & 0xffffffffffffffff | (A[4] / (2 ** 46)));\n B[2] = ((A[5] * (2 ** 1)) & 0xffffffffffffffff | (A[5] / (2 ** 63)));\n B[5] = ((A[6] * (2 ** 44)) & 0xffffffffffffffff | (A[6] / (2 ** 20)));\n B[13] = ((A[7] * (2 ** 10)) & 0xffffffffffffffff | (A[7] / (2 ** 54)));\n B[16] = ((A[8] * (2 ** 45)) & 0xffffffffffffffff | (A[8] / (2 ** 19)));\n B[24] = ((A[9] * (2 ** 2)) & 0xffffffffffffffff | (A[9] / (2 ** 62)));\n B[4] = ((A[10] * (2 ** 62)) & 0xffffffffffffffff | (A[10] / (2 ** 2)));\n B[7] = ((A[11] * (2 ** 6)) & 0xffffffffffffffff | (A[11] / (2 ** 58)));\n B[10] = ((A[12] * (2 ** 43)) & 0xffffffffffffffff | (A[12] / (2 ** 21)));\n B[18] = ((A[13] * (2 ** 15)) & 0xffffffffffffffff | (A[13] / (2 ** 49)));\n B[21] = ((A[14] * (2 ** 61)) & 0xffffffffffffffff | (A[14] / (2 ** 3)));\n B[1] = ((A[15] * (2 ** 28)) & 0xffffffffffffffff | (A[15] / (2 ** 36)));\n B[9] = ((A[16] * (2 ** 55)) & 0xffffffffffffffff | (A[16] / (2 ** 9)));\n B[12] = ((A[17] * (2 ** 25)) & 0xffffffffffffffff | (A[17] / (2 ** 39)));\n B[15] = ((A[18] * (2 ** 21)) & 0xffffffffffffffff | (A[18] / (2 ** 43)));\n B[23] = ((A[19] * (2 ** 56)) & 0xffffffffffffffff | (A[19] / (2 ** 8)));\n B[3] = ((A[20] * (2 ** 27)) & 0xffffffffffffffff | (A[20] / (2 ** 37)));\n B[6] = ((A[21] * (2 ** 20)) & 0xffffffffffffffff | (A[21] / (2 ** 44)));\n B[14] = ((A[22] * (2 ** 39)) & 0xffffffffffffffff | (A[22] / (2 ** 25)));\n B[17] = ((A[23] * (2 ** 8)) & 0xffffffffffffffff | (A[23] / (2 ** 56)));\n B[20] = ((A[24] * (2 ** 14)) & 0xffffffffffffffff | (A[24] / (2 ** 50)));\n\n /*Xi state*/\n A[0] = B[0] ^ ((~B[5]) & B[10]);\n A[1] = B[1] ^ ((~B[6]) & B[11]);\n A[2] = B[2] ^ ((~B[7]) & B[12]);\n A[3] = B[3] ^ ((~B[8]) & B[13]);\n A[4] = B[4] ^ ((~B[9]) & B[14]);\n A[5] = B[5] ^ ((~B[10]) & B[15]);\n A[6] = B[6] ^ ((~B[11]) & B[16]);\n A[7] = B[7] ^ ((~B[12]) & B[17]);\n A[8] = B[8] ^ ((~B[13]) & B[18]);\n A[9] = B[9] ^ ((~B[14]) & B[19]);\n A[10] = B[10] ^ ((~B[15]) & B[20]);\n A[11] = B[11] ^ ((~B[16]) & B[21]);\n A[12] = B[12] ^ ((~B[17]) & B[22]);\n A[13] = B[13] ^ ((~B[18]) & B[23]);\n A[14] = B[14] ^ ((~B[19]) & B[24]);\n A[15] = B[15] ^ ((~B[20]) & B[0]);\n A[16] = B[16] ^ ((~B[21]) & B[1]);\n A[17] = B[17] ^ ((~B[22]) & B[2]);\n A[18] = B[18] ^ ((~B[23]) & B[3]);\n A[19] = B[19] ^ ((~B[24]) & B[4]);\n A[20] = B[20] ^ ((~B[0]) & B[5]);\n A[21] = B[21] ^ ((~B[1]) & B[6]);\n A[22] = B[22] ^ ((~B[2]) & B[7]);\n A[23] = B[23] ^ ((~B[3]) & B[8]);\n A[24] = B[24] ^ ((~B[4]) & B[9]);\n\n /*Last step*/\n A[0] = A[0] ^ RC[i];\n }\n\n return A;\n }\n\n\n function sponge(uint[9] memory M) pure internal returns (uint[16] memory) {\n require((M.length * 8) == 72, \"sponge error\");\n\n M[5] = 0x01;\n M[8] = 0x8000000000000000;\n\n uint r = 72;\n uint w = 8;\n uint size = M.length * 8;\n\n uint[25] memory S;\n uint i;\n uint y;\n uint x;\n /*Absorbing Phase*/\n for (i = 0; i < size / r; i++) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w)) {\n S[5 * x + y] = S[5 * x + y] ^ M[i * 9 + x + 5 * y];\n }\n }\n }\n S = keccak_f(S);\n }\n\n /*Squeezing phase*/\n uint[16] memory result;\n uint b = 0;\n while (b < 16) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w) && (b < 16)) {\n result[b] = S[5 * x + y] & 0xFFFFFFFF;\n result[b + 1] = S[5 * x + y] / 0x100000000;\n b += 2;\n }\n }\n }\n }\n\n return result;\n }\n\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\ncontract Ethash is SHA3_512 {\n\n uint constant EPOCH_LENGTH = 30000; // blocks per epoch\n\n constructor() {\n }\n\n struct EthashCacheOptData {\n uint[512] merkleNodes;\n uint fullSizeIn128Resultion;\n uint branchDepth;\n }\n\n mapping(uint => EthashCacheOptData) epochData;\n\n\n function verifyPoW(uint blockNumber, bytes32 rlpHeaderHashWithoutNonce, uint nonce, uint difficulty,\n uint[] memory dataSetLookup, uint[] memory witnessForLookup) internal view {\n\n uint epoch = blockNumber / EPOCH_LENGTH;\n uint ethash = hashimoto(rlpHeaderHashWithoutNonce, nonce, dataSetLookup, witnessForLookup, epoch);\n\n require(ethash <= (2 ** 256 - 1) / difficulty, \"Ethash difficulty too low\");\n }\n\n function isEpochDataSet(uint epochIndex) public view returns (bool) {\n return epochData[epochIndex].fullSizeIn128Resultion != 0;\n }\n\n function setEpochData(\n uint epochNum,\n uint fullSizeIn128Resultion,\n uint branchDepth,\n uint[] calldata merkleNodes\n ) public {\n\n // we store only previous and current epochs\n // so, delete second from the end epoch\n if (epochNum >= 2) // underflow check\n delete epochData[epochNum - 2];\n\n\n uint l = merkleNodes.length;\n uint[512] storage nodes = epochData[epochNum].merkleNodes;\n\n for (uint i = 0; i < l; i++) {\n nodes[i] = merkleNodes[i];\n }\n\n epochData[epochNum].fullSizeIn128Resultion = fullSizeIn128Resultion;\n epochData[epochNum].branchDepth = branchDepth;\n }\n\n\n function hashimoto(bytes32 header,\n uint nonceLe,\n uint[] memory dataSetLookup,\n uint[] memory witnessForLookup,\n uint epochIndex) private view returns (uint) {\n\n uint[16] memory s = computeS(uint(header), nonceLe);\n uint[32] memory mix;\n uint[8] memory cmix;\n\n\n uint depth = epochData[epochIndex].branchDepth;\n uint fullSize = epochData[epochIndex].fullSizeIn128Resultion;\n\n uint i;\n uint j;\n\n require(fullSize != 0, \"EpochData not set\");\n\n\n for (i = 0; i < 16; i++) {\n assembly {\n let offset := mul(i, 0x20)\n\n //mix[i] = s[i];\n mstore(add(mix, offset), mload(add(s, offset)))\n\n // mix[i+16] = s[i];\n mstore(add(mix, add(0x200, offset)), mload(add(s, offset)))\n }\n }\n\n for (i = 0; i < 64; i++) {\n uint p = fnv(i ^ s[0], mix[i % 32]) % fullSize;\n\n // console.log(computeCacheRoot( p, i, dataSetLookup, witnessForLookup, depthAndFullSize[0]));\n // console.log(getMerkleLeave( epochIndex, p ));\n\n if (computeCacheRoot(p, i, dataSetLookup, witnessForLookup, depth) != getMerkleLeave(epochIndex, p)) {\n // PoW failed\n revert(\"PoW failed\");\n }\n\n for (j = 0; j < 8; j++) {\n\n assembly{\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & varFFFFFFFF );\n let dataOffset := add(mul(0x80, i), add(dataSetLookup, 0x20))\n let dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n let mixOffset := add(mix, mul(0x20, j))\n let mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n let fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n }\n\n\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & 0xFFFFFFFF );\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n\n\n //dataSetLookup[4*i ] = dataSetLookup[4*i ]/(2**32);\n //dataSetLookup[4*i + 1] = dataSetLookup[4*i + 1]/(2**32);\n //dataSetLookup[4*i + 2] = dataSetLookup[4*i + 2]/(2**32);\n //dataSetLookup[4*i + 3] = dataSetLookup[4*i + 3]/(2**32);\n\n assembly{\n let offset := add(add(dataSetLookup, 0x20), mul(i, 0x80))\n let value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n }\n }\n }\n\n\n for (i = 0; i < 32; i += 4) {\n cmix[i / 4] = (fnv(fnv(fnv(mix[i], mix[i + 1]), mix[i + 2]), mix[i + 3]));\n }\n\n return computeSha3(s, cmix);\n\n }\n\n\n function fnv(uint v1, uint v2) pure internal returns (uint) {\n return ((v1 * 0x01000193) ^ v2) & 0xFFFFFFFF;\n }\n\n function computeCacheRoot(uint index,\n uint indexInElementsArray,\n uint[] memory elements,\n uint[] memory witness,\n uint branchSize) pure private returns (uint) {\n\n uint leaf = computeLeaf(elements, indexInElementsArray) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n\n uint left;\n uint right;\n uint node;\n bool oddBranchSize = (branchSize % 2) > 0;\n\n assembly {\n branchSize := div(branchSize, 2)\n //branchSize /= 2;\n }\n uint witnessIndex = indexInElementsArray * branchSize;\n if (oddBranchSize) witnessIndex += indexInElementsArray;\n\n uint depth;\n for (depth = 0; depth < branchSize; depth++) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n\n //node = witness[witnessIndex + depth] / (2**128);\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := div(node, 0x100000000000000000000000000000000)\n }\n }\n else {\n assembly {\n left := div(node, 0x100000000000000000000000000000000)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n }\n\n if (oddBranchSize) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n }\n\n\n return leaf;\n }\n\n\n function computeSha3(uint[16] memory s, uint[8] memory cmix) pure internal returns (uint) {\n uint s0 = s[0] + s[1] * (2 ** 32) + s[2] * (2 ** 64) + s[3] * (2 ** 96) +\n (s[4] + s[5] * (2 ** 32) + s[6] * (2 ** 64) + s[7] * (2 ** 96)) * (2 ** 128);\n\n uint s1 = s[8] + s[9] * (2 ** 32) + s[10] * (2 ** 64) + s[11] * (2 ** 96) +\n (s[12] + s[13] * (2 ** 32) + s[14] * (2 ** 64) + s[15] * (2 ** 96)) * (2 ** 128);\n\n uint c = cmix[0] + cmix[1] * (2 ** 32) + cmix[2] * (2 ** 64) + cmix[3] * (2 ** 96) +\n (cmix[4] + cmix[5] * (2 ** 32) + cmix[6] * (2 ** 64) + cmix[7] * (2 ** 96)) * (2 ** 128);\n\n\n /* god knows why need to convert to big endian */\n return uint(keccak256(abi.encodePacked(reverseBytes(s0), reverseBytes(s1), reverseBytes(c))));\n }\n\n\n function computeLeaf(uint[] memory dataSetLookup, uint index) pure internal returns (uint) {\n return uint(keccak256(abi.encodePacked(\n dataSetLookup[4 * index],\n dataSetLookup[4 * index + 1],\n dataSetLookup[4 * index + 2],\n dataSetLookup[4 * index + 3]\n )));\n\n }\n\n function computeS(uint header, uint nonceLe) pure internal returns (uint[16] memory) {\n uint[9] memory M;\n\n header = reverseBytes(header);\n\n M[0] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[1] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[2] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[3] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n\n // make little endian nonce\n M[4] = nonceLe;\n return sponge(M);\n }\n\n function reverseBytes(uint input) pure internal returns (uint) {\n uint result;\n for (uint i = 0; i < 32; i++) {\n result = (result << 8) + (input & 0xff);\n input = input >> 8;\n }\n return result;\n }\n\n\n function getMerkleLeave(uint epochIndex, uint p) view internal returns (uint) {\n uint rootIndex = uint(p >> epochData[epochIndex].branchDepth);\n uint expectedRoot = epochData[epochIndex].merkleNodes[(rootIndex >> 1)];\n\n if ((rootIndex % 2) == 0)\n return expectedRoot & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n return expectedRoot >> 128;\n }\n\n}\n" - }, - "contracts/networks/ETH_AmbBridge_PoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoW.sol\";\n\n\ncontract ETH_AmbBridge_PoW is CommonBridge, CheckPoW {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint minimumDifficulty\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoW_init(minimumDifficulty);\n }\n\n function submitTransferPoW(PoWProof calldata powProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(powProof.transfer.eventId);\n checkEventId(powProof.transfer.eventId);\n checkPoW_(powProof, sideBridgeAddress);\n // checkPoW_(powProof, sideBridgeAddress);\n lockTransfers(powProof.transfer.transfers, powProof.transfer.eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n}\n\n" - }, - "contracts/contracts_for_tests/CheckPoWTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoW.sol\";\n\ncontract CheckPoWTest is CheckPoW {\n\n constructor(\n uint minimumDifficulty_\n ) {\n minimumDifficulty = minimumDifficulty_;\n }\n\n function checkPoWTest(PoWProof calldata powProof, address sideBridgeAddress) public {\n checkPoW_(powProof, sideBridgeAddress);\n }\n\n function verifyEthashTest(BlockPoW calldata block_) public view {\n verifyEthash(block_);\n }\n\n function blockHashTest(BlockPoW calldata block_) public pure returns (bytes32) {\n return blockHash(block_);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CommonBridgeTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckReceiptsProof.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // used for signature check\n _setupRole(RELAY_ROLE, address(0x295C2707319ad4BecA6b5bb4086617fD6F240CfE));\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n checkEventId(eventId); // now its more like submitTransferTest\n lockTransfers(events, eventId);\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n // checkReceiptsProof\n\n function calcTransferReceiptsHashTest(CommonStructs.TransferProof calldata p, address eventContractAddress) public pure returns (bytes32) {\n return calcTransferReceiptsHash(p, eventContractAddress);\n }\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" - }, - "contracts/checks/CheckPoSA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckPoSA is Initializable {\n uint256 private constant ADDRESS_LENGTH = 20;\n uint256 private constant EXTRA_VANITY_LENGTH = 32;\n uint256 private constant EXTRA_SEAL_LENGTH = 65;\n uint256 private constant EPOCH_LENGTH = 200;\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n\n mapping(uint => mapping(address => bool)) internal allValidators;\n uint public currentEpoch;\n uint currentValidatorSetSize;\n\n bytes1 chainId;\n\n\n struct BlockPoSA {\n bytes3 p0Signed;\n bytes3 p0Unsigned;\n\n bytes32 parentHash;\n bytes p1;\n bytes32 receiptHash;\n bytes p2;\n bytes number;\n bytes p3;\n\n bytes p4Signed;\n bytes p4Unsigned;\n bytes extraData;\n\n bytes p5;\n }\n\n struct PoSAProof {\n BlockPoSA[] blocks;\n CommonStructs.TransferProof transfer;\n uint64 transferEventBlock;\n }\n\n\n function __CheckPoSA_init(\n address[] calldata initialValidators_,\n uint initialEpoch_,\n bytes1 chainId_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n chainId = chainId_;\n currentEpoch = initialEpoch_;\n currentValidatorSetSize = initialValidators_.length;\n\n for (uint i = 0; i < initialValidators_.length; i++) {\n allValidators[currentEpoch][initialValidators_[i]] = true;\n }\n }\n\n /*\n PoSAProof.blocks contains:\n - blocks for validate validatorSet changes, in that order:\n - first block in epoch (blockNum % 200 == 0)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize\n * repeated for each new epoch, all epochs must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between epochs\n If there are no errors, the transfer is considered valid\n */\n function checkPoSA_(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n bytes32 bareHash;\n bytes32 parentHash;\n uint finalizeVsBlock;\n uint nextVsSize;\n\n // posaProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (posaProof.transfer.eventId != 0) {\n bytes32 receiptHash = calcTransferReceiptsHash(posaProof.transfer, sideBridgeAddress);\n require(posaProof.blocks[posaProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(posaProof.blocks.length - posaProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < posaProof.blocks.length; i++) {\n BlockPoSA calldata block_ = posaProof.blocks[i];\n\n if (parentHash != bytes32(0))\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n\n (bareHash, parentHash) = calcBlockHash(block_);\n\n require(verifySignature(bareHash, getSignature(block_.extraData)), \"invalid signature\");\n\n // change validator set\n\n uint blockNumber = bytesToUint(block_.number);\n\n if (blockNumber % EPOCH_LENGTH == 0) {\n require(blockNumber / EPOCH_LENGTH == currentEpoch + 1, \"invalid epoch\");\n\n nextVsSize = newValidatorSet(block_.extraData);\n finalizeVsBlock = blockNumber + currentValidatorSetSize / 2;\n } else if (blockNumber == finalizeVsBlock) {\n currentEpoch++;\n currentValidatorSetSize = nextVsSize;\n\n // after finalizing vs change, next block in posaProof.blocks can have any parentHash (skipping some blocks)\n // but only if it's not the safety blocks for transfer event\n if (i < posaProof.transferEventBlock)\n parentHash = bytes32(0);\n }\n }\n }\n\n\n function calcBlockHash(BlockPoSA calldata block_) internal view returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p1, block_.receiptHash, block_.p2, block_.number, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Unsigned, chainId, commonRlp, block_.p4Unsigned, getExtraDataUnsigned(block_.extraData), block_.p5)),\n // hash with seal, for prev_hash check\n keccak256(abi.encodePacked(block_.p0Signed, commonRlp, block_.p4Signed, block_.extraData, block_.p5))\n );\n }\n\n function getSignature(bytes calldata extraData) private pure returns (bytes calldata) {\n uint start = extraData.length - EXTRA_SEAL_LENGTH;\n return extraData[start : start + EXTRA_SEAL_LENGTH];\n }\n\n function getExtraDataUnsigned(bytes calldata extraData) private pure returns (bytes memory) {\n return extraData[0 : extraData.length - EXTRA_SEAL_LENGTH];\n }\n\n function newValidatorSet(bytes calldata extraData) private returns (uint) {\n uint nextValidatorSet = currentEpoch + 1;\n uint endPos = extraData.length - EXTRA_SEAL_LENGTH;\n\n uint nextValidatorSetSize;\n for (uint pos = EXTRA_VANITY_LENGTH; pos < endPos; pos += ADDRESS_LENGTH) {\n address validator = address(bytes20(extraData[pos : pos + ADDRESS_LENGTH]));\n allValidators[nextValidatorSet][validator] = true;\n nextValidatorSetSize++;\n }\n\n return nextValidatorSetSize;\n }\n\n function verifySignature(bytes32 hash, bytes calldata signature) private view returns (bool) {\n address signer = ecdsaRecover(hash, signature);\n return allValidators[currentEpoch][signer];\n }\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n}\n" - }, - "contracts/networks/BSC_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract BSC_AmbBridge is CommonBridge, CheckPoSA {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n uint initialEpoch,\n bytes1 chainId\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoSA_init(initialValidators, initialEpoch, chainId);\n }\n\n function submitTransferPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(posaProof.transfer.eventId);\n checkEventId(posaProof.transfer.eventId);\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(posaProof.transfer.transfers, posaProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoSATest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract CheckPoSATest is CheckPoSA {\n constructor(\n bytes1 chainId_\n ) {\n chainId = chainId_;\n }\n\n function checkPoSATest(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress,\n address[] memory _initialValidators, uint _initialEpoch, bytes1 _chainId) public {\n // TODO: we can't use the `__CheckPoSA_init` twice, but copy-paste is also not good\n chainId = _chainId;\n currentEpoch = _initialEpoch;\n currentValidatorSetSize = _initialValidators.length;\n\n for (uint i = 0; i < _initialValidators.length; i++) {\n allValidators[currentEpoch][_initialValidators[i]] = true;\n }\n\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockPoSA calldata block_) public view returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockPoSA calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n}\n" - }, - "contracts/tokens/sAMB.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./IWrapper.sol\";\n\ncontract sAMB is IWrapper, ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\n\n function deposit() public override payable {\n _mint(msg.sender, msg.value);\n\n emit Deposit(msg.sender, msg.value);\n }\n\n function withdraw(uint amount) public override {\n _burn(msg.sender, amount);\n payable(msg.sender).transfer(amount);\n\n emit Withdrawal(msg.sender, amount);\n }\n\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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 * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, 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 * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), 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 * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\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 * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\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/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\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" - }, - "contracts/contracts_for_tests/MintableERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MintableERC20 is ERC20 {\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20 is ERC20, Ownable {\n address public bridgeAddress; // address of bridge contract on this network\n uint public bridgeBalance; // locked tokens on the bridge\n\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\n ERC20(name_, symbol_)\n Ownable() {\n bridgeAddress = bridgeAddress_;\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\n bridgeAddress = bridgeAddress_;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sender == bridgeAddress) {\n // user transfer tokens to ambrosus => need to mint it\n\n // same amount locked on side bridge\n bridgeBalance += amount;\n\n _mint(recipient, amount);\n } else if (recipient == bridgeAddress) {\n // user withdraw tokens from ambrosus => need to burn it\n\n // side bridge must have enough tokens to send\n require(bridgeBalance >= amount, \"not enough locked tokens on bridge\");\n bridgeBalance -= amount;\n\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/access/Ownable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 _setOwner(_msgSender());\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 called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _setOwner(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 _setOwner(newOwner);\n }\n\n function _setOwner(address newOwner) private {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20_Amb.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20_Amb is ERC20, Ownable {\n\n // decimals of token in side network\n // example:\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\n mapping(address => uint8) public sideTokenDecimals;\n\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\n\n uint8 _decimals;\n\n constructor(\n string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n ) ERC20(name_, symbol_) Ownable() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n }\n\n // todo check if we need this func\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \"wrong array lengths\");\n for (uint i = 0; i < bridgeAddresses_.length; i++)\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n // todo events\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n // user transfer tokens to ambrosus => need to mint it\n\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n\n\n // bridge mint money to user; same amount locked on side bridge\n bridgeBalances[sender] += amount_this;\n\n _mint(recipient, amount_this);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n // user withdraw tokens from ambrosus => need to burn it\n\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n\n\n // user burn tokens; side bridge must have enough tokens to send\n require(bridgeBalances[recipient] >= amount_this, \"not enough locked tokens on bridge\");\n bridgeBalances[recipient] -= amount_this;\n\n _burn(sender, amount_this);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\n if (dTo == dFrom)\n return amount;\n if (dTo > dFrom)\n return amount * (10 ** (dTo - dFrom));\n else\n return amount / (10 ** (dFrom - dTo));\n }\n\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20_AmbTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20_Amb.sol\";\n\ncontract BridgeERC20_AmbTest is BridgeERC20_Amb {\n constructor(string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n )\n BridgeERC20_Amb(name_, symbol_, decimals_, bridgeAddresses_, sideTokenDecimals_) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n function changeBridgeBalance(address bridge, uint balance) public {\n bridgeBalances[bridge] = balance;\n }\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20Test.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n function changeBridgeBalance(uint balance) public {\n bridgeBalance = balance;\n }\n}\n" - }, - "contracts/contracts_for_tests/CheckAuraTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckAura.sol\";\n\ncontract CheckAuraTest is CheckAura {\n constructor(address validatorSetAddress_, uint minSafetyBlocksValidators_) {\n validatorSetAddress = validatorSetAddress_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function checkAuraTest(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress, address[] memory initialValidators_) public {\n validatorSet = initialValidators_;\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockAura calldata block_) public pure returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockAura calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function bytesToUintTest(bytes4 b) public pure returns (uint) {\n return bytesToUint(b);\n }\n\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "evmVersion": "byzantium", - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/contracts/deployments/test/bsc/solcInputs/14835e48c656ebed02c4fc9389a12566.json b/contracts/deployments/test/bsc/solcInputs/14835e48c656ebed02c4fc9389a12566.json deleted file mode 100644 index 332844f0..00000000 --- a/contracts/deployments/test/bsc/solcInputs/14835e48c656ebed02c4fc9389a12566.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/checks/CheckAura.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckAura is Initializable {\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n bytes1 constant STEP_PREFIX = 0x84;\n bytes2 constant SIGNATURE_PREFIX = 0xB841;\n\n address[] public validatorSet;\n address validatorSetAddress;\n bytes32 public lastProcessedBlock; // actually latest processed block in which *vs change event* emitted\n uint public minSafetyBlocksValidators;\n\n\n struct BlockAura {\n bytes3 p0Seal;\n bytes3 p0Bare;\n\n bytes32 parentHash;\n bytes p2;\n bytes32 receiptHash;\n bytes p3;\n\n bytes4 step;\n bytes signature; // todo maybe pass s r v values?\n\n uint64 finalizedVs;\n }\n\n\n struct ValidatorSetChange {\n address deltaAddress;\n uint16 deltaIndex; // add if 0, else remove\n }\n\n struct ValidatorSetProof {\n bytes[] receiptProof;\n ValidatorSetChange[] changes;\n uint64 eventBlock;\n }\n\n struct AuraProof {\n BlockAura[] blocks;\n CommonStructs.TransferProof transfer;\n ValidatorSetProof[] vsChanges;\n uint64 transferEventBlock;\n }\n\n\n function __CheckAura_init(\n address[] calldata initialValidators_,\n address validatorSetAddress_,\n bytes32 lastProcessedBlock_,\n uint minSafetyBlocksValidators_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n validatorSet = initialValidators_;\n validatorSetAddress = validatorSetAddress_;\n lastProcessedBlock = lastProcessedBlock_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n\n\n /*\n AuraProof.blocks contains:\n - blocks for validate validatorSet change event, in that order:\n - block with `InitiateChange` events (contains list of all validators)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize; have `finalizedVs` != 0\n * repeated for each vs change event; all events must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n AuraProof.vsChanges contains changes in validator set and receiptProof for validation.\n block.finalizedVs-1 is index in AuraProof.vsChanges array\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between vsChange events\n If there are no errors, the transfer is considered valid\n */\n function checkAura_(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n\n bytes32 parentHash;\n bytes32 receiptHash;\n\n // auraProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (auraProof.transfer.eventId != 0) {\n receiptHash = calcTransferReceiptsHash(auraProof.transfer, sideBridgeAddress);\n require(auraProof.blocks[auraProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(auraProof.blocks.length - auraProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < auraProof.blocks.length; i++) {\n BlockAura calldata block_ = auraProof.blocks[i];\n\n // check that parentHash is correct\n if (block_.parentHash != parentHash) {\n // we can ignore wrong parentHash if:\n // - it's NOT safety blocks for transfer event\n // - it's first block (don't know parentHash)\n // - it's finalizing block (there is gap BEFORE finalizing block)\n // - it's next block after finalizing (there is gap AFTER finalizing block)\n // else, raise error\n\n if (i > auraProof.transferEventBlock || // safety blocks for transfer event\n (i != 0 && // not first block\n block_.finalizedVs == 0 && // not finalizing block\n auraProof.blocks[i-1].finalizedVs == 0) // not next block after finalizing\n )\n revert(\"Wrong parent hash\");\n }\n\n // check validator for this block\n // calc block hash for this block\n parentHash = checkBlock(block_);\n\n // if this block is finalizing block\n // 0 means no events should be finalized, so indexes are shifted by 1\n if (block_.finalizedVs != 0) {\n // vs changes in that block\n ValidatorSetProof calldata vsProof = auraProof.vsChanges[block_.finalizedVs - 1];\n\n // apply vs changes\n for (uint k = 0; k < vsProof.changes.length; k++)\n applyVsChange(vsProof.changes[k]);\n\n // check proof\n receiptHash = calcValidatorSetReceiptHash(vsProof.receiptProof, validatorSetAddress, validatorSet);\n require(auraProof.blocks[vsProof.eventBlock].receiptHash == receiptHash, \"Wrong VS receipt hash\");\n require(i - vsProof.eventBlock >= minSafetyBlocksValidators, \"Few safety blocks validators\");\n }\n\n }\n\n // save block.parentHash in which latest processed vsChange event emitted\n if (auraProof.vsChanges.length > 0) {\n lastProcessedBlock = auraProof.blocks[auraProof.vsChanges[auraProof.vsChanges.length - 1].eventBlock].parentHash;\n }\n }\n\n function getValidatorSet() public view returns (address[] memory) {\n return validatorSet;\n }\n\n function applyVsChange(ValidatorSetChange calldata vsEvent) internal {\n if (vsEvent.deltaIndex == 0) {// add validator\n validatorSet.push(vsEvent.deltaAddress);\n } else {// delete validator\n uint index = uint(vsEvent.deltaIndex - 1);\n validatorSet[index] = validatorSet[validatorSet.length - 1];\n validatorSet.pop();\n }\n }\n\n function checkBlock(BlockAura calldata block_) internal view returns (bytes32) {\n (bytes32 bareHash, bytes32 sealHash) = calcBlockHash(block_);\n\n address validator = validatorSet[bytesToUint(block_.step) % validatorSet.length];\n require(ecdsaRecover(bareHash, block_.signature) == validator, \"Failed to verify sign\");\n\n return sealHash;\n }\n\n function calcBlockHash(BlockAura calldata block_) internal pure returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p2, block_.receiptHash, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Bare, commonRlp)),\n // hash with seal, for prevHash check\n keccak256(abi.encodePacked(block_.p0Seal, commonRlp, STEP_PREFIX, block_.step, SIGNATURE_PREFIX, block_.signature))\n );\n }\n\n\n function calcValidatorSetReceiptHash(bytes[] calldata receiptProof, address validatorSetAddress_, address[] storage vSet) private pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n receiptProof[0],\n validatorSetAddress_,\n receiptProof[1],\n abi.encode(vSet),\n receiptProof[2]\n ));\n return calcReceiptsHash(receiptProof, el, 3);\n }\n\n function bytesToUint(bytes4 b) internal pure returns (uint){\n return uint(uint32(b));\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckReceiptsProof.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\n// check readme for focs\nfunction calcReceiptsHash(bytes[] calldata proof, bytes32 el, uint proofStart) pure returns (bytes32) {\n bytes memory s;\n\n for (uint i = proofStart; i < proof.length; i += 2) {\n s = abi.encodePacked(proof[i], el, proof[i + 1]);\n el = (s.length > 32) ? keccak256(s) : bytes32(s);\n }\n\n return el;\n}\n\n\nfunction calcTransferReceiptsHash(CommonStructs.TransferProof calldata p, address eventContractAddress) pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n p.receiptProof[0],\n eventContractAddress,\n p.receiptProof[1],\n toBinary(p.eventId),\n p.receiptProof[2],\n abi.encode(p.transfers),\n p.receiptProof[3]\n ));\n return calcReceiptsHash(p.receiptProof, el, 4);\n // start from proof[4]\n}\n\n\nfunction toBinary(uint _x) pure returns (bytes memory) {\n bytes memory b = new bytes(32);\n assembly {\n mstore(add(b, 32), _x)\n }\n uint i;\n for (i = 0; i < 32; i++) {\n if (b[i] != 0) {\n break;\n }\n }\n bytes memory res = new bytes(32 - i);\n for (uint j = 0; j < res.length; j++) {\n res[j] = b[i++];\n }\n return res;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" - }, - "contracts/checks/SignatureCheck.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" - }, - "contracts/common/CommonStructs.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address relayAddress;\n address[] watchdogsAddresses; address feeProviderAddress;\n address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" - }, - "contracts/networks/_AuraReceiver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract _AuraReceiver is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n}\n" - }, - "contracts/common/CommonBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // DEFAULT_ADMIN_ROLE can grants and revokes all roles below; Set to multisig (proxy contract address)\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\"); // can submit transfers\n bytes32 public constant WATCHDOG_ROLE = keccak256(\"WATCHDOG_ROLE\"); // can pause contract\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\"FEE_PROVIDER_ROLE\"); // fee signatures must be signed by this role\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable public transferFeeRecipient;\n address payable public bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, address(this));\n _setupRole(ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRoles(WATCHDOG_ROLE, args.watchdogsAddresses);\n _setupRole(FEE_PROVIDER_ROLE, args.feeProviderAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId **and all after it**\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n require(eventId <= inputEventId, \"eventId must be <= inputEventId\");\n\n // now waiting for submitting a new transfer with `eventId` id\n inputEventId = eventId - 1;\n\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n\n }\n\n // pretend like bridge already receive and process all transfers up to `eventId` id\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\n }\n\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(WATCHDOG_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // roles\n\n function grantRoles(bytes32 role, address[] calldata accounts) public onlyRole(getRoleAdmin(role)) {\n // check permission to grant role via onlyRole(getRoleAdmin(role))\n _setupRoles(role, accounts);\n }\n function revokeRoles(bytes32 role, address[] calldata accounts) public {\n // revokeRole will check for permissions\n for (uint i = 0; i < accounts.length; i++)\n revokeRole(role, accounts[i]);\n }\n function _setupRoles(bytes32 role, address[] calldata accounts) internal {\n // no permissions check at all\n for (uint i = 0; i < accounts.length; i++)\n _setupRole(role, accounts[i]);\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(FEE_PROVIDER_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" - }, - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\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, _msgSender());\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(IAccessControlUpgradeable).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" - }, - "contracts/tokens/IWrapper.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 IERC165Upgradeable {\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" - }, - "contracts/networks/ETH_EthBridge_AURA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract ETH_EthBridge_AURA is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/BSC_BscBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract BSC_BscBridge is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/ETH_EthBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract ETH_EthBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address oldDefaultAdmin\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n}\n" - }, - "contracts/checks/CheckUntrustless2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\ncontract CheckUntrustless2 {\n // this contract do nothing, but i think it's required to inheritance from it\n // todo check this\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckUntrustless.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckUntrustless {\n uint public confirmationsThreshold;\n\n // [hash of (eventId, transfers)] => [relayAddress] => isConfirmed\n mapping(bytes32 => mapping(address => bool)) public confirmations;\n\n // using this instead of RELAY_ROLE coz it simpler\n address[] public relays;\n\n event RelayAdd(address indexed relay);\n event RelayRemove(address indexed relay);\n event ThresholdChange(uint newThreshold);\n event RelayConfirmation(address indexed sender, uint indexed eventId, bytes32 hash);\n\n // return true if current call reach confirmationsThreshold\n function checkUntrustless_(uint eventId, CommonStructs.Transfer[] calldata transfers) internal returns (bool) {\n require(isRelay(msg.sender), \"You not in relay whitelist\");\n\n bytes32 hash = transfersHash(eventId, transfers);\n require(confirmations[hash][msg.sender] == false, \"You have already confirmed this\");\n\n uint confirmCount = confirmedCount(hash);\n require(confirmCount < confirmationsThreshold, \"Already confirmed\");\n\n confirmations[hash][msg.sender] = true;\n emit RelayConfirmation(msg.sender, eventId, hash);\n\n // +1 coz current relay confirmed just now\n return confirmCount + 1 >= confirmationsThreshold;\n }\n\n\n function isConfirmedByRelay(address relay, uint eventId, CommonStructs.Transfer[] calldata transfers) public view returns (bool) {\n bytes32 hash = transfersHash(eventId, transfers);\n return confirmations[hash][relay];\n }\n\n\n function confirmedCount(bytes32 hash) public view returns (uint) {\n uint res;\n for (uint i = 0; i < relays.length; i++)\n if (confirmations[hash][relays[i]])\n res++;\n return res;\n }\n\n\n function isRelay(address relay) public view returns (bool){\n for (uint i = 0; i < relays.length; i++)\n if (relays[i] == relay)\n return true;\n return false;\n }\n\n function getRelays() public view returns (address[] memory) {\n return relays;\n }\n\n function transfersHash(uint eventId, CommonStructs.Transfer[] calldata transfers) public pure returns (bytes32) {\n bytes memory payload = abi.encodePacked(eventId);\n\n // i guess we can hash transfers only in this way\n for (uint i = 0; i < transfers.length; i++)\n payload = abi.encodePacked(payload, transfers[i].amount, transfers[i].toAddress, transfers[i].tokenAddress);\n\n return keccak256(payload);\n }\n\n\n function _setRelaysAndConfirmations(address[] memory toRemove, address[] memory toAdd, uint _confirmations) internal {\n for (uint i = 0; i < toRemove.length; i++)\n _removeRelay(toRemove[i]);\n for (uint i = 0; i < toAdd.length; i++)\n _addRelay(toAdd[i]);\n\n if (confirmationsThreshold != _confirmations) {\n confirmationsThreshold = _confirmations;\n emit ThresholdChange(_confirmations);\n }\n }\n\n function _removeRelay(address relay) internal {\n for (uint i = 0; i < relays.length; i++) {\n if (relays[i] == relay) {\n relays[i] = relays[relays.length - 1];\n relays.pop();\n emit RelayRemove(relay);\n return;\n }\n }\n revert(\"Not a relay\");\n }\n\n function _addRelay(address relay) internal {\n require(!isRelay(relay), \"Already relay\");\n relays.push(relay);\n emit RelayAdd(relay);\n }\n\n uint256[15] private ___gap;\n\n}\n" - }, - "contracts/networks/ETH_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless.sol\";\n\n\ncontract ETH_AmbBridge is CommonBridge, CheckUntrustless {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint _confirmations,\n address[] calldata _relays\n ) public initializer {\n __CommonBridge_init(args);\n _setRelaysAndConfirmations(new address[](0), _relays, _confirmations);\n }\n\n function upgrade(\n uint _confirmations,\n address[] memory _relays\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n // _setRelaysAndConfirmations don't work during upgrade and nobody knows why\n relays = _relays;\n confirmationsThreshold = _confirmations;\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public whenNotPaused {\n // relay \"role\" checked at CheckUntrustless contract\n require(eventId == inputEventId + 1, \"EventId out of order\");\n\n bool confirm = checkUntrustless_(eventId, transfers);\n if (confirm) {// required count of confirmations reached\n ++inputEventId;\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n // todo need lock?\n }\n }\n\n function setRelaysAndConfirmations(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n require(msg.sender == address(this), \"This method require multisig\");\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n\n}\n" - }, - "contracts/contracts_for_tests/CheckUntrustlessTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckUntrustless.sol\";\n\ncontract CheckUntrustlessTest is CheckUntrustless {\n constructor() {}\n\n event checkUntrustlessTestResult(bool result);\n\n function checkUntrustlessTest(uint eventId, CommonStructs.Transfer[] calldata transfers) public {\n emit checkUntrustlessTestResult(checkUntrustless_(eventId, transfers));\n }\n\n function setRelaysAndConfirmationsTest(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n}\n" - }, - "contracts/checks/CheckPoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"./CheckPoW_Ethash.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckPoW is Initializable, Ethash {\n struct BlockPoW {\n bytes3 p0WithNonce;\n bytes3 p0WithoutNonce;\n\n bytes p1;\n bytes32 parentOrReceiptHash;\n bytes p2;\n bytes difficulty;\n bytes p3;\n bytes number;\n bytes p4; // end when extra end\n bytes p5; // after extra\n bytes nonce;\n bytes p6;\n\n uint[] dataSetLookup;\n uint[] witnessForLookup;\n }\n\n struct PoWProof {\n BlockPoW[] blocks;\n CommonStructs.TransferProof transfer;\n }\n\n uint256 minimumDifficulty;\n\n function __CheckPoW_init(\n uint256 minimumDifficulty_\n ) internal initializer {\n minimumDifficulty = minimumDifficulty_;\n }\n\n /*\n PoWProof.blocks contains:\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, checking it pow hash.\n Each block parentHash must be equal to the hash of the previous block.\n If there are no errors, the transfer is considered valid\n */\n function checkPoW_(PoWProof calldata powProof, address sideBridgeAddress) internal view\n {\n bytes32 hash = calcTransferReceiptsHash(powProof.transfer, sideBridgeAddress);\n for (uint i = 0; i < powProof.blocks.length; i++) {\n require(powProof.blocks[i].parentOrReceiptHash == hash, \"parentHash or receiptHash wrong\");\n hash = blockHash(powProof.blocks[i]);\n\n verifyEthash(powProof.blocks[i]);\n }\n }\n\n\n function verifyEthash(BlockPoW calldata block_) internal view {\n uint difficulty = bytesToUint(block_.difficulty);\n require(difficulty >= minimumDifficulty, \"difficulty too low\");\n verifyPoW(\n bytesToUint(block_.number),\n blockHashWithoutNonce(block_),\n bytesToUint(block_.nonce),\n difficulty,\n block_.dataSetLookup,\n block_.witnessForLookup\n );\n }\n\n function blockHash(BlockPoW calldata block_) internal pure returns (bytes32) {\n // Note: too much arguments in abi.encodePacked() function cause CompilerError: Stack too deep...\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2,\n block_.difficulty,\n block_.p3\n ),\n abi.encodePacked(\n block_.number,\n block_.p4,\n block_.p5,\n block_.nonce,\n block_.p6\n )\n ));\n }\n\n function blockHashWithoutNonce(BlockPoW calldata block_) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithoutNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2\n ),\n abi.encodePacked(\n block_.difficulty,\n block_.p3,\n block_.number,\n block_.p4,\n block_.p6\n )\n ));\n }\n\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckPoW_Ethash.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n/// @dev These contracts are used to verify Proof of Work within a smart contract.\n/// The algorithms have been extracted from the implementation of smart pool (https://github.com/smartpool)\ncontract SHA3_512 {\n constructor() {}\n\n function keccak_f(uint[25] memory A) pure private returns (uint[25] memory) {\n uint[25] memory B;\n uint[5] memory C;\n uint[5] memory D;\n\n uint[24] memory RC = [\n uint(0x0000000000000001),\n 0x0000000000008082,\n 0x800000000000808A,\n 0x8000000080008000,\n 0x000000000000808B,\n 0x0000000080000001,\n 0x8000000080008081,\n 0x8000000000008009,\n 0x000000000000008A,\n 0x0000000000000088,\n 0x0000000080008009,\n 0x000000008000000A,\n 0x000000008000808B,\n 0x800000000000008B,\n 0x8000000000008089,\n 0x8000000000008003,\n 0x8000000000008002,\n 0x8000000000000080,\n 0x000000000000800A,\n 0x800000008000000A,\n 0x8000000080008081,\n 0x8000000000008080,\n 0x0000000080000001,\n 0x8000000080008008];\n\n for (uint i = 0; i < 24; i++) {\n\n C[0] = A[0] ^ A[1] ^ A[2] ^ A[3] ^ A[4];\n C[1] = A[5] ^ A[6] ^ A[7] ^ A[8] ^ A[9];\n C[2] = A[10] ^ A[11] ^ A[12] ^ A[13] ^ A[14];\n C[3] = A[15] ^ A[16] ^ A[17] ^ A[18] ^ A[19];\n C[4] = A[20] ^ A[21] ^ A[22] ^ A[23] ^ A[24];\n\n D[0] = C[4] ^ ((C[1] * 2) & 0xffffffffffffffff | (C[1] / (2 ** 63)));\n D[1] = C[0] ^ ((C[2] * 2) & 0xffffffffffffffff | (C[2] / (2 ** 63)));\n D[2] = C[1] ^ ((C[3] * 2) & 0xffffffffffffffff | (C[3] / (2 ** 63)));\n D[3] = C[2] ^ ((C[4] * 2) & 0xffffffffffffffff | (C[4] / (2 ** 63)));\n D[4] = C[3] ^ ((C[0] * 2) & 0xffffffffffffffff | (C[0] / (2 ** 63)));\n\n A[0] = A[0] ^ D[0];\n A[1] = A[1] ^ D[0];\n A[2] = A[2] ^ D[0];\n A[3] = A[3] ^ D[0];\n A[4] = A[4] ^ D[0];\n A[5] = A[5] ^ D[1];\n A[6] = A[6] ^ D[1];\n A[7] = A[7] ^ D[1];\n A[8] = A[8] ^ D[1];\n A[9] = A[9] ^ D[1];\n A[10] = A[10] ^ D[2];\n A[11] = A[11] ^ D[2];\n A[12] = A[12] ^ D[2];\n A[13] = A[13] ^ D[2];\n A[14] = A[14] ^ D[2];\n A[15] = A[15] ^ D[3];\n A[16] = A[16] ^ D[3];\n A[17] = A[17] ^ D[3];\n A[18] = A[18] ^ D[3];\n A[19] = A[19] ^ D[3];\n A[20] = A[20] ^ D[4];\n A[21] = A[21] ^ D[4];\n A[22] = A[22] ^ D[4];\n A[23] = A[23] ^ D[4];\n A[24] = A[24] ^ D[4];\n\n /*Rho and pi steps*/\n B[0] = A[0];\n B[8] = ((A[1] * (2 ** 36)) & 0xffffffffffffffff | (A[1] / (2 ** 28)));\n B[11] = ((A[2] * (2 ** 3)) & 0xffffffffffffffff | (A[2] / (2 ** 61)));\n B[19] = ((A[3] * (2 ** 41)) & 0xffffffffffffffff | (A[3] / (2 ** 23)));\n B[22] = ((A[4] * (2 ** 18)) & 0xffffffffffffffff | (A[4] / (2 ** 46)));\n B[2] = ((A[5] * (2 ** 1)) & 0xffffffffffffffff | (A[5] / (2 ** 63)));\n B[5] = ((A[6] * (2 ** 44)) & 0xffffffffffffffff | (A[6] / (2 ** 20)));\n B[13] = ((A[7] * (2 ** 10)) & 0xffffffffffffffff | (A[7] / (2 ** 54)));\n B[16] = ((A[8] * (2 ** 45)) & 0xffffffffffffffff | (A[8] / (2 ** 19)));\n B[24] = ((A[9] * (2 ** 2)) & 0xffffffffffffffff | (A[9] / (2 ** 62)));\n B[4] = ((A[10] * (2 ** 62)) & 0xffffffffffffffff | (A[10] / (2 ** 2)));\n B[7] = ((A[11] * (2 ** 6)) & 0xffffffffffffffff | (A[11] / (2 ** 58)));\n B[10] = ((A[12] * (2 ** 43)) & 0xffffffffffffffff | (A[12] / (2 ** 21)));\n B[18] = ((A[13] * (2 ** 15)) & 0xffffffffffffffff | (A[13] / (2 ** 49)));\n B[21] = ((A[14] * (2 ** 61)) & 0xffffffffffffffff | (A[14] / (2 ** 3)));\n B[1] = ((A[15] * (2 ** 28)) & 0xffffffffffffffff | (A[15] / (2 ** 36)));\n B[9] = ((A[16] * (2 ** 55)) & 0xffffffffffffffff | (A[16] / (2 ** 9)));\n B[12] = ((A[17] * (2 ** 25)) & 0xffffffffffffffff | (A[17] / (2 ** 39)));\n B[15] = ((A[18] * (2 ** 21)) & 0xffffffffffffffff | (A[18] / (2 ** 43)));\n B[23] = ((A[19] * (2 ** 56)) & 0xffffffffffffffff | (A[19] / (2 ** 8)));\n B[3] = ((A[20] * (2 ** 27)) & 0xffffffffffffffff | (A[20] / (2 ** 37)));\n B[6] = ((A[21] * (2 ** 20)) & 0xffffffffffffffff | (A[21] / (2 ** 44)));\n B[14] = ((A[22] * (2 ** 39)) & 0xffffffffffffffff | (A[22] / (2 ** 25)));\n B[17] = ((A[23] * (2 ** 8)) & 0xffffffffffffffff | (A[23] / (2 ** 56)));\n B[20] = ((A[24] * (2 ** 14)) & 0xffffffffffffffff | (A[24] / (2 ** 50)));\n\n /*Xi state*/\n A[0] = B[0] ^ ((~B[5]) & B[10]);\n A[1] = B[1] ^ ((~B[6]) & B[11]);\n A[2] = B[2] ^ ((~B[7]) & B[12]);\n A[3] = B[3] ^ ((~B[8]) & B[13]);\n A[4] = B[4] ^ ((~B[9]) & B[14]);\n A[5] = B[5] ^ ((~B[10]) & B[15]);\n A[6] = B[6] ^ ((~B[11]) & B[16]);\n A[7] = B[7] ^ ((~B[12]) & B[17]);\n A[8] = B[8] ^ ((~B[13]) & B[18]);\n A[9] = B[9] ^ ((~B[14]) & B[19]);\n A[10] = B[10] ^ ((~B[15]) & B[20]);\n A[11] = B[11] ^ ((~B[16]) & B[21]);\n A[12] = B[12] ^ ((~B[17]) & B[22]);\n A[13] = B[13] ^ ((~B[18]) & B[23]);\n A[14] = B[14] ^ ((~B[19]) & B[24]);\n A[15] = B[15] ^ ((~B[20]) & B[0]);\n A[16] = B[16] ^ ((~B[21]) & B[1]);\n A[17] = B[17] ^ ((~B[22]) & B[2]);\n A[18] = B[18] ^ ((~B[23]) & B[3]);\n A[19] = B[19] ^ ((~B[24]) & B[4]);\n A[20] = B[20] ^ ((~B[0]) & B[5]);\n A[21] = B[21] ^ ((~B[1]) & B[6]);\n A[22] = B[22] ^ ((~B[2]) & B[7]);\n A[23] = B[23] ^ ((~B[3]) & B[8]);\n A[24] = B[24] ^ ((~B[4]) & B[9]);\n\n /*Last step*/\n A[0] = A[0] ^ RC[i];\n }\n\n return A;\n }\n\n\n function sponge(uint[9] memory M) pure internal returns (uint[16] memory) {\n require((M.length * 8) == 72, \"sponge error\");\n\n M[5] = 0x01;\n M[8] = 0x8000000000000000;\n\n uint r = 72;\n uint w = 8;\n uint size = M.length * 8;\n\n uint[25] memory S;\n uint i;\n uint y;\n uint x;\n /*Absorbing Phase*/\n for (i = 0; i < size / r; i++) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w)) {\n S[5 * x + y] = S[5 * x + y] ^ M[i * 9 + x + 5 * y];\n }\n }\n }\n S = keccak_f(S);\n }\n\n /*Squeezing phase*/\n uint[16] memory result;\n uint b = 0;\n while (b < 16) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w) && (b < 16)) {\n result[b] = S[5 * x + y] & 0xFFFFFFFF;\n result[b + 1] = S[5 * x + y] / 0x100000000;\n b += 2;\n }\n }\n }\n }\n\n return result;\n }\n\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\ncontract Ethash is SHA3_512 {\n\n uint constant EPOCH_LENGTH = 30000; // blocks per epoch\n\n constructor() {\n }\n\n struct EthashCacheOptData {\n uint[512] merkleNodes;\n uint fullSizeIn128Resultion;\n uint branchDepth;\n }\n\n mapping(uint => EthashCacheOptData) epochData;\n\n\n function verifyPoW(uint blockNumber, bytes32 rlpHeaderHashWithoutNonce, uint nonce, uint difficulty,\n uint[] memory dataSetLookup, uint[] memory witnessForLookup) internal view {\n\n uint epoch = blockNumber / EPOCH_LENGTH;\n uint ethash = hashimoto(rlpHeaderHashWithoutNonce, nonce, dataSetLookup, witnessForLookup, epoch);\n\n require(ethash <= (2 ** 256 - 1) / difficulty, \"Ethash difficulty too low\");\n }\n\n function isEpochDataSet(uint epochIndex) public view returns (bool) {\n return epochData[epochIndex].fullSizeIn128Resultion != 0;\n }\n\n function setEpochData(\n uint epochNum,\n uint fullSizeIn128Resultion,\n uint branchDepth,\n uint[] calldata merkleNodes\n ) public {\n\n // we store only previous and current epochs\n // so, delete second from the end epoch\n if (epochNum >= 2) // underflow check\n delete epochData[epochNum - 2];\n\n\n uint l = merkleNodes.length;\n uint[512] storage nodes = epochData[epochNum].merkleNodes;\n\n for (uint i = 0; i < l; i++) {\n nodes[i] = merkleNodes[i];\n }\n\n epochData[epochNum].fullSizeIn128Resultion = fullSizeIn128Resultion;\n epochData[epochNum].branchDepth = branchDepth;\n }\n\n\n function hashimoto(bytes32 header,\n uint nonceLe,\n uint[] memory dataSetLookup,\n uint[] memory witnessForLookup,\n uint epochIndex) private view returns (uint) {\n\n uint[16] memory s = computeS(uint(header), nonceLe);\n uint[32] memory mix;\n uint[8] memory cmix;\n\n\n uint depth = epochData[epochIndex].branchDepth;\n uint fullSize = epochData[epochIndex].fullSizeIn128Resultion;\n\n uint i;\n uint j;\n\n require(fullSize != 0, \"EpochData not set\");\n\n\n for (i = 0; i < 16; i++) {\n assembly {\n let offset := mul(i, 0x20)\n\n //mix[i] = s[i];\n mstore(add(mix, offset), mload(add(s, offset)))\n\n // mix[i+16] = s[i];\n mstore(add(mix, add(0x200, offset)), mload(add(s, offset)))\n }\n }\n\n for (i = 0; i < 64; i++) {\n uint p = fnv(i ^ s[0], mix[i % 32]) % fullSize;\n\n // console.log(computeCacheRoot( p, i, dataSetLookup, witnessForLookup, depthAndFullSize[0]));\n // console.log(getMerkleLeave( epochIndex, p ));\n\n if (computeCacheRoot(p, i, dataSetLookup, witnessForLookup, depth) != getMerkleLeave(epochIndex, p)) {\n // PoW failed\n revert(\"PoW failed\");\n }\n\n for (j = 0; j < 8; j++) {\n\n assembly{\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & varFFFFFFFF );\n let dataOffset := add(mul(0x80, i), add(dataSetLookup, 0x20))\n let dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n let mixOffset := add(mix, mul(0x20, j))\n let mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n let fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n }\n\n\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & 0xFFFFFFFF );\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n\n\n //dataSetLookup[4*i ] = dataSetLookup[4*i ]/(2**32);\n //dataSetLookup[4*i + 1] = dataSetLookup[4*i + 1]/(2**32);\n //dataSetLookup[4*i + 2] = dataSetLookup[4*i + 2]/(2**32);\n //dataSetLookup[4*i + 3] = dataSetLookup[4*i + 3]/(2**32);\n\n assembly{\n let offset := add(add(dataSetLookup, 0x20), mul(i, 0x80))\n let value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n }\n }\n }\n\n\n for (i = 0; i < 32; i += 4) {\n cmix[i / 4] = (fnv(fnv(fnv(mix[i], mix[i + 1]), mix[i + 2]), mix[i + 3]));\n }\n\n return computeSha3(s, cmix);\n\n }\n\n\n function fnv(uint v1, uint v2) pure internal returns (uint) {\n return ((v1 * 0x01000193) ^ v2) & 0xFFFFFFFF;\n }\n\n function computeCacheRoot(uint index,\n uint indexInElementsArray,\n uint[] memory elements,\n uint[] memory witness,\n uint branchSize) pure private returns (uint) {\n\n uint leaf = computeLeaf(elements, indexInElementsArray) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n\n uint left;\n uint right;\n uint node;\n bool oddBranchSize = (branchSize % 2) > 0;\n\n assembly {\n branchSize := div(branchSize, 2)\n //branchSize /= 2;\n }\n uint witnessIndex = indexInElementsArray * branchSize;\n if (oddBranchSize) witnessIndex += indexInElementsArray;\n\n uint depth;\n for (depth = 0; depth < branchSize; depth++) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n\n //node = witness[witnessIndex + depth] / (2**128);\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := div(node, 0x100000000000000000000000000000000)\n }\n }\n else {\n assembly {\n left := div(node, 0x100000000000000000000000000000000)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n }\n\n if (oddBranchSize) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n }\n\n\n return leaf;\n }\n\n\n function computeSha3(uint[16] memory s, uint[8] memory cmix) pure internal returns (uint) {\n uint s0 = s[0] + s[1] * (2 ** 32) + s[2] * (2 ** 64) + s[3] * (2 ** 96) +\n (s[4] + s[5] * (2 ** 32) + s[6] * (2 ** 64) + s[7] * (2 ** 96)) * (2 ** 128);\n\n uint s1 = s[8] + s[9] * (2 ** 32) + s[10] * (2 ** 64) + s[11] * (2 ** 96) +\n (s[12] + s[13] * (2 ** 32) + s[14] * (2 ** 64) + s[15] * (2 ** 96)) * (2 ** 128);\n\n uint c = cmix[0] + cmix[1] * (2 ** 32) + cmix[2] * (2 ** 64) + cmix[3] * (2 ** 96) +\n (cmix[4] + cmix[5] * (2 ** 32) + cmix[6] * (2 ** 64) + cmix[7] * (2 ** 96)) * (2 ** 128);\n\n\n /* god knows why need to convert to big endian */\n return uint(keccak256(abi.encodePacked(reverseBytes(s0), reverseBytes(s1), reverseBytes(c))));\n }\n\n\n function computeLeaf(uint[] memory dataSetLookup, uint index) pure internal returns (uint) {\n return uint(keccak256(abi.encodePacked(\n dataSetLookup[4 * index],\n dataSetLookup[4 * index + 1],\n dataSetLookup[4 * index + 2],\n dataSetLookup[4 * index + 3]\n )));\n\n }\n\n function computeS(uint header, uint nonceLe) pure internal returns (uint[16] memory) {\n uint[9] memory M;\n\n header = reverseBytes(header);\n\n M[0] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[1] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[2] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[3] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n\n // make little endian nonce\n M[4] = nonceLe;\n return sponge(M);\n }\n\n function reverseBytes(uint input) pure internal returns (uint) {\n uint result;\n for (uint i = 0; i < 32; i++) {\n result = (result << 8) + (input & 0xff);\n input = input >> 8;\n }\n return result;\n }\n\n\n function getMerkleLeave(uint epochIndex, uint p) view internal returns (uint) {\n uint rootIndex = uint(p >> epochData[epochIndex].branchDepth);\n uint expectedRoot = epochData[epochIndex].merkleNodes[(rootIndex >> 1)];\n\n if ((rootIndex % 2) == 0)\n return expectedRoot & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n return expectedRoot >> 128;\n }\n\n}\n" - }, - "contracts/networks/ETH_AmbBridge_PoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoW.sol\";\n\n\ncontract ETH_AmbBridge_PoW is CommonBridge, CheckPoW {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint minimumDifficulty\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoW_init(minimumDifficulty);\n }\n\n function submitTransferPoW(PoWProof calldata powProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(powProof.transfer.eventId);\n checkEventId(powProof.transfer.eventId);\n checkPoW_(powProof, sideBridgeAddress);\n // checkPoW_(powProof, sideBridgeAddress);\n lockTransfers(powProof.transfer.transfers, powProof.transfer.eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n}\n\n" - }, - "contracts/contracts_for_tests/CheckPoWTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoW.sol\";\n\ncontract CheckPoWTest is CheckPoW {\n\n constructor(\n uint minimumDifficulty_\n ) {\n minimumDifficulty = minimumDifficulty_;\n }\n\n function checkPoWTest(PoWProof calldata powProof, address sideBridgeAddress) public {\n checkPoW_(powProof, sideBridgeAddress);\n }\n\n function verifyEthashTest(BlockPoW calldata block_) public view {\n verifyEthash(block_);\n }\n\n function blockHashTest(BlockPoW calldata block_) public pure returns (bytes32) {\n return blockHash(block_);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CommonBridgeTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckReceiptsProof.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // deployer now can grant roles\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n checkEventId(eventId); // now its more like submitTransferTest\n lockTransfers(events, eventId);\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n // checkReceiptsProof\n\n function calcTransferReceiptsHashTest(CommonStructs.TransferProof calldata p, address eventContractAddress) public pure returns (bytes32) {\n return calcTransferReceiptsHash(p, eventContractAddress);\n }\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" - }, - "contracts/checks/CheckPoSA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckPoSA is Initializable {\n uint256 private constant ADDRESS_LENGTH = 20;\n uint256 private constant EXTRA_VANITY_LENGTH = 32;\n uint256 private constant EXTRA_SEAL_LENGTH = 65;\n uint256 private constant EPOCH_LENGTH = 200;\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n\n mapping(uint => mapping(address => bool)) internal allValidators;\n uint public currentEpoch;\n uint currentValidatorSetSize;\n\n bytes1 chainId;\n\n\n struct BlockPoSA {\n bytes3 p0Signed;\n bytes3 p0Unsigned;\n\n bytes32 parentHash;\n bytes p1;\n bytes32 receiptHash;\n bytes p2;\n bytes number;\n bytes p3;\n\n bytes p4Signed;\n bytes p4Unsigned;\n bytes extraData;\n\n bytes p5;\n }\n\n struct PoSAProof {\n BlockPoSA[] blocks;\n CommonStructs.TransferProof transfer;\n uint64 transferEventBlock;\n }\n\n\n function __CheckPoSA_init(\n address[] calldata initialValidators_,\n uint initialEpoch_,\n bytes1 chainId_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n chainId = chainId_;\n currentEpoch = initialEpoch_;\n currentValidatorSetSize = initialValidators_.length;\n\n for (uint i = 0; i < initialValidators_.length; i++) {\n allValidators[currentEpoch][initialValidators_[i]] = true;\n }\n }\n\n /*\n PoSAProof.blocks contains:\n - blocks for validate validatorSet changes, in that order:\n - first block in epoch (blockNum % 200 == 0)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize\n * repeated for each new epoch, all epochs must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between epochs\n If there are no errors, the transfer is considered valid\n */\n function checkPoSA_(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n bytes32 bareHash;\n bytes32 parentHash;\n uint finalizeVsBlock;\n uint nextVsSize;\n\n // posaProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (posaProof.transfer.eventId != 0) {\n bytes32 receiptHash = calcTransferReceiptsHash(posaProof.transfer, sideBridgeAddress);\n require(posaProof.blocks[posaProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(posaProof.blocks.length - posaProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < posaProof.blocks.length; i++) {\n BlockPoSA calldata block_ = posaProof.blocks[i];\n\n if (parentHash != bytes32(0))\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n\n (bareHash, parentHash) = calcBlockHash(block_);\n\n require(verifySignature(bareHash, getSignature(block_.extraData)), \"invalid signature\");\n\n // change validator set\n\n uint blockNumber = bytesToUint(block_.number);\n\n if (blockNumber % EPOCH_LENGTH == 0) {\n require(blockNumber / EPOCH_LENGTH == currentEpoch + 1, \"invalid epoch\");\n\n nextVsSize = newValidatorSet(block_.extraData);\n finalizeVsBlock = blockNumber + currentValidatorSetSize / 2;\n } else if (blockNumber == finalizeVsBlock) {\n currentEpoch++;\n currentValidatorSetSize = nextVsSize;\n\n // after finalizing vs change, next block in posaProof.blocks can have any parentHash (skipping some blocks)\n // but only if it's not the safety blocks for transfer event\n if (i < posaProof.transferEventBlock)\n parentHash = bytes32(0);\n }\n }\n }\n\n\n function calcBlockHash(BlockPoSA calldata block_) internal view returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p1, block_.receiptHash, block_.p2, block_.number, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Unsigned, chainId, commonRlp, block_.p4Unsigned, getExtraDataUnsigned(block_.extraData), block_.p5)),\n // hash with seal, for prev_hash check\n keccak256(abi.encodePacked(block_.p0Signed, commonRlp, block_.p4Signed, block_.extraData, block_.p5))\n );\n }\n\n function getSignature(bytes calldata extraData) private pure returns (bytes calldata) {\n uint start = extraData.length - EXTRA_SEAL_LENGTH;\n return extraData[start : start + EXTRA_SEAL_LENGTH];\n }\n\n function getExtraDataUnsigned(bytes calldata extraData) private pure returns (bytes memory) {\n return extraData[0 : extraData.length - EXTRA_SEAL_LENGTH];\n }\n\n function newValidatorSet(bytes calldata extraData) private returns (uint) {\n uint nextValidatorSet = currentEpoch + 1;\n uint endPos = extraData.length - EXTRA_SEAL_LENGTH;\n\n uint nextValidatorSetSize;\n for (uint pos = EXTRA_VANITY_LENGTH; pos < endPos; pos += ADDRESS_LENGTH) {\n address validator = address(bytes20(extraData[pos : pos + ADDRESS_LENGTH]));\n allValidators[nextValidatorSet][validator] = true;\n nextValidatorSetSize++;\n }\n\n return nextValidatorSetSize;\n }\n\n function verifySignature(bytes32 hash, bytes calldata signature) private view returns (bool) {\n address signer = ecdsaRecover(hash, signature);\n return allValidators[currentEpoch][signer];\n }\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n}\n" - }, - "contracts/networks/BSC_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract BSC_AmbBridge is CommonBridge, CheckPoSA {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n uint initialEpoch,\n bytes1 chainId\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoSA_init(initialValidators, initialEpoch, chainId);\n }\n\n function submitTransferPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(posaProof.transfer.eventId);\n checkEventId(posaProof.transfer.eventId);\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(posaProof.transfer.transfers, posaProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoSATest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract CheckPoSATest is CheckPoSA {\n constructor(\n bytes1 chainId_\n ) {\n chainId = chainId_;\n }\n\n function checkPoSATest(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress,\n address[] memory _initialValidators, uint _initialEpoch, bytes1 _chainId) public {\n // TODO: we can't use the `__CheckPoSA_init` twice, but copy-paste is also not good\n chainId = _chainId;\n currentEpoch = _initialEpoch;\n currentValidatorSetSize = _initialValidators.length;\n\n for (uint i = 0; i < _initialValidators.length; i++) {\n allValidators[currentEpoch][_initialValidators[i]] = true;\n }\n\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockPoSA calldata block_) public view returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockPoSA calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n}\n" - }, - "contracts/tokens/sAMB.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./IWrapper.sol\";\n\ncontract sAMB is IWrapper, ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\n\n function deposit() public override payable {\n _mint(msg.sender, msg.value);\n\n emit Deposit(msg.sender, msg.value);\n }\n\n function withdraw(uint amount) public override {\n _burn(msg.sender, amount);\n payable(msg.sender).transfer(amount);\n\n emit Withdrawal(msg.sender, amount);\n }\n\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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 * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, 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 * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), 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 * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\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 * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\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/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\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" - }, - "contracts/contracts_for_tests/MintableERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MintableERC20 is ERC20 {\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20 is ERC20, Ownable {\n address public bridgeAddress; // address of bridge contract on this network\n\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\n ERC20(name_, symbol_)\n Ownable() {\n bridgeAddress = bridgeAddress_;\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\n bridgeAddress = bridgeAddress_;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sender == bridgeAddress) {\n // user transfer tokens to ambrosus => need to mint it\n _mint(recipient, amount);\n } else if (recipient == bridgeAddress) {\n // user withdraw tokens from ambrosus => need to burn it\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/access/Ownable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 _setOwner(_msgSender());\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 called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _setOwner(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 _setOwner(newOwner);\n }\n\n function _setOwner(address newOwner) private {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20_Amb.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20_Amb is ERC20, Ownable {\n\n // decimals of token in side network\n // example:\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\n mapping(address => uint8) public sideTokenDecimals;\n\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\n\n uint8 _decimals;\n\n constructor(\n string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n ) ERC20(name_, symbol_) Ownable() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n }\n\n // todo check if we need this func\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \"wrong array lengths\");\n for (uint i = 0; i < bridgeAddresses_.length; i++)\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n // todo events\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n // user transfer tokens to ambrosus => need to mint it\n\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n\n\n // bridge mint money to user; same amount locked on side bridge\n bridgeBalances[sender] += amount_this;\n\n _mint(recipient, amount_this);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n // user withdraw tokens from ambrosus => need to burn it\n\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n\n\n // user burn tokens; side bridge must have enough tokens to send\n require(bridgeBalances[recipient] >= amount_this, \"not enough locked tokens on bridge\");\n bridgeBalances[recipient] -= amount_this;\n\n _burn(sender, amount_this);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\n if (dTo == dFrom)\n return amount;\n if (dTo > dFrom)\n return amount * (10 ** (dTo - dFrom));\n else\n return amount / (10 ** (dFrom - dTo));\n }\n\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20_AmbTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20_Amb.sol\";\n\ncontract BridgeERC20_AmbTest is BridgeERC20_Amb {\n constructor(string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n )\n BridgeERC20_Amb(name_, symbol_, decimals_, bridgeAddresses_, sideTokenDecimals_) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n function changeBridgeBalance(address bridge, uint balance) public {\n bridgeBalances[bridge] = balance;\n }\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20Test.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckAuraTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckAura.sol\";\n\ncontract CheckAuraTest is CheckAura {\n constructor(address validatorSetAddress_, uint minSafetyBlocksValidators_) {\n validatorSetAddress = validatorSetAddress_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function checkAuraTest(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress, address[] memory initialValidators_) public {\n validatorSet = initialValidators_;\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockAura calldata block_) public pure returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockAura calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function bytesToUintTest(bytes4 b) public pure returns (uint) {\n return bytesToUint(b);\n }\n\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "evmVersion": "byzantium", - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/contracts/deployments/test/bsc/solcInputs/54d2ddebdc6c37a1b4fd5c90d287707b.json b/contracts/deployments/test/bsc/solcInputs/54d2ddebdc6c37a1b4fd5c90d287707b.json new file mode 100644 index 00000000..17b731cd --- /dev/null +++ b/contracts/deployments/test/bsc/solcInputs/54d2ddebdc6c37a1b4fd5c90d287707b.json @@ -0,0 +1,51 @@ +{ + "language": "Solidity", + "sources": { + "contracts/utils/MultiSigWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n\ncontract MultiSigWallet {\n\n /*\n * Events\n */\n event Confirmation(address indexed sender, uint indexed transactionId);\n event Revocation(address indexed sender, uint indexed transactionId);\n event Submission(uint indexed transactionId);\n event Execution(uint indexed transactionId);\n event ExecutionFailure(uint indexed transactionId);\n event OwnerAddition(address indexed owner);\n event OwnerRemoval(address indexed owner);\n event RequirementChange(uint required);\n\n /*\n * Constants\n */\n uint constant public MAX_OWNER_COUNT = 50;\n\n /*\n * Storage\n */\n mapping(uint => Transaction) public transactions;\n mapping(uint => mapping(address => bool)) public confirmations;\n mapping(address => bool) public isOwner;\n address[] public owners;\n uint public required;\n uint public transactionCount;\n\n struct Transaction {\n address destination;\n uint value;\n bytes data;\n bool executed;\n }\n\n /*\n * Modifiers\n */\n modifier onlyWallet() {\n require(msg.sender == address(this));\n _;\n }\n\n modifier ownerDoesNotExist(address owner) {\n require(!isOwner[owner]);\n _;\n }\n\n modifier ownerExists(address owner) {\n require(isOwner[owner]);\n _;\n }\n\n modifier transactionExists(uint transactionId) {\n require(transactions[transactionId].destination != address(0));\n _;\n }\n\n modifier confirmed(uint transactionId, address owner) {\n require(confirmations[transactionId][owner]);\n _;\n }\n\n modifier notConfirmed(uint transactionId, address owner) {\n require(!confirmations[transactionId][owner]);\n _;\n }\n\n modifier notExecuted(uint transactionId) {\n require(!transactions[transactionId].executed);\n _;\n }\n\n modifier notNull(address _address) {\n require(_address != address(0));\n _;\n }\n\n modifier validRequirement(uint ownerCount, uint _required) {\n require(ownerCount <= MAX_OWNER_COUNT\n && _required <= ownerCount\n && _required != 0\n && ownerCount != 0);\n _;\n }\n\n /*\n * Public functions\n */\n /// @dev Contract constructor sets initial owners and required number of confirmations.\n /// @param _owners List of initial owners.\n /// @param _required Number of required confirmations.\n constructor(address[] memory _owners, uint _required)\n validRequirement(_owners.length, _required)\n {\n for (uint i = 0; i < _owners.length; i++) {\n require(!isOwner[_owners[i]] && _owners[i] != address(0));\n isOwner[_owners[i]] = true;\n }\n owners = _owners;\n required = _required;\n }\n\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of new owner.\n function addOwner(address owner)\n public\n onlyWallet\n ownerDoesNotExist(owner)\n notNull(owner)\n validRequirement(owners.length + 1, required)\n {\n isOwner[owner] = true;\n owners.push(owner);\n emit OwnerAddition(owner);\n }\n\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner.\n function removeOwner(address owner)\n public\n onlyWallet\n ownerExists(owner)\n {\n isOwner[owner] = false;\n for (uint i = 0; i < owners.length - 1; i++)\n if (owners[i] == owner) {\n owners[i] = owners[owners.length - 1];\n break;\n }\n owners.pop();\n if (required > owners.length)\n changeRequirement(owners.length);\n emit OwnerRemoval(owner);\n }\n\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner to be replaced.\n /// @param newOwner Address of new owner.\n function replaceOwner(address owner, address newOwner)\n public\n onlyWallet\n ownerExists(owner)\n ownerDoesNotExist(newOwner)\n {\n for (uint i = 0; i < owners.length; i++)\n if (owners[i] == owner) {\n owners[i] = newOwner;\n break;\n }\n isOwner[owner] = false;\n isOwner[newOwner] = true;\n emit OwnerRemoval(owner);\n emit OwnerAddition(newOwner);\n }\n\n /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\n /// @param _required Number of required confirmations.\n function changeRequirement(uint _required)\n public\n onlyWallet\n validRequirement(owners.length, _required)\n {\n required = _required;\n emit RequirementChange(_required);\n }\n\n /// @dev Allows an owner to submit and confirm a transaction.\n /// @param destination Transaction target address.\n /// @param value Transaction ether value.\n /// @param data Transaction data payload.\n /// @return transactionId Returns transaction ID.\n function submitTransaction(\n address destination,\n uint value,\n bytes memory data\n ) public returns (uint transactionId)\n {\n transactionId = addTransaction(destination, value, data);\n confirmTransaction(transactionId);\n }\n\n /// @dev Allows an owner to confirm a transaction.\n /// @param transactionId Transaction ID.\n function confirmTransaction(uint transactionId)\n public\n ownerExists(msg.sender)\n transactionExists(transactionId)\n notConfirmed(transactionId, msg.sender)\n {\n confirmations[transactionId][msg.sender] = true;\n emit Confirmation(msg.sender, transactionId);\n executeTransaction(transactionId);\n }\n\n /// @dev Allows an owner to revoke a confirmation for a transaction.\n /// @param transactionId Transaction ID.\n function revokeConfirmation(uint transactionId)\n public\n ownerExists(msg.sender)\n confirmed(transactionId, msg.sender)\n notExecuted(transactionId)\n {\n confirmations[transactionId][msg.sender] = false;\n emit Revocation(msg.sender, transactionId);\n }\n\n /// @dev Allows anyone to execute a confirmed transaction.\n /// @param transactionId Transaction ID.\n function executeTransaction(uint transactionId)\n public\n ownerExists(msg.sender)\n confirmed(transactionId, msg.sender)\n notExecuted(transactionId)\n {\n if (isConfirmed(transactionId)) {\n Transaction storage txn = transactions[transactionId];\n txn.executed = true;\n if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\n emit Execution(transactionId);\n else {\n emit ExecutionFailure(transactionId);\n txn.executed = false;\n }\n }\n }\n\n // call has been separated into its own function in order to take advantage\n // of the Solidity's code generator to produce a loop that copies tx.data into memory.\n function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) {\n bool result;\n assembly {\n let x := mload(0x40) // \"Allocate\" memory for output (0x40 is where \"free memory\" pointer is stored by convention)\n let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\n result := call(\n sub(gas(), 36810), // 34710 is the value that solidity is currently emitting // todo\n // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\n // callNewAccountGas (25000, in case the destination address does not exist and needs creating) +\n // gasSLoadEIP2929 (2100)\n\n destination,\n value,\n d,\n dataLength, // Size of the input (in bytes) - this is what fixes the padding problem\n x,\n 0 // Output is ignored, therefore the output size is zero\n )\n }\n return result;\n }\n\n /// @dev Returns the confirmation status of a transaction.\n /// @param transactionId Transaction ID.\n /// @return Confirmation status.\n function isConfirmed(uint transactionId) public view returns (bool)\n {\n uint count = 0;\n for (uint i = 0; i < owners.length; i++) {\n if (confirmations[transactionId][owners[i]])\n count += 1;\n if (count == required)\n return true;\n }\n return false;\n }\n\n /*\n * Internal functions\n */\n /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\n /// @param destination Transaction target address.\n /// @param value Transaction ether value.\n /// @param data Transaction data payload.\n /// @return transactionId Returns transaction ID.\n function addTransaction(\n address destination,\n uint value,\n bytes memory data\n ) internal\n notNull(destination) returns (uint transactionId)\n {\n transactionId = transactionCount;\n transactions[transactionId] = Transaction({\n destination : destination,\n value : value,\n data : data,\n executed : false\n });\n transactionCount += 1;\n emit Submission(transactionId);\n }\n\n /*\n * Web3 call functions\n */\n /// @dev Returns number of confirmations of a transaction.\n /// @param transactionId Transaction ID.\n /// @return count Number of confirmations.\n function getConfirmationCount(uint transactionId)\n public\n view\n returns (uint count)\n {\n for (uint i = 0; i < owners.length; i++)\n if (confirmations[transactionId][owners[i]])\n count += 1;\n }\n\n /// @dev Returns total number of transactions after filers are applied.\n /// @param pending Include pending transactions.\n /// @param executed Include executed transactions.\n /// @return count Total number of transactions after filters are applied.\n function getTransactionCount(bool pending, bool executed)\n public\n view\n returns (uint count)\n {\n for (uint i = 0; i < transactionCount; i++)\n if (pending && !transactions[i].executed\n || executed && transactions[i].executed)\n count += 1;\n }\n\n /// @dev Returns list of owners.\n /// @return List of owner addresses.\n function getOwners() public view returns (address[] memory)\n {\n return owners;\n }\n\n /// @dev Returns array with owner addresses, which confirmed transaction.\n /// @param transactionId Transaction ID.\n /// @return _confirmations Returns array of owner addresses.\n function getConfirmations(uint transactionId) public view\n returns (address[] memory _confirmations)\n {\n address[] memory confirmationsTemp = new address[](owners.length);\n uint count = 0;\n uint i;\n for (i = 0; i < owners.length; i++)\n if (confirmations[transactionId][owners[i]]) {\n confirmationsTemp[count] = owners[i];\n count += 1;\n }\n _confirmations = new address[](count);\n for (i = 0; i < count; i++)\n _confirmations[i] = confirmationsTemp[i];\n }\n\n /// @dev Returns list of transaction IDs in defined range.\n /// @param from Index start position of transaction array.\n /// @param to Index end position of transaction array.\n /// @param pending Include pending transactions.\n /// @param executed Include executed transactions.\n /// @return _transactionIds Returns array of transaction IDs.\n function getTransactionIds(uint from, uint to, bool pending, bool executed)\n public\n view\n returns (uint[] memory _transactionIds)\n {\n uint[] memory transactionIdsTemp = new uint[](transactionCount);\n uint count = 0;\n uint i;\n for (i = 0; i < transactionCount; i++)\n if (pending && !transactions[i].executed\n || executed && transactions[i].executed)\n {\n transactionIdsTemp[count] = i;\n count += 1;\n }\n _transactionIds = new uint[](to - from);\n for (i = from; i < to; i++)\n _transactionIds[i - from] = transactionIdsTemp[i];\n }\n}\n" + }, + "contracts/utils/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/proxy/Proxy.sol\";\nimport \"@openzeppelin/contracts/utils/StorageSlot.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\nimport \"./MultiSigWallet.sol\";\nimport \"hardhat/console.sol\";\n\n\ncontract ProxyMultiSig is Proxy, MultiSigWallet {\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n bytes32 private constant ADMIN_STORAGE_LOCATION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n bytes4 private constant _UPGRADE_TO_AND_CALL_SIGNATURE = bytes4(keccak256(\"_upgradeToAndCall(address,bytes)\"));\n\n event Upgraded(address indexed implementation);\n\n\n constructor(\n address _logic,\n bytes memory _data,\n address[] memory owners,\n uint _required\n\n ) MultiSigWallet(owners, _required) {\n // Cannot use _upgradeToAndCall because of onlyWallet modifier\n _upgradeTo(_logic);\n if (_data.length > 0) {\n Address.functionDelegateCall(_logic, _data);\n }\n\n StorageSlot.getAddressSlot(ADMIN_STORAGE_LOCATION).value = msg.sender; // trick the hardhat-deploy\n }\n\n\n function implementation() external view returns (address) {\n return _implementation();\n }\n\n function upgradeTo(address newImplementation) external payable ownerExists(msg.sender) {\n submitTransaction(\n address(this),\n msg.value,\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, bytes(\"\"))\n );\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ownerExists(msg.sender) {\n submitTransaction(\n address(this),\n msg.value,\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, data)\n );\n }\n\n function _upgradeToAndCall(address newImplementation, bytes memory data) external onlyWallet payable {\n _upgradeTo(newImplementation);\n if (data.length > 0) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n function _upgradeTo(address newImplementation) internal {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n emit Upgraded(newImplementation);\n }\n\n function _implementation() internal view override returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overriden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \"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(\n address target,\n bytes memory data,\n uint256 value\n ) 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 require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(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 require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(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 require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason 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 // 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\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}\n" + }, + "hardhat/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >= 0.4.22 <0.9.0;\n\nlibrary console {\n\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n\tfunction _sendLogPayload(bytes memory payload) private view {\n\t\tuint256 payloadLength = payload.length;\n\t\taddress consoleAddress = CONSOLE_ADDRESS;\n\t\tassembly {\n\t\t\tlet payloadStart := add(payload, 32)\n\t\t\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n\t\t}\n\t}\n\n\tfunction log() internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log()\"));\n\t}\n\n\tfunction logInt(int p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n\t}\n\n\tfunction logUint(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction logString(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction logBool(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction logAddress(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction logBytes(bytes memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n\t}\n\n\tfunction logBytes1(bytes1 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n\t}\n\n\tfunction logBytes2(bytes2 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n\t}\n\n\tfunction logBytes3(bytes3 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n\t}\n\n\tfunction logBytes4(bytes4 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n\t}\n\n\tfunction logBytes5(bytes5 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n\t}\n\n\tfunction logBytes6(bytes6 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n\t}\n\n\tfunction logBytes7(bytes7 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n\t}\n\n\tfunction logBytes8(bytes8 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n\t}\n\n\tfunction logBytes9(bytes9 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n\t}\n\n\tfunction logBytes10(bytes10 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n\t}\n\n\tfunction logBytes11(bytes11 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n\t}\n\n\tfunction logBytes12(bytes12 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n\t}\n\n\tfunction logBytes13(bytes13 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n\t}\n\n\tfunction logBytes14(bytes14 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n\t}\n\n\tfunction logBytes15(bytes15 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n\t}\n\n\tfunction logBytes16(bytes16 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n\t}\n\n\tfunction logBytes17(bytes17 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n\t}\n\n\tfunction logBytes18(bytes18 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n\t}\n\n\tfunction logBytes19(bytes19 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n\t}\n\n\tfunction logBytes20(bytes20 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n\t}\n\n\tfunction logBytes21(bytes21 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n\t}\n\n\tfunction logBytes22(bytes22 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n\t}\n\n\tfunction logBytes23(bytes23 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n\t}\n\n\tfunction logBytes24(bytes24 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n\t}\n\n\tfunction logBytes25(bytes25 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n\t}\n\n\tfunction logBytes26(bytes26 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n\t}\n\n\tfunction logBytes27(bytes27 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n\t}\n\n\tfunction logBytes28(bytes28 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n\t}\n\n\tfunction logBytes29(bytes29 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n\t}\n\n\tfunction logBytes30(bytes30 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n\t}\n\n\tfunction logBytes31(bytes31 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n\t}\n\n\tfunction logBytes32(bytes32 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n\t}\n\n\tfunction log(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction log(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction log(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction log(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction log(uint p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n\t}\n\n\tfunction log(address p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n\t}\n\n\tfunction log(address p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n\t}\n\n\tfunction log(address p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n\t}\n\n\tfunction log(address p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "byzantium", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/contracts/deployments/test/bsc/solcInputs/63b1c355e88e8fd19ebe2cd692a8475b.json b/contracts/deployments/test/bsc/solcInputs/63b1c355e88e8fd19ebe2cd692a8475b.json deleted file mode 100644 index 15fb2537..00000000 --- a/contracts/deployments/test/bsc/solcInputs/63b1c355e88e8fd19ebe2cd692a8475b.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/checks/CheckAura.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\nimport \"hardhat/console.sol\";\n\n\ncontract CheckAura is Initializable {\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n bytes1 constant STEP_PREFIX = 0x84;\n bytes2 constant SIGNATURE_PREFIX = 0xB841;\n\n address[] public validatorSet;\n address validatorSetAddress;\n bytes32 public lastProcessedBlock; // actually latest processed (finalized) *vs change event* block\n uint public minSafetyBlocksValidators;\n\n\n struct BlockAura {\n bytes3 p0Seal;\n bytes3 p0Bare;\n\n bytes32 parentHash;\n bytes p2;\n bytes32 receiptHash;\n bytes p3;\n\n bytes4 step;\n bytes signature; // todo maybe pass s r v values?\n\n uint64 finalizedVs;\n }\n\n\n struct ValidatorSetChange {\n address deltaAddress;\n int64 deltaIndex; // < 0 ? remove : add\n }\n\n struct ValidatorSetProof {\n bytes[] receiptProof;\n ValidatorSetChange[] changes;\n uint eventBlock;\n }\n\n struct AuraProof {\n BlockAura[] blocks;\n CommonStructs.TransferProof transfer;\n ValidatorSetProof[] vsChanges;\n uint64 transferEventBlock;\n }\n\n\n function __CheckAura_init(\n address[] calldata initialValidators_,\n address validatorSetAddress_,\n bytes32 lastProcessedBlock_,\n uint minSafetyBlocksValidators_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n validatorSet = initialValidators_;\n validatorSetAddress = validatorSetAddress_;\n lastProcessedBlock = lastProcessedBlock_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n\n\n /*\n AuraProof.blocks contains:\n - blocks for validate validatorSet change event, in that order:\n - block with `InitiateChange` events (contains list of all validators)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize; have `finalizedVs` != 0\n * repeated for each vs change event; all events must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n AuraProof.vsChanges contains changes in validator set and receiptProof for validation.\n block.finalizedVs-1 is index in AuraProof.vsChanges array\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between vsChange events\n If there are no errors, the transfer is considered valid\n */\n function checkAura_(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n\n bytes32 parentHash;\n bytes32 receiptHash;\n bytes32 lastProcessedBlockTemp;\n\n // auraProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (auraProof.transferEventBlock != 0) {\n receiptHash = calcTransferReceiptsHash(auraProof.transfer, sideBridgeAddress);\n require(auraProof.blocks[auraProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(auraProof.blocks.length - auraProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < auraProof.blocks.length; i++) {\n console.logUint(i);\n BlockAura calldata block_ = auraProof.blocks[i];\n\n checkBlock(block_);\n\n // 0 means no events should be finalized, so indexes are shifted by 1\n if (block_.finalizedVs != 0) {\n // vs changes in that block\n ValidatorSetProof calldata vsProof = auraProof.vsChanges[block_.finalizedVs - 1];\n console.logUint(vsProof.eventBlock);\n\n // apply vs changes\n for (uint k = 0; k < vsProof.changes.length; k++)\n applyVsChange(vsProof.changes[k]);\n\n // check proof\n receiptHash = calcValidatorSetReceiptHash(vsProof.receiptProof, validatorSetAddress, validatorSet);\n require(auraProof.blocks[vsProof.eventBlock].receiptHash == receiptHash, \"Wrong VS receipt hash\");\n require(i - vsProof.eventBlock >= minSafetyBlocksValidators, \"Few safety blocks validators\");\n\n // there is gap BEFORE finalizing block, so disable parentHash check for it\n // but only if it's not the safety blocks for transfer event\n if (i < auraProof.transferEventBlock){\n console.log(\"here 1\");\n parentHash = bytes32(0);\n }\n }\n\n // check that block.parentHash == parentHash (hash of prev block)\n // don't check parentHash for first block and for blocks before and after finalizing vs\n if (parentHash != bytes32(0)){\n console.logBytes32(parentHash);\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n }\n\n // calc block hash for this block\n (, parentHash) = calcBlockHash(block_);\n\n // and again, if this block is finalizing block\n if (block_.finalizedVs != 0) {\n // save it hash to `lastProcessedBlock`\n lastProcessedBlockTemp = parentHash;\n\n // there is gap AFTER finalizing block, so disable parentHash check for it\n // but only if it's not the safety blocks for transfer event\n if (i < auraProof.transferEventBlock){\n console.log(\"here 2\");\n parentHash = bytes32(0);\n }\n }\n\n }\n\n // saving in temp variable cost lower than saving in global `lastProcessedBlock`\n if (lastProcessedBlockTemp != bytes32(0)) {\n lastProcessedBlock = lastProcessedBlockTemp;\n }\n }\n\n function getValidatorSet() public view returns (address[] memory) {\n return validatorSet;\n }\n\n function applyVsChange(ValidatorSetChange calldata vsEvent) internal {\n // todo invert indexes sign meaning\n if (vsEvent.deltaIndex < 0) { // delete validator\n uint index = uint(int(vsEvent.deltaIndex * (- 1) - 1));\n validatorSet[index] = validatorSet[validatorSet.length - 1];\n validatorSet.pop();\n } else { // add validator\n validatorSet.push(vsEvent.deltaAddress);\n }\n }\n\n function checkBlock(BlockAura calldata block_) internal view returns (bytes32) {\n (bytes32 bareHash, bytes32 sealHash) = calcBlockHash(block_);\n\n for (uint i = 0; i < validatorSet.length; i++) {\n console.logAddress(validatorSet[i]);\n }\n\n address validator = validatorSet[bytesToUint(block_.step) % validatorSet.length];\n console.log();\n console.logAddress(validator);\n console.logAddress(ecdsaRecover(bareHash, block_.signature));\n require(ecdsaRecover(bareHash, block_.signature) == validator, \"Failed to verify sign\");\n\n return sealHash;\n }\n\n function calcBlockHash(BlockAura calldata block_) internal pure returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p2, block_.receiptHash, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Bare, commonRlp)),\n // hash with seal, for prevHash check\n keccak256(abi.encodePacked(block_.p0Seal, commonRlp, STEP_PREFIX, block_.step, SIGNATURE_PREFIX, block_.signature))\n );\n }\n\n\n function calcValidatorSetReceiptHash(bytes[] calldata receiptProof, address validatorSetAddress_, address[] storage vSet) private pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n receiptProof[0],\n validatorSetAddress_,\n receiptProof[1],\n abi.encode(vSet),\n receiptProof[2]\n ));\n return calcReceiptsHash(receiptProof, el, 3);\n }\n\n function bytesToUint(bytes4 b) internal pure returns (uint){\n return uint(uint32(b));\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckReceiptsProof.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\n// check readme for focs\nfunction calcReceiptsHash(bytes[] calldata proof, bytes32 el, uint proofStart) pure returns (bytes32) {\n bytes memory s;\n\n for (uint i = proofStart; i < proof.length; i += 2) {\n s = abi.encodePacked(proof[i], el, proof[i + 1]);\n el = (s.length > 32) ? keccak256(s) : bytes32(s);\n }\n\n return el;\n}\n\n\nfunction calcTransferReceiptsHash(CommonStructs.TransferProof calldata p, address eventContractAddress) pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n p.receiptProof[0],\n eventContractAddress,\n p.receiptProof[1],\n toBinary(p.eventId),\n p.receiptProof[2],\n abi.encode(p.transfers),\n p.receiptProof[3]\n ));\n return calcReceiptsHash(p.receiptProof, el, 4);\n // start from proof[4]\n}\n\n\nfunction toBinary(uint _x) pure returns (bytes memory) {\n bytes memory b = new bytes(32);\n assembly {\n mstore(add(b, 32), _x)\n }\n uint i;\n for (i = 0; i < 32; i++) {\n if (b[i] != 0) {\n break;\n }\n }\n bytes memory res = new bytes(32 - i);\n for (uint j = 0; j < res.length; j++) {\n res[j] = b[i++];\n }\n return res;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" - }, - "contracts/checks/SignatureCheck.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" - }, - "hardhat/console.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >= 0.4.22 <0.9.0;\n\nlibrary console {\n\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n\tfunction _sendLogPayload(bytes memory payload) private view {\n\t\tuint256 payloadLength = payload.length;\n\t\taddress consoleAddress = CONSOLE_ADDRESS;\n\t\tassembly {\n\t\t\tlet payloadStart := add(payload, 32)\n\t\t\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n\t\t}\n\t}\n\n\tfunction log() internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log()\"));\n\t}\n\n\tfunction logInt(int p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n\t}\n\n\tfunction logUint(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction logString(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction logBool(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction logAddress(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction logBytes(bytes memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n\t}\n\n\tfunction logBytes1(bytes1 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n\t}\n\n\tfunction logBytes2(bytes2 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n\t}\n\n\tfunction logBytes3(bytes3 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n\t}\n\n\tfunction logBytes4(bytes4 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n\t}\n\n\tfunction logBytes5(bytes5 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n\t}\n\n\tfunction logBytes6(bytes6 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n\t}\n\n\tfunction logBytes7(bytes7 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n\t}\n\n\tfunction logBytes8(bytes8 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n\t}\n\n\tfunction logBytes9(bytes9 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n\t}\n\n\tfunction logBytes10(bytes10 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n\t}\n\n\tfunction logBytes11(bytes11 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n\t}\n\n\tfunction logBytes12(bytes12 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n\t}\n\n\tfunction logBytes13(bytes13 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n\t}\n\n\tfunction logBytes14(bytes14 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n\t}\n\n\tfunction logBytes15(bytes15 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n\t}\n\n\tfunction logBytes16(bytes16 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n\t}\n\n\tfunction logBytes17(bytes17 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n\t}\n\n\tfunction logBytes18(bytes18 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n\t}\n\n\tfunction logBytes19(bytes19 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n\t}\n\n\tfunction logBytes20(bytes20 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n\t}\n\n\tfunction logBytes21(bytes21 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n\t}\n\n\tfunction logBytes22(bytes22 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n\t}\n\n\tfunction logBytes23(bytes23 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n\t}\n\n\tfunction logBytes24(bytes24 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n\t}\n\n\tfunction logBytes25(bytes25 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n\t}\n\n\tfunction logBytes26(bytes26 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n\t}\n\n\tfunction logBytes27(bytes27 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n\t}\n\n\tfunction logBytes28(bytes28 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n\t}\n\n\tfunction logBytes29(bytes29 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n\t}\n\n\tfunction logBytes30(bytes30 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n\t}\n\n\tfunction logBytes31(bytes31 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n\t}\n\n\tfunction logBytes32(bytes32 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n\t}\n\n\tfunction log(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction log(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction log(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction log(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction log(uint p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n\t}\n\n\tfunction log(address p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n\t}\n\n\tfunction log(address p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n\t}\n\n\tfunction log(address p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n\t}\n\n\tfunction log(address p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n}\n" - }, - "contracts/common/CommonStructs.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address adminAddress;\n address relayAddress; address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" - }, - "contracts/networks/ETH_EthBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract ETH_EthBridge is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n}\n" - }, - "contracts/common/CommonBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // OWNER_ROLE must be DEFAULT_ADMIN_ROLE because by default only this role able to grant or revoke other roles\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\");\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\");\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable transferFeeRecipient;\n address payable bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRole(ADMIN_ROLE, args.adminAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId and all after it\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\");\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n inputEventId = eventId - 1;\n // pretend like we don't receive that event\n }\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(ADMIN_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(RELAY_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" - }, - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\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, _msgSender());\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(IAccessControlUpgradeable).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" - }, - "contracts/tokens/IWrapper.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 IERC165Upgradeable {\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" - }, - "contracts/networks/ETH_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoW.sol\";\n\n\ncontract ETH_AmbBridge is CommonBridge, CheckPoW {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint minimumDifficulty\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoW_init(minimumDifficulty);\n }\n\n function submitTransferPoW(PoWProof calldata powProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(powProof.transfer.eventId);\n checkEventId(powProof.transfer.eventId);\n// checkPoW_(powProof, sideBridgeAddress);\n lockTransfers(powProof.transfer.transfers, powProof.transfer.eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n}\n" - }, - "contracts/checks/CheckPoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"./CheckPoW_Ethash.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckPoW is Initializable, Ethash {\n struct BlockPoW {\n bytes3 p0WithNonce;\n bytes3 p0WithoutNonce;\n\n bytes p1;\n bytes32 parentOrReceiptHash;\n bytes p2;\n bytes difficulty;\n bytes p3;\n bytes number;\n bytes p4; // end when extra end\n bytes p5; // after extra\n bytes nonce;\n bytes p6;\n\n uint[] dataSetLookup;\n uint[] witnessForLookup;\n }\n\n struct PoWProof {\n BlockPoW[] blocks;\n CommonStructs.TransferProof transfer;\n }\n\n uint256 minimumDifficulty;\n\n function __CheckPoW_init(\n uint256 minimumDifficulty_\n ) internal initializer {\n minimumDifficulty = minimumDifficulty_;\n }\n\n /*\n PoWProof.blocks contains:\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, checking it pow hash.\n Each block parentHash must be equal to the hash of the previous block.\n If there are no errors, the transfer is considered valid\n */\n function checkPoW_(PoWProof calldata powProof, address sideBridgeAddress) internal view\n {\n bytes32 hash = calcTransferReceiptsHash(powProof.transfer, sideBridgeAddress);\n for (uint i = 0; i < powProof.blocks.length; i++) {\n require(powProof.blocks[i].parentOrReceiptHash == hash, \"parentHash or receiptHash wrong\");\n hash = blockHash(powProof.blocks[i]);\n\n verifyEthash(powProof.blocks[i]);\n }\n }\n\n\n function verifyEthash(BlockPoW calldata block_) internal view {\n uint difficulty = bytesToUint(block_.difficulty);\n require(difficulty >= minimumDifficulty, \"difficulty too low\");\n verifyPoW(\n bytesToUint(block_.number),\n blockHashWithoutNonce(block_),\n bytesToUint(block_.nonce),\n difficulty,\n block_.dataSetLookup,\n block_.witnessForLookup\n );\n }\n\n function blockHash(BlockPoW calldata block_) internal pure returns (bytes32) {\n // Note: too much arguments in abi.encodePacked() function cause CompilerError: Stack too deep...\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2,\n block_.difficulty,\n block_.p3\n ),\n abi.encodePacked(\n block_.number,\n block_.p4,\n block_.p5,\n block_.nonce,\n block_.p6\n )\n ));\n }\n\n function blockHashWithoutNonce(BlockPoW calldata block_) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithoutNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2\n ),\n abi.encodePacked(\n block_.difficulty,\n block_.p3,\n block_.number,\n block_.p4,\n block_.p6\n )\n ));\n }\n\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckPoW_Ethash.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n/// @dev These contracts are used to verify Proof of Work within a smart contract.\n/// The algorithms have been extracted from the implementation of smart pool (https://github.com/smartpool)\ncontract SHA3_512 {\n constructor() {}\n\n function keccak_f(uint[25] memory A) pure private returns (uint[25] memory) {\n uint[25] memory B;\n uint[5] memory C;\n uint[5] memory D;\n\n uint[24] memory RC = [\n uint(0x0000000000000001),\n 0x0000000000008082,\n 0x800000000000808A,\n 0x8000000080008000,\n 0x000000000000808B,\n 0x0000000080000001,\n 0x8000000080008081,\n 0x8000000000008009,\n 0x000000000000008A,\n 0x0000000000000088,\n 0x0000000080008009,\n 0x000000008000000A,\n 0x000000008000808B,\n 0x800000000000008B,\n 0x8000000000008089,\n 0x8000000000008003,\n 0x8000000000008002,\n 0x8000000000000080,\n 0x000000000000800A,\n 0x800000008000000A,\n 0x8000000080008081,\n 0x8000000000008080,\n 0x0000000080000001,\n 0x8000000080008008];\n\n for (uint i = 0; i < 24; i++) {\n\n C[0] = A[0] ^ A[1] ^ A[2] ^ A[3] ^ A[4];\n C[1] = A[5] ^ A[6] ^ A[7] ^ A[8] ^ A[9];\n C[2] = A[10] ^ A[11] ^ A[12] ^ A[13] ^ A[14];\n C[3] = A[15] ^ A[16] ^ A[17] ^ A[18] ^ A[19];\n C[4] = A[20] ^ A[21] ^ A[22] ^ A[23] ^ A[24];\n\n D[0] = C[4] ^ ((C[1] * 2) & 0xffffffffffffffff | (C[1] / (2 ** 63)));\n D[1] = C[0] ^ ((C[2] * 2) & 0xffffffffffffffff | (C[2] / (2 ** 63)));\n D[2] = C[1] ^ ((C[3] * 2) & 0xffffffffffffffff | (C[3] / (2 ** 63)));\n D[3] = C[2] ^ ((C[4] * 2) & 0xffffffffffffffff | (C[4] / (2 ** 63)));\n D[4] = C[3] ^ ((C[0] * 2) & 0xffffffffffffffff | (C[0] / (2 ** 63)));\n\n A[0] = A[0] ^ D[0];\n A[1] = A[1] ^ D[0];\n A[2] = A[2] ^ D[0];\n A[3] = A[3] ^ D[0];\n A[4] = A[4] ^ D[0];\n A[5] = A[5] ^ D[1];\n A[6] = A[6] ^ D[1];\n A[7] = A[7] ^ D[1];\n A[8] = A[8] ^ D[1];\n A[9] = A[9] ^ D[1];\n A[10] = A[10] ^ D[2];\n A[11] = A[11] ^ D[2];\n A[12] = A[12] ^ D[2];\n A[13] = A[13] ^ D[2];\n A[14] = A[14] ^ D[2];\n A[15] = A[15] ^ D[3];\n A[16] = A[16] ^ D[3];\n A[17] = A[17] ^ D[3];\n A[18] = A[18] ^ D[3];\n A[19] = A[19] ^ D[3];\n A[20] = A[20] ^ D[4];\n A[21] = A[21] ^ D[4];\n A[22] = A[22] ^ D[4];\n A[23] = A[23] ^ D[4];\n A[24] = A[24] ^ D[4];\n\n /*Rho and pi steps*/\n B[0] = A[0];\n B[8] = ((A[1] * (2 ** 36)) & 0xffffffffffffffff | (A[1] / (2 ** 28)));\n B[11] = ((A[2] * (2 ** 3)) & 0xffffffffffffffff | (A[2] / (2 ** 61)));\n B[19] = ((A[3] * (2 ** 41)) & 0xffffffffffffffff | (A[3] / (2 ** 23)));\n B[22] = ((A[4] * (2 ** 18)) & 0xffffffffffffffff | (A[4] / (2 ** 46)));\n B[2] = ((A[5] * (2 ** 1)) & 0xffffffffffffffff | (A[5] / (2 ** 63)));\n B[5] = ((A[6] * (2 ** 44)) & 0xffffffffffffffff | (A[6] / (2 ** 20)));\n B[13] = ((A[7] * (2 ** 10)) & 0xffffffffffffffff | (A[7] / (2 ** 54)));\n B[16] = ((A[8] * (2 ** 45)) & 0xffffffffffffffff | (A[8] / (2 ** 19)));\n B[24] = ((A[9] * (2 ** 2)) & 0xffffffffffffffff | (A[9] / (2 ** 62)));\n B[4] = ((A[10] * (2 ** 62)) & 0xffffffffffffffff | (A[10] / (2 ** 2)));\n B[7] = ((A[11] * (2 ** 6)) & 0xffffffffffffffff | (A[11] / (2 ** 58)));\n B[10] = ((A[12] * (2 ** 43)) & 0xffffffffffffffff | (A[12] / (2 ** 21)));\n B[18] = ((A[13] * (2 ** 15)) & 0xffffffffffffffff | (A[13] / (2 ** 49)));\n B[21] = ((A[14] * (2 ** 61)) & 0xffffffffffffffff | (A[14] / (2 ** 3)));\n B[1] = ((A[15] * (2 ** 28)) & 0xffffffffffffffff | (A[15] / (2 ** 36)));\n B[9] = ((A[16] * (2 ** 55)) & 0xffffffffffffffff | (A[16] / (2 ** 9)));\n B[12] = ((A[17] * (2 ** 25)) & 0xffffffffffffffff | (A[17] / (2 ** 39)));\n B[15] = ((A[18] * (2 ** 21)) & 0xffffffffffffffff | (A[18] / (2 ** 43)));\n B[23] = ((A[19] * (2 ** 56)) & 0xffffffffffffffff | (A[19] / (2 ** 8)));\n B[3] = ((A[20] * (2 ** 27)) & 0xffffffffffffffff | (A[20] / (2 ** 37)));\n B[6] = ((A[21] * (2 ** 20)) & 0xffffffffffffffff | (A[21] / (2 ** 44)));\n B[14] = ((A[22] * (2 ** 39)) & 0xffffffffffffffff | (A[22] / (2 ** 25)));\n B[17] = ((A[23] * (2 ** 8)) & 0xffffffffffffffff | (A[23] / (2 ** 56)));\n B[20] = ((A[24] * (2 ** 14)) & 0xffffffffffffffff | (A[24] / (2 ** 50)));\n\n /*Xi state*/\n A[0] = B[0] ^ ((~B[5]) & B[10]);\n A[1] = B[1] ^ ((~B[6]) & B[11]);\n A[2] = B[2] ^ ((~B[7]) & B[12]);\n A[3] = B[3] ^ ((~B[8]) & B[13]);\n A[4] = B[4] ^ ((~B[9]) & B[14]);\n A[5] = B[5] ^ ((~B[10]) & B[15]);\n A[6] = B[6] ^ ((~B[11]) & B[16]);\n A[7] = B[7] ^ ((~B[12]) & B[17]);\n A[8] = B[8] ^ ((~B[13]) & B[18]);\n A[9] = B[9] ^ ((~B[14]) & B[19]);\n A[10] = B[10] ^ ((~B[15]) & B[20]);\n A[11] = B[11] ^ ((~B[16]) & B[21]);\n A[12] = B[12] ^ ((~B[17]) & B[22]);\n A[13] = B[13] ^ ((~B[18]) & B[23]);\n A[14] = B[14] ^ ((~B[19]) & B[24]);\n A[15] = B[15] ^ ((~B[20]) & B[0]);\n A[16] = B[16] ^ ((~B[21]) & B[1]);\n A[17] = B[17] ^ ((~B[22]) & B[2]);\n A[18] = B[18] ^ ((~B[23]) & B[3]);\n A[19] = B[19] ^ ((~B[24]) & B[4]);\n A[20] = B[20] ^ ((~B[0]) & B[5]);\n A[21] = B[21] ^ ((~B[1]) & B[6]);\n A[22] = B[22] ^ ((~B[2]) & B[7]);\n A[23] = B[23] ^ ((~B[3]) & B[8]);\n A[24] = B[24] ^ ((~B[4]) & B[9]);\n\n /*Last step*/\n A[0] = A[0] ^ RC[i];\n }\n\n return A;\n }\n\n\n function sponge(uint[9] memory M) pure internal returns (uint[16] memory) {\n require((M.length * 8) == 72, \"sponge error\");\n\n M[5] = 0x01;\n M[8] = 0x8000000000000000;\n\n uint r = 72;\n uint w = 8;\n uint size = M.length * 8;\n\n uint[25] memory S;\n uint i;\n uint y;\n uint x;\n /*Absorbing Phase*/\n for (i = 0; i < size / r; i++) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w)) {\n S[5 * x + y] = S[5 * x + y] ^ M[i * 9 + x + 5 * y];\n }\n }\n }\n S = keccak_f(S);\n }\n\n /*Squeezing phase*/\n uint[16] memory result;\n uint b = 0;\n while (b < 16) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w) && (b < 16)) {\n result[b] = S[5 * x + y] & 0xFFFFFFFF;\n result[b + 1] = S[5 * x + y] / 0x100000000;\n b += 2;\n }\n }\n }\n }\n\n return result;\n }\n\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\ncontract Ethash is SHA3_512 {\n\n uint constant EPOCH_LENGTH = 30000; // blocks per epoch\n\n constructor() {\n }\n\n struct EthashCacheOptData {\n uint[512] merkleNodes;\n uint fullSizeIn128Resultion;\n uint branchDepth;\n }\n\n mapping(uint => EthashCacheOptData) epochData;\n\n\n function verifyPoW(uint blockNumber, bytes32 rlpHeaderHashWithoutNonce, uint nonce, uint difficulty,\n uint[] memory dataSetLookup, uint[] memory witnessForLookup) internal view {\n\n uint epoch = blockNumber / EPOCH_LENGTH;\n uint ethash = hashimoto(rlpHeaderHashWithoutNonce, nonce, dataSetLookup, witnessForLookup, epoch);\n\n require(ethash <= (2 ** 256 - 1) / difficulty, \"Ethash difficulty too low\");\n }\n\n function isEpochDataSet(uint epochIndex) public view returns (bool) {\n return epochData[epochIndex].fullSizeIn128Resultion != 0;\n }\n\n function setEpochData(\n uint epochNum,\n uint fullSizeIn128Resultion,\n uint branchDepth,\n uint[] calldata merkleNodes\n ) public {\n\n // we store only previous and current epochs\n // so, delete second from the end epoch\n if (epochNum >= 2) // underflow check\n delete epochData[epochNum - 2];\n\n\n uint l = merkleNodes.length;\n uint[512] storage nodes = epochData[epochNum].merkleNodes;\n\n for (uint i = 0; i < l; i++) {\n nodes[i] = merkleNodes[i];\n }\n\n epochData[epochNum].fullSizeIn128Resultion = fullSizeIn128Resultion;\n epochData[epochNum].branchDepth = branchDepth;\n }\n\n\n function hashimoto(bytes32 header,\n uint nonceLe,\n uint[] memory dataSetLookup,\n uint[] memory witnessForLookup,\n uint epochIndex) private view returns (uint) {\n\n uint[16] memory s = computeS(uint(header), nonceLe);\n uint[32] memory mix;\n uint[8] memory cmix;\n\n\n uint depth = epochData[epochIndex].branchDepth;\n uint fullSize = epochData[epochIndex].fullSizeIn128Resultion;\n\n uint i;\n uint j;\n\n require(fullSize != 0, \"EpochData not set\");\n\n\n for (i = 0; i < 16; i++) {\n assembly {\n let offset := mul(i, 0x20)\n\n //mix[i] = s[i];\n mstore(add(mix, offset), mload(add(s, offset)))\n\n // mix[i+16] = s[i];\n mstore(add(mix, add(0x200, offset)), mload(add(s, offset)))\n }\n }\n\n for (i = 0; i < 64; i++) {\n uint p = fnv(i ^ s[0], mix[i % 32]) % fullSize;\n\n // console.log(computeCacheRoot( p, i, dataSetLookup, witnessForLookup, depthAndFullSize[0]));\n // console.log(getMerkleLeave( epochIndex, p ));\n\n if (computeCacheRoot(p, i, dataSetLookup, witnessForLookup, depth) != getMerkleLeave(epochIndex, p)) {\n // PoW failed\n revert(\"PoW failed\");\n }\n\n for (j = 0; j < 8; j++) {\n\n assembly{\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & varFFFFFFFF );\n let dataOffset := add(mul(0x80, i), add(dataSetLookup, 0x20))\n let dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n let mixOffset := add(mix, mul(0x20, j))\n let mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n let fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n }\n\n\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & 0xFFFFFFFF );\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n\n\n //dataSetLookup[4*i ] = dataSetLookup[4*i ]/(2**32);\n //dataSetLookup[4*i + 1] = dataSetLookup[4*i + 1]/(2**32);\n //dataSetLookup[4*i + 2] = dataSetLookup[4*i + 2]/(2**32);\n //dataSetLookup[4*i + 3] = dataSetLookup[4*i + 3]/(2**32);\n\n assembly{\n let offset := add(add(dataSetLookup, 0x20), mul(i, 0x80))\n let value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n }\n }\n }\n\n\n for (i = 0; i < 32; i += 4) {\n cmix[i / 4] = (fnv(fnv(fnv(mix[i], mix[i + 1]), mix[i + 2]), mix[i + 3]));\n }\n\n return computeSha3(s, cmix);\n\n }\n\n\n function fnv(uint v1, uint v2) pure internal returns (uint) {\n return ((v1 * 0x01000193) ^ v2) & 0xFFFFFFFF;\n }\n\n function computeCacheRoot(uint index,\n uint indexInElementsArray,\n uint[] memory elements,\n uint[] memory witness,\n uint branchSize) pure private returns (uint) {\n\n uint leaf = computeLeaf(elements, indexInElementsArray) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n\n uint left;\n uint right;\n uint node;\n bool oddBranchSize = (branchSize % 2) > 0;\n\n assembly {\n branchSize := div(branchSize, 2)\n //branchSize /= 2;\n }\n uint witnessIndex = indexInElementsArray * branchSize;\n if (oddBranchSize) witnessIndex += indexInElementsArray;\n\n uint depth;\n for (depth = 0; depth < branchSize; depth++) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n\n //node = witness[witnessIndex + depth] / (2**128);\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := div(node, 0x100000000000000000000000000000000)\n }\n }\n else {\n assembly {\n left := div(node, 0x100000000000000000000000000000000)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n }\n\n if (oddBranchSize) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n }\n\n\n return leaf;\n }\n\n\n function computeSha3(uint[16] memory s, uint[8] memory cmix) pure internal returns (uint) {\n uint s0 = s[0] + s[1] * (2 ** 32) + s[2] * (2 ** 64) + s[3] * (2 ** 96) +\n (s[4] + s[5] * (2 ** 32) + s[6] * (2 ** 64) + s[7] * (2 ** 96)) * (2 ** 128);\n\n uint s1 = s[8] + s[9] * (2 ** 32) + s[10] * (2 ** 64) + s[11] * (2 ** 96) +\n (s[12] + s[13] * (2 ** 32) + s[14] * (2 ** 64) + s[15] * (2 ** 96)) * (2 ** 128);\n\n uint c = cmix[0] + cmix[1] * (2 ** 32) + cmix[2] * (2 ** 64) + cmix[3] * (2 ** 96) +\n (cmix[4] + cmix[5] * (2 ** 32) + cmix[6] * (2 ** 64) + cmix[7] * (2 ** 96)) * (2 ** 128);\n\n\n /* god knows why need to convert to big endian */\n return uint(keccak256(abi.encodePacked(reverseBytes(s0), reverseBytes(s1), reverseBytes(c))));\n }\n\n\n function computeLeaf(uint[] memory dataSetLookup, uint index) pure internal returns (uint) {\n return uint(keccak256(abi.encodePacked(\n dataSetLookup[4 * index],\n dataSetLookup[4 * index + 1],\n dataSetLookup[4 * index + 2],\n dataSetLookup[4 * index + 3]\n )));\n\n }\n\n function computeS(uint header, uint nonceLe) pure internal returns (uint[16] memory) {\n uint[9] memory M;\n\n header = reverseBytes(header);\n\n M[0] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[1] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[2] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[3] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n\n // make little endian nonce\n M[4] = nonceLe;\n return sponge(M);\n }\n\n function reverseBytes(uint input) pure internal returns (uint) {\n uint result;\n for (uint i = 0; i < 32; i++) {\n result = (result << 8) + (input & 0xff);\n input = input >> 8;\n }\n return result;\n }\n\n\n function getMerkleLeave(uint epochIndex, uint p) view internal returns (uint) {\n uint rootIndex = uint(p >> epochData[epochIndex].branchDepth);\n uint expectedRoot = epochData[epochIndex].merkleNodes[(rootIndex >> 1)];\n\n if ((rootIndex % 2) == 0)\n return expectedRoot & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n return expectedRoot >> 128;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoWTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoW.sol\";\n\ncontract CheckPoWTest is CheckPoW {\n\n constructor(\n uint minimumDifficulty_\n ) {\n minimumDifficulty = minimumDifficulty_;\n }\n\n function checkPoWTest(PoWProof calldata powProof, address sideBridgeAddress) public {\n checkPoW_(powProof, sideBridgeAddress);\n }\n\n function verifyEthashTest(BlockPoW calldata block_) public view {\n verifyEthash(block_);\n }\n\n function blockHashTest(BlockPoW calldata block_) public pure returns (bytes32) {\n return blockHash(block_);\n }\n\n}\n" - }, - "contracts/checks/CheckPoSA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckPoSA is Initializable {\n uint256 private constant ADDRESS_LENGTH = 20;\n uint256 private constant EXTRA_VANITY_LENGTH = 32;\n uint256 private constant EXTRA_SEAL_LENGTH = 65;\n uint256 private constant EPOCH_LENGTH = 200;\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n\n mapping(uint => mapping(address => bool)) internal allValidators;\n uint public currentEpoch;\n uint currentValidatorSetSize;\n\n bytes1 chainId;\n\n\n struct BlockPoSA {\n bytes3 p0Signed;\n bytes3 p0Unsigned;\n\n bytes32 parentHash;\n bytes p1;\n bytes32 receiptHash;\n bytes p2;\n bytes number;\n bytes p3;\n\n bytes p4Signed;\n bytes p4Unsigned;\n bytes extraData;\n\n bytes p5;\n }\n\n struct PoSAProof {\n BlockPoSA[] blocks;\n CommonStructs.TransferProof transfer;\n uint64 transferEventBlock;\n }\n\n\n function __CheckPoSA_init(\n address[] calldata initialValidators_,\n uint initialEpoch_,\n bytes1 chainId_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n chainId = chainId_;\n currentEpoch = initialEpoch_;\n currentValidatorSetSize = initialValidators_.length;\n\n for (uint i = 0; i < initialValidators_.length; i++) {\n allValidators[currentEpoch][initialValidators_[i]] = true;\n }\n }\n\n /*\n PoSAProof.blocks contains:\n - blocks for validate validatorSet changes, in that order:\n - first block in epoch (blockNum % 200 == 0)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize\n * repeated for each new epoch, all epochs must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between epochs\n If there are no errors, the transfer is considered valid\n */\n function checkPoSA_(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n bytes32 bareHash;\n bytes32 parentHash;\n uint finalizeVsBlock;\n uint nextVsSize;\n\n // posaProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (posaProof.transferEventBlock != 0) {\n bytes32 receiptHash = calcTransferReceiptsHash(posaProof.transfer, sideBridgeAddress);\n require(posaProof.blocks[posaProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(posaProof.blocks.length - posaProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < posaProof.blocks.length; i++) {\n BlockPoSA calldata block_ = posaProof.blocks[i];\n\n if (parentHash != bytes32(0))\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n\n (bareHash, parentHash) = calcBlockHash(block_);\n\n require(verifySignature(bareHash, getSignature(block_.extraData)), \"invalid signature\");\n\n // change validator set\n\n uint blockNumber = bytesToUint(block_.number);\n\n if (blockNumber % EPOCH_LENGTH == 0) {\n require(blockNumber / EPOCH_LENGTH == currentEpoch + 1, \"invalid epoch\");\n\n nextVsSize = newValidatorSet(block_.extraData);\n finalizeVsBlock = blockNumber + currentValidatorSetSize / 2;\n } else if (blockNumber == finalizeVsBlock) {\n currentEpoch++;\n currentValidatorSetSize = nextVsSize;\n\n // after finalizing vs change, next block in posaProof.blocks can have any parentHash (skipping some blocks)\n // but only if it's not the safety blocks for transfer event\n if (i < posaProof.transferEventBlock)\n parentHash = bytes32(0);\n }\n }\n }\n\n\n function calcBlockHash(BlockPoSA calldata block_) internal view returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p1, block_.receiptHash, block_.p2, block_.number, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Unsigned, chainId, commonRlp, block_.p4Unsigned, getExtraDataUnsigned(block_.extraData), block_.p5)),\n // hash with seal, for prev_hash check\n keccak256(abi.encodePacked(block_.p0Signed, commonRlp, block_.p4Signed, block_.extraData, block_.p5))\n );\n }\n\n function getSignature(bytes calldata extraData) private pure returns (bytes calldata) {\n uint start = extraData.length - EXTRA_SEAL_LENGTH;\n return extraData[start : start + EXTRA_SEAL_LENGTH];\n }\n\n function getExtraDataUnsigned(bytes calldata extraData) private pure returns (bytes memory) {\n return extraData[0 : extraData.length - EXTRA_SEAL_LENGTH];\n }\n\n function newValidatorSet(bytes calldata extraData) private returns (uint) {\n uint nextValidatorSet = currentEpoch + 1;\n uint endPos = extraData.length - EXTRA_SEAL_LENGTH;\n\n uint nextValidatorSetSize;\n for (uint pos = EXTRA_VANITY_LENGTH; pos < endPos; pos += ADDRESS_LENGTH) {\n address validator = address(bytes20(extraData[pos : pos + ADDRESS_LENGTH]));\n allValidators[nextValidatorSet][validator] = true;\n nextValidatorSetSize++;\n }\n\n return nextValidatorSetSize;\n }\n\n function verifySignature(bytes32 hash, bytes calldata signature) private view returns (bool) {\n address signer = ecdsaRecover(hash, signature);\n return allValidators[currentEpoch][signer];\n }\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n}\n" - }, - "contracts/networks/BSC_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract BSC_AmbBridge is CommonBridge, CheckPoSA {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n uint initialEpoch,\n bytes1 chainId\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoSA_init(initialValidators, initialEpoch, chainId);\n }\n\n function submitTransferPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(posaProof.transfer.eventId);\n checkEventId(posaProof.transfer.eventId);\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(posaProof.transfer.transfers, posaProof.transfer.eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoSATest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract CheckPoSATest is CheckPoSA {\n constructor(\n bytes1 chainId_\n ) {\n chainId = chainId_;\n }\n\n function checkPoSATest(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress,\n address[] memory _initialValidators, uint _initialEpoch, bytes1 _chainId) public {\n // TODO: we can't use the `__CheckPoSA_init` twice, but copy-paste is also not good\n chainId = _chainId;\n currentEpoch = _initialEpoch;\n currentValidatorSetSize = _initialValidators.length;\n\n for (uint i = 0; i < _initialValidators.length; i++) {\n allValidators[currentEpoch][_initialValidators[i]] = true;\n }\n\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockPoSA calldata block_) public view returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockPoSA calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/commonBridgeTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckReceiptsProof.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // used for signature check\n _setupRole(RELAY_ROLE, address(0x295C2707319ad4BecA6b5bb4086617fD6F240CfE));\n }\n\n function getLockedTransferTest(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n lockTransfers(events, eventId);\n }\n\n function getOutputEventId() public view returns (uint) {\n return outputEventId;\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n // checkReceiptsProof\n\n function calcTransferReceiptsHashTest(CommonStructs.TransferProof calldata p, address eventContractAddress) public pure returns (bytes32) {\n return calcTransferReceiptsHash(p, eventContractAddress);\n }\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" - }, - "contracts/networks/BSC_BscBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract BSC_BscBridge is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n}\n" - }, - "contracts/tokens/sAMB.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./IWrapper.sol\";\n\ncontract sAMB is IWrapper, ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\n\n function deposit() public override payable {\n _mint(msg.sender, msg.value);\n\n emit Deposit(msg.sender, msg.value);\n }\n\n function withdraw(uint amount) public override {\n _burn(msg.sender, amount);\n payable(msg.sender).transfer(amount);\n\n emit Withdrawal(msg.sender, amount);\n }\n\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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 * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, 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 * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), 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 * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\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 * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\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/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\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/access/AccessControl.sol": { - "content": "// SPDX-License-Identifier: MIT\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 * ```\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 * ```\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.\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, _msgSender());\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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(uint160(account), 20),\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\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\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/utils/Strings.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts/utils/introspection/ERC165.sol": { - "content": "// SPDX-License-Identifier: MIT\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\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" - }, - "contracts/tokens/BridgeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\n\ncontract BridgeERC20 is ERC20, AccessControl {\n mapping (address => uint) public bridgeBalances;\n bytes32 public constant BRIDGE_ROLE = keccak256(\"BRIDGE_ROLE\");\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address[] memory bridgeAddresses)\n ERC20(name_, symbol_) {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setBridgeAddressesRole(bridgeAddresses);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddressesRole(address[] memory bridgeAddresses) public onlyRole(DEFAULT_ADMIN_ROLE) {\n _setBridgeAddressesRole(bridgeAddresses);\n }\n\n function _setBridgeAddressesRole(address[] memory bridgeAddresses) private {\n for (uint i = 0; i < bridgeAddresses.length; i++) {\n _setupRole(BRIDGE_ROLE, bridgeAddresses[i]);\n }\n }\n\n function _mint(address recipient, uint256 amount) internal virtual override {\n super._mint(recipient, amount);\n\n bridgeBalances[recipient] += amount;\n }\n\n function _burn(address sender, uint256 amount) internal virtual override {\n require(bridgeBalances[sender] >= amount, \"amount is bigger than balance\");\n\n bridgeBalances[sender] -= amount;\n\n super._burn(sender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (hasRole(BRIDGE_ROLE, sender)) {\n _mint(recipient, amount);\n } else if (hasRole(BRIDGE_ROLE, recipient)) {\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20Test.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address[] memory bridgeAddresses)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddresses) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n}\n" - }, - "contracts/contracts_for_tests/CheckAuraTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckAura.sol\";\n\ncontract CheckAuraTest is CheckAura {\n constructor(address validatorSetAddress_, uint minSafetyBlocksValidators_) {\n validatorSetAddress = validatorSetAddress_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function checkAuraTest(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress, address[] memory initialValidators_) public {\n validatorSet = initialValidators_;\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockAura calldata block_) public pure returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockAura calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function bytesToUintTest(bytes4 b) public pure returns (uint) {\n return bytesToUint(b);\n }\n\n}\n" - }, - "contracts/utils/Proxy.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/proxy/Proxy.sol\";\nimport \"@openzeppelin/contracts/utils/StorageSlot.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\nimport \"./MultiSigWallet.sol\";\nimport \"hardhat/console.sol\";\n\n\ncontract ProxyMultiSig is Proxy, MultiSigWallet {\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n bytes32 private constant ADMIN_STORAGE_LOCATION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n bytes4 private constant _UPGRADE_TO_AND_CALL_SIGNATURE = bytes4(keccak256(\"_upgradeToAndCall(address,bytes)\"));\n\n event Upgraded(address indexed implementation);\n\n\n constructor(\n address _logic,\n bytes memory _data,\n address[] memory owners,\n uint _required\n\n ) MultiSigWallet(owners, _required) {\n // Cannot use _upgradeToAndCall because of onlyWallet modifier\n _upgradeTo(_logic);\n if (_data.length > 0) {\n Address.functionDelegateCall(_logic, _data);\n }\n\n StorageSlot.getAddressSlot(ADMIN_STORAGE_LOCATION).value = msg.sender; // trick the hardhat-deploy\n }\n\n\n function implementation() external view returns (address) {\n return _implementation();\n }\n\n function upgradeTo(address newImplementation) external payable ownerExists(msg.sender) {\n submitTransaction(\n address(this),\n msg.value,\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, bytes(\"\"))\n );\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ownerExists(msg.sender) {\n submitTransaction(\n address(this),\n msg.value,\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, data)\n );\n }\n\n function _upgradeToAndCall(address newImplementation, bytes memory data) external onlyWallet payable {\n _upgradeTo(newImplementation);\n if (data.length > 0) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n function _upgradeTo(address newImplementation) internal {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n emit Upgraded(newImplementation);\n }\n\n function _implementation() internal view override returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/Proxy.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overriden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/utils/StorageSlot.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n}\n" - }, - "@openzeppelin/contracts/utils/Address.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \"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(\n address target,\n bytes memory data,\n uint256 value\n ) 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 require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(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 require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(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 require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason 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 // 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\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}\n" - }, - "contracts/utils/MultiSigWallet.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n\ncontract MultiSigWallet {\n\n /*\n * Events\n */\n event Confirmation(address indexed sender, uint indexed transactionId);\n event Revocation(address indexed sender, uint indexed transactionId);\n event Submission(uint indexed transactionId);\n event Execution(uint indexed transactionId);\n event ExecutionFailure(uint indexed transactionId);\n event OwnerAddition(address indexed owner);\n event OwnerRemoval(address indexed owner);\n event RequirementChange(uint required);\n\n /*\n * Constants\n */\n uint constant public MAX_OWNER_COUNT = 50;\n\n /*\n * Storage\n */\n mapping(uint => Transaction) public transactions;\n mapping(uint => mapping(address => bool)) public confirmations;\n mapping(address => bool) public isOwner;\n address[] public owners;\n uint public required;\n uint public transactionCount;\n\n struct Transaction {\n address destination;\n uint value;\n bytes data;\n bool executed;\n }\n\n /*\n * Modifiers\n */\n modifier onlyWallet() {\n require(msg.sender == address(this));\n _;\n }\n\n modifier ownerDoesNotExist(address owner) {\n require(!isOwner[owner]);\n _;\n }\n\n modifier ownerExists(address owner) {\n require(isOwner[owner]);\n _;\n }\n\n modifier transactionExists(uint transactionId) {\n require(transactions[transactionId].destination != address(0));\n _;\n }\n\n modifier confirmed(uint transactionId, address owner) {\n require(confirmations[transactionId][owner]);\n _;\n }\n\n modifier notConfirmed(uint transactionId, address owner) {\n require(!confirmations[transactionId][owner]);\n _;\n }\n\n modifier notExecuted(uint transactionId) {\n require(!transactions[transactionId].executed);\n _;\n }\n\n modifier notNull(address _address) {\n require(_address != address(0));\n _;\n }\n\n modifier validRequirement(uint ownerCount, uint _required) {\n require(ownerCount <= MAX_OWNER_COUNT\n && _required <= ownerCount\n && _required != 0\n && ownerCount != 0);\n _;\n }\n\n /*\n * Public functions\n */\n /// @dev Contract constructor sets initial owners and required number of confirmations.\n /// @param _owners List of initial owners.\n /// @param _required Number of required confirmations.\n constructor(address[] memory _owners, uint _required)\n validRequirement(_owners.length, _required)\n {\n for (uint i = 0; i < _owners.length; i++) {\n require(!isOwner[_owners[i]] && _owners[i] != address(0));\n isOwner[_owners[i]] = true;\n }\n owners = _owners;\n required = _required;\n }\n\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of new owner.\n function addOwner(address owner)\n public\n onlyWallet\n ownerDoesNotExist(owner)\n notNull(owner)\n validRequirement(owners.length + 1, required)\n {\n isOwner[owner] = true;\n owners.push(owner);\n emit OwnerAddition(owner);\n }\n\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner.\n function removeOwner(address owner)\n public\n onlyWallet\n ownerExists(owner)\n {\n isOwner[owner] = false;\n for (uint i = 0; i < owners.length - 1; i++)\n if (owners[i] == owner) {\n owners[i] = owners[owners.length - 1];\n break;\n }\n owners.pop();\n if (required > owners.length)\n changeRequirement(owners.length);\n emit OwnerRemoval(owner);\n }\n\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner to be replaced.\n /// @param newOwner Address of new owner.\n function replaceOwner(address owner, address newOwner)\n public\n onlyWallet\n ownerExists(owner)\n ownerDoesNotExist(newOwner)\n {\n for (uint i = 0; i < owners.length; i++)\n if (owners[i] == owner) {\n owners[i] = newOwner;\n break;\n }\n isOwner[owner] = false;\n isOwner[newOwner] = true;\n emit OwnerRemoval(owner);\n emit OwnerAddition(newOwner);\n }\n\n /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\n /// @param _required Number of required confirmations.\n function changeRequirement(uint _required)\n public\n onlyWallet\n validRequirement(owners.length, _required)\n {\n required = _required;\n emit RequirementChange(_required);\n }\n\n /// @dev Allows an owner to submit and confirm a transaction.\n /// @param destination Transaction target address.\n /// @param value Transaction ether value.\n /// @param data Transaction data payload.\n /// @return transactionId Returns transaction ID.\n function submitTransaction(\n address destination,\n uint value,\n bytes memory data\n ) public returns (uint transactionId)\n {\n transactionId = addTransaction(destination, value, data);\n confirmTransaction(transactionId);\n }\n\n /// @dev Allows an owner to confirm a transaction.\n /// @param transactionId Transaction ID.\n function confirmTransaction(uint transactionId)\n public\n ownerExists(msg.sender)\n transactionExists(transactionId)\n notConfirmed(transactionId, msg.sender)\n {\n confirmations[transactionId][msg.sender] = true;\n emit Confirmation(msg.sender, transactionId);\n executeTransaction(transactionId);\n }\n\n /// @dev Allows an owner to revoke a confirmation for a transaction.\n /// @param transactionId Transaction ID.\n function revokeConfirmation(uint transactionId)\n public\n ownerExists(msg.sender)\n confirmed(transactionId, msg.sender)\n notExecuted(transactionId)\n {\n confirmations[transactionId][msg.sender] = false;\n emit Revocation(msg.sender, transactionId);\n }\n\n /// @dev Allows anyone to execute a confirmed transaction.\n /// @param transactionId Transaction ID.\n function executeTransaction(uint transactionId)\n public\n ownerExists(msg.sender)\n confirmed(transactionId, msg.sender)\n notExecuted(transactionId)\n {\n if (isConfirmed(transactionId)) {\n Transaction storage txn = transactions[transactionId];\n txn.executed = true;\n if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\n emit Execution(transactionId);\n else {\n emit ExecutionFailure(transactionId);\n txn.executed = false;\n }\n }\n }\n\n // call has been separated into its own function in order to take advantage\n // of the Solidity's code generator to produce a loop that copies tx.data into memory.\n function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) {\n bool result;\n assembly {\n let x := mload(0x40) // \"Allocate\" memory for output (0x40 is where \"free memory\" pointer is stored by convention)\n let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\n result := call(\n sub(gas(), 36810), // 34710 is the value that solidity is currently emitting // todo\n // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\n // callNewAccountGas (25000, in case the destination address does not exist and needs creating) +\n // gasSLoadEIP2929 (2100)\n\n destination,\n value,\n d,\n dataLength, // Size of the input (in bytes) - this is what fixes the padding problem\n x,\n 0 // Output is ignored, therefore the output size is zero\n )\n }\n return result;\n }\n\n /// @dev Returns the confirmation status of a transaction.\n /// @param transactionId Transaction ID.\n /// @return Confirmation status.\n function isConfirmed(uint transactionId) public view returns (bool)\n {\n uint count = 0;\n for (uint i = 0; i < owners.length; i++) {\n if (confirmations[transactionId][owners[i]])\n count += 1;\n if (count == required)\n return true;\n }\n return false;\n }\n\n /*\n * Internal functions\n */\n /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\n /// @param destination Transaction target address.\n /// @param value Transaction ether value.\n /// @param data Transaction data payload.\n /// @return transactionId Returns transaction ID.\n function addTransaction(\n address destination,\n uint value,\n bytes memory data\n ) internal\n notNull(destination) returns (uint transactionId)\n {\n transactionId = transactionCount;\n transactions[transactionId] = Transaction({\n destination : destination,\n value : value,\n data : data,\n executed : false\n });\n transactionCount += 1;\n emit Submission(transactionId);\n }\n\n /*\n * Web3 call functions\n */\n /// @dev Returns number of confirmations of a transaction.\n /// @param transactionId Transaction ID.\n /// @return count Number of confirmations.\n function getConfirmationCount(uint transactionId)\n public\n view\n returns (uint count)\n {\n for (uint i = 0; i < owners.length; i++)\n if (confirmations[transactionId][owners[i]])\n count += 1;\n }\n\n /// @dev Returns total number of transactions after filers are applied.\n /// @param pending Include pending transactions.\n /// @param executed Include executed transactions.\n /// @return count Total number of transactions after filters are applied.\n function getTransactionCount(bool pending, bool executed)\n public\n view\n returns (uint count)\n {\n for (uint i = 0; i < transactionCount; i++)\n if (pending && !transactions[i].executed\n || executed && transactions[i].executed)\n count += 1;\n }\n\n /// @dev Returns list of owners.\n /// @return List of owner addresses.\n function getOwners() public view returns (address[] memory)\n {\n return owners;\n }\n\n /// @dev Returns array with owner addresses, which confirmed transaction.\n /// @param transactionId Transaction ID.\n /// @return _confirmations Returns array of owner addresses.\n function getConfirmations(uint transactionId) public view\n returns (address[] memory _confirmations)\n {\n address[] memory confirmationsTemp = new address[](owners.length);\n uint count = 0;\n uint i;\n for (i = 0; i < owners.length; i++)\n if (confirmations[transactionId][owners[i]]) {\n confirmationsTemp[count] = owners[i];\n count += 1;\n }\n _confirmations = new address[](count);\n for (i = 0; i < count; i++)\n _confirmations[i] = confirmationsTemp[i];\n }\n\n /// @dev Returns list of transaction IDs in defined range.\n /// @param from Index start position of transaction array.\n /// @param to Index end position of transaction array.\n /// @param pending Include pending transactions.\n /// @param executed Include executed transactions.\n /// @return _transactionIds Returns array of transaction IDs.\n function getTransactionIds(uint from, uint to, bool pending, bool executed)\n public\n view\n returns (uint[] memory _transactionIds)\n {\n uint[] memory transactionIdsTemp = new uint[](transactionCount);\n uint count = 0;\n uint i;\n for (i = 0; i < transactionCount; i++)\n if (pending && !transactions[i].executed\n || executed && transactions[i].executed)\n {\n transactionIdsTemp[count] = i;\n count += 1;\n }\n _transactionIds = new uint[](to - from);\n for (i = from; i < to; i++)\n _transactionIds[i - from] = transactionIdsTemp[i];\n }\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "evmVersion": "byzantium", - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/contracts/deployments/test/amb/solcInputs/82f48662a243d1786232fd2873dea3c2.json b/contracts/deployments/test/bsc/solcInputs/af3862e0ddcca2861ee723b668139921.json similarity index 98% rename from contracts/deployments/test/amb/solcInputs/82f48662a243d1786232fd2873dea3c2.json rename to contracts/deployments/test/bsc/solcInputs/af3862e0ddcca2861ee723b668139921.json index fa75a6c5..5c4c023e 100644 --- a/contracts/deployments/test/amb/solcInputs/82f48662a243d1786232fd2873dea3c2.json +++ b/contracts/deployments/test/bsc/solcInputs/af3862e0ddcca2861ee723b668139921.json @@ -85,6 +85,9 @@ "contracts/tokens/BridgeERC20.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20 is ERC20, Ownable {\n address public bridgeAddress; // address of bridge contract on this network\n\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\n ERC20(name_, symbol_)\n Ownable() {\n bridgeAddress = bridgeAddress_;\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\n bridgeAddress = bridgeAddress_;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sender == bridgeAddress) {\n // user transfer tokens to ambrosus => need to mint it\n _mint(recipient, amount);\n } else if (recipient == bridgeAddress) {\n // user withdraw tokens from ambrosus => need to burn it\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" }, + "contracts/tokens/BridgeERC20_Fix.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./BridgeERC20.sol\";\n\ncontract BridgeERC20_Fix is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_,\n address[] memory oldAddresses, uint[] memory oldBalances\n )\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress_) {\n for (uint i = 0; i < oldAddresses.length; i++)\n _mint(oldAddresses[i], oldBalances[i]);\n }\n}\n" + }, "contracts/contracts_for_tests/BridgeERC20Test.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n}\n" }, @@ -104,7 +107,7 @@ "content": "// SPDX-License-Identifier: MIT\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" }, "contracts/utils/Faucet.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\n\ncontract Faucet is AccessControl {\n event Faucet(address indexed to, uint256 indexed eventId, uint256 amount);\n\n constructor(address[] memory admins) payable {\n for (uint i = 0; i < admins.length; i++)\n _setupRole(DEFAULT_ADMIN_ROLE, admins[i]);\n }\n\n function faucet(address toAddress, uint256 eventId, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\n withdraw(toAddress, amount);\n emit Faucet(toAddress, eventId, amount);\n }\n\n function withdraw(address toAddress, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(address(this).balance >= amount, \"not enough funds\");\n payable(toAddress).transfer(amount);\n }\n\n receive() external payable {}\n\n\n}\n" + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\n\ncontract Faucet is AccessControl {\n event Faucet(address indexed to, uint256 indexed eventId, uint256 indexed chainId, uint256 amount);\n\n constructor(address[] memory admins) payable {\n for (uint i = 0; i < admins.length; i++)\n _setupRole(DEFAULT_ADMIN_ROLE, admins[i]);\n }\n\n function faucet(address toAddress, uint256 eventId, uint256 chainId, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\n withdraw(toAddress, amount);\n emit Faucet(toAddress, eventId, chainId, amount);\n }\n\n function withdraw(address toAddress, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(address(this).balance >= amount, \"not enough funds\");\n payable(toAddress).transfer(amount);\n }\n\n receive() external payable {}\n\n\n}\n" }, "contracts/tokens/BridgeERC20_Amb.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20_Amb is ERC20, Ownable {\n\n // decimals of token in side network\n // example:\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\n mapping(address => uint8) public sideTokenDecimals;\n\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\n\n uint8 _decimals;\n\n constructor(\n string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n ) ERC20(name_, symbol_) Ownable() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n }\n\n // todo check if we need this func\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \"wrong array lengths\");\n for (uint i = 0; i < bridgeAddresses_.length; i++)\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\n }\n\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n // convert decimals just like in _transfer function\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n amount = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n amount = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n }\n\n uint256 currentAllowance = allowance(sender,_msgSender());\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n // user transfer tokens to ambrosus => need to mint it\n\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n\n\n // bridge mint money to user; same amount locked on side bridge\n bridgeBalances[sender] += amount_this;\n\n _mint(recipient, amount_this);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n // user withdraw tokens from ambrosus => need to burn it\n\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n\n\n // user burn tokens; side bridge must have enough tokens to send\n require(bridgeBalances[recipient] >= amount_this, \"not enough locked tokens on bridge\");\n bridgeBalances[recipient] -= amount_this;\n\n _burn(sender, amount_this);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\n if (dTo == dFrom)\n return amount;\n if (dTo > dFrom)\n return amount * (10 ** (dTo - dFrom));\n else\n return amount / (10 ** (dFrom - dTo));\n }\n\n}\n" diff --git a/contracts/deployments/test/eth/ETH_EthBridge.json b/contracts/deployments/test/eth/ETH_EthBridge.json index 87244b45..702109b1 100644 --- a/contracts/deployments/test/eth/ETH_EthBridge.json +++ b/contracts/deployments/test/eth/ETH_EthBridge.json @@ -1,5 +1,5 @@ { - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "abi": [ { "anonymous": false, @@ -1710,80 +1710,80 @@ "type": "constructor" } ], - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", - "transactionIndex": 0, - "gasUsed": "2474083", - "logsBloom": "0x00000004000000040000002000040000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000002000000000020000000000000001000000000000004020000000000000000000800000000000000000800000000000000000000002000000000000000000000004000000000000000020000000800000000000020000002000000041000000000000000000000000000001000000000000000000020400000000000000000000000000000000000000100000000000020000000000000000000000000000010800000000000800000000000000000000000", - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a", - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", + "contractAddress": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", + "transactionIndex": 14, + "gasUsed": "2471543", + "logsBloom": "0x000004040000000400000020000800004000000000000000000080000000000000000000800000000008000000000000000000000000000000000000000000000000000000000000000000000000020000000000200200000000000010000000000000140200000000000000000008000000000000000008000000000000000000000020000000000000000000000040000000000000000200000008000000000000200000000000000c1000000000000000000000000000001000000000000000000020400000000000000000000000000000000000000100000000000020000000000000000000000000000000000000000000800000000000000000000000", + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418", + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", "logs": [ { - "transactionIndex": 0, - "blockNumber": 2072667, - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "transactionIndex": 14, + "blockNumber": 3187002, + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000f4b5713cac918c9755b8aff2eb5ae14c5991b7b5" + "0x00000000000000000000000028c790c357e59c1ff13c1845499b15edbe8621e1" ], "data": "0x", "logIndex": 0, - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a" + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418" }, { - "transactionIndex": 0, - "blockNumber": 2072667, - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "transactionIndex": 14, + "blockNumber": 3187002, + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000fce5b5ca100e58e5635b15b79f0163be4cbd258b", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 1, - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a" + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418" }, { - "transactionIndex": 0, - "blockNumber": 2072667, - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "transactionIndex": 14, + "blockNumber": 3187002, + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 2, - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a" + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418" }, { - "transactionIndex": 0, - "blockNumber": 2072667, - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "transactionIndex": 14, + "blockNumber": 3187002, + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 3, - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a" + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418" }, { - "transactionIndex": 0, - "blockNumber": 2072667, - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "transactionIndex": 14, + "blockNumber": 3187002, + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0xb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95", @@ -1792,13 +1792,13 @@ ], "data": "0x", "logIndex": 4, - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a" + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418" }, { - "transactionIndex": 0, - "blockNumber": 2072667, - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "transactionIndex": 14, + "blockNumber": 3187002, + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887e", @@ -1807,28 +1807,59 @@ ], "data": "0x", "logIndex": 5, - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a" + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418" } ], - "blockNumber": 2072667, - "cumulativeGasUsed": "2474083", + "blockNumber": 3187002, + "cumulativeGasUsed": "2765543", "status": 1, "byzantium": true }, "args": [ - "0xf4B5713CaC918C9755B8aFF2EB5ae14c5991b7B5", - "0x7836869800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000300000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000cdea3ecb85d0f386ea5d498d39c9c127380f254a000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d67a7ce611c1b33a549712c0fcbfe8436a917b7100000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fc277855999cf6452f9027bbdc1b56264a736e3a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d67a7ce611c1b33a549712c0fcbfe8436a917b710000000000000000000000001d335e8b7787fb6c51f98713df5bcb56884fd0230000000000000000000000000000000000000000000000000000000000000004000000000000000000000000da9bb33f9e3334781f3e4fce310288d7db3ed29a000000000000000000000000fc277855999cf6452f9027bbdc1b56264a736e3a000000000000000000000000075de66d19ca867387c75c880cffddba9a3e976300000000000000000000000056a79d39fc414ff11ebb30d6a5367ea5da8c6fe90000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x28c790c357E59C1fF13C1845499B15EDbE8621e1", + "0x5a5f55bf0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000b08cfc95eea0f1d9bb79002d23fa204b8836a536000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000000000000000000000000000000000000000000180000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000005ecfead3d77f6814d189f6209ea27ecd1c00d45a00000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e00000000000000000000000000000000000000000000000000000000000000040000000000000000000000009ba7ef7e1c6c5ef4fe7e2a32d4527497d6b12ff20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b841c5707da4b43ed915b707158010bd2faf3b4600000000000000000000000005875578a63c7e26245c7cba3cf460ff6a613c6b00000000000000000000000000000000000000000000000000000000000000040000000000000000000000007cee2ae3042d2c646aa24facfa92dfee589046f00000000000000000000000009ba7ef7e1c6c5ef4fe7e2a32d4527497d6b12ff2000000000000000000000000952b98dbda3319bf0e339cc9cc574ff768f80f3c0000000000000000000000001bb13b68dba3571415b4092802777b5ca15de897", [ "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" ], 1 ], - "numDeployments": 4, - "solcInputHash": "63b1c355e88e8fd19ebe2cd692a8475b", + "numDeployments": 1, + "solcInputHash": "54d2ddebdc6c37a1b4fd5c90d287707b", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Confirmation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Execution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"ExecutionFailure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerAddition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerRemoval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"required\",\"type\":\"uint256\"}],\"name\":\"RequirementChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Revocation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Submission\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"MAX_OWNER_COUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"_upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"name\":\"changeRequirement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"confirmTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"confirmations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmationCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmations\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"_confirmations\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"to\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_transactionIds\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"isConfirmed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"owners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"replaceOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"required\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"revokeConfirmation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"submitTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addOwner(address)\":{\"details\":\"Allows to add a new owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of new owner.\"}},\"changeRequirement(uint256)\":{\"details\":\"Allows to change the number of required confirmations. Transaction has to be sent by wallet.\",\"params\":{\"_required\":\"Number of required confirmations.\"}},\"confirmTransaction(uint256)\":{\"details\":\"Allows an owner to confirm a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"executeTransaction(uint256)\":{\"details\":\"Allows anyone to execute a confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"getConfirmationCount(uint256)\":{\"details\":\"Returns number of confirmations of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"count\":\"Number of confirmations.\"}},\"getConfirmations(uint256)\":{\"details\":\"Returns array with owner addresses, which confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_confirmations\":\"Returns array of owner addresses.\"}},\"getOwners()\":{\"details\":\"Returns list of owners.\",\"returns\":{\"_0\":\"List of owner addresses.\"}},\"getTransactionCount(bool,bool)\":{\"details\":\"Returns total number of transactions after filers are applied.\",\"params\":{\"executed\":\"Include executed transactions.\",\"pending\":\"Include pending transactions.\"},\"returns\":{\"count\":\"Total number of transactions after filters are applied.\"}},\"getTransactionIds(uint256,uint256,bool,bool)\":{\"details\":\"Returns list of transaction IDs in defined range.\",\"params\":{\"executed\":\"Include executed transactions.\",\"from\":\"Index start position of transaction array.\",\"pending\":\"Include pending transactions.\",\"to\":\"Index end position of transaction array.\"},\"returns\":{\"_transactionIds\":\"Returns array of transaction IDs.\"}},\"isConfirmed(uint256)\":{\"details\":\"Returns the confirmation status of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_0\":\"Confirmation status.\"}},\"removeOwner(address)\":{\"details\":\"Allows to remove an owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of owner.\"}},\"replaceOwner(address,address)\":{\"details\":\"Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\",\"params\":{\"newOwner\":\"Address of new owner.\",\"owner\":\"Address of owner to be replaced.\"}},\"revokeConfirmation(uint256)\":{\"details\":\"Allows an owner to revoke a confirmation for a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"submitTransaction(address,uint256,bytes)\":{\"details\":\"Allows an owner to submit and confirm a transaction.\",\"params\":{\"data\":\"Transaction data payload.\",\"destination\":\"Transaction target address.\",\"value\":\"Transaction ether value.\"},\"returns\":{\"transactionId\":\"Returns transaction ID.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/utils/Proxy.sol\":\"ProxyMultiSig\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \\\"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(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) 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 require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/utils/MultiSigWallet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\n\\ncontract MultiSigWallet {\\n\\n /*\\n * Events\\n */\\n event Confirmation(address indexed sender, uint indexed transactionId);\\n event Revocation(address indexed sender, uint indexed transactionId);\\n event Submission(uint indexed transactionId);\\n event Execution(uint indexed transactionId);\\n event ExecutionFailure(uint indexed transactionId);\\n event OwnerAddition(address indexed owner);\\n event OwnerRemoval(address indexed owner);\\n event RequirementChange(uint required);\\n\\n /*\\n * Constants\\n */\\n uint constant public MAX_OWNER_COUNT = 50;\\n\\n /*\\n * Storage\\n */\\n mapping(uint => Transaction) public transactions;\\n mapping(uint => mapping(address => bool)) public confirmations;\\n mapping(address => bool) public isOwner;\\n address[] public owners;\\n uint public required;\\n uint public transactionCount;\\n\\n struct Transaction {\\n address destination;\\n uint value;\\n bytes data;\\n bool executed;\\n }\\n\\n /*\\n * Modifiers\\n */\\n modifier onlyWallet() {\\n require(msg.sender == address(this));\\n _;\\n }\\n\\n modifier ownerDoesNotExist(address owner) {\\n require(!isOwner[owner]);\\n _;\\n }\\n\\n modifier ownerExists(address owner) {\\n require(isOwner[owner]);\\n _;\\n }\\n\\n modifier transactionExists(uint transactionId) {\\n require(transactions[transactionId].destination != address(0));\\n _;\\n }\\n\\n modifier confirmed(uint transactionId, address owner) {\\n require(confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notConfirmed(uint transactionId, address owner) {\\n require(!confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notExecuted(uint transactionId) {\\n require(!transactions[transactionId].executed);\\n _;\\n }\\n\\n modifier notNull(address _address) {\\n require(_address != address(0));\\n _;\\n }\\n\\n modifier validRequirement(uint ownerCount, uint _required) {\\n require(ownerCount <= MAX_OWNER_COUNT\\n && _required <= ownerCount\\n && _required != 0\\n && ownerCount != 0);\\n _;\\n }\\n\\n /*\\n * Public functions\\n */\\n /// @dev Contract constructor sets initial owners and required number of confirmations.\\n /// @param _owners List of initial owners.\\n /// @param _required Number of required confirmations.\\n constructor(address[] memory _owners, uint _required)\\n validRequirement(_owners.length, _required)\\n {\\n for (uint i = 0; i < _owners.length; i++) {\\n require(!isOwner[_owners[i]] && _owners[i] != address(0));\\n isOwner[_owners[i]] = true;\\n }\\n owners = _owners;\\n required = _required;\\n }\\n\\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of new owner.\\n function addOwner(address owner)\\n public\\n onlyWallet\\n ownerDoesNotExist(owner)\\n notNull(owner)\\n validRequirement(owners.length + 1, required)\\n {\\n isOwner[owner] = true;\\n owners.push(owner);\\n emit OwnerAddition(owner);\\n }\\n\\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner.\\n function removeOwner(address owner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n {\\n isOwner[owner] = false;\\n for (uint i = 0; i < owners.length - 1; i++)\\n if (owners[i] == owner) {\\n owners[i] = owners[owners.length - 1];\\n break;\\n }\\n owners.pop();\\n if (required > owners.length)\\n changeRequirement(owners.length);\\n emit OwnerRemoval(owner);\\n }\\n\\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner to be replaced.\\n /// @param newOwner Address of new owner.\\n function replaceOwner(address owner, address newOwner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n ownerDoesNotExist(newOwner)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (owners[i] == owner) {\\n owners[i] = newOwner;\\n break;\\n }\\n isOwner[owner] = false;\\n isOwner[newOwner] = true;\\n emit OwnerRemoval(owner);\\n emit OwnerAddition(newOwner);\\n }\\n\\n /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\\n /// @param _required Number of required confirmations.\\n function changeRequirement(uint _required)\\n public\\n onlyWallet\\n validRequirement(owners.length, _required)\\n {\\n required = _required;\\n emit RequirementChange(_required);\\n }\\n\\n /// @dev Allows an owner to submit and confirm a transaction.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function submitTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) public returns (uint transactionId)\\n {\\n transactionId = addTransaction(destination, value, data);\\n confirmTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to confirm a transaction.\\n /// @param transactionId Transaction ID.\\n function confirmTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n transactionExists(transactionId)\\n notConfirmed(transactionId, msg.sender)\\n {\\n confirmations[transactionId][msg.sender] = true;\\n emit Confirmation(msg.sender, transactionId);\\n executeTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to revoke a confirmation for a transaction.\\n /// @param transactionId Transaction ID.\\n function revokeConfirmation(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n confirmations[transactionId][msg.sender] = false;\\n emit Revocation(msg.sender, transactionId);\\n }\\n\\n /// @dev Allows anyone to execute a confirmed transaction.\\n /// @param transactionId Transaction ID.\\n function executeTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n if (isConfirmed(transactionId)) {\\n Transaction storage txn = transactions[transactionId];\\n txn.executed = true;\\n if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\\n emit Execution(transactionId);\\n else {\\n emit ExecutionFailure(transactionId);\\n txn.executed = false;\\n }\\n }\\n }\\n\\n // call has been separated into its own function in order to take advantage\\n // of the Solidity's code generator to produce a loop that copies tx.data into memory.\\n function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) {\\n bool result;\\n assembly {\\n let x := mload(0x40) // \\\"Allocate\\\" memory for output (0x40 is where \\\"free memory\\\" pointer is stored by convention)\\n let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\\n result := call(\\n sub(gas(), 36810), // 34710 is the value that solidity is currently emitting // todo\\n // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\\n // callNewAccountGas (25000, in case the destination address does not exist and needs creating) +\\n // gasSLoadEIP2929 (2100)\\n\\n destination,\\n value,\\n d,\\n dataLength, // Size of the input (in bytes) - this is what fixes the padding problem\\n x,\\n 0 // Output is ignored, therefore the output size is zero\\n )\\n }\\n return result;\\n }\\n\\n /// @dev Returns the confirmation status of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return Confirmation status.\\n function isConfirmed(uint transactionId) public view returns (bool)\\n {\\n uint count = 0;\\n for (uint i = 0; i < owners.length; i++) {\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n if (count == required)\\n return true;\\n }\\n return false;\\n }\\n\\n /*\\n * Internal functions\\n */\\n /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function addTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) internal\\n notNull(destination) returns (uint transactionId)\\n {\\n transactionId = transactionCount;\\n transactions[transactionId] = Transaction({\\n destination : destination,\\n value : value,\\n data : data,\\n executed : false\\n });\\n transactionCount += 1;\\n emit Submission(transactionId);\\n }\\n\\n /*\\n * Web3 call functions\\n */\\n /// @dev Returns number of confirmations of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return count Number of confirmations.\\n function getConfirmationCount(uint transactionId)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n }\\n\\n /// @dev Returns total number of transactions after filers are applied.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return count Total number of transactions after filters are applied.\\n function getTransactionCount(bool pending, bool executed)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n count += 1;\\n }\\n\\n /// @dev Returns list of owners.\\n /// @return List of owner addresses.\\n function getOwners() public view returns (address[] memory)\\n {\\n return owners;\\n }\\n\\n /// @dev Returns array with owner addresses, which confirmed transaction.\\n /// @param transactionId Transaction ID.\\n /// @return _confirmations Returns array of owner addresses.\\n function getConfirmations(uint transactionId) public view\\n returns (address[] memory _confirmations)\\n {\\n address[] memory confirmationsTemp = new address[](owners.length);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]]) {\\n confirmationsTemp[count] = owners[i];\\n count += 1;\\n }\\n _confirmations = new address[](count);\\n for (i = 0; i < count; i++)\\n _confirmations[i] = confirmationsTemp[i];\\n }\\n\\n /// @dev Returns list of transaction IDs in defined range.\\n /// @param from Index start position of transaction array.\\n /// @param to Index end position of transaction array.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return _transactionIds Returns array of transaction IDs.\\n function getTransactionIds(uint from, uint to, bool pending, bool executed)\\n public\\n view\\n returns (uint[] memory _transactionIds)\\n {\\n uint[] memory transactionIdsTemp = new uint[](transactionCount);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n {\\n transactionIdsTemp[count] = i;\\n count += 1;\\n }\\n _transactionIds = new uint[](to - from);\\n for (i = from; i < to; i++)\\n _transactionIds[i - from] = transactionIdsTemp[i];\\n }\\n}\\n\",\"keccak256\":\"0x1630487b4e9acd29e4c4ea04eff94b838660e39d009c0668c5213c209fb2f883\",\"license\":\"MIT\"},\"contracts/utils/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/proxy/Proxy.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport \\\"./MultiSigWallet.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\n\\ncontract ProxyMultiSig is Proxy, MultiSigWallet {\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n bytes32 private constant ADMIN_STORAGE_LOCATION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n bytes4 private constant _UPGRADE_TO_AND_CALL_SIGNATURE = bytes4(keccak256(\\\"_upgradeToAndCall(address,bytes)\\\"));\\n\\n event Upgraded(address indexed implementation);\\n\\n\\n constructor(\\n address _logic,\\n bytes memory _data,\\n address[] memory owners,\\n uint _required\\n\\n ) MultiSigWallet(owners, _required) {\\n // Cannot use _upgradeToAndCall because of onlyWallet modifier\\n _upgradeTo(_logic);\\n if (_data.length > 0) {\\n Address.functionDelegateCall(_logic, _data);\\n }\\n\\n StorageSlot.getAddressSlot(ADMIN_STORAGE_LOCATION).value = msg.sender; // trick the hardhat-deploy\\n }\\n\\n\\n function implementation() external view returns (address) {\\n return _implementation();\\n }\\n\\n function upgradeTo(address newImplementation) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, bytes(\\\"\\\"))\\n );\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, data)\\n );\\n }\\n\\n function _upgradeToAndCall(address newImplementation, bytes memory data) external onlyWallet payable {\\n _upgradeTo(newImplementation);\\n if (data.length > 0) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n function _upgradeTo(address newImplementation) internal {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n emit Upgraded(newImplementation);\\n }\\n\\n function _implementation() internal view override returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n}\\n\",\"keccak256\":\"0x9e2738f9167ae4a747ac4e8622c443ad735a257630293dee633535dae02863d5\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200285f3803806200285f833981016040819052620000349162000645565b8181815181603282111580156200004b5750818111155b80156200005757508015155b80156200006357508115155b6200006d57600080fd5b60005b845181101562000163576002600086838151811062000093576200009362000821565b602090810291909101810151600160a060020a031682528101919091526040016000205460ff16158015620000f757506000600160a060020a0316858281518110620000e357620000e362000821565b6020026020010151600160a060020a031614155b6200010157600080fd5b6001600260008784815181106200011c576200011c62000821565b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055806200015a81620007de565b91505062000070565b5083516200017990600390602087019062000511565b5050506004555062000194846401000000006200021b810204565b825115620001b857620001b68484640100000000620015686200034a82021704565b505b33620001f27fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a0392909216919091179055506200087f92505050565b6200023481640100000000620015906200038582021704565b620002c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b80620003007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a03928316179055604051908216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200037b838360405180606001604052806027815260200162002838602791396401000000006200038b810204565b9392505050565b90565b3b151590565b6060620003a18464010000000062000385810204565b6200042f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401620002bd565b60008085600160a060020a0316856040516200044c919062000725565b600060405180830381855af49150503d806000811462000489576040519150601f19603f3d011682016040523d82523d6000602084013e6200048e565b606091505b5091509150620004af828286620004b9640100000000026401000000009004565b9695505050505050565b60608315620004ca5750816200037b565b825115620004db5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002bd919062000743565b82805482825590600052602060002090810192821562000569579160200282015b82811115620005695782518254600160a060020a031916600160a060020a0390911617825560209092019160019091019062000532565b50620005779291506200057b565b5090565b5b808211156200057757600081556001016200057c565b8051600160a060020a0381168114620005aa57600080fd5b919050565b600082601f830112620005c157600080fd5b815160206001604060020a03821115620005df57620005df62000850565b808202620005ef82820162000778565b8381528281019086840183880185018910156200060b57600080fd5b600093505b858410156200063957620006248162000592565b83526001939093019291840191840162000610565b50979650505050505050565b600080600080608085870312156200065c57600080fd5b620006678562000592565b935060208501516001604060020a03808211156200068457600080fd5b818701915087601f8301126200069957600080fd5b815181811115620006ae57620006ae62000850565b620006c3601f8201601f191660200162000778565b818152896020838601011115620006d957600080fd5b620006ec826020830160208701620007ab565b6040890151909650925050808211156200070557600080fd5b506200071487828801620005af565b606096909601519497939650505050565b6000825162000739818460208701620007ab565b9190910192915050565b602081526000825180602084015262000764816040850160208701620007ab565b601f01601f19169190910160400192915050565b604051601f8201601f191681016001604060020a0381118282101715620007a357620007a362000850565b604052919050565b60005b83811015620007c8578181015183820152602001620007ae565b83811115620007d8576000848401525b50505050565b60006000198214156200081a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611fa9806200088f6000396000f3fe608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033", - "implementation": "0x115E4BEF320793Ff7cA3B4d0d9988292d08a2f45", + "execute": { + "methodName": "initialize", + "args": [ + { + "relayAddress": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "feeProviderAddress": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "watchdogsAddresses": [ + "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" + ], + "transferFeeRecipient": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "bridgeFeeRecipient": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", + "tokenThisAddresses": [ + "0x9Ba7ef7E1C6C5EF4fe7e2A32d4527497D6B12Ff2", + "0x0000000000000000000000000000000000000000", + "0xB841C5707DA4B43eD915B707158010bd2FaF3B46", + "0x05875578a63C7E26245c7CBa3cF460fF6a613c6B" + ], + "tokenSideAddresses": [ + "0x7cee2ae3042D2C646Aa24FACfA92dfeE589046f0", + "0x9Ba7ef7E1C6C5EF4fe7e2A32d4527497D6B12Ff2", + "0x952b98DBDa3319BF0e339cC9CC574fF768F80f3c", + "0x1bB13b68DbA3571415B4092802777B5cA15de897" + ], + "sideBridgeAddress": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", + "wrappingTokenAddress": "0x5ECfeaD3d77F6814D189F6209ea27eCD1c00D45a", + "timeframeSeconds": 60, + "lockTime": 60, + "minSafetyBlocks": 2 + } + ] + }, + "implementation": "0x28c790c357E59C1fF13C1845499B15EDbE8621e1", "devdoc": { "kind": "dev", "methods": { @@ -1952,15 +1983,15 @@ "storageLayout": { "storage": [ { - "astId": 9567, + "astId": 454, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "transactions", "offset": 0, "slot": "0", - "type": "t_mapping(t_uint256,t_struct(Transaction)9593_storage)" + "type": "t_mapping(t_uint256,t_struct(Transaction)480_storage)" }, { - "astId": 9573, + "astId": 460, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "confirmations", "offset": 0, @@ -1968,7 +1999,7 @@ "type": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" }, { - "astId": 9577, + "astId": 464, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "isOwner", "offset": 0, @@ -1976,7 +2007,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 9580, + "astId": 467, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "owners", "offset": 0, @@ -1984,7 +2015,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 9582, + "astId": 469, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "required", "offset": 0, @@ -1992,7 +2023,7 @@ "type": "t_uint256" }, { - "astId": 9584, + "astId": 471, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "transactionCount", "offset": 0, @@ -2036,19 +2067,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_bool)" }, - "t_mapping(t_uint256,t_struct(Transaction)9593_storage)": { + "t_mapping(t_uint256,t_struct(Transaction)480_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct MultiSigWallet.Transaction)", "numberOfBytes": "32", - "value": "t_struct(Transaction)9593_storage" + "value": "t_struct(Transaction)480_storage" }, - "t_struct(Transaction)9593_storage": { + "t_struct(Transaction)480_storage": { "encoding": "inplace", "label": "struct MultiSigWallet.Transaction", "members": [ { - "astId": 9586, + "astId": 473, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "destination", "offset": 0, @@ -2056,7 +2087,7 @@ "type": "t_address" }, { - "astId": 9588, + "astId": 475, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "value", "offset": 0, @@ -2064,7 +2095,7 @@ "type": "t_uint256" }, { - "astId": 9590, + "astId": 477, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "data", "offset": 0, @@ -2072,7 +2103,7 @@ "type": "t_bytes_storage" }, { - "astId": 9592, + "astId": 479, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "executed", "offset": 0, diff --git a/contracts/deployments/test/eth/ETH_EthBridge_Implementation.json b/contracts/deployments/test/eth/ETH_EthBridge_Implementation.json index 5389dd32..acbb298e 100644 --- a/contracts/deployments/test/eth/ETH_EthBridge_Implementation.json +++ b/contracts/deployments/test/eth/ETH_EthBridge_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x115E4BEF320793Ff7cA3B4d0d9988292d08a2f45", + "address": "0x28c790c357E59C1fF13C1845499B15EDbE8621e1", "abi": [ { "anonymous": false, @@ -1101,25 +1101,25 @@ "type": "receive" } ], - "transactionHash": "0x82c13d9f7bc22c3e881ec35e6281d9bc55a1f3f1f779910f5ba0923ff34859ff", + "transactionHash": "0x132ca23af79e220fc393385c3223fdb2dd0d425b79f26583292f65b9d0550d0e", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x115E4BEF320793Ff7cA3B4d0d9988292d08a2f45", - "transactionIndex": 0, - "gasUsed": "3033619", + "contractAddress": "0x28c790c357E59C1fF13C1845499B15EDbE8621e1", + "transactionIndex": 28, + "gasUsed": "3034487", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x010979dd596aceded75004b2deebf83eeadd2b70fb7a75570e4fe61e3d015fc8", - "transactionHash": "0x82c13d9f7bc22c3e881ec35e6281d9bc55a1f3f1f779910f5ba0923ff34859ff", + "blockHash": "0x60262a0a50115ef75a04dad4b9d972564bde46523cfa80e74d7a54c3540633fd", + "transactionHash": "0x132ca23af79e220fc393385c3223fdb2dd0d425b79f26583292f65b9d0550d0e", "logs": [], - "blockNumber": 2118968, - "cumulativeGasUsed": "3033619", + "blockNumber": 3187000, + "cumulativeGasUsed": "11972444", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 4, - "solcInputHash": "14835e48c656ebed02c4fc9389a12566", + "numDeployments": 1, + "solcInputHash": "af3862e0ddcca2861ee723b668139921", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"queue\",\"type\":\"tuple[]\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"TransferFinish\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"TransferSubmit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenFrom\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenTo\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"transferFeeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bridgeFeeAmount\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FEE_PROVIDER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RELAY_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WATCHDOG_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeFeeRecipient\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"feeRecipient_\",\"type\":\"address\"}],\"name\":\"changeBridgeFeeRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lockTime_\",\"type\":\"uint256\"}],\"name\":\"changeLockTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minSafetyBlocks_\",\"type\":\"uint256\"}],\"name\":\"changeMinSafetyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"signatureFeeCheckNumber_\",\"type\":\"uint256\"}],\"name\":\"changeSignatureFeeCheckNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timeframeSeconds_\",\"type\":\"uint256\"}],\"name\":\"changeTimeframeSeconds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"feeRecipient_\",\"type\":\"address\"}],\"name\":\"changeTransferFeeRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"getLockedTransfers\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"transfers\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"endTimestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.LockedTransfers\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"grantRoles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sideBridgeAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"watchdogsAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"feeProviderAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"wrappingTokenAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokenSideAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address payable\",\"name\":\"transferFeeRecipient\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"bridgeFeeRecipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timeframeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minSafetyBlocks\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.ConstructorArgs\",\"name\":\"args\",\"type\":\"tuple\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inputEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isQueueEmpty\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastTimeframe\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lockTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lockedTransfers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"endTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minSafetyBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldestLockedEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"outputEventId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"removeLockedTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"revokeRoles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sideBridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"skipTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct CommonStructs.Transfer[]\",\"name\":\"transfers\",\"type\":\"tuple[]\"}],\"name\":\"submitTransferUntrustless\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeframeSeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenSideAddress\",\"type\":\"address\"}],\"name\":\"tokensAdd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokenSideAddresses\",\"type\":\"address[]\"}],\"name\":\"tokensAddBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"}],\"name\":\"tokensRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokenThisAddresses\",\"type\":\"address[]\"}],\"name\":\"tokensRemoveBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transferFeeRecipient\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"}],\"name\":\"unlockTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unlockTransfersBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_watchdogs\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"_fee_provider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oldDefaultAdmin\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenThisAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"unwrapSide\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"feeSignature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"transferFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bridgeFee\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"feeSignature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"transferFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bridgeFee\",\"type\":\"uint256\"}],\"name\":\"wrapWithdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrapperAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"withdraw(address,address,uint256,bool,bytes,uint256,uint256)\":{\"params\":{\"bridgeFee\":\"Amount (in native coins), payed as bridge earnings\",\"feeSignature\":\"Signature signed by relay that confirms that the fee values are valid\",\"transferFee\":\"Amount (in native coins), payed to compensate gas fees in side network\"}},\"wrapWithdraw(address,bytes,uint256,uint256)\":{\"params\":{\"bridgeFee\":\"Amount (in native coins), payed as bridge earnings\",\"feeSignature\":\"Signature signed by relay that confirms that the fee values are valid\",\"toAddress\":\"Address in side network that will receive the tokens\",\"transferFee\":\"Amount (in native coins), payed to compensate gas fees in side network\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/networks/ETH_EthBridge.sol\":\"ETH_EthBridge\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 * ```\\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 * ```\\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.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\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, _msgSender());\\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(IAccessControlUpgradeable).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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x29d96f28c0dfcd25ddffef02e56438bde20e1135df9745d7eeb196f08665da6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\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\":\"0xb138a22255a0c28ffa169cd269120bbfa27711cefe14b531462b22560cf374fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 * 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 */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool 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 Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\\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 function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\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 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 require(!paused(), \\\"Pausable: paused\\\");\\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 require(paused(), \\\"Pausable: not paused\\\");\\n _;\\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 uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x742c0fbab73bf595ca40025f6e81cb48dbd5e133950717f7befd062a925c0148\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xc7af08df3d3e818ce36f95aa879c13245772fed21b553e6033292ea4edc2a9f3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x17c9c5d2d6b56527215ee7b3da6dde66b6f23f1b3d5c66cc436e753ef349a97a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 IERC165Upgradeable {\\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\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"contracts/checks/CheckUntrustless2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"../common/CommonStructs.sol\\\";\\n\\n\\ncontract CheckUntrustless2 {\\n // this contract do nothing, but i think it's required to inheritance from it\\n // todo check this\\n uint256[15] private ___gap;\\n}\\n\",\"keccak256\":\"0xff7351b4e6b3628cd20511c65aa12dfb19b76472ee18ee06397879c1000d562d\",\"license\":\"MIT\"},\"contracts/checks/SignatureCheck.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n assembly {\\n r := mload(add(signature, 32))\\n s := mload(add(signature, 64))\\n v := byte(0, mload(add(signature, 96)))\\n if lt(v, 27) {v := add(v, 27)}\\n }\\n return ecrecover(messageHash, v, r, s);\\n}\\n\",\"keccak256\":\"0x16e553d27ac4c9c49f8487c5df1fd51b3afbffa9557be22ca031f05d82739ba7\",\"license\":\"MIT\"},\"contracts/common/CommonBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./CommonStructs.sol\\\";\\nimport \\\"../tokens/IWrapper.sol\\\";\\nimport \\\"../checks/SignatureCheck.sol\\\";\\n\\n\\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\\n // DEFAULT_ADMIN_ROLE can grants and revokes all roles below; Set to multisig (proxy contract address)\\n bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\\n bytes32 public constant RELAY_ROLE = keccak256(\\\"RELAY_ROLE\\\"); // can submit transfers\\n bytes32 public constant WATCHDOG_ROLE = keccak256(\\\"WATCHDOG_ROLE\\\"); // can pause contract\\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\\\"FEE_PROVIDER_ROLE\\\"); // fee signatures must be signed by this role\\n\\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\\n uint internal signatureFeeCheckNumber;\\n\\n\\n // queue of Transfers to be pushed in another network\\n CommonStructs.Transfer[] queue;\\n\\n // locked transfers from another network\\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\\n // head index of lockedTransfers 'queue' mapping\\n uint public oldestLockedEventId;\\n\\n\\n // this network to side network token addresses mapping\\n mapping(address => address) public tokenAddresses;\\n // token that implement `IWrapper` interface and used to wrap native coin\\n address public wrapperAddress;\\n\\n // addresses that will receive fees\\n address payable public transferFeeRecipient;\\n address payable public bridgeFeeRecipient;\\n\\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\\n\\n uint public inputEventId; // last processed event from side network\\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\\n\\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\\n\\n\\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\\n uint transferFeeAmount, uint bridgeFeeAmount);\\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\\n event TransferSubmit(uint indexed eventId);\\n event TransferFinish(uint indexed eventId);\\n\\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, address(this));\\n _setupRole(ADMIN_ROLE, msg.sender);\\n _setupRole(RELAY_ROLE, args.relayAddress);\\n _setupRoles(WATCHDOG_ROLE, args.watchdogsAddresses);\\n _setupRole(FEE_PROVIDER_ROLE, args.feeProviderAddress);\\n\\n // initialise tokenAddresses with start values\\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\\n wrapperAddress = args.wrappingTokenAddress;\\n\\n sideBridgeAddress = args.sideBridgeAddress;\\n transferFeeRecipient = args.transferFeeRecipient;\\n bridgeFeeRecipient = args.bridgeFeeRecipient;\\n minSafetyBlocks = args.minSafetyBlocks;\\n timeframeSeconds = args.timeframeSeconds;\\n lockTime = args.lockTime;\\n\\n // 1, coz eventId 0 considered already processed\\n oldestLockedEventId = 1;\\n outputEventId = 1;\\n\\n signatureFeeCheckNumber = 3;\\n\\n lastTimeframe = block.timestamp / timeframeSeconds;\\n }\\n\\n\\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\\n\\n /// @param toAddress Address in side network that will receive the tokens\\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\\n function wrapWithdraw(address toAddress,\\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\\n ) public payable {\\n address tokenSideAddress = tokenAddresses[wrapperAddress];\\n require(tokenSideAddress != address(0), \\\"Unknown token address\\\");\\n\\n require(msg.value > transferFee + bridgeFee, \\\"Sent value <= fee\\\");\\n\\n uint amount = msg.value - transferFee - bridgeFee;\\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\\n transferFeeRecipient.transfer(transferFee);\\n bridgeFeeRecipient.transfer(bridgeFee);\\n\\n IWrapper(wrapperAddress).deposit{value : amount}();\\n\\n //\\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\\n\\n withdrawFinish();\\n }\\n\\n // `withdraw` function used for sending tokens from this network to side network;\\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\\n /// @param toAddress Address in side network that will receive the tokens\\n /// @param amount Amount of tokens to be sent\\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\\n */\\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\\n function withdraw(\\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\\n ) payable public {\\n address tokenSideAddress;\\n if (unwrapSide) {\\n require(tokenAddresses[address(0)] == tokenThisAddress, \\\"Token not point to native token\\\");\\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\\n } else {\\n tokenSideAddress = tokenAddresses[tokenThisAddress];\\n require(tokenSideAddress != address(0), \\\"Unknown token address\\\");\\n }\\n\\n require(msg.value == transferFee + bridgeFee, \\\"Sent value != fee\\\");\\n\\n require(amount > 0, \\\"Cannot withdraw 0\\\");\\n\\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\\n transferFeeRecipient.transfer(transferFee);\\n bridgeFeeRecipient.transfer(bridgeFee);\\n\\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \\\"Fail transfer coins\\\");\\n\\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\\n\\n withdrawFinish();\\n }\\n\\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\\n function triggerTransfers() public {\\n require(queue.length != 0, \\\"Queue is empty\\\");\\n\\n emit Transfer(outputEventId++, queue);\\n delete queue;\\n }\\n\\n\\n // after `lockTime` period, transfers can be unlocked\\n function unlockTransfers(uint eventId) public whenNotPaused {\\n require(eventId == oldestLockedEventId, \\\"can unlock only oldest event\\\");\\n\\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\\n require(transfersLocked.endTimestamp > 0, \\\"no locked transfers with this id\\\");\\n require(transfersLocked.endTimestamp < block.timestamp, \\\"lockTime has not yet passed\\\");\\n\\n proceedTransfers(transfersLocked.transfers);\\n\\n delete lockedTransfers[eventId];\\n emit TransferFinish(eventId);\\n\\n oldestLockedEventId = eventId + 1;\\n }\\n\\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\\n function unlockTransfersBatch() public whenNotPaused {\\n uint eventId = oldestLockedEventId;\\n for (;; eventId++) {\\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\\n\\n proceedTransfers(transfersLocked.transfers);\\n\\n delete lockedTransfers[eventId];\\n emit TransferFinish(eventId);\\n }\\n oldestLockedEventId = eventId;\\n }\\n\\n // delete transfers with passed eventId **and all after it**\\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\\n require(eventId >= oldestLockedEventId, \\\"eventId must be >= oldestLockedEventId\\\"); // can't undo unlocked :(\\n require(eventId <= inputEventId, \\\"eventId must be <= inputEventId\\\");\\n\\n // now waiting for submitting a new transfer with `eventId` id\\n inputEventId = eventId - 1;\\n\\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\\n delete lockedTransfers[eventId];\\n\\n }\\n\\n // pretend like bridge already receive and process all transfers up to `eventId` id\\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\\n require(eventId >= oldestLockedEventId, \\\"eventId must be >= oldestLockedEventId\\\"); // can't undo unlocked :(\\n\\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\\n }\\n\\n\\n // views\\n\\n // returns locked transfers from another network\\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\\n return lockedTransfers[eventId];\\n }\\n\\n\\n function isQueueEmpty() public view returns (bool) {\\n return queue.length == 0;\\n }\\n\\n\\n // admin setters\\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\\n minSafetyBlocks = minSafetyBlocks_;\\n }\\n\\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\\n transferFeeRecipient = feeRecipient_;\\n }\\n\\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\\n bridgeFeeRecipient = feeRecipient_;\\n }\\n\\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\\n timeframeSeconds = timeframeSeconds_;\\n }\\n\\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\\n lockTime = lockTime_;\\n }\\n\\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\\n }\\n\\n // token addressed mapping\\n\\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\\n }\\n\\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\\n delete tokenAddresses[tokenThisAddress];\\n }\\n\\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\\n }\\n\\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\\n require(tokenThisAddresses.length == tokenSideAddresses.length, \\\"sizes of tokenThisAddresses and tokenSideAddresses must be same\\\");\\n uint arrayLength = tokenThisAddresses.length;\\n for (uint i = 0; i < arrayLength; i++)\\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\\n }\\n\\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\\n uint arrayLength = tokenThisAddresses.length;\\n for (uint i = 0; i < arrayLength; i++)\\n delete tokenAddresses[tokenThisAddresses[i]];\\n }\\n\\n // pause\\n\\n function pause() public onlyRole(WATCHDOG_ROLE) {\\n _pause();\\n }\\n\\n function unpause() public onlyRole(ADMIN_ROLE) {\\n _unpause();\\n }\\n\\n // roles\\n\\n function grantRoles(bytes32 role, address[] calldata accounts) public onlyRole(getRoleAdmin(role)) {\\n // check permission to grant role via onlyRole(getRoleAdmin(role))\\n _setupRoles(role, accounts);\\n }\\n function revokeRoles(bytes32 role, address[] calldata accounts) public {\\n // revokeRole will check for permissions\\n for (uint i = 0; i < accounts.length; i++)\\n revokeRole(role, accounts[i]);\\n }\\n function _setupRoles(bytes32 role, address[] calldata accounts) internal {\\n // no permissions check at all\\n for (uint i = 0; i < accounts.length; i++)\\n _setupRole(role, accounts[i]);\\n }\\n\\n // internal\\n\\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\\n for (uint i = 0; i < events.length; i++)\\n lockedTransfers[eventId].transfers.push(events[i]);\\n }\\n\\n\\n // sends money according to the information in the Transfer structure\\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\\n for (uint i = 0; i < transfers.length; i++) {\\n\\n if (transfers[i].tokenAddress == address(0)) {// native token\\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\\n } else {// ERC20 token\\n require(\\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\\n \\\"Fail transfer coins\\\");\\n }\\n\\n }\\n }\\n\\n // used by `withdraw` and `wrapWithdraw` functions;\\n // emit `Transfer` event with current queue if timeframe was changed;\\n function withdrawFinish() internal {\\n uint nowTimeframe = block.timestamp / timeframeSeconds;\\n if (nowTimeframe != lastTimeframe) {\\n emit Transfer(outputEventId++, queue);\\n delete queue;\\n\\n lastTimeframe = nowTimeframe;\\n }\\n }\\n\\n // encode message with received values and current timestamp;\\n // check that signature is same message signed by address with RELAY_ROLE;\\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\\n bytes32 messageHash;\\n address signer;\\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\\n\\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\\n messageHash = keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\\n ));\\n\\n signer = ecdsaRecover(messageHash, signature);\\n if (hasRole(FEE_PROVIDER_ROLE, signer))\\n return;\\n timestampEpoch--;\\n }\\n revert(\\\"Signature check failed\\\");\\n }\\n\\n function checkEventId(uint eventId) internal {\\n require(eventId == ++inputEventId, \\\"EventId out of order\\\");\\n }\\n\\n receive() external payable {} // need to receive native token from wrapper contract\\n\\n uint256[15] private __gap;\\n}\\n\",\"keccak256\":\"0x74846658822e44c4fc71b2764a31d90bad77af3b492a2a4a5a512f7a41d9b489\",\"license\":\"MIT\"},\"contracts/common/CommonStructs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.6;\\n\\nlibrary CommonStructs {\\n struct Transfer {\\n address tokenAddress;\\n address toAddress;\\n uint amount;\\n }\\n\\n struct TransferProof {\\n bytes[] receiptProof;\\n uint eventId;\\n Transfer[] transfers;\\n }\\n\\n struct LockedTransfers {\\n Transfer[] transfers;\\n uint endTimestamp;\\n }\\n\\n struct ConstructorArgs {\\n address sideBridgeAddress; address relayAddress;\\n address[] watchdogsAddresses; address feeProviderAddress;\\n address wrappingTokenAddress;\\n address[] tokenThisAddresses; address[] tokenSideAddresses;\\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\\n }\\n}\\n\",\"keccak256\":\"0x0294bbc461102c4f4108d6f0163ce8158d5af7c5a6ff29971f01afdec7b38cf3\",\"license\":\"MIT\"},\"contracts/networks/ETH_EthBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"../common/CommonBridge.sol\\\";\\nimport \\\"../checks/CheckUntrustless2.sol\\\";\\n\\n\\ncontract ETH_EthBridge is CommonBridge, CheckUntrustless2 {\\n\\n function initialize(\\n CommonStructs.ConstructorArgs calldata args\\n ) public initializer {\\n __CommonBridge_init(args);\\n }\\n\\n function upgrade(\\n address[] calldata _watchdogs,\\n address _fee_provider,\\n address oldDefaultAdmin\\n ) public {\\n require(msg.sender == address(this), \\\"This method require multisig\\\");\\n\\n // new roles for untrustless mpc\\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\\n\\n // add DEFAULT_ADMIN_ROLE to multisig\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n // revoke DEFAULT_ADMIN_ROLE from deployer\\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\\n }\\n\\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\\n checkEventId(eventId);\\n emit TransferSubmit(eventId);\\n lockTransfers(transfers, eventId);\\n }\\n}\\n\",\"keccak256\":\"0x491228bedd295cc8947c19d4439ca275f9a3c3a809f42473376e25f891a3a81e\",\"license\":\"MIT\"},\"contracts/tokens/IWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\ninterface IWrapper {\\n event Deposit(address indexed dst, uint amount);\\n event Withdrawal(address indexed src, uint amount);\\n\\n function deposit() external payable;\\n\\n function withdraw(uint amount) external;\\n}\\n\",\"keccak256\":\"0xbe5bc17241b9a14b78e18e4562e2a4c02e2b941fae0f1a896bbd795e49af136e\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50613603806100206000396000f3fe6080604052600436106102ec5760003560e060020a90048063853890ae11610194578063ba8bbbe0116100e0578063e31be08711610099578063f700558711610073578063f7005587146108d6578063f862b7eb146108f6578063f8b7443314610916578063fd5d2ef31461092957600080fd5b8063e31be08714610869578063ec9d4d3c14610896578063f33fe10f146108b657600080fd5b8063ba8bbbe0146107bb578063baeebe75146107d1578063cf3317d3146107e7578063d3b89f4914610807578063d547741f14610829578063deb9a3a21461084957600080fd5b8063924cf6e01161014d578063a217fddf11610127578063a217fddf1461072e578063a9b1cf0b14610743578063b6d3385e14610765578063b87330e91461079b57600080fd5b8063924cf6e0146106e257806396cf5227146106f857806399b5bb641461071857600080fd5b8063853890ae1461064457806386d7679e146106645780638ac1f86f1461067a5780638e5df9c71461068f57806391c5bc0a146106af57806391d14854146106c257600080fd5b8063390d5388116102535780635249a7051161020c578063746b5c42116101e6578063746b5c42146105d857806375b238fc146105ed5780637df8b8021461060f5780638456cb591461062f57600080fd5b80635249a705146105805780635a5f55bf146105a05780635c975abb146105c057600080fd5b8063390d5388146104bb5780633928b296146104db5780633f4ba83a146104fb57806342180fb8146105105780634a1856de146105305780635119b0ef1461056057600080fd5b8063297c2677116102a5578063297c2677146103f75780632bbba8471461040d5780632f2ff15d14610423578063304561bb14610443578063331a891a1461047b57806336568abe1461049b57600080fd5b806301ffc9a7146102f8578063044218231461032d57806309fce3561461036f5780630d66808714610391578063196f0f62146103a7578063248a9ca3146103c757600080fd5b366102f357005b600080fd5b34801561030457600080fd5b50610318610313366004612fc2565b610949565b60405190151581526020015b60405180910390f35b34801561033957600080fd5b506103617f077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d781565b604051908152602001610324565b34801561037b57600080fd5b5061038f61038a366004612eaf565b6109dc565b005b34801561039d57600080fd5b5061036160d45481565b3480156103b357600080fd5b5061038f6103c2366004612f76565b610a08565b3480156103d357600080fd5b506103616103e2366004612f38565b60009081526065602052604090206001015490565b34801561040357600080fd5b5061036160d65481565b34801561041957600080fd5b5060ca5415610318565b34801561042f57600080fd5b5061038f61043e366004612f51565b610a56565b34801561044f57600080fd5b5060cf5461046390600160a060020a031681565b604051600160a060020a039091168152602001610324565b34801561048757600080fd5b5061038f610496366004612f38565b610a81565b3480156104a757600080fd5b5061038f6104b6366004612f51565b610ba1565b3480156104c757600080fd5b5060d05461046390600160a060020a031681565b3480156104e757600080fd5b5061038f6104f6366004612cb4565b610c2c565b34801561050757600080fd5b5061038f610c68565b34801561051c57600080fd5b5061038f61052b366004612f38565b610c8c565b34801561053c57600080fd5b5061036161054b366004612f38565b60cb6020526000908152604090206001015481565b34801561056c57600080fd5b5061038f61057b36600461303d565b610cc9565b34801561058c57600080fd5b5061038f61059b366004612e05565b610d59565b3480156105ac57600080fd5b5061038f6105bb366004613001565b610de2565b3480156105cc57600080fd5b5060975460ff16610318565b3480156105e457600080fd5b5061038f610e5a565b3480156105f957600080fd5b506103616000805160206135ae83398151915281565b34801561061b57600080fd5b5060ce5461046390600160a060020a031681565b34801561063b57600080fd5b5061038f610f06565b34801561065057600080fd5b5061038f61065f366004612cd1565b610f27565b34801561067057600080fd5b5061036160d75481565b34801561068657600080fd5b5061038f610f6f565b34801561069b57600080fd5b5061038f6106aa366004612cb4565b6110c7565b61038f6106bd366004612d9e565b611108565b3480156106ce57600080fd5b506103186106dd366004612f51565b611438565b3480156106ee57600080fd5b5061036160d25481565b34801561070457600080fd5b5061038f610713366004612f38565b611463565b34801561072457600080fd5b5061036160d55481565b34801561073a57600080fd5b50610361600081565b34801561074f57600080fd5b5061036160008051602061356e83398151915281565b34801561077157600080fd5b50610463610780366004612cb4565b60cd60205260009081526040902054600160a060020a031681565b3480156107a757600080fd5b5061038f6107b6366004612cb4565b611482565b3480156107c757600080fd5b5061036160cc5481565b3480156107dd57600080fd5b5061036160d35481565b3480156107f357600080fd5b5061038f610802366004612f38565b6114be565b34801561081357600080fd5b5061036160008051602061358e83398151915281565b34801561083557600080fd5b5061038f610844366004612f51565b611535565b34801561085557600080fd5b5061038f610864366004612f76565b61155b565b34801561087557600080fd5b50610889610884366004612f38565b611582565b6040516103249190613308565b3480156108a257600080fd5b5061038f6108b1366004612e47565b61163e565b3480156108c257600080fd5b5060d15461046390600160a060020a031681565b3480156108e257600080fd5b5061038f6108f1366004612f38565b6116d7565b34801561090257600080fd5b5061038f610911366004612f38565b6116f6565b61038f610924366004612d0a565b611929565b34801561093557600080fd5b5061038f610944366004612f38565b611d89565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b0000000000000000000000000000000000000000000000000000000014806109d657507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b6000805160206135ae8339815191526109f58133611da8565b610a0185858585611e0f565b5050505050565b60005b81811015610a5057610a3e84848484818110610a2957610a296134b9565b90506020020160208101906108449190612cb4565b80610a4881613485565b915050610a0b565b50505050565b600082815260656020526040902060010154610a728133611da8565b610a7c8383611f30565b505050565b6000805160206135ae833981519152610a9a8133611da8565b60975460ff16610ac85760405160e560020a62461bcd028152600401610abf906131e0565b60405180910390fd5b60cc54821015610aed5760405160e560020a62461bcd028152600401610abf906132ab565b60d554821115610b425760405160e560020a62461bcd02815260206004820152601f60248201527f6576656e744964206d757374206265203c3d20696e7075744576656e744964006044820152606401610abf565b610b4d60018361342b565b60d5555b600082815260cb602052604090206001015415610b9d57600082815260cb6020526040812090610b818282612bd4565b5060006001919091015581610b9581613485565b925050610b51565b5050565b600160a060020a0381163314610c225760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610abf565b610b9d8282611fb6565b6000805160206135ae833981519152610c458133611da8565b5060d08054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206135ae833981519152610c818133611da8565b610c8961201d565b50565b6000805160206135ae833981519152610ca58133611da8565b8160d35460d754610cb6919061340c565b610cc091906133e7565b60d7555060d355565b7f077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7610cf48133611da8565b60975460ff1615610d1a5760405160e560020a62461bcd028152600401610abf90613217565b610d238461208c565b60405184907f196c47048e38df7a4fe6e581c8f4f2e2ba67ac0dd45b90da756e97bd61d9dd3b90600090a2610a508383866120f1565b6000805160206135ae833981519152610d728133611da8565b8160005b81811015610a015760cd6000868684818110610d9457610d946134b9565b9050602002016020810190610da99190612cb4565b600160a060020a0316815260208101919091526040016000208054600160a060020a031916905580610dda81613485565b915050610d76565b600054610100900460ff1680610dfb575060005460ff16155b610e1a5760405160e560020a62461bcd028152600401610abf9061324e565b600054610100900460ff16158015610e3c576000805461ffff19166101011790555b610e458261217f565b8015610b9d576000805461ff00191690555050565b60ca54610eac5760405160e560020a62461bcd02815260206004820152600e60248201527f517565756520697320656d7074790000000000000000000000000000000000006044820152606401610abf565b60d68054906000610ebc83613485565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca604051610ef0919061313d565b60405180910390a2610f0460ca6000612bd4565b565b60008051602061356e833981519152610f1f8133611da8565b610c896123ab565b6000805160206135ae833981519152610f408133611da8565b50600160a060020a03918216600090815260cd602052604090208054600160a060020a03191691909216179055565b60975460ff1615610f955760405160e560020a62461bcd028152600401610abf90613217565b60cc545b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b8282101561102757600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101610fcd565b50505050815260200160018201548152505090508060200151600014806110515750428160200151115b1561105c575060cc55565b805161106790612406565b600082815260cb60205260408120906110808282612bd4565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a250806110bf81613485565b915050610f99565b6000805160206135ae8339815191526110e08133611da8565b50600160a060020a0316600090815260cd602052604090208054600160a060020a0319169055565b60ce54600160a060020a03908116600090815260cd602052604090205416806111765760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610abf565b61118082846133cf565b34116111d15760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c7565203c3d206665650000000000000000000000000000006044820152606401610abf565b6000826111de853461342b565b6111e8919061342b565b60ce5490915061120590600160a060020a0316878787878661269a565b60cf54604051600160a060020a039091169085156108fc029086906000818181858888f1935050505015801561123f573d6000803e3d6000fd5b5060d054604051600160a060020a039091169084156108fc029085906000818181858888f1935050505015801561127a573d6000803e3d6000fd5b5060ce60009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0826040518263ffffffff1660e060020a0281526004016000604051808303818588803b1580156112ce57600080fd5b505af11580156112e2573d6000803e3d6000fd5b505060408051606081018252600160a060020a0380881682528c81166020830190815282840188815260ca80546001810182556000918252945160039095027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054968616600160a060020a031997881617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee2840180549190951695169490941790925590517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d65491513395507f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f444945061141f9350879087908b908b90958652600160a060020a0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b60405180910390a261142f61282e565b50505050505050565b6000918252606560209081526040808420600160a060020a0393909316845291905290205460ff1690565b6000805160206135ae83398151915261147c8133611da8565b5060d455565b6000805160206135ae83398151915261149b8133611da8565b5060cf8054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206135ae8339815191526114d78133611da8565b60975460ff166114fc5760405160e560020a62461bcd028152600401610abf906131e0565b60cc548210156115215760405160e560020a62461bcd028152600401610abf906132ab565b61152c60018361342b565b60d5555060cc55565b6000828152606560205260409020600101546115518133611da8565b610a7c8383611fb6565b6000838152606560205260409020600101546115778133611da8565b610a508484846128a6565b604080518082019091526060815260006020820152600082815260cb60209081526040808320815181546060948102820185018452928101838152909491938593919285929185015b8282101561162557600084815260209081902060408051606081018252600386029092018054600160a060020a039081168452600180830154909116848601526002909101549183019190915290835290920191016115cb565b5050505081526020016001820154815250509050919050565b3330146116905760405160e560020a62461bcd02815260206004820152601c60248201527f54686973206d6574686f642072657175697265206d756c7469736967000000006044820152606401610abf565b6116a960008051602061356e83398151915285856128a6565b6116c160008051602061358e833981519152836128ee565b6116cc6000336128ee565b610a50600082611535565b6000805160206135ae8339815191526116f08133611da8565b5060c955565b60975460ff161561171c5760405160e560020a62461bcd028152600401610abf90613217565b60cc5481146117705760405160e560020a62461bcd02815260206004820152601c60248201527f63616e20756e6c6f636b206f6e6c79206f6c64657374206576656e74000000006044820152606401610abf565b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156117fe57600084815260209081902060408051606081018252600386029092018054600160a060020a039081168452600180830154909116848601526002909101549183019190915290835290920191016117a4565b505050508152602001600182015481525050905060008160200151116118695760405160e560020a62461bcd02815260206004820181905260248201527f6e6f206c6f636b6564207472616e7366657273207769746820746869732069646044820152606401610abf565b428160200151106118bf5760405160e560020a62461bcd02815260206004820152601b60248201527f6c6f636b54696d6520686173206e6f74207965742070617373656400000000006044820152606401610abf565b80516118ca90612406565b600082815260cb60205260408120906118e38282612bd4565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a26119228260016133cf565b60cc555050565b600085156119be576000805260cd6020527fcd565b10a72538d86f6d352f37ebc5dff31587960b12c0afe00fd03947a6932a54600160a060020a038a81169116146119b95760405160e560020a62461bcd02815260206004820152601f60248201527f546f6b656e206e6f7420706f696e7420746f206e617469766520746f6b656e006044820152606401610abf565b611a2a565b50600160a060020a03808916600090815260cd60205260409020541680611a2a5760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610abf565b611a3482846133cf565b3414611a855760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c756520213d206665650000000000000000000000000000006044820152606401610abf565b60008711611ad85760405160e560020a62461bcd02815260206004820152601160248201527f43616e6e6f7420776974686472617720300000000000000000000000000000006044820152606401610abf565b611ae689868686868c61269a565b60cf54604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611b20573d6000803e3d6000fd5b5060d054604051600160a060020a039091169083156108fc029084906000818181858888f19350505050158015611b5b573d6000803e3d6000fd5b506040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101889052600160a060020a038a16906323b872dd90606401602060405180830381600087803b158015611bc357600080fd5b505af1158015611bd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bfb9190612f1b565b611c4a5760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610abf565b6040805160608082018352600160a060020a038481168084528c821660208086019182528587018e815260ca8054600181018255600091909152965160039097027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054988716600160a060020a0319998a1617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee284018054918716919098161790965594517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d6548551908152918e16938201939093529283019190915281018890526080810184905260a0810183905233907f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f4449060c00160405180910390a2611d7e61282e565b505050505050505050565b6000805160206135ae833981519152611da28133611da8565b5060d255565b611db28282611438565b610b9d57611dca81600160a060020a031660146128f8565b611dd58360206128f8565b604051602001611de69291906130bc565b60408051601f198184030181529082905260e560020a62461bcd028252610abf916004016131ad565b828114611e875760405160e560020a62461bcd02815260206004820152603f60248201527f73697a6573206f6620746f6b656e5468697341646472657373657320616e642060448201527f746f6b656e53696465416464726573736573206d7573742062652073616d65006064820152608401610abf565b8260005b81811015611f2857838382818110611ea557611ea56134b9565b9050602002016020810190611eba9190612cb4565b60cd6000888885818110611ed057611ed06134b9565b9050602002016020810190611ee59190612cb4565b600160a060020a03908116825260208201929092526040016000208054600160a060020a0319169290911691909117905580611f2081613485565b915050611e8b565b505050505050565b611f3a8282611438565b610b9d576000828152606560209081526040808320600160a060020a03851684529091529020805460ff19166001179055611f723390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611fc08282611438565b15610b9d576000828152606560209081526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60975460ff166120425760405160e560020a62461bcd028152600401610abf906131e0565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051600160a060020a03909116815260200160405180910390a1565b60d56000815461209b90613485565b91829055508114610c895760405160e560020a62461bcd02815260206004820152601460248201527f4576656e744964206f7574206f66206f726465720000000000000000000000006044820152606401610abf565b60d4546120fe90426133cf565b600082815260cb60205260408120600101919091555b82811015610a5057600082815260cb6020526040902084848381811061213c5761213c6134b9565b83546001810185556000948552602090942060609091029290920192600302909101905061216a82826134eb565b5050808061217790613485565b915050612114565b600054610100900460ff1680612198575060005460ff16155b6121b75760405160e560020a62461bcd028152600401610abf9061324e565b600054610100900460ff161580156121d9576000805461ffff19166101011790555b6121e46000306128ee565b6121fc6000805160206135ae833981519152336128ee565b6122357f077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d76122306040850160208601612cb4565b6128ee565b61225960008051602061356e8339815191526122546040850185613386565b6128a6565b61227b60008051602061358e8339815191526122306080850160608601612cb4565b61229d61228b60a0840184613386565b61229860c0860186613386565b611e0f565b6122ad60a0830160808401612cb4565b60ce8054600160a060020a031916600160a060020a03929092169190911790556122da6020830183612cb4565b60d18054600160a060020a031916600160a060020a039290921691909117905561230b610100830160e08401612cb4565b60cf8054600160a060020a031916600160a060020a039290921691909117905561233d61012083016101008401612cb4565b60d08054600160a060020a031916600160a060020a039290921691909117905561016082013560d25561012082013560d381905561014083013560d455600160cc81905560d655600360c95561239390426133e7565b60d7558015610b9d576000805461ff00191690555050565b60975460ff16156123d15760405160e560020a62461bcd028152600401610abf90613217565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861206f3390565b60005b8151811015610b9d576000600160a060020a031682828151811061242f5761242f6134b9565b602002602001015160000151600160a060020a0316141561254b5760ce548251600160a060020a0390911690632e1a7d4d90849084908110612473576124736134b9565b6020026020010151604001516040518263ffffffff1660e060020a0281526004016124a091815260200190565b600060405180830381600087803b1580156124ba57600080fd5b505af11580156124ce573d6000803e3d6000fd5b505050508181815181106124e4576124e46134b9565b602002602001015160200151600160a060020a03166108fc83838151811061250e5761250e6134b9565b6020026020010151604001519081150290604051600060405180830381858888f19350505050158015612545573d6000803e3d6000fd5b50612688565b81818151811061255d5761255d6134b9565b602002602001015160000151600160a060020a031663a9059cbb838381518110612589576125896134b9565b6020026020010151602001518484815181106125a7576125a76134b9565b6020026020010151604001516040518363ffffffff1660e060020a0281526004016125e7929190600160a060020a03929092168252602082015260400190565b602060405180830381600087803b15801561260157600080fd5b505af1158015612615573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126399190612f1b565b6126885760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610abf565b8061269281613485565b915050612409565b600080806126aa610708426133e7565b905060005b60c9548110156127e2576040516c01000000000000000000000000600160a060020a038c160260208201526034810183905260548101889052607481018790526094810186905260b40160408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c0160405160208183030381529060405280519060200120935061279a848a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612b4992505050565b92506127b460008051602061358e83398151915284611438565b156127c25750505050611f28565b816127cc8161346e565b92505080806127da90613485565b9150506126af565b5060405160e560020a62461bcd02815260206004820152601660248201527f5369676e617475726520636865636b206661696c6564000000000000000000006044820152606401610abf565b600060d3544261283e91906133e7565b905060d7548114610c895760d6805490600061285983613485565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca60405161288d919061313d565b60405180910390a26128a160ca6000612bd4565b60d755565b60005b81811015610a50576128dc848484848181106128c7576128c76134b9565b90506020020160208101906122309190612cb4565b806128e681613485565b9150506128a9565b610b9d8282611f30565b6060600061290783600261340c565b6129129060026133cf565b67ffffffffffffffff81111561292a5761292a6134d2565b6040519080825280601f01601f191660200182016040528015612954576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061298b5761298b6134b9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106129ee576129ee6134b9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612a2a84600261340c565b612a359060016133cf565b90505b6001811115612af0577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612a7657612a766134b9565b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110612aab57612aab6134b9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350601090940493612ae98161346e565b9050612a38565b508315612b425760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610abf565b9392505050565b6020810151604082015160608301516000929190831a601b811015612b6c57601b015b60408051600081526020810180835288905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa158015612bbf573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b5080546000825560030290600052602060002090810190610c8991905b80821115612c23578054600160a060020a03199081168255600182018054909116905560006002820155600301612bf1565b5090565b60008083601f840112612c3957600080fd5b50813567ffffffffffffffff811115612c5157600080fd5b6020830191508360208083028501011115612c6b57600080fd5b9250929050565b60008083601f840112612c8457600080fd5b50813567ffffffffffffffff811115612c9c57600080fd5b602083019150836020828501011115612c6b57600080fd5b600060208284031215612cc657600080fd5b8135612b428161354a565b60008060408385031215612ce457600080fd5b8235612cef8161354a565b91506020830135612cff8161354a565b809150509250929050565b60008060008060008060008060e0898b031215612d2657600080fd5b8835612d318161354a565b97506020890135612d418161354a565b9650604089013595506060890135612d588161355f565b9450608089013567ffffffffffffffff811115612d7457600080fd5b612d808b828c01612c72565b999c989b5096999598969760a08701359660c0013595509350505050565b600080600080600060808688031215612db657600080fd5b8535612dc18161354a565b9450602086013567ffffffffffffffff811115612ddd57600080fd5b612de988828901612c72565b9699909850959660408101359660609091013595509350505050565b60008060208385031215612e1857600080fd5b823567ffffffffffffffff811115612e2f57600080fd5b612e3b85828601612c27565b90969095509350505050565b60008060008060608587031215612e5d57600080fd5b843567ffffffffffffffff811115612e7457600080fd5b612e8087828801612c27565b9095509350506020850135612e948161354a565b91506040850135612ea48161354a565b939692955090935050565b60008060008060408587031215612ec557600080fd5b843567ffffffffffffffff80821115612edd57600080fd5b612ee988838901612c27565b90965094506020870135915080821115612f0257600080fd5b50612f0f87828801612c27565b95989497509550505050565b600060208284031215612f2d57600080fd5b8151612b428161355f565b600060208284031215612f4a57600080fd5b5035919050565b60008060408385031215612f6457600080fd5b823591506020830135612cff8161354a565b600080600060408486031215612f8b57600080fd5b83359250602084013567ffffffffffffffff811115612fa957600080fd5b612fb586828701612c27565b9497909650939450505050565b600060208284031215612fd457600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1981168114612b4257600080fd5b60006020828403121561301357600080fd5b813567ffffffffffffffff81111561302a57600080fd5b82016101808185031215612b4257600080fd5b60008060006040848603121561305257600080fd5b83359250602084013567ffffffffffffffff8082111561307157600080fd5b818601915086601f83011261308557600080fd5b81358181111561309457600080fd5b8760206060830285010111156130a957600080fd5b6020830194508093505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516130f4816017850160208801613442565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613131816028840160208801613442565b01602801949350505050565b60006020808301818452808554808352604092508286019150866000528360002060005b828110156131a0578154600160a060020a0390811685526001808401549091168786015260028301548686015260609094019360039092019101613161565b5091979650505050505050565b60208152600082518060208401526131cc816040850160208701613442565b601f01601f19169190910160400192915050565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b60208082526026908201527f6576656e744964206d757374206265203e3d206f6c646573744c6f636b65644560408201527f76656e7449640000000000000000000000000000000000000000000000000000606082015260800190565b6000602080835260608084018551604080858801528282518085526080890191508684019450600093505b808410156133705784518051600160a060020a03908116845288820151168884015283015183830152938601936001939093019290850190613333565b5094909701519590960194909452509392505050565b6000808335601e1984360301811261339d57600080fd5b83018035915067ffffffffffffffff8211156133b857600080fd5b6020908101925081023603821315612c6b57600080fd5b600082198211156133e2576133e26134a0565b500190565b6000826134075760e060020a634e487b7102600052601260045260246000fd5b500490565b6000816000190483118215151615613426576134266134a0565b500290565b60008282101561343d5761343d6134a0565b500390565b60005b8381101561345d578181015183820152602001613445565b83811115610a505750506000910152565b60008161347d5761347d6134a0565b506000190190565b6000600019821415613499576134996134a0565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fd5b81356134f68161354a565b8154600160a060020a031916600160a060020a03821617825550602082013561351e8161354a565b600182018054600160a060020a031916600160a060020a03831617905550604082013560028201555050565b600160a060020a0381168114610c8957600080fd5b8015158114610c8957600080fdfeb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887ea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a264697066735822122021ae13fe42025722238345005395f6989376a7128dd63e4ffce1ff036d69905464736f6c63430008060033", "deployedBytecode": "0x6080604052600436106102ec5760003560e060020a90048063853890ae11610194578063ba8bbbe0116100e0578063e31be08711610099578063f700558711610073578063f7005587146108d6578063f862b7eb146108f6578063f8b7443314610916578063fd5d2ef31461092957600080fd5b8063e31be08714610869578063ec9d4d3c14610896578063f33fe10f146108b657600080fd5b8063ba8bbbe0146107bb578063baeebe75146107d1578063cf3317d3146107e7578063d3b89f4914610807578063d547741f14610829578063deb9a3a21461084957600080fd5b8063924cf6e01161014d578063a217fddf11610127578063a217fddf1461072e578063a9b1cf0b14610743578063b6d3385e14610765578063b87330e91461079b57600080fd5b8063924cf6e0146106e257806396cf5227146106f857806399b5bb641461071857600080fd5b8063853890ae1461064457806386d7679e146106645780638ac1f86f1461067a5780638e5df9c71461068f57806391c5bc0a146106af57806391d14854146106c257600080fd5b8063390d5388116102535780635249a7051161020c578063746b5c42116101e6578063746b5c42146105d857806375b238fc146105ed5780637df8b8021461060f5780638456cb591461062f57600080fd5b80635249a705146105805780635a5f55bf146105a05780635c975abb146105c057600080fd5b8063390d5388146104bb5780633928b296146104db5780633f4ba83a146104fb57806342180fb8146105105780634a1856de146105305780635119b0ef1461056057600080fd5b8063297c2677116102a5578063297c2677146103f75780632bbba8471461040d5780632f2ff15d14610423578063304561bb14610443578063331a891a1461047b57806336568abe1461049b57600080fd5b806301ffc9a7146102f8578063044218231461032d57806309fce3561461036f5780630d66808714610391578063196f0f62146103a7578063248a9ca3146103c757600080fd5b366102f357005b600080fd5b34801561030457600080fd5b50610318610313366004612fc2565b610949565b60405190151581526020015b60405180910390f35b34801561033957600080fd5b506103617f077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d781565b604051908152602001610324565b34801561037b57600080fd5b5061038f61038a366004612eaf565b6109dc565b005b34801561039d57600080fd5b5061036160d45481565b3480156103b357600080fd5b5061038f6103c2366004612f76565b610a08565b3480156103d357600080fd5b506103616103e2366004612f38565b60009081526065602052604090206001015490565b34801561040357600080fd5b5061036160d65481565b34801561041957600080fd5b5060ca5415610318565b34801561042f57600080fd5b5061038f61043e366004612f51565b610a56565b34801561044f57600080fd5b5060cf5461046390600160a060020a031681565b604051600160a060020a039091168152602001610324565b34801561048757600080fd5b5061038f610496366004612f38565b610a81565b3480156104a757600080fd5b5061038f6104b6366004612f51565b610ba1565b3480156104c757600080fd5b5060d05461046390600160a060020a031681565b3480156104e757600080fd5b5061038f6104f6366004612cb4565b610c2c565b34801561050757600080fd5b5061038f610c68565b34801561051c57600080fd5b5061038f61052b366004612f38565b610c8c565b34801561053c57600080fd5b5061036161054b366004612f38565b60cb6020526000908152604090206001015481565b34801561056c57600080fd5b5061038f61057b36600461303d565b610cc9565b34801561058c57600080fd5b5061038f61059b366004612e05565b610d59565b3480156105ac57600080fd5b5061038f6105bb366004613001565b610de2565b3480156105cc57600080fd5b5060975460ff16610318565b3480156105e457600080fd5b5061038f610e5a565b3480156105f957600080fd5b506103616000805160206135ae83398151915281565b34801561061b57600080fd5b5060ce5461046390600160a060020a031681565b34801561063b57600080fd5b5061038f610f06565b34801561065057600080fd5b5061038f61065f366004612cd1565b610f27565b34801561067057600080fd5b5061036160d75481565b34801561068657600080fd5b5061038f610f6f565b34801561069b57600080fd5b5061038f6106aa366004612cb4565b6110c7565b61038f6106bd366004612d9e565b611108565b3480156106ce57600080fd5b506103186106dd366004612f51565b611438565b3480156106ee57600080fd5b5061036160d25481565b34801561070457600080fd5b5061038f610713366004612f38565b611463565b34801561072457600080fd5b5061036160d55481565b34801561073a57600080fd5b50610361600081565b34801561074f57600080fd5b5061036160008051602061356e83398151915281565b34801561077157600080fd5b50610463610780366004612cb4565b60cd60205260009081526040902054600160a060020a031681565b3480156107a757600080fd5b5061038f6107b6366004612cb4565b611482565b3480156107c757600080fd5b5061036160cc5481565b3480156107dd57600080fd5b5061036160d35481565b3480156107f357600080fd5b5061038f610802366004612f38565b6114be565b34801561081357600080fd5b5061036160008051602061358e83398151915281565b34801561083557600080fd5b5061038f610844366004612f51565b611535565b34801561085557600080fd5b5061038f610864366004612f76565b61155b565b34801561087557600080fd5b50610889610884366004612f38565b611582565b6040516103249190613308565b3480156108a257600080fd5b5061038f6108b1366004612e47565b61163e565b3480156108c257600080fd5b5060d15461046390600160a060020a031681565b3480156108e257600080fd5b5061038f6108f1366004612f38565b6116d7565b34801561090257600080fd5b5061038f610911366004612f38565b6116f6565b61038f610924366004612d0a565b611929565b34801561093557600080fd5b5061038f610944366004612f38565b611d89565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b0000000000000000000000000000000000000000000000000000000014806109d657507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b6000805160206135ae8339815191526109f58133611da8565b610a0185858585611e0f565b5050505050565b60005b81811015610a5057610a3e84848484818110610a2957610a296134b9565b90506020020160208101906108449190612cb4565b80610a4881613485565b915050610a0b565b50505050565b600082815260656020526040902060010154610a728133611da8565b610a7c8383611f30565b505050565b6000805160206135ae833981519152610a9a8133611da8565b60975460ff16610ac85760405160e560020a62461bcd028152600401610abf906131e0565b60405180910390fd5b60cc54821015610aed5760405160e560020a62461bcd028152600401610abf906132ab565b60d554821115610b425760405160e560020a62461bcd02815260206004820152601f60248201527f6576656e744964206d757374206265203c3d20696e7075744576656e744964006044820152606401610abf565b610b4d60018361342b565b60d5555b600082815260cb602052604090206001015415610b9d57600082815260cb6020526040812090610b818282612bd4565b5060006001919091015581610b9581613485565b925050610b51565b5050565b600160a060020a0381163314610c225760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610abf565b610b9d8282611fb6565b6000805160206135ae833981519152610c458133611da8565b5060d08054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206135ae833981519152610c818133611da8565b610c8961201d565b50565b6000805160206135ae833981519152610ca58133611da8565b8160d35460d754610cb6919061340c565b610cc091906133e7565b60d7555060d355565b7f077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7610cf48133611da8565b60975460ff1615610d1a5760405160e560020a62461bcd028152600401610abf90613217565b610d238461208c565b60405184907f196c47048e38df7a4fe6e581c8f4f2e2ba67ac0dd45b90da756e97bd61d9dd3b90600090a2610a508383866120f1565b6000805160206135ae833981519152610d728133611da8565b8160005b81811015610a015760cd6000868684818110610d9457610d946134b9565b9050602002016020810190610da99190612cb4565b600160a060020a0316815260208101919091526040016000208054600160a060020a031916905580610dda81613485565b915050610d76565b600054610100900460ff1680610dfb575060005460ff16155b610e1a5760405160e560020a62461bcd028152600401610abf9061324e565b600054610100900460ff16158015610e3c576000805461ffff19166101011790555b610e458261217f565b8015610b9d576000805461ff00191690555050565b60ca54610eac5760405160e560020a62461bcd02815260206004820152600e60248201527f517565756520697320656d7074790000000000000000000000000000000000006044820152606401610abf565b60d68054906000610ebc83613485565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca604051610ef0919061313d565b60405180910390a2610f0460ca6000612bd4565b565b60008051602061356e833981519152610f1f8133611da8565b610c896123ab565b6000805160206135ae833981519152610f408133611da8565b50600160a060020a03918216600090815260cd602052604090208054600160a060020a03191691909216179055565b60975460ff1615610f955760405160e560020a62461bcd028152600401610abf90613217565b60cc545b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b8282101561102757600084815260209081902060408051606081018252600386029092018054600160a060020a03908116845260018083015490911684860152600290910154918301919091529083529092019101610fcd565b50505050815260200160018201548152505090508060200151600014806110515750428160200151115b1561105c575060cc55565b805161106790612406565b600082815260cb60205260408120906110808282612bd4565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a250806110bf81613485565b915050610f99565b6000805160206135ae8339815191526110e08133611da8565b50600160a060020a0316600090815260cd602052604090208054600160a060020a0319169055565b60ce54600160a060020a03908116600090815260cd602052604090205416806111765760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610abf565b61118082846133cf565b34116111d15760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c7565203c3d206665650000000000000000000000000000006044820152606401610abf565b6000826111de853461342b565b6111e8919061342b565b60ce5490915061120590600160a060020a0316878787878661269a565b60cf54604051600160a060020a039091169085156108fc029086906000818181858888f1935050505015801561123f573d6000803e3d6000fd5b5060d054604051600160a060020a039091169084156108fc029085906000818181858888f1935050505015801561127a573d6000803e3d6000fd5b5060ce60009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0826040518263ffffffff1660e060020a0281526004016000604051808303818588803b1580156112ce57600080fd5b505af11580156112e2573d6000803e3d6000fd5b505060408051606081018252600160a060020a0380881682528c81166020830190815282840188815260ca80546001810182556000918252945160039095027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054968616600160a060020a031997881617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee2840180549190951695169490941790925590517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d65491513395507f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f444945061141f9350879087908b908b90958652600160a060020a0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b60405180910390a261142f61282e565b50505050505050565b6000918252606560209081526040808420600160a060020a0393909316845291905290205460ff1690565b6000805160206135ae83398151915261147c8133611da8565b5060d455565b6000805160206135ae83398151915261149b8133611da8565b5060cf8054600160a060020a031916600160a060020a0392909216919091179055565b6000805160206135ae8339815191526114d78133611da8565b60975460ff166114fc5760405160e560020a62461bcd028152600401610abf906131e0565b60cc548210156115215760405160e560020a62461bcd028152600401610abf906132ab565b61152c60018361342b565b60d5555060cc55565b6000828152606560205260409020600101546115518133611da8565b610a7c8383611fb6565b6000838152606560205260409020600101546115778133611da8565b610a508484846128a6565b604080518082019091526060815260006020820152600082815260cb60209081526040808320815181546060948102820185018452928101838152909491938593919285929185015b8282101561162557600084815260209081902060408051606081018252600386029092018054600160a060020a039081168452600180830154909116848601526002909101549183019190915290835290920191016115cb565b5050505081526020016001820154815250509050919050565b3330146116905760405160e560020a62461bcd02815260206004820152601c60248201527f54686973206d6574686f642072657175697265206d756c7469736967000000006044820152606401610abf565b6116a960008051602061356e83398151915285856128a6565b6116c160008051602061358e833981519152836128ee565b6116cc6000336128ee565b610a50600082611535565b6000805160206135ae8339815191526116f08133611da8565b5060c955565b60975460ff161561171c5760405160e560020a62461bcd028152600401610abf90613217565b60cc5481146117705760405160e560020a62461bcd02815260206004820152601c60248201527f63616e20756e6c6f636b206f6e6c79206f6c64657374206576656e74000000006044820152606401610abf565b600081815260cb60209081526040808320815181546060948102820185018452928101838152909391928492849190879085015b828210156117fe57600084815260209081902060408051606081018252600386029092018054600160a060020a039081168452600180830154909116848601526002909101549183019190915290835290920191016117a4565b505050508152602001600182015481525050905060008160200151116118695760405160e560020a62461bcd02815260206004820181905260248201527f6e6f206c6f636b6564207472616e7366657273207769746820746869732069646044820152606401610abf565b428160200151106118bf5760405160e560020a62461bcd02815260206004820152601b60248201527f6c6f636b54696d6520686173206e6f74207965742070617373656400000000006044820152606401610abf565b80516118ca90612406565b600082815260cb60205260408120906118e38282612bd4565b50600060019190910181905560405183917f78ff9b3176bb0d6421590f3816e75cb15a9ffa2b7a1a028f40a3f4e029eb39f291a26119228260016133cf565b60cc555050565b600085156119be576000805260cd6020527fcd565b10a72538d86f6d352f37ebc5dff31587960b12c0afe00fd03947a6932a54600160a060020a038a81169116146119b95760405160e560020a62461bcd02815260206004820152601f60248201527f546f6b656e206e6f7420706f696e7420746f206e617469766520746f6b656e006044820152606401610abf565b611a2a565b50600160a060020a03808916600090815260cd60205260409020541680611a2a5760405160e560020a62461bcd02815260206004820152601560248201527f556e6b6e6f776e20746f6b656e206164647265737300000000000000000000006044820152606401610abf565b611a3482846133cf565b3414611a855760405160e560020a62461bcd02815260206004820152601160248201527f53656e742076616c756520213d206665650000000000000000000000000000006044820152606401610abf565b60008711611ad85760405160e560020a62461bcd02815260206004820152601160248201527f43616e6e6f7420776974686472617720300000000000000000000000000000006044820152606401610abf565b611ae689868686868c61269a565b60cf54604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015611b20573d6000803e3d6000fd5b5060d054604051600160a060020a039091169083156108fc029084906000818181858888f19350505050158015611b5b573d6000803e3d6000fd5b506040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101889052600160a060020a038a16906323b872dd90606401602060405180830381600087803b158015611bc357600080fd5b505af1158015611bd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bfb9190612f1b565b611c4a5760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610abf565b6040805160608082018352600160a060020a038481168084528c821660208086019182528587018e815260ca8054600181018255600091909152965160039097027f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee181018054988716600160a060020a0319998a1617905592517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee284018054918716919098161790965594517f42d72674974f694b5f5159593243114d38a5c39c89d6b62fee061ff523240ee39091015560d6548551908152918e16938201939093529283019190915281018890526080810184905260a0810183905233907f3b823d3b837159352faddd1e0b9e9f584ca2bfe976238f6a9e6da4615cf2f4449060c00160405180910390a2611d7e61282e565b505050505050505050565b6000805160206135ae833981519152611da28133611da8565b5060d255565b611db28282611438565b610b9d57611dca81600160a060020a031660146128f8565b611dd58360206128f8565b604051602001611de69291906130bc565b60408051601f198184030181529082905260e560020a62461bcd028252610abf916004016131ad565b828114611e875760405160e560020a62461bcd02815260206004820152603f60248201527f73697a6573206f6620746f6b656e5468697341646472657373657320616e642060448201527f746f6b656e53696465416464726573736573206d7573742062652073616d65006064820152608401610abf565b8260005b81811015611f2857838382818110611ea557611ea56134b9565b9050602002016020810190611eba9190612cb4565b60cd6000888885818110611ed057611ed06134b9565b9050602002016020810190611ee59190612cb4565b600160a060020a03908116825260208201929092526040016000208054600160a060020a0319169290911691909117905580611f2081613485565b915050611e8b565b505050505050565b611f3a8282611438565b610b9d576000828152606560209081526040808320600160a060020a03851684529091529020805460ff19166001179055611f723390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611fc08282611438565b15610b9d576000828152606560209081526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60975460ff166120425760405160e560020a62461bcd028152600401610abf906131e0565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051600160a060020a03909116815260200160405180910390a1565b60d56000815461209b90613485565b91829055508114610c895760405160e560020a62461bcd02815260206004820152601460248201527f4576656e744964206f7574206f66206f726465720000000000000000000000006044820152606401610abf565b60d4546120fe90426133cf565b600082815260cb60205260408120600101919091555b82811015610a5057600082815260cb6020526040902084848381811061213c5761213c6134b9565b83546001810185556000948552602090942060609091029290920192600302909101905061216a82826134eb565b5050808061217790613485565b915050612114565b600054610100900460ff1680612198575060005460ff16155b6121b75760405160e560020a62461bcd028152600401610abf9061324e565b600054610100900460ff161580156121d9576000805461ffff19166101011790555b6121e46000306128ee565b6121fc6000805160206135ae833981519152336128ee565b6122357f077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d76122306040850160208601612cb4565b6128ee565b61225960008051602061356e8339815191526122546040850185613386565b6128a6565b61227b60008051602061358e8339815191526122306080850160608601612cb4565b61229d61228b60a0840184613386565b61229860c0860186613386565b611e0f565b6122ad60a0830160808401612cb4565b60ce8054600160a060020a031916600160a060020a03929092169190911790556122da6020830183612cb4565b60d18054600160a060020a031916600160a060020a039290921691909117905561230b610100830160e08401612cb4565b60cf8054600160a060020a031916600160a060020a039290921691909117905561233d61012083016101008401612cb4565b60d08054600160a060020a031916600160a060020a039290921691909117905561016082013560d25561012082013560d381905561014083013560d455600160cc81905560d655600360c95561239390426133e7565b60d7558015610b9d576000805461ff00191690555050565b60975460ff16156123d15760405160e560020a62461bcd028152600401610abf90613217565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861206f3390565b60005b8151811015610b9d576000600160a060020a031682828151811061242f5761242f6134b9565b602002602001015160000151600160a060020a0316141561254b5760ce548251600160a060020a0390911690632e1a7d4d90849084908110612473576124736134b9565b6020026020010151604001516040518263ffffffff1660e060020a0281526004016124a091815260200190565b600060405180830381600087803b1580156124ba57600080fd5b505af11580156124ce573d6000803e3d6000fd5b505050508181815181106124e4576124e46134b9565b602002602001015160200151600160a060020a03166108fc83838151811061250e5761250e6134b9565b6020026020010151604001519081150290604051600060405180830381858888f19350505050158015612545573d6000803e3d6000fd5b50612688565b81818151811061255d5761255d6134b9565b602002602001015160000151600160a060020a031663a9059cbb838381518110612589576125896134b9565b6020026020010151602001518484815181106125a7576125a76134b9565b6020026020010151604001516040518363ffffffff1660e060020a0281526004016125e7929190600160a060020a03929092168252602082015260400190565b602060405180830381600087803b15801561260157600080fd5b505af1158015612615573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126399190612f1b565b6126885760405160e560020a62461bcd02815260206004820152601360248201527f4661696c207472616e7366657220636f696e73000000000000000000000000006044820152606401610abf565b8061269281613485565b915050612409565b600080806126aa610708426133e7565b905060005b60c9548110156127e2576040516c01000000000000000000000000600160a060020a038c160260208201526034810183905260548101889052607481018790526094810186905260b40160408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c0160405160208183030381529060405280519060200120935061279a848a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612b4992505050565b92506127b460008051602061358e83398151915284611438565b156127c25750505050611f28565b816127cc8161346e565b92505080806127da90613485565b9150506126af565b5060405160e560020a62461bcd02815260206004820152601660248201527f5369676e617475726520636865636b206661696c6564000000000000000000006044820152606401610abf565b600060d3544261283e91906133e7565b905060d7548114610c895760d6805490600061285983613485565b919050557fe15729a2f427aa4572dab35eb692c902fcbce57d41642013259c741380809ae260ca60405161288d919061313d565b60405180910390a26128a160ca6000612bd4565b60d755565b60005b81811015610a50576128dc848484848181106128c7576128c76134b9565b90506020020160208101906122309190612cb4565b806128e681613485565b9150506128a9565b610b9d8282611f30565b6060600061290783600261340c565b6129129060026133cf565b67ffffffffffffffff81111561292a5761292a6134d2565b6040519080825280601f01601f191660200182016040528015612954576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061298b5761298b6134b9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106129ee576129ee6134b9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612a2a84600261340c565b612a359060016133cf565b90505b6001811115612af0577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612a7657612a766134b9565b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110612aab57612aab6134b9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350601090940493612ae98161346e565b9050612a38565b508315612b425760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610abf565b9392505050565b6020810151604082015160608301516000929190831a601b811015612b6c57601b015b60408051600081526020810180835288905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa158015612bbf573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b5080546000825560030290600052602060002090810190610c8991905b80821115612c23578054600160a060020a03199081168255600182018054909116905560006002820155600301612bf1565b5090565b60008083601f840112612c3957600080fd5b50813567ffffffffffffffff811115612c5157600080fd5b6020830191508360208083028501011115612c6b57600080fd5b9250929050565b60008083601f840112612c8457600080fd5b50813567ffffffffffffffff811115612c9c57600080fd5b602083019150836020828501011115612c6b57600080fd5b600060208284031215612cc657600080fd5b8135612b428161354a565b60008060408385031215612ce457600080fd5b8235612cef8161354a565b91506020830135612cff8161354a565b809150509250929050565b60008060008060008060008060e0898b031215612d2657600080fd5b8835612d318161354a565b97506020890135612d418161354a565b9650604089013595506060890135612d588161355f565b9450608089013567ffffffffffffffff811115612d7457600080fd5b612d808b828c01612c72565b999c989b5096999598969760a08701359660c0013595509350505050565b600080600080600060808688031215612db657600080fd5b8535612dc18161354a565b9450602086013567ffffffffffffffff811115612ddd57600080fd5b612de988828901612c72565b9699909850959660408101359660609091013595509350505050565b60008060208385031215612e1857600080fd5b823567ffffffffffffffff811115612e2f57600080fd5b612e3b85828601612c27565b90969095509350505050565b60008060008060608587031215612e5d57600080fd5b843567ffffffffffffffff811115612e7457600080fd5b612e8087828801612c27565b9095509350506020850135612e948161354a565b91506040850135612ea48161354a565b939692955090935050565b60008060008060408587031215612ec557600080fd5b843567ffffffffffffffff80821115612edd57600080fd5b612ee988838901612c27565b90965094506020870135915080821115612f0257600080fd5b50612f0f87828801612c27565b95989497509550505050565b600060208284031215612f2d57600080fd5b8151612b428161355f565b600060208284031215612f4a57600080fd5b5035919050565b60008060408385031215612f6457600080fd5b823591506020830135612cff8161354a565b600080600060408486031215612f8b57600080fd5b83359250602084013567ffffffffffffffff811115612fa957600080fd5b612fb586828701612c27565b9497909650939450505050565b600060208284031215612fd457600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1981168114612b4257600080fd5b60006020828403121561301357600080fd5b813567ffffffffffffffff81111561302a57600080fd5b82016101808185031215612b4257600080fd5b60008060006040848603121561305257600080fd5b83359250602084013567ffffffffffffffff8082111561307157600080fd5b818601915086601f83011261308557600080fd5b81358181111561309457600080fd5b8760206060830285010111156130a957600080fd5b6020830194508093505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516130f4816017850160208801613442565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613131816028840160208801613442565b01602801949350505050565b60006020808301818452808554808352604092508286019150866000528360002060005b828110156131a0578154600160a060020a0390811685526001808401549091168786015260028301548686015260609094019360039092019101613161565b5091979650505050505050565b60208152600082518060208401526131cc816040850160208701613442565b601f01601f19169190910160400192915050565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b60208082526026908201527f6576656e744964206d757374206265203e3d206f6c646573744c6f636b65644560408201527f76656e7449640000000000000000000000000000000000000000000000000000606082015260800190565b6000602080835260608084018551604080858801528282518085526080890191508684019450600093505b808410156133705784518051600160a060020a03908116845288820151168884015283015183830152938601936001939093019290850190613333565b5094909701519590960194909452509392505050565b6000808335601e1984360301811261339d57600080fd5b83018035915067ffffffffffffffff8211156133b857600080fd5b6020908101925081023603821315612c6b57600080fd5b600082198211156133e2576133e26134a0565b500190565b6000826134075760e060020a634e487b7102600052601260045260246000fd5b500490565b6000816000190483118215151615613426576134266134a0565b500290565b60008282101561343d5761343d6134a0565b500390565b60005b8381101561345d578181015183820152602001613445565b83811115610a505750506000910152565b60008161347d5761347d6134a0565b506000190190565b6000600019821415613499576134996134a0565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fd5b81356134f68161354a565b8154600160a060020a031916600160a060020a03821617825550602082013561351e8161354a565b600182018054600160a060020a031916600160a060020a03831617905550604082013560028201555050565b600160a060020a0381168114610c8957600080fd5b8015158114610c8957600080fdfeb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887ea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a264697066735822122021ae13fe42025722238345005395f6989376a7128dd63e4ffce1ff036d69905464736f6c63430008060033", @@ -1237,7 +1237,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 6726, + "astId": 2748, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "signatureFeeCheckNumber", "offset": 0, @@ -1245,23 +1245,23 @@ "type": "t_uint256" }, { - "astId": 6730, + "astId": 2752, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "queue", "offset": 0, "slot": "202", - "type": "t_array(t_struct(Transfer)7932_storage)dyn_storage" + "type": "t_array(t_struct(Transfer)3954_storage)dyn_storage" }, { - "astId": 6735, + "astId": 2757, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "lockedTransfers", "offset": 0, "slot": "203", - "type": "t_mapping(t_uint256,t_struct(LockedTransfers)7949_storage)" + "type": "t_mapping(t_uint256,t_struct(LockedTransfers)3971_storage)" }, { - "astId": 6737, + "astId": 2759, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "oldestLockedEventId", "offset": 0, @@ -1269,7 +1269,7 @@ "type": "t_uint256" }, { - "astId": 6741, + "astId": 2763, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "tokenAddresses", "offset": 0, @@ -1277,7 +1277,7 @@ "type": "t_mapping(t_address,t_address)" }, { - "astId": 6743, + "astId": 2765, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "wrapperAddress", "offset": 0, @@ -1285,7 +1285,7 @@ "type": "t_address" }, { - "astId": 6745, + "astId": 2767, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "transferFeeRecipient", "offset": 0, @@ -1293,7 +1293,7 @@ "type": "t_address_payable" }, { - "astId": 6747, + "astId": 2769, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "bridgeFeeRecipient", "offset": 0, @@ -1301,7 +1301,7 @@ "type": "t_address_payable" }, { - "astId": 6749, + "astId": 2771, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "sideBridgeAddress", "offset": 0, @@ -1309,7 +1309,7 @@ "type": "t_address" }, { - "astId": 6751, + "astId": 2773, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "minSafetyBlocks", "offset": 0, @@ -1317,7 +1317,7 @@ "type": "t_uint256" }, { - "astId": 6753, + "astId": 2775, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "timeframeSeconds", "offset": 0, @@ -1325,7 +1325,7 @@ "type": "t_uint256" }, { - "astId": 6755, + "astId": 2777, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "lockTime", "offset": 0, @@ -1333,7 +1333,7 @@ "type": "t_uint256" }, { - "astId": 6757, + "astId": 2779, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "inputEventId", "offset": 0, @@ -1341,7 +1341,7 @@ "type": "t_uint256" }, { - "astId": 6759, + "astId": 2781, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "outputEventId", "offset": 0, @@ -1349,7 +1349,7 @@ "type": "t_uint256" }, { - "astId": 6761, + "astId": 2783, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "lastTimeframe", "offset": 0, @@ -1357,7 +1357,7 @@ "type": "t_uint256" }, { - "astId": 7922, + "astId": 3944, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "__gap", "offset": 0, @@ -1365,7 +1365,7 @@ "type": "t_array(t_uint256)15_storage" }, { - "astId": 6656, + "astId": 2678, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "___gap", "offset": 0, @@ -1384,8 +1384,8 @@ "label": "address payable", "numberOfBytes": "20" }, - "t_array(t_struct(Transfer)7932_storage)dyn_storage": { - "base": "t_struct(Transfer)7932_storage", + "t_array(t_struct(Transfer)3954_storage)dyn_storage": { + "base": "t_struct(Transfer)3954_storage", "encoding": "dynamic_array", "label": "struct CommonStructs.Transfer[]", "numberOfBytes": "32" @@ -1439,27 +1439,27 @@ "numberOfBytes": "32", "value": "t_struct(RoleData)43_storage" }, - "t_mapping(t_uint256,t_struct(LockedTransfers)7949_storage)": { + "t_mapping(t_uint256,t_struct(LockedTransfers)3971_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct CommonStructs.LockedTransfers)", "numberOfBytes": "32", - "value": "t_struct(LockedTransfers)7949_storage" + "value": "t_struct(LockedTransfers)3971_storage" }, - "t_struct(LockedTransfers)7949_storage": { + "t_struct(LockedTransfers)3971_storage": { "encoding": "inplace", "label": "struct CommonStructs.LockedTransfers", "members": [ { - "astId": 7946, + "astId": 3968, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "transfers", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Transfer)7932_storage)dyn_storage" + "type": "t_array(t_struct(Transfer)3954_storage)dyn_storage" }, { - "astId": 7948, + "astId": 3970, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "endTimestamp", "offset": 0, @@ -1492,12 +1492,12 @@ ], "numberOfBytes": "64" }, - "t_struct(Transfer)7932_storage": { + "t_struct(Transfer)3954_storage": { "encoding": "inplace", "label": "struct CommonStructs.Transfer", "members": [ { - "astId": 7927, + "astId": 3949, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "tokenAddress", "offset": 0, @@ -1505,7 +1505,7 @@ "type": "t_address" }, { - "astId": 7929, + "astId": 3951, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "toAddress", "offset": 0, @@ -1513,7 +1513,7 @@ "type": "t_address" }, { - "astId": 7931, + "astId": 3953, "contract": "contracts/networks/ETH_EthBridge.sol:ETH_EthBridge", "label": "amount", "offset": 0, diff --git a/contracts/deployments/test/eth/ETH_EthBridge_Proxy.json b/contracts/deployments/test/eth/ETH_EthBridge_Proxy.json index 98163c68..3e1c6f92 100644 --- a/contracts/deployments/test/eth/ETH_EthBridge_Proxy.json +++ b/contracts/deployments/test/eth/ETH_EthBridge_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "abi": [ { "inputs": [ @@ -615,80 +615,80 @@ "type": "receive" } ], - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", - "transactionIndex": 0, - "gasUsed": "2474083", - "logsBloom": "0x00000004000000040000002000040000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000002000000000020000000000000001000000000000004020000000000000000000800000000000000000800000000000000000000002000000000000000000000004000000000000000020000000800000000000020000002000000041000000000000000000000000000001000000000000000000020400000000000000000000000000000000000000100000000000020000000000000000000000000000010800000000000800000000000000000000000", - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a", - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", + "contractAddress": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", + "transactionIndex": 14, + "gasUsed": "2471543", + "logsBloom": "0x000004040000000400000020000800004000000000000000000080000000000000000000800000000008000000000000000000000000000000000000000000000000000000000000000000000000020000000000200200000000000010000000000000140200000000000000000008000000000000000008000000000000000000000020000000000000000000000040000000000000000200000008000000000000200000000000000c1000000000000000000000000000001000000000000000000020400000000000000000000000000000000000000100000000000020000000000000000000000000000000000000000000800000000000000000000000", + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418", + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", "logs": [ { - "transactionIndex": 0, - "blockNumber": 2072667, - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "transactionIndex": 14, + "blockNumber": 3187002, + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000f4b5713cac918c9755b8aff2eb5ae14c5991b7b5" + "0x00000000000000000000000028c790c357e59c1ff13c1845499b15edbe8621e1" ], "data": "0x", "logIndex": 0, - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a" + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418" }, { - "transactionIndex": 0, - "blockNumber": 2072667, - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "transactionIndex": 14, + "blockNumber": 3187002, + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x000000000000000000000000fce5b5ca100e58e5635b15b79f0163be4cbd258b", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 1, - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a" + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418" }, { - "transactionIndex": 0, - "blockNumber": 2072667, - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "transactionIndex": 14, + "blockNumber": 3187002, + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", + "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 2, - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a" + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418" }, { - "transactionIndex": 0, - "blockNumber": 2072667, - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "transactionIndex": 14, + "blockNumber": 3187002, + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775", + "0x077a1d526a4ce8a773632ab13b4fbbf1fcc954c3dab26cd27ea0e2a6750da5d7", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", "logIndex": 3, - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a" + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418" }, { - "transactionIndex": 0, - "blockNumber": 2072667, - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "transactionIndex": 14, + "blockNumber": 3187002, + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0xb7f2fcb7a10916921b74b9baa8ea85f89b12ab12f6ededa160998f8b20e65f95", @@ -697,13 +697,13 @@ ], "data": "0x", "logIndex": 4, - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a" + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418" }, { - "transactionIndex": 0, - "blockNumber": 2072667, - "transactionHash": "0x9722724764b1c50add501f80100b2ad36f3fd0aafbac65c4126cd4383d1c715d", - "address": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "transactionIndex": 14, + "blockNumber": 3187002, + "transactionHash": "0x128f50d6e49bb0c46e4864afdc59d378f34b55f21e27cc980f9cd19b503a6f0c", + "address": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x516d5e7ed3e60a6b2804c1554cd94bc2eb576e44b192a0e069d4c527589a887e", @@ -712,24 +712,24 @@ ], "data": "0x", "logIndex": 5, - "blockHash": "0xd5f0f510b42575b7696515f092f7eab68d798c47a96611ef066cf76b0338334a" + "blockHash": "0x5d29349cca0679bbc9920c8a982ce1121eeab303e5bc56082f4a2d5b292d5418" } ], - "blockNumber": 2072667, - "cumulativeGasUsed": "2474083", + "blockNumber": 3187002, + "cumulativeGasUsed": "2765543", "status": 1, "byzantium": true }, "args": [ - "0xf4B5713CaC918C9755B8aFF2EB5ae14c5991b7B5", - "0x7836869800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000300000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000cdea3ecb85d0f386ea5d498d39c9c127380f254a000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d67a7ce611c1b33a549712c0fcbfe8436a917b7100000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fc277855999cf6452f9027bbdc1b56264a736e3a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d67a7ce611c1b33a549712c0fcbfe8436a917b710000000000000000000000001d335e8b7787fb6c51f98713df5bcb56884fd0230000000000000000000000000000000000000000000000000000000000000004000000000000000000000000da9bb33f9e3334781f3e4fce310288d7db3ed29a000000000000000000000000fc277855999cf6452f9027bbdc1b56264a736e3a000000000000000000000000075de66d19ca867387c75c880cffddba9a3e976300000000000000000000000056a79d39fc414ff11ebb30d6a5367ea5da8c6fe90000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e", + "0x28c790c357E59C1fF13C1845499B15EDbE8621e1", + "0x5a5f55bf0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000b08cfc95eea0f1d9bb79002d23fa204b8836a536000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000000000000000000000000000000000000000000180000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e0000000000000000000000005ecfead3d77f6814d189f6209ea27ecd1c00d45a00000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e00000000000000000000000000000000000000000000000000000000000000040000000000000000000000009ba7ef7e1c6c5ef4fe7e2a32d4527497d6b12ff20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b841c5707da4b43ed915b707158010bd2faf3b4600000000000000000000000005875578a63c7e26245c7cba3cf460ff6a613c6b00000000000000000000000000000000000000000000000000000000000000040000000000000000000000007cee2ae3042d2c646aa24facfa92dfee589046f00000000000000000000000009ba7ef7e1c6c5ef4fe7e2a32d4527497d6b12ff2000000000000000000000000952b98dbda3319bf0e339cc9cc574ff768f80f3c0000000000000000000000001bb13b68dba3571415b4092802777b5ca15de897", [ "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E" ], 1 ], "numDeployments": 1, - "solcInputHash": "63b1c355e88e8fd19ebe2cd692a8475b", + "solcInputHash": "54d2ddebdc6c37a1b4fd5c90d287707b", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Confirmation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Execution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"ExecutionFailure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerAddition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnerRemoval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"required\",\"type\":\"uint256\"}],\"name\":\"RequirementChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Revocation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"Submission\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"MAX_OWNER_COUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"_upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_required\",\"type\":\"uint256\"}],\"name\":\"changeRequirement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"confirmTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"confirmations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmationCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmations\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"_confirmations\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"to\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"pending\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_transactionIds\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"isConfirmed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"owners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"replaceOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"required\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"revokeConfirmation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"submitTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addOwner(address)\":{\"details\":\"Allows to add a new owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of new owner.\"}},\"changeRequirement(uint256)\":{\"details\":\"Allows to change the number of required confirmations. Transaction has to be sent by wallet.\",\"params\":{\"_required\":\"Number of required confirmations.\"}},\"confirmTransaction(uint256)\":{\"details\":\"Allows an owner to confirm a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"executeTransaction(uint256)\":{\"details\":\"Allows anyone to execute a confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"getConfirmationCount(uint256)\":{\"details\":\"Returns number of confirmations of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"count\":\"Number of confirmations.\"}},\"getConfirmations(uint256)\":{\"details\":\"Returns array with owner addresses, which confirmed transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_confirmations\":\"Returns array of owner addresses.\"}},\"getOwners()\":{\"details\":\"Returns list of owners.\",\"returns\":{\"_0\":\"List of owner addresses.\"}},\"getTransactionCount(bool,bool)\":{\"details\":\"Returns total number of transactions after filers are applied.\",\"params\":{\"executed\":\"Include executed transactions.\",\"pending\":\"Include pending transactions.\"},\"returns\":{\"count\":\"Total number of transactions after filters are applied.\"}},\"getTransactionIds(uint256,uint256,bool,bool)\":{\"details\":\"Returns list of transaction IDs in defined range.\",\"params\":{\"executed\":\"Include executed transactions.\",\"from\":\"Index start position of transaction array.\",\"pending\":\"Include pending transactions.\",\"to\":\"Index end position of transaction array.\"},\"returns\":{\"_transactionIds\":\"Returns array of transaction IDs.\"}},\"isConfirmed(uint256)\":{\"details\":\"Returns the confirmation status of a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"},\"returns\":{\"_0\":\"Confirmation status.\"}},\"removeOwner(address)\":{\"details\":\"Allows to remove an owner. Transaction has to be sent by wallet.\",\"params\":{\"owner\":\"Address of owner.\"}},\"replaceOwner(address,address)\":{\"details\":\"Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\",\"params\":{\"newOwner\":\"Address of new owner.\",\"owner\":\"Address of owner to be replaced.\"}},\"revokeConfirmation(uint256)\":{\"details\":\"Allows an owner to revoke a confirmation for a transaction.\",\"params\":{\"transactionId\":\"Transaction ID.\"}},\"submitTransaction(address,uint256,bytes)\":{\"details\":\"Allows an owner to submit and confirm a transaction.\",\"params\":{\"data\":\"Transaction data payload.\",\"destination\":\"Transaction target address.\",\"value\":\"Transaction ether value.\"},\"returns\":{\"transactionId\":\"Returns transaction ID.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/utils/Proxy.sol\":\"ProxyMultiSig\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x8ddea9f930f26e588ea606f44c90d2623560c908e38614a03a4ca78aea8f9202\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \\\"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(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) 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 require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5d15d280d1f868f59a8264dc73f7ea8c51f10d78aac864b2f2ad29412d187ff5\",\"license\":\"MIT\"},\"contracts/utils/MultiSigWallet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\n\\ncontract MultiSigWallet {\\n\\n /*\\n * Events\\n */\\n event Confirmation(address indexed sender, uint indexed transactionId);\\n event Revocation(address indexed sender, uint indexed transactionId);\\n event Submission(uint indexed transactionId);\\n event Execution(uint indexed transactionId);\\n event ExecutionFailure(uint indexed transactionId);\\n event OwnerAddition(address indexed owner);\\n event OwnerRemoval(address indexed owner);\\n event RequirementChange(uint required);\\n\\n /*\\n * Constants\\n */\\n uint constant public MAX_OWNER_COUNT = 50;\\n\\n /*\\n * Storage\\n */\\n mapping(uint => Transaction) public transactions;\\n mapping(uint => mapping(address => bool)) public confirmations;\\n mapping(address => bool) public isOwner;\\n address[] public owners;\\n uint public required;\\n uint public transactionCount;\\n\\n struct Transaction {\\n address destination;\\n uint value;\\n bytes data;\\n bool executed;\\n }\\n\\n /*\\n * Modifiers\\n */\\n modifier onlyWallet() {\\n require(msg.sender == address(this));\\n _;\\n }\\n\\n modifier ownerDoesNotExist(address owner) {\\n require(!isOwner[owner]);\\n _;\\n }\\n\\n modifier ownerExists(address owner) {\\n require(isOwner[owner]);\\n _;\\n }\\n\\n modifier transactionExists(uint transactionId) {\\n require(transactions[transactionId].destination != address(0));\\n _;\\n }\\n\\n modifier confirmed(uint transactionId, address owner) {\\n require(confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notConfirmed(uint transactionId, address owner) {\\n require(!confirmations[transactionId][owner]);\\n _;\\n }\\n\\n modifier notExecuted(uint transactionId) {\\n require(!transactions[transactionId].executed);\\n _;\\n }\\n\\n modifier notNull(address _address) {\\n require(_address != address(0));\\n _;\\n }\\n\\n modifier validRequirement(uint ownerCount, uint _required) {\\n require(ownerCount <= MAX_OWNER_COUNT\\n && _required <= ownerCount\\n && _required != 0\\n && ownerCount != 0);\\n _;\\n }\\n\\n /*\\n * Public functions\\n */\\n /// @dev Contract constructor sets initial owners and required number of confirmations.\\n /// @param _owners List of initial owners.\\n /// @param _required Number of required confirmations.\\n constructor(address[] memory _owners, uint _required)\\n validRequirement(_owners.length, _required)\\n {\\n for (uint i = 0; i < _owners.length; i++) {\\n require(!isOwner[_owners[i]] && _owners[i] != address(0));\\n isOwner[_owners[i]] = true;\\n }\\n owners = _owners;\\n required = _required;\\n }\\n\\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of new owner.\\n function addOwner(address owner)\\n public\\n onlyWallet\\n ownerDoesNotExist(owner)\\n notNull(owner)\\n validRequirement(owners.length + 1, required)\\n {\\n isOwner[owner] = true;\\n owners.push(owner);\\n emit OwnerAddition(owner);\\n }\\n\\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner.\\n function removeOwner(address owner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n {\\n isOwner[owner] = false;\\n for (uint i = 0; i < owners.length - 1; i++)\\n if (owners[i] == owner) {\\n owners[i] = owners[owners.length - 1];\\n break;\\n }\\n owners.pop();\\n if (required > owners.length)\\n changeRequirement(owners.length);\\n emit OwnerRemoval(owner);\\n }\\n\\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\\n /// @param owner Address of owner to be replaced.\\n /// @param newOwner Address of new owner.\\n function replaceOwner(address owner, address newOwner)\\n public\\n onlyWallet\\n ownerExists(owner)\\n ownerDoesNotExist(newOwner)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (owners[i] == owner) {\\n owners[i] = newOwner;\\n break;\\n }\\n isOwner[owner] = false;\\n isOwner[newOwner] = true;\\n emit OwnerRemoval(owner);\\n emit OwnerAddition(newOwner);\\n }\\n\\n /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\\n /// @param _required Number of required confirmations.\\n function changeRequirement(uint _required)\\n public\\n onlyWallet\\n validRequirement(owners.length, _required)\\n {\\n required = _required;\\n emit RequirementChange(_required);\\n }\\n\\n /// @dev Allows an owner to submit and confirm a transaction.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function submitTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) public returns (uint transactionId)\\n {\\n transactionId = addTransaction(destination, value, data);\\n confirmTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to confirm a transaction.\\n /// @param transactionId Transaction ID.\\n function confirmTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n transactionExists(transactionId)\\n notConfirmed(transactionId, msg.sender)\\n {\\n confirmations[transactionId][msg.sender] = true;\\n emit Confirmation(msg.sender, transactionId);\\n executeTransaction(transactionId);\\n }\\n\\n /// @dev Allows an owner to revoke a confirmation for a transaction.\\n /// @param transactionId Transaction ID.\\n function revokeConfirmation(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n confirmations[transactionId][msg.sender] = false;\\n emit Revocation(msg.sender, transactionId);\\n }\\n\\n /// @dev Allows anyone to execute a confirmed transaction.\\n /// @param transactionId Transaction ID.\\n function executeTransaction(uint transactionId)\\n public\\n ownerExists(msg.sender)\\n confirmed(transactionId, msg.sender)\\n notExecuted(transactionId)\\n {\\n if (isConfirmed(transactionId)) {\\n Transaction storage txn = transactions[transactionId];\\n txn.executed = true;\\n if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\\n emit Execution(transactionId);\\n else {\\n emit ExecutionFailure(transactionId);\\n txn.executed = false;\\n }\\n }\\n }\\n\\n // call has been separated into its own function in order to take advantage\\n // of the Solidity's code generator to produce a loop that copies tx.data into memory.\\n function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) {\\n bool result;\\n assembly {\\n let x := mload(0x40) // \\\"Allocate\\\" memory for output (0x40 is where \\\"free memory\\\" pointer is stored by convention)\\n let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\\n result := call(\\n sub(gas(), 36810), // 34710 is the value that solidity is currently emitting // todo\\n // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\\n // callNewAccountGas (25000, in case the destination address does not exist and needs creating) +\\n // gasSLoadEIP2929 (2100)\\n\\n destination,\\n value,\\n d,\\n dataLength, // Size of the input (in bytes) - this is what fixes the padding problem\\n x,\\n 0 // Output is ignored, therefore the output size is zero\\n )\\n }\\n return result;\\n }\\n\\n /// @dev Returns the confirmation status of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return Confirmation status.\\n function isConfirmed(uint transactionId) public view returns (bool)\\n {\\n uint count = 0;\\n for (uint i = 0; i < owners.length; i++) {\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n if (count == required)\\n return true;\\n }\\n return false;\\n }\\n\\n /*\\n * Internal functions\\n */\\n /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\\n /// @param destination Transaction target address.\\n /// @param value Transaction ether value.\\n /// @param data Transaction data payload.\\n /// @return transactionId Returns transaction ID.\\n function addTransaction(\\n address destination,\\n uint value,\\n bytes memory data\\n ) internal\\n notNull(destination) returns (uint transactionId)\\n {\\n transactionId = transactionCount;\\n transactions[transactionId] = Transaction({\\n destination : destination,\\n value : value,\\n data : data,\\n executed : false\\n });\\n transactionCount += 1;\\n emit Submission(transactionId);\\n }\\n\\n /*\\n * Web3 call functions\\n */\\n /// @dev Returns number of confirmations of a transaction.\\n /// @param transactionId Transaction ID.\\n /// @return count Number of confirmations.\\n function getConfirmationCount(uint transactionId)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]])\\n count += 1;\\n }\\n\\n /// @dev Returns total number of transactions after filers are applied.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return count Total number of transactions after filters are applied.\\n function getTransactionCount(bool pending, bool executed)\\n public\\n view\\n returns (uint count)\\n {\\n for (uint i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n count += 1;\\n }\\n\\n /// @dev Returns list of owners.\\n /// @return List of owner addresses.\\n function getOwners() public view returns (address[] memory)\\n {\\n return owners;\\n }\\n\\n /// @dev Returns array with owner addresses, which confirmed transaction.\\n /// @param transactionId Transaction ID.\\n /// @return _confirmations Returns array of owner addresses.\\n function getConfirmations(uint transactionId) public view\\n returns (address[] memory _confirmations)\\n {\\n address[] memory confirmationsTemp = new address[](owners.length);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < owners.length; i++)\\n if (confirmations[transactionId][owners[i]]) {\\n confirmationsTemp[count] = owners[i];\\n count += 1;\\n }\\n _confirmations = new address[](count);\\n for (i = 0; i < count; i++)\\n _confirmations[i] = confirmationsTemp[i];\\n }\\n\\n /// @dev Returns list of transaction IDs in defined range.\\n /// @param from Index start position of transaction array.\\n /// @param to Index end position of transaction array.\\n /// @param pending Include pending transactions.\\n /// @param executed Include executed transactions.\\n /// @return _transactionIds Returns array of transaction IDs.\\n function getTransactionIds(uint from, uint to, bool pending, bool executed)\\n public\\n view\\n returns (uint[] memory _transactionIds)\\n {\\n uint[] memory transactionIdsTemp = new uint[](transactionCount);\\n uint count = 0;\\n uint i;\\n for (i = 0; i < transactionCount; i++)\\n if (pending && !transactions[i].executed\\n || executed && transactions[i].executed)\\n {\\n transactionIdsTemp[count] = i;\\n count += 1;\\n }\\n _transactionIds = new uint[](to - from);\\n for (i = from; i < to; i++)\\n _transactionIds[i - from] = transactionIdsTemp[i];\\n }\\n}\\n\",\"keccak256\":\"0x1630487b4e9acd29e4c4ea04eff94b838660e39d009c0668c5213c209fb2f883\",\"license\":\"MIT\"},\"contracts/utils/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/proxy/Proxy.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport \\\"./MultiSigWallet.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\n\\ncontract ProxyMultiSig is Proxy, MultiSigWallet {\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n bytes32 private constant ADMIN_STORAGE_LOCATION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n bytes4 private constant _UPGRADE_TO_AND_CALL_SIGNATURE = bytes4(keccak256(\\\"_upgradeToAndCall(address,bytes)\\\"));\\n\\n event Upgraded(address indexed implementation);\\n\\n\\n constructor(\\n address _logic,\\n bytes memory _data,\\n address[] memory owners,\\n uint _required\\n\\n ) MultiSigWallet(owners, _required) {\\n // Cannot use _upgradeToAndCall because of onlyWallet modifier\\n _upgradeTo(_logic);\\n if (_data.length > 0) {\\n Address.functionDelegateCall(_logic, _data);\\n }\\n\\n StorageSlot.getAddressSlot(ADMIN_STORAGE_LOCATION).value = msg.sender; // trick the hardhat-deploy\\n }\\n\\n\\n function implementation() external view returns (address) {\\n return _implementation();\\n }\\n\\n function upgradeTo(address newImplementation) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, bytes(\\\"\\\"))\\n );\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ownerExists(msg.sender) {\\n submitTransaction(\\n address(this),\\n msg.value,\\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, data)\\n );\\n }\\n\\n function _upgradeToAndCall(address newImplementation, bytes memory data) external onlyWallet payable {\\n _upgradeTo(newImplementation);\\n if (data.length > 0) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n function _upgradeTo(address newImplementation) internal {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n emit Upgraded(newImplementation);\\n }\\n\\n function _implementation() internal view override returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n}\\n\",\"keccak256\":\"0x9e2738f9167ae4a747ac4e8622c443ad735a257630293dee633535dae02863d5\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200285f3803806200285f833981016040819052620000349162000645565b8181815181603282111580156200004b5750818111155b80156200005757508015155b80156200006357508115155b6200006d57600080fd5b60005b845181101562000163576002600086838151811062000093576200009362000821565b602090810291909101810151600160a060020a031682528101919091526040016000205460ff16158015620000f757506000600160a060020a0316858281518110620000e357620000e362000821565b6020026020010151600160a060020a031614155b6200010157600080fd5b6001600260008784815181106200011c576200011c62000821565b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055806200015a81620007de565b91505062000070565b5083516200017990600390602087019062000511565b5050506004555062000194846401000000006200021b810204565b825115620001b857620001b68484640100000000620015686200034a82021704565b505b33620001f27fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a0392909216919091179055506200087f92505050565b6200023481640100000000620015906200038582021704565b620002c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b80620003007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6401000000006200158d6200038282021704565b8054600160a060020a031916600160a060020a03928316179055604051908216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200037b838360405180606001604052806027815260200162002838602791396401000000006200038b810204565b9392505050565b90565b3b151590565b6060620003a18464010000000062000385810204565b6200042f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401620002bd565b60008085600160a060020a0316856040516200044c919062000725565b600060405180830381855af49150503d806000811462000489576040519150601f19603f3d011682016040523d82523d6000602084013e6200048e565b606091505b5091509150620004af828286620004b9640100000000026401000000009004565b9695505050505050565b60608315620004ca5750816200037b565b825115620004db5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002bd919062000743565b82805482825590600052602060002090810192821562000569579160200282015b82811115620005695782518254600160a060020a031916600160a060020a0390911617825560209092019160019091019062000532565b50620005779291506200057b565b5090565b5b808211156200057757600081556001016200057c565b8051600160a060020a0381168114620005aa57600080fd5b919050565b600082601f830112620005c157600080fd5b815160206001604060020a03821115620005df57620005df62000850565b808202620005ef82820162000778565b8381528281019086840183880185018910156200060b57600080fd5b600093505b858410156200063957620006248162000592565b83526001939093019291840191840162000610565b50979650505050505050565b600080600080608085870312156200065c57600080fd5b620006678562000592565b935060208501516001604060020a03808211156200068457600080fd5b818701915087601f8301126200069957600080fd5b815181811115620006ae57620006ae62000850565b620006c3601f8201601f191660200162000778565b818152896020838601011115620006d957600080fd5b620006ec826020830160208701620007ab565b6040890151909650925050808211156200070557600080fd5b506200071487828801620005af565b606096909601519497939650505050565b6000825162000739818460208701620007ab565b9190910192915050565b602081526000825180602084015262000764816040850160208701620007ab565b601f01601f19169190910160400192915050565b604051601f8201601f191681016001604060020a0381118282101715620007a357620007a362000850565b604052919050565b60005b83811015620007c8578181015183820152602001620007ae565b83811115620007d8576000848401525b50505050565b60006000198214156200081a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611fa9806200088f6000396000f3fe608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x608060405260043610610187576000357c0100000000000000000000000000000000000000000000000000000000900480639ace38c2116100ee578063ba885381116100a7578063d74f8edd11610081578063d74f8edd14610487578063dc8452cd1461049c578063e20056e6146104b2578063ee22610b146104d257610196565b8063ba88538114610434578063c01a8c8414610447578063c64274741461046757610196565b80639ace38c21461035f578063a0e67e2b1461038f578063a8abe69a146103b1578063b5dc40c3146103de578063b77bf600146103fe578063ba51a6df1461041457610196565b80634f1ef286116101405780634f1ef286146102a957806354741525146102bc5780635c60da1b146102ea5780637065cb48146102ff578063784547a71461031f5780638b51d13f1461033f57610196565b8063025e7c271461019e578063173825d9146101db57806320ea8d86146101fb5780632f54bf6e1461021b5780633411c81c1461025b5780633659cfe61461029657610196565b36610196576101946104f2565b005b6101946104f2565b3480156101aa57600080fd5b506101be6101b9366004611c30565b61052d565b604051600160a060020a0390911681526020015b60405180910390f35b3480156101e757600080fd5b506101946101f6366004611a90565b610557565b34801561020757600080fd5b50610194610216366004611c30565b61071b565b34801561022757600080fd5b5061024b610236366004611a90565b60026020526000908152604090205460ff1681565b60405190151581526020016101d2565b34801561026757600080fd5b5061024b610276366004611c49565b600160209081526000928352604080842090915290825290205460ff1681565b6101946102a4366004611a90565b6107d1565b6101946102b7366004611ade565b61089e565b3480156102c857600080fd5b506102dc6102d7366004611c06565b6108fc565b6040519081526020016101d2565b3480156102f657600080fd5b506101be610979565b34801561030b57600080fd5b5061019461031a366004611a90565b6109b1565b34801561032b57600080fd5b5061024b61033a366004611c30565b610ad7565b34801561034b57600080fd5b506102dc61035a366004611c30565b610b76565b34801561036b57600080fd5b5061037f61037a366004611c30565b610bfc565b6040516101d29493929190611d63565b34801561039b57600080fd5b506103a4610cba565b6040516101d29190611d9e565b3480156103bd57600080fd5b506103d16103cc366004611c6c565b610d1c565b6040516101d29190611deb565b3480156103ea57600080fd5b506103a46103f9366004611c30565b610eb4565b34801561040a57600080fd5b506102dc60055481565b34801561042057600080fd5b5061019461042f366004611c30565b61108c565b610194610442366004611b61565b611109565b34801561045357600080fd5b50610194610462366004611c30565b611133565b34801561047357600080fd5b506102dc610482366004611baf565b6111f3565b34801561049357600080fd5b506102dc603281565b3480156104a857600080fd5b506102dc60045481565b3480156104be57600080fd5b506101946104cd366004611aab565b611212565b3480156104de57600080fd5b506101946104ed366004611c30565b6113a5565b61052b6105267f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b611596565b565b6003818154811061053d57600080fd5b600091825260209091200154600160a060020a0316905081565b33301461056357600080fd5b600160a060020a038116600090815260026020526040902054819060ff1661058a57600080fd5b600160a060020a0382166000908152600260205260408120805460ff191690555b6003546105ba90600190611e4e565b81101561068a5782600160a060020a0316600382815481106105de576105de611f1a565b600091825260209091200154600160a060020a03161415610678576003805461060990600190611e4e565b8154811061061957610619611f1a565b60009182526020909120015460038054600160a060020a03909216918390811061064557610645611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061068a565b8061068281611ecd565b9150506105ab565b50600380548061069c5761069c611f01565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905560035460045411156106e3576003546106e39061108c565b604051600160a060020a038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661073757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1661076157600080fd5b600084815260208190526040902060030154849060ff161561078257600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b3360008181526002602052604090205460ff166107ed57600080fd5b61089930347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc908560405180602001604052806000815250604051602401610835929190611d39565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111f3565b505050565b3360008181526002602052604090205460ff166108ba57600080fd5b6108f530347fba885381e9e37cc12b642007ef2e8679381eb527b676e6a3d428e0378e8cbc9087878760405160240161083593929190611cfa565b5050505050565b6000805b60055481101561097257838015610929575060008181526020819052604090206003015460ff16155b8061094d575082801561094d575060008181526020819052604090206003015460ff165b156109605761095d600183611e36565b91505b8061096a81611ecd565b915050610900565b5092915050565b60006109ac7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600160a060020a031690565b905090565b3330146109bd57600080fd5b600160a060020a038116600090815260026020526040902054819060ff16156109e557600080fd5b81600160a060020a0381166109f957600080fd5b600354610a07906001611e36565b60045460328211158015610a1b5750818111155b8015610a2657508015155b8015610a3157508115155b610a3a57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610b6c5760008481526001602052604081206003805491929184908110610b0b57610b0b611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610b4657610b43600183611e36565b91505b600454821415610b5a575060019392505050565b80610b6481611ecd565b915050610adc565b5060009392505050565b6000805b600354811015610bf65760008381526001602052604081206003805491929184908110610ba957610ba9611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610be457610be1600183611e36565b91505b80610bee81611ecd565b915050610b7a565b50919050565b600060208190529081526040902080546001820154600283018054600160a060020a03909316939192610c2e90611e95565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90611e95565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610d1257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610cf4575b5050505050905090565b6060600060055467ffffffffffffffff811115610d3b57610d3b611f33565b604051908082528060200260200182016040528015610d64578160200160208202803683370190505b5090506000805b600554811015610dfb57858015610d94575060008181526020819052604090206003015460ff16155b80610db85750848015610db8575060008181526020819052604090206003015460ff165b15610de95780838381518110610dd057610dd0611f1a565b6020908102919091010152610de6600183611e36565b91505b80610df381611ecd565b915050610d6b565b610e058888611e4e565b67ffffffffffffffff811115610e1d57610e1d611f33565b604051908082528060200260200182016040528015610e46578160200160208202803683370190505b5093508790505b86811015610ea957828181518110610e6757610e67611f1a565b6020026020010151848983610e7c9190611e4e565b81518110610e8c57610e8c611f1a565b602090810291909101015280610ea181611ecd565b915050610e4d565b505050949350505050565b60035460609060009067ffffffffffffffff811115610ed557610ed5611f33565b604051908082528060200260200182016040528015610efe578160200160208202803683370190505b5090506000805b600354811015610fdc5760008581526001602052604081206003805491929184908110610f3457610f34611f1a565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610fca5760038181548110610f7457610f74611f1a565b9060005260206000200160009054906101000a9004600160a060020a0316838381518110610fa457610fa4611f1a565b600160a060020a0390921660209283029190910190910152610fc7600183611e36565b91505b80610fd481611ecd565b915050610f05565b8167ffffffffffffffff811115610ff557610ff5611f33565b60405190808252806020026020018201604052801561101e578160200160208202803683370190505b509350600090505b818110156110845782818151811061104057611040611f1a565b602002602001015184828151811061105a5761105a611f1a565b600160a060020a03909216602092830291909101909101528061107c81611ecd565b915050611026565b505050919050565b33301461109857600080fd5b60035481603282118015906110ad5750818111155b80156110b857508015155b80156110c357508115155b6110cc57600080fd5b60048390556040518381527fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9060200160405180910390a1505050565b33301461111557600080fd5b61111e826115ba565b80511561112f576108998282611568565b5050565b3360008181526002602052604090205460ff1661114f57600080fd5b6000828152602081905260409020548290600160a060020a031661117257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561119d57600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36108f5856113a5565b60006112008484846116c3565b905061120b81611133565b9392505050565b33301461121e57600080fd5b600160a060020a038216600090815260026020526040902054829060ff1661124557600080fd5b600160a060020a038216600090815260026020526040902054829060ff161561126d57600080fd5b60005b60035481101561130b5784600160a060020a03166003828154811061129757611297611f1a565b600091825260209091200154600160a060020a031614156112f95783600382815481106112c6576112c6611f1a565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555061130b565b8061130381611ecd565b915050611270565b50600160a060020a03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b3360008181526002602052604090205460ff166113c157600080fd5b60008281526001602090815260408083203380855292529091205483919060ff166113eb57600080fd5b600084815260208190526040902060030154849060ff161561140c57600080fd5b61141585610ad7565b156108f557600085815260208190526040902060038101805460ff191660019081179091558154908201546002830180546114f393600160a060020a031692919061145f90611e95565b905084600201805461147090611e95565b80601f016020809104026020016040519081016040528092919081815260200182805461149c90611e95565b80156114e95780601f106114be576101008083540402835291602001916114e9565b820191906000526020600020905b8154815290600101906020018083116114cc57829003601f168201915b50505050506117c3565b156115285760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611560565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038101805460ff191690555b505050505050565b606061120b8383604051806060016040528060278152602001611f4d602791396117e6565b90565b3b151590565b3660008037600080366000845af43d6000803e8080156115b5573d6000f35b3d6000fd5b803b61164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600083600160a060020a0381166116d957600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261175992600285019291019061193e565b50606091909101516003909101805460ff1916911515919091179055600580546001919060009061178b908490611e36565b909155505060405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c618fca5a03f198975050505050505050565b6060833b611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401611644565b60008085600160a060020a0316856040516118919190611cde565b600060405180830381855af49150503d80600081146118cc576040519150601f19603f3d011682016040523d82523d6000602084013e6118d1565b606091505b50915091506118e18282866118eb565b9695505050505050565b606083156118fa57508161120b565b82511561190a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449190611e23565b82805461194a90611e95565b90600052602060002090601f01602090048101928261196c57600085556119b2565b82601f1061198557805160ff19168380011785556119b2565b828001600101855582156119b2579182015b828111156119b2578251825591602001919060010190611997565b506119be9291506119c2565b5090565b5b808211156119be57600081556001016119c3565b8035600160a060020a03811681146119ee57600080fd5b919050565b803580151581146119ee57600080fd5b600082601f830112611a1457600080fd5b813567ffffffffffffffff80821115611a2f57611a2f611f33565b604051601f8301601f19908116603f01168101908282118183101715611a5757611a57611f33565b81604052838152866020858801011115611a7057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611aa257600080fd5b61120b826119d7565b60008060408385031215611abe57600080fd5b611ac7836119d7565b9150611ad5602084016119d7565b90509250929050565b600080600060408486031215611af357600080fd5b611afc846119d7565b9250602084013567ffffffffffffffff80821115611b1957600080fd5b818601915086601f830112611b2d57600080fd5b813581811115611b3c57600080fd5b876020828501011115611b4e57600080fd5b6020830194508093505050509250925092565b60008060408385031215611b7457600080fd5b611b7d836119d7565b9150602083013567ffffffffffffffff811115611b9957600080fd5b611ba585828601611a03565b9150509250929050565b600080600060608486031215611bc457600080fd5b611bcd846119d7565b925060208401359150604084013567ffffffffffffffff811115611bf057600080fd5b611bfc86828701611a03565b9150509250925092565b60008060408385031215611c1957600080fd5b611c22836119f3565b9150611ad5602084016119f3565b600060208284031215611c4257600080fd5b5035919050565b60008060408385031215611c5c57600080fd5b82359150611ad5602084016119d7565b60008060008060808587031215611c8257600080fd5b8435935060208501359250611c99604086016119f3565b9150611ca7606086016119f3565b905092959194509250565b60008151808452611cca816020860160208601611e65565b601f01601f19169290920160200192915050565b60008251611cf0818460208701611e65565b9190910192915050565b600160a060020a038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600160a060020a0383168152604060208201526000611d5b6040830184611cb2565b949350505050565b600160a060020a0385168152836020820152608060408201526000611d8b6080830185611cb2565b9050821515606083015295945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf578351600160a060020a031683529284019291840191600101611dba565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611ddf57835183529284019291840191600101611e07565b60208152600061120b6020830184611cb2565b60008219821115611e4957611e49611ee8565b500190565b600082821015611e6057611e60611ee8565b500390565b60005b83811015611e80578181015183820152602001611e68565b83811115611e8f576000848401525b50505050565b600281046001821680611ea957607f821691505b60208210811415610bf65760e060020a634e487b7102600052602260045260246000fd5b6000600019821415611ee157611ee1611ee8565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220558728c0a320f4caa2d0ad93c90eb723e3aaa33a04102dd7eef27686a8aa796864736f6c63430008060033", @@ -856,15 +856,15 @@ "storageLayout": { "storage": [ { - "astId": 9567, + "astId": 454, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "transactions", "offset": 0, "slot": "0", - "type": "t_mapping(t_uint256,t_struct(Transaction)9593_storage)" + "type": "t_mapping(t_uint256,t_struct(Transaction)480_storage)" }, { - "astId": 9573, + "astId": 460, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "confirmations", "offset": 0, @@ -872,7 +872,7 @@ "type": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" }, { - "astId": 9577, + "astId": 464, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "isOwner", "offset": 0, @@ -880,7 +880,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 9580, + "astId": 467, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "owners", "offset": 0, @@ -888,7 +888,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 9582, + "astId": 469, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "required", "offset": 0, @@ -896,7 +896,7 @@ "type": "t_uint256" }, { - "astId": 9584, + "astId": 471, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "transactionCount", "offset": 0, @@ -940,19 +940,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_bool)" }, - "t_mapping(t_uint256,t_struct(Transaction)9593_storage)": { + "t_mapping(t_uint256,t_struct(Transaction)480_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct MultiSigWallet.Transaction)", "numberOfBytes": "32", - "value": "t_struct(Transaction)9593_storage" + "value": "t_struct(Transaction)480_storage" }, - "t_struct(Transaction)9593_storage": { + "t_struct(Transaction)480_storage": { "encoding": "inplace", "label": "struct MultiSigWallet.Transaction", "members": [ { - "astId": 9586, + "astId": 473, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "destination", "offset": 0, @@ -960,7 +960,7 @@ "type": "t_address" }, { - "astId": 9588, + "astId": 475, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "value", "offset": 0, @@ -968,7 +968,7 @@ "type": "t_uint256" }, { - "astId": 9590, + "astId": 477, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "data", "offset": 0, @@ -976,7 +976,7 @@ "type": "t_bytes_storage" }, { - "astId": 9592, + "astId": 479, "contract": "contracts/utils/Proxy.sol:ProxyMultiSig", "label": "executed", "offset": 0, diff --git a/contracts/deployments/test/eth/SAMB.json b/contracts/deployments/test/eth/SAMB.json index e19efd31..95c490f6 100644 --- a/contracts/deployments/test/eth/SAMB.json +++ b/contracts/deployments/test/eth/SAMB.json @@ -1,5 +1,5 @@ { - "address": "0xfc277855999cF6452F9027BbdC1B56264A736E3A", + "address": "0x9Ba7ef7E1C6C5EF4fe7e2A32d4527497D6B12Ff2", "abi": [ { "inputs": [ @@ -176,19 +176,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "bridgeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "decimals", @@ -389,34 +376,34 @@ "type": "function" } ], - "transactionHash": "0x541db3b86e316f588211b8c2f527cb5a099ed3c12ed3d103cc7dc0a6c47eaf0b", + "transactionHash": "0x2a85e29be85b2dd92409d8e948c7820c8044d655e4717d8ab3489c4a8d68e153", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0xfc277855999cF6452F9027BbdC1B56264A736E3A", - "transactionIndex": 0, - "gasUsed": "1047091", - "logsBloom": "0x00000000000000000000002000000000000000000000000000800000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000004000000000000000000020000000000000000000800000000000000000000000000000000400000002000000000000000000002000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x040ded1598ca37e678038315cd1f17f552dddc3d4a1381b4754f19847c7514f1", - "transactionHash": "0x541db3b86e316f588211b8c2f527cb5a099ed3c12ed3d103cc7dc0a6c47eaf0b", + "contractAddress": "0x9Ba7ef7E1C6C5EF4fe7e2A32d4527497D6B12Ff2", + "transactionIndex": 22, + "gasUsed": "1009849", + "logsBloom": "0x00000000000000000000002000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000010000000000000100000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000080000000000000400000002000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xc9e1d9094ffdbc104bb66b253e0a775e5dbc3f59c1f7913613ef1019203d9e40", + "transactionHash": "0x2a85e29be85b2dd92409d8e948c7820c8044d655e4717d8ab3489c4a8d68e153", "logs": [ { - "transactionIndex": 0, - "blockNumber": 2072659, - "transactionHash": "0x541db3b86e316f588211b8c2f527cb5a099ed3c12ed3d103cc7dc0a6c47eaf0b", - "address": "0xfc277855999cF6452F9027BbdC1B56264A736E3A", + "transactionIndex": 22, + "blockNumber": 3186997, + "transactionHash": "0x2a85e29be85b2dd92409d8e948c7820c8044d655e4717d8ab3489c4a8d68e153", + "address": "0x9Ba7ef7E1C6C5EF4fe7e2A32d4527497D6B12Ff2", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000d693a3cc5686e74ca2e72e8120a2f2013b8ee66e" ], "data": "0x", - "logIndex": 0, - "blockHash": "0x040ded1598ca37e678038315cd1f17f552dddc3d4a1381b4754f19847c7514f1" + "logIndex": 5, + "blockHash": "0xc9e1d9094ffdbc104bb66b253e0a775e5dbc3f59c1f7913613ef1019203d9e40" } ], - "blockNumber": 2072659, - "cumulativeGasUsed": "1047091", + "blockNumber": 3186997, + "cumulativeGasUsed": "1787535", "status": 1, "byzantium": true }, @@ -427,10 +414,10 @@ "0x0000000000000000000000000000000000000000" ], "numDeployments": 1, - "solcInputHash": "13963204c1e3ae6f33bd8024ced50cd9", - "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"bridgeAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeAddress_\",\"type\":\"address\"}],\"name\":\"setBridgeAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20.sol\":\"BridgeERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20 is ERC20, Ownable {\\n address public bridgeAddress; // address of bridge contract on this network\\n uint public bridgeBalance; // locked tokens on the bridge\\n\\n uint8 _decimals;\\n\\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\\n ERC20(name_, symbol_)\\n Ownable() {\\n bridgeAddress = bridgeAddress_;\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\\n bridgeAddress = bridgeAddress_;\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n if (sender == bridgeAddress) {\\n // user transfer tokens to ambrosus => need to mint it\\n\\n // same amount locked on side bridge\\n bridgeBalance += amount;\\n\\n _mint(recipient, amount);\\n } else if (recipient == bridgeAddress) {\\n // user withdraw tokens from ambrosus => need to burn it\\n\\n // side bridge must have enough tokens to send\\n require(bridgeBalance >= amount, \\\"not enough locked tokens on bridge\\\");\\n bridgeBalance -= amount;\\n\\n _burn(sender, amount);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0a37a41cff8f5797f2cb10e75c95e76634ea63997e13f19e8a1ece497ad05bfe\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b50604051620013ce380380620013ce833981016040819052620000349162000282565b8351849084906200004d90600390602085019062000125565b5080516200006390600490602084019062000125565b5050506200009262000083620000cf640100000000026401000000009004565b640100000000620000d3810204565b60068054600160a060020a031916600160a060020a03929092169190911790556008805460ff191660ff9290921691909117905550620003ab9050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001339062000326565b90600052602060002090601f016020900481019282620001575760008555620001a2565b82601f106200017257805160ff1916838001178555620001a2565b82800160010185558215620001a2579182015b82811115620001a257825182559160200191906001019062000185565b50620001b0929150620001b4565b5090565b5b80821115620001b05760008155600101620001b5565b600082601f830112620001dd57600080fd5b81516001604060020a0380821115620001fa57620001fa6200037c565b604051601f8301601f19908116603f011681019082821181831017156200022557620002256200037c565b816040528381526020925086838588010111156200024257600080fd5b600091505b8382101562000266578582018301518183018401529082019062000247565b83821115620002785760008385830101525b9695505050505050565b600080600080608085870312156200029957600080fd5b84516001604060020a0380821115620002b157600080fd5b620002bf88838901620001cb565b95506020870151915080821115620002d657600080fd5b50620002e587828801620001cb565b935050604085015160ff81168114620002fd57600080fd5b6060860151909250600160a060020a03811681146200031b57600080fd5b939692955090935050565b6002810460018216806200033b57607f821691505b6020821081141562000376577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61101380620003bb6000396000f3fe608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a3c573eb1161008e578063a3c573eb14610237578063a457c2d71461024a578063a9059cbb1461025d578063dd62ed3e14610270578063f2fde38b146102a957600080fd5b8063715018a6146101ed5780637f5a22f9146101f75780638da5cb5b1461020a57806395d89b411461022f57600080fd5b8063313ce567116100fb578063313ce5671461019357806339509351146101a85780633b1f6a01146101bb57806370a08231146101c457600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e57806323b872dd14610180575b600080fd5b6101356102bc565b6040516101429190610ea1565b60405180910390f35b61015e610159366004610e77565b61034e565b6040519015158152602001610142565b6002545b604051908152602001610142565b61015e61018e366004610e3b565b610364565b60085460405160ff9091168152602001610142565b61015e6101b6366004610e77565b61042b565b61017260075481565b6101726101d2366004610de6565b600160a060020a031660009081526020819052604090205490565b6101f5610467565b005b6101f5610205366004610de6565b6104a0565b600554600160a060020a03165b604051600160a060020a039091168152602001610142565b6101356104fc565b60065461021790600160a060020a031681565b61015e610258366004610e77565b61050b565b61015e61026b366004610e77565b6105bf565b61017261027e366004610e08565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6101f56102b7366004610de6565b6105cc565b6060600380546102cb90610f5a565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790610f5a565b80156103445780601f1061031957610100808354040283529160200191610344565b820191906000526020600020905b81548152906001019060200180831161032757829003601f168201915b5050505050905090565b600061035b338484610684565b50600192915050565b60006103718484846107e2565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104135760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104208533858403610684565b506001949350505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161035b918590610462908690610f2b565b610684565b600554600160a060020a031633146104945760405160e560020a62461bcd02815260040161040a90610ef6565b61049e60006108dd565b565b600554600160a060020a031633146104cd5760405160e560020a62461bcd02815260040161040a90610ef6565b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6060600480546102cb90610f5a565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105a85760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161040a565b6105b53385858403610684565b5060019392505050565b600061035b3384846107e2565b600554600160a060020a031633146105f95760405160e560020a62461bcd02815260040161040a90610ef6565b600160a060020a0381166106785760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161040a565b610681816108dd565b50565b600160a060020a0383166107025760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a0382166107815760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600654600160a060020a038481169116141561081f57806007600082825461080a9190610f2b565b9091555061081a9050828261093c565b505050565b600654600160a060020a03838116911614156108d2578060075410156108b05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f6765000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b80600760008282546108c29190610f43565b9091555061081a90508382610a1e565b61081a838383610ba9565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600160a060020a0382166109955760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161040a565b80600260008282546109a79190610f2b565b9091555050600160a060020a038216600090815260208190526040812080548392906109d4908490610f2b565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610a9d5760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a03821660009081526020819052604090205481811015610b2f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f6365000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a0383166000908152602081905260408120838303905560028054849290610b5e908490610f43565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610c285760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a038216610ca75760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a03831660009081526020819052604090205481811015610d395760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610d70908490610f2b565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610dbc91815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610de157600080fd5b919050565b600060208284031215610df857600080fd5b610e0182610dca565b9392505050565b60008060408385031215610e1b57600080fd5b610e2483610dca565b9150610e3260208401610dca565b90509250929050565b600080600060608486031215610e5057600080fd5b610e5984610dca565b9250610e6760208501610dca565b9150604084013590509250925092565b60008060408385031215610e8a57600080fd5b610e9383610dca565b946020939093013593505050565b600060208083528351808285015260005b81811015610ece57858101830151858201604001528201610eb2565b81811115610ee0576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610f3e57610f3e610fae565b500190565b600082821015610f5557610f55610fae565b500390565b600281046001821680610f6e57607f821691505b60208210811415610fa8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea264697066735822122039233cab17b837d41ed7bb27cb0f83b1f84c94b26a8d35bfcf956593eebbb43f64736f6c63430008060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a3c573eb1161008e578063a3c573eb14610237578063a457c2d71461024a578063a9059cbb1461025d578063dd62ed3e14610270578063f2fde38b146102a957600080fd5b8063715018a6146101ed5780637f5a22f9146101f75780638da5cb5b1461020a57806395d89b411461022f57600080fd5b8063313ce567116100fb578063313ce5671461019357806339509351146101a85780633b1f6a01146101bb57806370a08231146101c457600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e57806323b872dd14610180575b600080fd5b6101356102bc565b6040516101429190610ea1565b60405180910390f35b61015e610159366004610e77565b61034e565b6040519015158152602001610142565b6002545b604051908152602001610142565b61015e61018e366004610e3b565b610364565b60085460405160ff9091168152602001610142565b61015e6101b6366004610e77565b61042b565b61017260075481565b6101726101d2366004610de6565b600160a060020a031660009081526020819052604090205490565b6101f5610467565b005b6101f5610205366004610de6565b6104a0565b600554600160a060020a03165b604051600160a060020a039091168152602001610142565b6101356104fc565b60065461021790600160a060020a031681565b61015e610258366004610e77565b61050b565b61015e61026b366004610e77565b6105bf565b61017261027e366004610e08565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6101f56102b7366004610de6565b6105cc565b6060600380546102cb90610f5a565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790610f5a565b80156103445780601f1061031957610100808354040283529160200191610344565b820191906000526020600020905b81548152906001019060200180831161032757829003601f168201915b5050505050905090565b600061035b338484610684565b50600192915050565b60006103718484846107e2565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156104135760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104208533858403610684565b506001949350505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161035b918590610462908690610f2b565b610684565b600554600160a060020a031633146104945760405160e560020a62461bcd02815260040161040a90610ef6565b61049e60006108dd565b565b600554600160a060020a031633146104cd5760405160e560020a62461bcd02815260040161040a90610ef6565b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6060600480546102cb90610f5a565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105a85760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161040a565b6105b53385858403610684565b5060019392505050565b600061035b3384846107e2565b600554600160a060020a031633146105f95760405160e560020a62461bcd02815260040161040a90610ef6565b600160a060020a0381166106785760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161040a565b610681816108dd565b50565b600160a060020a0383166107025760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a0382166107815760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600654600160a060020a038481169116141561081f57806007600082825461080a9190610f2b565b9091555061081a9050828261093c565b505050565b600654600160a060020a03838116911614156108d2578060075410156108b05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f6765000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b80600760008282546108c29190610f43565b9091555061081a90508382610a1e565b61081a838383610ba9565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600160a060020a0382166109955760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161040a565b80600260008282546109a79190610f2b565b9091555050600160a060020a038216600090815260208190526040812080548392906109d4908490610f2b565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610a9d5760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a03821660009081526020819052604090205481811015610b2f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f6365000000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a0383166000908152602081905260408120838303905560028054849290610b5e908490610f43565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610c285760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a038216610ca75760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a03831660009081526020819052604090205481811015610d395760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161040a565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610d70908490610f2b565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610dbc91815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610de157600080fd5b919050565b600060208284031215610df857600080fd5b610e0182610dca565b9392505050565b60008060408385031215610e1b57600080fd5b610e2483610dca565b9150610e3260208401610dca565b90509250929050565b600080600060608486031215610e5057600080fd5b610e5984610dca565b9250610e6760208501610dca565b9150604084013590509250925092565b60008060408385031215610e8a57600080fd5b610e9383610dca565b946020939093013593505050565b600060208083528351808285015260005b81811015610ece57858101830151858201604001528201610eb2565b81811115610ee0576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610f3e57610f3e610fae565b500190565b600082821015610f5557610f55610fae565b500390565b600281046001821680610f6e57607f821691505b60208210811415610fa8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea264697066735822122039233cab17b837d41ed7bb27cb0f83b1f84c94b26a8d35bfcf956593eebbb43f64736f6c63430008060033", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", + "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"bridgeAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeAddress_\",\"type\":\"address\"}],\"name\":\"setBridgeAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20.sol\":\"BridgeERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20 is ERC20, Ownable {\\n address public bridgeAddress; // address of bridge contract on this network\\n\\n uint8 _decimals;\\n\\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\\n ERC20(name_, symbol_)\\n Ownable() {\\n bridgeAddress = bridgeAddress_;\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\\n bridgeAddress = bridgeAddress_;\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n if (sender == bridgeAddress) {\\n // user transfer tokens to ambrosus => need to mint it\\n _mint(recipient, amount);\\n } else if (recipient == bridgeAddress) {\\n // user withdraw tokens from ambrosus => need to burn it\\n _burn(sender, amount);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xef05c4f9e5b12e19b3aafdb903f55ec177e2f8f84f67dd221cc968d7d45c9bde\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620013373803806200133783398101604081905262000034916200028f565b8351849084906200004d90600390602085019062000132565b5080516200006390600490602084019062000132565b5050506200009262000083620000dc640100000000026401000000009004565b640100000000620000e0810204565b6006805460ff9093167401000000000000000000000000000000000000000002600160a860020a0319909316600160a060020a039092169190911791909117905550620003b89050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001409062000333565b90600052602060002090601f016020900481019282620001645760008555620001af565b82601f106200017f57805160ff1916838001178555620001af565b82800160010185558215620001af579182015b82811115620001af57825182559160200191906001019062000192565b50620001bd929150620001c1565b5090565b5b80821115620001bd5760008155600101620001c2565b600082601f830112620001ea57600080fd5b81516001604060020a038082111562000207576200020762000389565b604051601f8301601f19908116603f0116810190828211818310171562000232576200023262000389565b816040528381526020925086838588010111156200024f57600080fd5b600091505b8382101562000273578582018301518183018401529082019062000254565b83821115620002855760008385830101525b9695505050505050565b60008060008060808587031215620002a657600080fd5b84516001604060020a0380821115620002be57600080fd5b620002cc88838901620001d8565b95506020870151915080821115620002e357600080fd5b50620002f287828801620001d8565b935050604085015160ff811681146200030a57600080fd5b6060860151909250600160a060020a03811681146200032857600080fd5b939692955090935050565b6002810460018216806200034857607f821691505b6020821081141562000383577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610f6f80620003c86000396000f3fe608060405234801561001057600080fd5b506004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900480637f5a22f9116100b4578063a457c2d711610083578063a457c2d714610251578063a9059cbb14610264578063dd62ed3e14610277578063f2fde38b146102b057600080fd5b80637f5a22f9146101fe5780638da5cb5b1461021157806395d89b4114610236578063a3c573eb1461023e57600080fd5b8063313ce567116100f0578063313ce5671461018857806339509351146101b857806370a08231146101cb578063715018a6146101f457600080fd5b806306fdde0314610122578063095ea7b31461014057806318160ddd1461016357806323b872dd14610175575b600080fd5b61012a6102c3565b6040516101379190610dfd565b60405180910390f35b61015361014e366004610dd3565b610355565b6040519015158152602001610137565b6002545b604051908152602001610137565b610153610183366004610d97565b61036b565b60065474010000000000000000000000000000000000000000900460ff1660405160ff9091168152602001610137565b6101536101c6366004610dd3565b610432565b6101676101d9366004610d42565b600160a060020a031660009081526020819052604090205490565b6101fc61046e565b005b6101fc61020c366004610d42565b6104a7565b600554600160a060020a03165b604051600160a060020a039091168152602001610137565b61012a610503565b60065461021e90600160a060020a031681565b61015361025f366004610dd3565b610512565b610153610272366004610dd3565b6105c6565b610167610285366004610d64565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6101fc6102be366004610d42565b6105d3565b6060600380546102d290610eb6565b80601f01602080910402602001604051908101604052809291908181526020018280546102fe90610eb6565b801561034b5780601f106103205761010080835404028352916020019161034b565b820191906000526020600020905b81548152906001019060200180831161032e57829003601f168201915b5050505050905090565b600061036233848461068b565b50600192915050565b60006103788484846107e9565b600160a060020a03841660009081526001602090815260408083203384529091529020548281101561041a5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610427853385840361068b565b506001949350505050565b336000818152600160209081526040808320600160a060020a03871684529091528120549091610362918590610469908690610e87565b61068b565b600554600160a060020a0316331461049b5760405160e560020a62461bcd02815260040161041190610e52565b6104a56000610839565b565b600554600160a060020a031633146104d45760405160e560020a62461bcd02815260040161041190610e52565b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6060600480546102d290610eb6565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105af5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610411565b6105bc338585840361068b565b5060019392505050565b60006103623384846107e9565b600554600160a060020a031633146106005760405160e560020a62461bcd02815260040161041190610e52565b600160a060020a03811661067f5760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610411565b61068881610839565b50565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600654600160a060020a038481169116141561080e576108098282610898565b505050565b600654600160a060020a038381169116141561082e57610809838261097a565b610809838383610b05565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600160a060020a0382166108f15760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610411565b80600260008282546109039190610e87565b9091555050600160a060020a03821660009081526020819052604081208054839290610930908490610e87565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a0382166109f95760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a03821660009081526020819052604090205481811015610a8b5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a0383166000908152602081905260408120838303905560028054849290610aba908490610e9f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610b845760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a038216610c035760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a03831660009081526020819052604090205481811015610c955760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610ccc908490610e87565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d1891815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610d3d57600080fd5b919050565b600060208284031215610d5457600080fd5b610d5d82610d26565b9392505050565b60008060408385031215610d7757600080fd5b610d8083610d26565b9150610d8e60208401610d26565b90509250929050565b600080600060608486031215610dac57600080fd5b610db584610d26565b9250610dc360208501610d26565b9150604084013590509250925092565b60008060408385031215610de657600080fd5b610def83610d26565b946020939093013593505050565b600060208083528351808285015260005b81811015610e2a57858101830151858201604001528201610e0e565b81811115610e3c576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610e9a57610e9a610f0a565b500190565b600082821015610eb157610eb1610f0a565b500390565b600281046001821680610eca57607f821691505b60208210811415610f04577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220acec37cfcec7bc4c41abf4c4cedec7169090aad5f2764d4290d98cf4a8259e8964736f6c63430008060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900480637f5a22f9116100b4578063a457c2d711610083578063a457c2d714610251578063a9059cbb14610264578063dd62ed3e14610277578063f2fde38b146102b057600080fd5b80637f5a22f9146101fe5780638da5cb5b1461021157806395d89b4114610236578063a3c573eb1461023e57600080fd5b8063313ce567116100f0578063313ce5671461018857806339509351146101b857806370a08231146101cb578063715018a6146101f457600080fd5b806306fdde0314610122578063095ea7b31461014057806318160ddd1461016357806323b872dd14610175575b600080fd5b61012a6102c3565b6040516101379190610dfd565b60405180910390f35b61015361014e366004610dd3565b610355565b6040519015158152602001610137565b6002545b604051908152602001610137565b610153610183366004610d97565b61036b565b60065474010000000000000000000000000000000000000000900460ff1660405160ff9091168152602001610137565b6101536101c6366004610dd3565b610432565b6101676101d9366004610d42565b600160a060020a031660009081526020819052604090205490565b6101fc61046e565b005b6101fc61020c366004610d42565b6104a7565b600554600160a060020a03165b604051600160a060020a039091168152602001610137565b61012a610503565b60065461021e90600160a060020a031681565b61015361025f366004610dd3565b610512565b610153610272366004610dd3565b6105c6565b610167610285366004610d64565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6101fc6102be366004610d42565b6105d3565b6060600380546102d290610eb6565b80601f01602080910402602001604051908101604052809291908181526020018280546102fe90610eb6565b801561034b5780601f106103205761010080835404028352916020019161034b565b820191906000526020600020905b81548152906001019060200180831161032e57829003601f168201915b5050505050905090565b600061036233848461068b565b50600192915050565b60006103788484846107e9565b600160a060020a03841660009081526001602090815260408083203384529091529020548281101561041a5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610427853385840361068b565b506001949350505050565b336000818152600160209081526040808320600160a060020a03871684529091528120549091610362918590610469908690610e87565b61068b565b600554600160a060020a0316331461049b5760405160e560020a62461bcd02815260040161041190610e52565b6104a56000610839565b565b600554600160a060020a031633146104d45760405160e560020a62461bcd02815260040161041190610e52565b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6060600480546102d290610eb6565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156105af5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610411565b6105bc338585840361068b565b5060019392505050565b60006103623384846107e9565b600554600160a060020a031633146106005760405160e560020a62461bcd02815260040161041190610e52565b600160a060020a03811661067f5760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610411565b61068881610839565b50565b600160a060020a0383166107095760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a0382166107885760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600654600160a060020a038481169116141561080e576108098282610898565b505050565b600654600160a060020a038381169116141561082e57610809838261097a565b610809838383610b05565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600160a060020a0382166108f15760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610411565b80600260008282546109039190610e87565b9091555050600160a060020a03821660009081526020819052604081208054839290610930908490610e87565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a0382166109f95760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a03821660009081526020819052604090205481811015610a8b5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a0383166000908152602081905260408120838303905560028054849290610aba908490610e9f565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610b845760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a038216610c035760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a03831660009081526020819052604090205481811015610c955760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610411565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610ccc908490610e87565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d1891815260200190565b60405180910390a350505050565b8035600160a060020a0381168114610d3d57600080fd5b919050565b600060208284031215610d5457600080fd5b610d5d82610d26565b9392505050565b60008060408385031215610d7757600080fd5b610d8083610d26565b9150610d8e60208401610d26565b90509250929050565b600080600060608486031215610dac57600080fd5b610db584610d26565b9250610dc360208501610d26565b9150604084013590509250925092565b60008060408385031215610de657600080fd5b610def83610d26565b946020939093013593505050565b600060208083528351808285015260005b81811015610e2a57858101830151858201604001528201610e0e565b81811115610e3c576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610e9a57610e9a610f0a565b500190565b600082821015610eb157610eb1610f0a565b500390565b600281046001821680610eca57607f821691505b60208210811415610f04577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220acec37cfcec7bc4c41abf4c4cedec7169090aad5f2764d4290d98cf4a8259e8964736f6c63430008060033", "devdoc": { "kind": "dev", "methods": { @@ -487,7 +474,7 @@ "storageLayout": { "storage": [ { - "astId": 991, + "astId": 1371, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_balances", "offset": 0, @@ -495,7 +482,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 997, + "astId": 1377, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_allowances", "offset": 0, @@ -503,7 +490,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 999, + "astId": 1379, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_totalSupply", "offset": 0, @@ -511,7 +498,7 @@ "type": "t_uint256" }, { - "astId": 1001, + "astId": 1381, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_name", "offset": 0, @@ -519,7 +506,7 @@ "type": "t_string_storage" }, { - "astId": 1003, + "astId": 1383, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_symbol", "offset": 0, @@ -527,7 +514,7 @@ "type": "t_string_storage" }, { - "astId": 879, + "astId": 1259, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_owner", "offset": 0, @@ -535,7 +522,7 @@ "type": "t_address" }, { - "astId": 9077, + "astId": 4767, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "bridgeAddress", "offset": 0, @@ -543,19 +530,11 @@ "type": "t_address" }, { - "astId": 9079, - "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", - "label": "bridgeBalance", - "offset": 0, - "slot": "7", - "type": "t_uint256" - }, - { - "astId": 9081, + "astId": 4769, "contract": "contracts/tokens/BridgeERC20.sol:BridgeERC20", "label": "_decimals", - "offset": 0, - "slot": "8", + "offset": 20, + "slot": "6", "type": "t_uint8" } ], diff --git a/contracts/deployments/test/eth/USDC.json b/contracts/deployments/test/eth/USDC.json index 6b0c4d73..d09bf894 100644 --- a/contracts/deployments/test/eth/USDC.json +++ b/contracts/deployments/test/eth/USDC.json @@ -1,5 +1,5 @@ { - "address": "0x1D335E8B7787fB6c51F98713df5BCb56884FD023", + "address": "0xB841C5707DA4B43eD915B707158010bd2FaF3B46", "abi": [ { "inputs": [ @@ -311,19 +311,19 @@ "type": "function" } ], - "transactionHash": "0x2eb465d49048eec0a3305a57d1ac1eea2328b75e3c34af869f916526c0b372da", + "transactionHash": "0x1e96550d720e68314e24ed28fba1e3ea0e1b8055edb1e259a5931fab037b9328", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x1D335E8B7787fB6c51F98713df5BCb56884FD023", - "transactionIndex": 0, - "gasUsed": "733007", + "contractAddress": "0xB841C5707DA4B43eD915B707158010bd2FaF3B46", + "transactionIndex": 27, + "gasUsed": "733245", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd02f164b7faf3013913c1f1c5f4a5398fe913cfc5180207cea9f487b4bba36fa", - "transactionHash": "0x2eb465d49048eec0a3305a57d1ac1eea2328b75e3c34af869f916526c0b372da", + "blockHash": "0x20240ee6c91c20b0ff55f5f108125053755fdb789b1d3d8e1f7c295a0f48faab", + "transactionHash": "0x1e96550d720e68314e24ed28fba1e3ea0e1b8055edb1e259a5931fab037b9328", "logs": [], - "blockNumber": 2072657, - "cumulativeGasUsed": "733007", + "blockNumber": 3186993, + "cumulativeGasUsed": "2572116", "status": 1, "byzantium": true }, @@ -333,7 +333,7 @@ 6 ], "numDeployments": 1, - "solcInputHash": "13963204c1e3ae6f33bd8024ced50cd9", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/contracts_for_tests/MintableERC20.sol\":\"MintableERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/contracts_for_tests/MintableERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ncontract MintableERC20 is ERC20 {\\n uint8 _decimals;\\n\\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function mint(address to, uint256 amount) public {\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0x2c98fb67e868a6ec093346b029e1bacb57b6200aa1c37035f04298ad6eea4851\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b5060405162000de338038062000de38339810160408190526200003491620001e1565b8251839083906200004d90600390602085019062000084565b5080516200006390600490602084019062000084565b50506005805460ff191660ff939093169290921790915550620002eb915050565b828054620000929062000266565b90600052602060002090601f016020900481019282620000b6576000855562000101565b82601f10620000d157805160ff191683800117855562000101565b8280016001018555821562000101579182015b8281111562000101578251825591602001919060010190620000e4565b506200010f92915062000113565b5090565b5b808211156200010f576000815560010162000114565b600082601f8301126200013c57600080fd5b81516001604060020a0380821115620001595762000159620002bc565b604051601f8301601f19908116603f01168101908282118183101715620001845762000184620002bc565b81604052838152602092508683858801011115620001a157600080fd5b600091505b83821015620001c55785820183015181830184015290820190620001a6565b83821115620001d75760008385830101525b9695505050505050565b600080600060608486031215620001f757600080fd5b83516001604060020a03808211156200020f57600080fd5b6200021d878388016200012a565b945060208601519150808211156200023457600080fd5b5062000243868287016200012a565b925050604084015160ff811681146200025b57600080fd5b809150509250925092565b6002810460018216806200027b57607f821691505b60208210811415620002b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610ae880620002fb6000396000f3fe608060405234801561001057600080fd5b50600436106100d1576000357c01000000000000000000000000000000000000000000000000000000009004806340c10f191161008e57806340c10f191461016457806370a082311461017957806395d89b41146101a2578063a457c2d7146101aa578063a9059cbb146101bd578063dd62ed3e146101d057600080fd5b806306fdde03146100d6578063095ea7b3146100f457806318160ddd1461011757806323b872dd14610129578063313ce5671461013c5780633950935114610151575b600080fd5b6100de610209565b6040516100eb91906109ca565b60405180910390f35b6101076101023660046109a0565b61029b565b60405190151581526020016100eb565b6002545b6040519081526020016100eb565b610107610137366004610964565b6102b1565b60055460405160ff90911681526020016100eb565b61010761015f3660046109a0565b610378565b6101776101723660046109a0565b6103b4565b005b61011b61018736600461090f565b600160a060020a031660009081526020819052604090205490565b6100de6103c2565b6101076101b83660046109a0565b6103d1565b6101076101cb3660046109a0565b610485565b61011b6101de366004610931565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461021890610a5e565b80601f016020809104026020016040519081016040528092919081815260200182805461024490610a5e565b80156102915780601f1061026657610100808354040283529160200191610291565b820191906000526020600020905b81548152906001019060200180831161027457829003601f168201915b5050505050905090565b60006102a8338484610492565b50600192915050565b60006102be8484846105f0565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156103605760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61036d8533858403610492565b506001949350505050565b336000818152600160209081526040808320600160a060020a038716845290915281205490916102a89185906103af908690610a1f565b610492565b6103be8282610811565b5050565b60606004805461021890610a5e565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561046e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610357565b61047b3385858403610492565b5060019392505050565b60006102a83384846105f0565b600160a060020a0383166105105760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a03821661058f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831661066f5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0382166106ee5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038316600090815260208190526040902054818110156107805760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038085166000908152602081905260408082208585039055918516815290812080548492906107b7908490610a1f565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161080391815260200190565b60405180910390a350505050565b600160a060020a03821661086a5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610357565b806002600082825461087c9190610a1f565b9091555050600160a060020a038216600090815260208190526040812080548392906108a9908490610a1f565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a038116811461090a57600080fd5b919050565b60006020828403121561092157600080fd5b61092a826108f3565b9392505050565b6000806040838503121561094457600080fd5b61094d836108f3565b915061095b602084016108f3565b90509250929050565b60008060006060848603121561097957600080fd5b610982846108f3565b9250610990602085016108f3565b9150604084013590509250925092565b600080604083850312156109b357600080fd5b6109bc836108f3565b946020939093013593505050565b600060208083528351808285015260005b818110156109f7578581018301518582016040015282016109db565b81811115610a09576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610a59577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b600281046001821680610a7257607f821691505b60208210811415610aac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea264697066735822122078b31f04c5d7da08a395798c3b485cacdeabad33239343694adc13bd09258f3064736f6c63430008060033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d1576000357c01000000000000000000000000000000000000000000000000000000009004806340c10f191161008e57806340c10f191461016457806370a082311461017957806395d89b41146101a2578063a457c2d7146101aa578063a9059cbb146101bd578063dd62ed3e146101d057600080fd5b806306fdde03146100d6578063095ea7b3146100f457806318160ddd1461011757806323b872dd14610129578063313ce5671461013c5780633950935114610151575b600080fd5b6100de610209565b6040516100eb91906109ca565b60405180910390f35b6101076101023660046109a0565b61029b565b60405190151581526020016100eb565b6002545b6040519081526020016100eb565b610107610137366004610964565b6102b1565b60055460405160ff90911681526020016100eb565b61010761015f3660046109a0565b610378565b6101776101723660046109a0565b6103b4565b005b61011b61018736600461090f565b600160a060020a031660009081526020819052604090205490565b6100de6103c2565b6101076101b83660046109a0565b6103d1565b6101076101cb3660046109a0565b610485565b61011b6101de366004610931565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461021890610a5e565b80601f016020809104026020016040519081016040528092919081815260200182805461024490610a5e565b80156102915780601f1061026657610100808354040283529160200191610291565b820191906000526020600020905b81548152906001019060200180831161027457829003601f168201915b5050505050905090565b60006102a8338484610492565b50600192915050565b60006102be8484846105f0565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156103605760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61036d8533858403610492565b506001949350505050565b336000818152600160209081526040808320600160a060020a038716845290915281205490916102a89185906103af908690610a1f565b610492565b6103be8282610811565b5050565b60606004805461021890610a5e565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561046e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610357565b61047b3385858403610492565b5060019392505050565b60006102a83384846105f0565b600160a060020a0383166105105760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a03821661058f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831661066f5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0382166106ee5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038316600090815260208190526040902054818110156107805760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038085166000908152602081905260408082208585039055918516815290812080548492906107b7908490610a1f565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161080391815260200190565b60405180910390a350505050565b600160a060020a03821661086a5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610357565b806002600082825461087c9190610a1f565b9091555050600160a060020a038216600090815260208190526040812080548392906108a9908490610a1f565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a038116811461090a57600080fd5b919050565b60006020828403121561092157600080fd5b61092a826108f3565b9392505050565b6000806040838503121561094457600080fd5b61094d836108f3565b915061095b602084016108f3565b90509250929050565b60008060006060848603121561097957600080fd5b610982846108f3565b9250610990602085016108f3565b9150604084013590509250925092565b600080604083850312156109b357600080fd5b6109bc836108f3565b946020939093013593505050565b600060208083528351808285015260005b818110156109f7578581018301518582016040015282016109db565b81811115610a09576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610a59577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b600281046001821680610a7257607f821691505b60208210811415610aac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea264697066735822122078b31f04c5d7da08a395798c3b485cacdeabad33239343694adc13bd09258f3064736f6c63430008060033", @@ -384,7 +384,7 @@ "storageLayout": { "storage": [ { - "astId": 991, + "astId": 1371, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_balances", "offset": 0, @@ -392,7 +392,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 997, + "astId": 1377, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_allowances", "offset": 0, @@ -400,7 +400,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 999, + "astId": 1379, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_totalSupply", "offset": 0, @@ -408,7 +408,7 @@ "type": "t_uint256" }, { - "astId": 1001, + "astId": 1381, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_name", "offset": 0, @@ -416,7 +416,7 @@ "type": "t_string_storage" }, { - "astId": 1003, + "astId": 1383, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_symbol", "offset": 0, @@ -424,7 +424,7 @@ "type": "t_string_storage" }, { - "astId": 8419, + "astId": 4256, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_decimals", "offset": 0, diff --git a/contracts/deployments/test/eth/USDT.json b/contracts/deployments/test/eth/USDT.json index 6d8d1042..36a24c66 100644 --- a/contracts/deployments/test/eth/USDT.json +++ b/contracts/deployments/test/eth/USDT.json @@ -1,5 +1,5 @@ { - "address": "0x2Aaf5696BdF562b31D6dAd629B7434E809296bAF", + "address": "0x05875578a63C7E26245c7CBa3cF460fF6a613c6B", "abi": [ { "inputs": [ @@ -311,19 +311,19 @@ "type": "function" } ], - "transactionHash": "0xd022139b47c116d798c64258c487f329a722b48dce5d1d76ff899c2abeafcf6a", + "transactionHash": "0x82e0d0178b73716bfae0f16349f8935e94b5c45dbbaea0d50320e71990616088", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0x2Aaf5696BdF562b31D6dAd629B7434E809296bAF", - "transactionIndex": 0, - "gasUsed": "733031", + "contractAddress": "0x05875578a63C7E26245c7CBa3cF460fF6a613c6B", + "transactionIndex": 61, + "gasUsed": "733269", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xef45cc3adde58e5c69b763ff6dd9ca36a23655f30048b3eaa39ad390518b9383", - "transactionHash": "0xd022139b47c116d798c64258c487f329a722b48dce5d1d76ff899c2abeafcf6a", + "blockHash": "0x66af09bfbe5f5f344e977bcc0868278dd3db191b29f879561a86d5aebad19fd3", + "transactionHash": "0x82e0d0178b73716bfae0f16349f8935e94b5c45dbbaea0d50320e71990616088", "logs": [], - "blockNumber": 2211164, - "cumulativeGasUsed": "733031", + "blockNumber": 3186994, + "cumulativeGasUsed": "9950397", "status": 1, "byzantium": true }, @@ -333,7 +333,7 @@ 6 ], "numDeployments": 1, - "solcInputHash": "14835e48c656ebed02c4fc9389a12566", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/contracts_for_tests/MintableERC20.sol\":\"MintableERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/contracts_for_tests/MintableERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ncontract MintableERC20 is ERC20 {\\n uint8 _decimals;\\n\\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function mint(address to, uint256 amount) public {\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0x2c98fb67e868a6ec093346b029e1bacb57b6200aa1c37035f04298ad6eea4851\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b5060405162000de338038062000de38339810160408190526200003491620001e1565b8251839083906200004d90600390602085019062000084565b5080516200006390600490602084019062000084565b50506005805460ff191660ff939093169290921790915550620002eb915050565b828054620000929062000266565b90600052602060002090601f016020900481019282620000b6576000855562000101565b82601f10620000d157805160ff191683800117855562000101565b8280016001018555821562000101579182015b8281111562000101578251825591602001919060010190620000e4565b506200010f92915062000113565b5090565b5b808211156200010f576000815560010162000114565b600082601f8301126200013c57600080fd5b81516001604060020a0380821115620001595762000159620002bc565b604051601f8301601f19908116603f01168101908282118183101715620001845762000184620002bc565b81604052838152602092508683858801011115620001a157600080fd5b600091505b83821015620001c55785820183015181830184015290820190620001a6565b83821115620001d75760008385830101525b9695505050505050565b600080600060608486031215620001f757600080fd5b83516001604060020a03808211156200020f57600080fd5b6200021d878388016200012a565b945060208601519150808211156200023457600080fd5b5062000243868287016200012a565b925050604084015160ff811681146200025b57600080fd5b809150509250925092565b6002810460018216806200027b57607f821691505b60208210811415620002b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610ae880620002fb6000396000f3fe608060405234801561001057600080fd5b50600436106100d1576000357c01000000000000000000000000000000000000000000000000000000009004806340c10f191161008e57806340c10f191461016457806370a082311461017957806395d89b41146101a2578063a457c2d7146101aa578063a9059cbb146101bd578063dd62ed3e146101d057600080fd5b806306fdde03146100d6578063095ea7b3146100f457806318160ddd1461011757806323b872dd14610129578063313ce5671461013c5780633950935114610151575b600080fd5b6100de610209565b6040516100eb91906109ca565b60405180910390f35b6101076101023660046109a0565b61029b565b60405190151581526020016100eb565b6002545b6040519081526020016100eb565b610107610137366004610964565b6102b1565b60055460405160ff90911681526020016100eb565b61010761015f3660046109a0565b610378565b6101776101723660046109a0565b6103b4565b005b61011b61018736600461090f565b600160a060020a031660009081526020819052604090205490565b6100de6103c2565b6101076101b83660046109a0565b6103d1565b6101076101cb3660046109a0565b610485565b61011b6101de366004610931565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461021890610a5e565b80601f016020809104026020016040519081016040528092919081815260200182805461024490610a5e565b80156102915780601f1061026657610100808354040283529160200191610291565b820191906000526020600020905b81548152906001019060200180831161027457829003601f168201915b5050505050905090565b60006102a8338484610492565b50600192915050565b60006102be8484846105f0565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156103605760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61036d8533858403610492565b506001949350505050565b336000818152600160209081526040808320600160a060020a038716845290915281205490916102a89185906103af908690610a1f565b610492565b6103be8282610811565b5050565b60606004805461021890610a5e565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561046e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610357565b61047b3385858403610492565b5060019392505050565b60006102a83384846105f0565b600160a060020a0383166105105760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a03821661058f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831661066f5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0382166106ee5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038316600090815260208190526040902054818110156107805760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038085166000908152602081905260408082208585039055918516815290812080548492906107b7908490610a1f565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161080391815260200190565b60405180910390a350505050565b600160a060020a03821661086a5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610357565b806002600082825461087c9190610a1f565b9091555050600160a060020a038216600090815260208190526040812080548392906108a9908490610a1f565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a038116811461090a57600080fd5b919050565b60006020828403121561092157600080fd5b61092a826108f3565b9392505050565b6000806040838503121561094457600080fd5b61094d836108f3565b915061095b602084016108f3565b90509250929050565b60008060006060848603121561097957600080fd5b610982846108f3565b9250610990602085016108f3565b9150604084013590509250925092565b600080604083850312156109b357600080fd5b6109bc836108f3565b946020939093013593505050565b600060208083528351808285015260005b818110156109f7578581018301518582016040015282016109db565b81811115610a09576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610a59577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b600281046001821680610a7257607f821691505b60208210811415610aac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea264697066735822122078b31f04c5d7da08a395798c3b485cacdeabad33239343694adc13bd09258f3064736f6c63430008060033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d1576000357c01000000000000000000000000000000000000000000000000000000009004806340c10f191161008e57806340c10f191461016457806370a082311461017957806395d89b41146101a2578063a457c2d7146101aa578063a9059cbb146101bd578063dd62ed3e146101d057600080fd5b806306fdde03146100d6578063095ea7b3146100f457806318160ddd1461011757806323b872dd14610129578063313ce5671461013c5780633950935114610151575b600080fd5b6100de610209565b6040516100eb91906109ca565b60405180910390f35b6101076101023660046109a0565b61029b565b60405190151581526020016100eb565b6002545b6040519081526020016100eb565b610107610137366004610964565b6102b1565b60055460405160ff90911681526020016100eb565b61010761015f3660046109a0565b610378565b6101776101723660046109a0565b6103b4565b005b61011b61018736600461090f565b600160a060020a031660009081526020819052604090205490565b6100de6103c2565b6101076101b83660046109a0565b6103d1565b6101076101cb3660046109a0565b610485565b61011b6101de366004610931565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461021890610a5e565b80601f016020809104026020016040519081016040528092919081815260200182805461024490610a5e565b80156102915780601f1061026657610100808354040283529160200191610291565b820191906000526020600020905b81548152906001019060200180831161027457829003601f168201915b5050505050905090565b60006102a8338484610492565b50600192915050565b60006102be8484846105f0565b600160a060020a0384166000908152600160209081526040808320338452909152902054828110156103605760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61036d8533858403610492565b506001949350505050565b336000818152600160209081526040808320600160a060020a038716845290915281205490916102a89185906103af908690610a1f565b610492565b6103be8282610811565b5050565b60606004805461021890610a5e565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561046e5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610357565b61047b3385858403610492565b5060019392505050565b60006102a83384846105f0565b600160a060020a0383166105105760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a03821661058f5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831661066f5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a0382166106ee5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038316600090815260208190526040902054818110156107805760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610357565b600160a060020a038085166000908152602081905260408082208585039055918516815290812080548492906107b7908490610a1f565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161080391815260200190565b60405180910390a350505050565b600160a060020a03821661086a5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610357565b806002600082825461087c9190610a1f565b9091555050600160a060020a038216600090815260208190526040812080548392906108a9908490610a1f565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a038116811461090a57600080fd5b919050565b60006020828403121561092157600080fd5b61092a826108f3565b9392505050565b6000806040838503121561094457600080fd5b61094d836108f3565b915061095b602084016108f3565b90509250929050565b60008060006060848603121561097957600080fd5b610982846108f3565b9250610990602085016108f3565b9150604084013590509250925092565b600080604083850312156109b357600080fd5b6109bc836108f3565b946020939093013593505050565b600060208083528351808285015260005b818110156109f7578581018301518582016040015282016109db565b81811115610a09576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610a59577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b600281046001821680610a7257607f821691505b60208210811415610aac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea264697066735822122078b31f04c5d7da08a395798c3b485cacdeabad33239343694adc13bd09258f3064736f6c63430008060033", @@ -384,7 +384,7 @@ "storageLayout": { "storage": [ { - "astId": 991, + "astId": 1371, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_balances", "offset": 0, @@ -392,7 +392,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 997, + "astId": 1377, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_allowances", "offset": 0, @@ -400,7 +400,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 999, + "astId": 1379, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_totalSupply", "offset": 0, @@ -408,7 +408,7 @@ "type": "t_uint256" }, { - "astId": 1001, + "astId": 1381, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_name", "offset": 0, @@ -416,7 +416,7 @@ "type": "t_string_storage" }, { - "astId": 1003, + "astId": 1383, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_symbol", "offset": 0, @@ -424,7 +424,7 @@ "type": "t_string_storage" }, { - "astId": 8499, + "astId": 4256, "contract": "contracts/contracts_for_tests/MintableERC20.sol:MintableERC20", "label": "_decimals", "offset": 0, diff --git a/contracts/deployments/test/eth/WETH.json b/contracts/deployments/test/eth/WETH.json index 7eaf186d..22f79a94 100644 --- a/contracts/deployments/test/eth/WETH.json +++ b/contracts/deployments/test/eth/WETH.json @@ -1,5 +1,5 @@ { - "address": "0xd67A7CE611C1b33A549712c0FcbFE8436A917b71", + "address": "0x5ECfeaD3d77F6814D189F6209ea27eCD1c00D45a", "abi": [ { "inputs": [ @@ -346,19 +346,19 @@ "type": "function" } ], - "transactionHash": "0x3c4dac83c0b4cd311d18fa5ba92aa627c28b1c86d6abe1a67a72c946b4f4e0b5", + "transactionHash": "0x3763055ea10a4c9215ba4db9c4413c199ebaa00a34d502090c4c2d6c30fe7277", "receipt": { "to": null, "from": "0xD693a3cc5686e74Ca2e72e8120A2F2013B8eE66E", - "contractAddress": "0xd67A7CE611C1b33A549712c0FcbFE8436A917b71", - "transactionIndex": 2, - "gasUsed": "877356", + "contractAddress": "0x5ECfeaD3d77F6814D189F6209ea27eCD1c00D45a", + "transactionIndex": 22, + "gasUsed": "877636", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6a54a95565f1b5c172610e35c7822548684758607c7a24e1797f44964a7da290", - "transactionHash": "0x3c4dac83c0b4cd311d18fa5ba92aa627c28b1c86d6abe1a67a72c946b4f4e0b5", + "blockHash": "0x43c87bb37f61110f5dde14ec30fbbf0adf9c6303e096913702466959e5faaeed", + "transactionHash": "0x3763055ea10a4c9215ba4db9c4413c199ebaa00a34d502090c4c2d6c30fe7277", "logs": [], - "blockNumber": 2072658, - "cumulativeGasUsed": "2515078", + "blockNumber": 3186992, + "cumulativeGasUsed": "2149948", "status": 1, "byzantium": true }, @@ -367,7 +367,7 @@ "WETH" ], "numDeployments": 1, - "solcInputHash": "13963204c1e3ae6f33bd8024ced50cd9", + "solcInputHash": "af3862e0ddcca2861ee723b668139921", "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/sAMB.sol\":\"sAMB\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/IWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\ninterface IWrapper {\\n event Deposit(address indexed dst, uint amount);\\n event Withdrawal(address indexed src, uint amount);\\n\\n function deposit() external payable;\\n\\n function withdraw(uint amount) external;\\n}\\n\",\"keccak256\":\"0xbe5bc17241b9a14b78e18e4562e2a4c02e2b941fae0f1a896bbd795e49af136e\",\"license\":\"MIT\"},\"contracts/tokens/sAMB.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"./IWrapper.sol\\\";\\n\\ncontract sAMB is IWrapper, ERC20 {\\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\\n\\n function deposit() public override payable {\\n _mint(msg.sender, msg.value);\\n\\n emit Deposit(msg.sender, msg.value);\\n }\\n\\n function withdraw(uint amount) public override {\\n _burn(msg.sender, amount);\\n payable(msg.sender).transfer(amount);\\n\\n emit Withdrawal(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x90133b5fc764016576f455329dda29434c23704c3102d2d83961f89ae65890d6\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b50604051620010bd380380620010bd8339810160408190526200003491620001cb565b8151829082906200004d9060039060208501906200006e565b508051620000639060049060208401906200006e565b5050505050620002ba565b8280546200007c9062000235565b90600052602060002090601f016020900481019282620000a05760008555620000eb565b82601f10620000bb57805160ff1916838001178555620000eb565b82800160010185558215620000eb579182015b82811115620000eb578251825591602001919060010190620000ce565b50620000f9929150620000fd565b5090565b5b80821115620000f95760008155600101620000fe565b600082601f8301126200012657600080fd5b81516001604060020a03808211156200014357620001436200028b565b604051601f8301601f19908116603f011681019082821181831017156200016e576200016e6200028b565b816040528381526020925086838588010111156200018b57600080fd5b600091505b83821015620001af578582018301518183018401529082019062000190565b83821115620001c15760008385830101525b9695505050505050565b60008060408385031215620001df57600080fd5b82516001604060020a0380821115620001f757600080fd5b620002058683870162000114565b935060208501519150808211156200021c57600080fd5b506200022b8582860162000114565b9150509250929050565b6002810460018216806200024a57607f821691505b6020821081141562000285577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610df380620002ca6000396000f3fe6080604052600436106100df576000357c010000000000000000000000000000000000000000000000000000000090048063395093511161009c578063a457c2d711610076578063a457c2d714610227578063a9059cbb14610247578063d0e30db014610267578063dd62ed3e1461026f57600080fd5b806339509351146101bc57806370a08231146101dc57806395d89b411461021257600080fd5b806306fdde03146100e4578063095ea7b31461010f57806318160ddd1461013f57806323b872dd1461015e5780632e1a7d4d1461017e578063313ce567146101a0575b600080fd5b3480156100f057600080fd5b506100f96102b5565b6040516101069190610cb6565b60405180910390f35b34801561011b57600080fd5b5061012f61012a366004610c73565b610347565b6040519015158152602001610106565b34801561014b57600080fd5b506002545b604051908152602001610106565b34801561016a57600080fd5b5061012f610179366004610c37565b61035d565b34801561018a57600080fd5b5061019e610199366004610c9d565b610424565b005b3480156101ac57600080fd5b5060405160128152602001610106565b3480156101c857600080fd5b5061012f6101d7366004610c73565b610494565b3480156101e857600080fd5b506101506101f7366004610be2565b600160a060020a031660009081526020819052604090205490565b34801561021e57600080fd5b506100f96104d0565b34801561023357600080fd5b5061012f610242366004610c73565b6104df565b34801561025357600080fd5b5061012f610262366004610c73565b610593565b61019e6105a0565b34801561027b57600080fd5b5061015061028a366004610c04565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546102c490610d3a565b80601f01602080910402602001604051908101604052809291908181526020018280546102f090610d3a565b801561033d5780601f106103125761010080835404028352916020019161033d565b820191906000526020600020905b81548152906001019060200180831161032057829003601f168201915b5050505050905090565b60006103543384846105e1565b50600192915050565b600061036a848484610740565b600160a060020a03841660009081526001602090815260408083203384529091529020548281101561040c5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61041985338584036105e1565b506001949350505050565b61042e3382610961565b604051339082156108fc029083906000818181858888f1935050505015801561045b573d6000803e3d6000fd5b5060405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a250565b336000818152600160209081526040808320600160a060020a038716845290915281205490916103549185906104cb908690610d0b565b6105e1565b6060600480546102c490610d3a565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561057c5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610403565b61058933858584036105e1565b5060019392505050565b6000610354338484610740565b6105aa3334610ae4565b60405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b600160a060020a03831661065f5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0382166106de5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600160a060020a0383166107bf5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03821661083e5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a038316600090815260208190526040902054818110156108d05760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610907908490610d0b565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161095391815260200190565b60405180910390a350505050565b600160a060020a0382166109e05760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03821660009081526020819052604090205481811015610a725760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0383166000908152602081905260408120838303905560028054849290610aa1908490610d23565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610733565b600160a060020a038216610b3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610403565b8060026000828254610b4f9190610d0b565b9091555050600160a060020a03821660009081526020819052604081208054839290610b7c908490610d0b565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a0381168114610bdd57600080fd5b919050565b600060208284031215610bf457600080fd5b610bfd82610bc6565b9392505050565b60008060408385031215610c1757600080fd5b610c2083610bc6565b9150610c2e60208401610bc6565b90509250929050565b600080600060608486031215610c4c57600080fd5b610c5584610bc6565b9250610c6360208501610bc6565b9150604084013590509250925092565b60008060408385031215610c8657600080fd5b610c8f83610bc6565b946020939093013593505050565b600060208284031215610caf57600080fd5b5035919050565b600060208083528351808285015260005b81811015610ce357858101830151858201604001528201610cc7565b81811115610cf5576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610d1e57610d1e610d8e565b500190565b600082821015610d3557610d35610d8e565b500390565b600281046001821680610d4e57607f821691505b60208210811415610d88577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220f75853fc2637d5ca8248502a85a7f949947d4ce8824b83a6ae12f18058d32b2c64736f6c63430008060033", "deployedBytecode": "0x6080604052600436106100df576000357c010000000000000000000000000000000000000000000000000000000090048063395093511161009c578063a457c2d711610076578063a457c2d714610227578063a9059cbb14610247578063d0e30db014610267578063dd62ed3e1461026f57600080fd5b806339509351146101bc57806370a08231146101dc57806395d89b411461021257600080fd5b806306fdde03146100e4578063095ea7b31461010f57806318160ddd1461013f57806323b872dd1461015e5780632e1a7d4d1461017e578063313ce567146101a0575b600080fd5b3480156100f057600080fd5b506100f96102b5565b6040516101069190610cb6565b60405180910390f35b34801561011b57600080fd5b5061012f61012a366004610c73565b610347565b6040519015158152602001610106565b34801561014b57600080fd5b506002545b604051908152602001610106565b34801561016a57600080fd5b5061012f610179366004610c37565b61035d565b34801561018a57600080fd5b5061019e610199366004610c9d565b610424565b005b3480156101ac57600080fd5b5060405160128152602001610106565b3480156101c857600080fd5b5061012f6101d7366004610c73565b610494565b3480156101e857600080fd5b506101506101f7366004610be2565b600160a060020a031660009081526020819052604090205490565b34801561021e57600080fd5b506100f96104d0565b34801561023357600080fd5b5061012f610242366004610c73565b6104df565b34801561025357600080fd5b5061012f610262366004610c73565b610593565b61019e6105a0565b34801561027b57600080fd5b5061015061028a366004610c04565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546102c490610d3a565b80601f01602080910402602001604051908101604052809291908181526020018280546102f090610d3a565b801561033d5780601f106103125761010080835404028352916020019161033d565b820191906000526020600020905b81548152906001019060200180831161032057829003601f168201915b5050505050905090565b60006103543384846105e1565b50600192915050565b600061036a848484610740565b600160a060020a03841660009081526001602090815260408083203384529091529020548281101561040c5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61041985338584036105e1565b506001949350505050565b61042e3382610961565b604051339082156108fc029083906000818181858888f1935050505015801561045b573d6000803e3d6000fd5b5060405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a250565b336000818152600160209081526040808320600160a060020a038716845290915281205490916103549185906104cb908690610d0b565b6105e1565b6060600480546102c490610d3a565b336000908152600160209081526040808320600160a060020a03861684529091528120548281101561057c5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610403565b61058933858584036105e1565b5060019392505050565b6000610354338484610740565b6105aa3334610ae4565b60405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b600160a060020a03831661065f5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0382166106de5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600160a060020a0383166107bf5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03821661083e5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a038316600090815260208190526040902054818110156108d05760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290610907908490610d0b565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161095391815260200190565b60405180910390a350505050565b600160a060020a0382166109e05760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a03821660009081526020819052604090205481811015610a725760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610403565b600160a060020a0383166000908152602081905260408120838303905560028054849290610aa1908490610d23565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610733565b600160a060020a038216610b3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610403565b8060026000828254610b4f9190610d0b565b9091555050600160a060020a03821660009081526020819052604081208054839290610b7c908490610d0b565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8035600160a060020a0381168114610bdd57600080fd5b919050565b600060208284031215610bf457600080fd5b610bfd82610bc6565b9392505050565b60008060408385031215610c1757600080fd5b610c2083610bc6565b9150610c2e60208401610bc6565b90509250929050565b600080600060608486031215610c4c57600080fd5b610c5584610bc6565b9250610c6360208501610bc6565b9150604084013590509250925092565b60008060408385031215610c8657600080fd5b610c8f83610bc6565b946020939093013593505050565b600060208284031215610caf57600080fd5b5035919050565b600060208083528351808285015260005b81811015610ce357858101830151858201604001528201610cc7565b81811115610cf5576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610d1e57610d1e610d8e565b500190565b600082821015610d3557610d35610d8e565b500390565b600281046001821680610d4e57607f821691505b60208210811415610d88577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220f75853fc2637d5ca8248502a85a7f949947d4ce8824b83a6ae12f18058d32b2c64736f6c63430008060033", @@ -418,7 +418,7 @@ "storageLayout": { "storage": [ { - "astId": 991, + "astId": 1371, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_balances", "offset": 0, @@ -426,7 +426,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 997, + "astId": 1377, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_allowances", "offset": 0, @@ -434,7 +434,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 999, + "astId": 1379, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_totalSupply", "offset": 0, @@ -442,7 +442,7 @@ "type": "t_uint256" }, { - "astId": 1001, + "astId": 1381, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_name", "offset": 0, @@ -450,7 +450,7 @@ "type": "t_string_storage" }, { - "astId": 1003, + "astId": 1383, "contract": "contracts/tokens/sAMB.sol:sAMB", "label": "_symbol", "offset": 0, diff --git a/contracts/deployments/test/eth/solcInputs/13963204c1e3ae6f33bd8024ced50cd9.json b/contracts/deployments/test/eth/solcInputs/13963204c1e3ae6f33bd8024ced50cd9.json deleted file mode 100644 index a2474623..00000000 --- a/contracts/deployments/test/eth/solcInputs/13963204c1e3ae6f33bd8024ced50cd9.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/checks/CheckAura.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckAura is Initializable {\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n bytes1 constant STEP_PREFIX = 0x84;\n bytes2 constant SIGNATURE_PREFIX = 0xB841;\n\n address[] public validatorSet;\n address validatorSetAddress;\n bytes32 public lastProcessedBlock; // actually latest processed block in which *vs change event* emitted\n uint public minSafetyBlocksValidators;\n\n\n struct BlockAura {\n bytes3 p0Seal;\n bytes3 p0Bare;\n\n bytes32 parentHash;\n bytes p2;\n bytes32 receiptHash;\n bytes p3;\n\n bytes4 step;\n bytes signature; // todo maybe pass s r v values?\n\n uint64 finalizedVs;\n }\n\n\n struct ValidatorSetChange {\n address deltaAddress;\n uint16 deltaIndex; // add if 0, else remove\n }\n\n struct ValidatorSetProof {\n bytes[] receiptProof;\n ValidatorSetChange[] changes;\n uint64 eventBlock;\n }\n\n struct AuraProof {\n BlockAura[] blocks;\n CommonStructs.TransferProof transfer;\n ValidatorSetProof[] vsChanges;\n uint64 transferEventBlock;\n }\n\n\n function __CheckAura_init(\n address[] calldata initialValidators_,\n address validatorSetAddress_,\n bytes32 lastProcessedBlock_,\n uint minSafetyBlocksValidators_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n validatorSet = initialValidators_;\n validatorSetAddress = validatorSetAddress_;\n lastProcessedBlock = lastProcessedBlock_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n\n\n /*\n AuraProof.blocks contains:\n - blocks for validate validatorSet change event, in that order:\n - block with `InitiateChange` events (contains list of all validators)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize; have `finalizedVs` != 0\n * repeated for each vs change event; all events must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n AuraProof.vsChanges contains changes in validator set and receiptProof for validation.\n block.finalizedVs-1 is index in AuraProof.vsChanges array\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between vsChange events\n If there are no errors, the transfer is considered valid\n */\n function checkAura_(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n\n bytes32 parentHash;\n bytes32 receiptHash;\n\n // auraProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (auraProof.transfer.eventId != 0) {\n receiptHash = calcTransferReceiptsHash(auraProof.transfer, sideBridgeAddress);\n require(auraProof.blocks[auraProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(auraProof.blocks.length - auraProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < auraProof.blocks.length; i++) {\n BlockAura calldata block_ = auraProof.blocks[i];\n\n // check that parentHash is correct\n if (block_.parentHash != parentHash) {\n // we can ignore wrong parentHash if:\n // - it's NOT safety blocks for transfer event\n // - it's first block (don't know parentHash)\n // - it's finalizing block (there is gap BEFORE finalizing block)\n // - it's next block after finalizing (there is gap AFTER finalizing block)\n // else, raise error\n\n if (i > auraProof.transferEventBlock || // safety blocks for transfer event\n (i != 0 && // not first block\n block_.finalizedVs == 0 && // not finalizing block\n auraProof.blocks[i-1].finalizedVs == 0) // not next block after finalizing\n )\n revert(\"Wrong parent hash\");\n }\n\n // check validator for this block\n // calc block hash for this block\n parentHash = checkBlock(block_);\n\n // if this block is finalizing block\n // 0 means no events should be finalized, so indexes are shifted by 1\n if (block_.finalizedVs != 0) {\n // vs changes in that block\n ValidatorSetProof calldata vsProof = auraProof.vsChanges[block_.finalizedVs - 1];\n\n // apply vs changes\n for (uint k = 0; k < vsProof.changes.length; k++)\n applyVsChange(vsProof.changes[k]);\n\n // check proof\n receiptHash = calcValidatorSetReceiptHash(vsProof.receiptProof, validatorSetAddress, validatorSet);\n require(auraProof.blocks[vsProof.eventBlock].receiptHash == receiptHash, \"Wrong VS receipt hash\");\n require(i - vsProof.eventBlock >= minSafetyBlocksValidators, \"Few safety blocks validators\");\n }\n\n }\n\n // save block.parentHash in which latest processed vsChange event emitted\n if (auraProof.vsChanges.length > 0) {\n lastProcessedBlock = auraProof.blocks[auraProof.vsChanges[auraProof.vsChanges.length - 1].eventBlock].parentHash;\n }\n }\n\n function getValidatorSet() public view returns (address[] memory) {\n return validatorSet;\n }\n\n function applyVsChange(ValidatorSetChange calldata vsEvent) internal {\n if (vsEvent.deltaIndex == 0) {// add validator\n validatorSet.push(vsEvent.deltaAddress);\n } else {// delete validator\n uint index = uint(vsEvent.deltaIndex - 1);\n validatorSet[index] = validatorSet[validatorSet.length - 1];\n validatorSet.pop();\n }\n }\n\n function checkBlock(BlockAura calldata block_) internal view returns (bytes32) {\n (bytes32 bareHash, bytes32 sealHash) = calcBlockHash(block_);\n\n address validator = validatorSet[bytesToUint(block_.step) % validatorSet.length];\n require(ecdsaRecover(bareHash, block_.signature) == validator, \"Failed to verify sign\");\n\n return sealHash;\n }\n\n function calcBlockHash(BlockAura calldata block_) internal pure returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p2, block_.receiptHash, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Bare, commonRlp)),\n // hash with seal, for prevHash check\n keccak256(abi.encodePacked(block_.p0Seal, commonRlp, STEP_PREFIX, block_.step, SIGNATURE_PREFIX, block_.signature))\n );\n }\n\n\n function calcValidatorSetReceiptHash(bytes[] calldata receiptProof, address validatorSetAddress_, address[] storage vSet) private pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n receiptProof[0],\n validatorSetAddress_,\n receiptProof[1],\n abi.encode(vSet),\n receiptProof[2]\n ));\n return calcReceiptsHash(receiptProof, el, 3);\n }\n\n function bytesToUint(bytes4 b) internal pure returns (uint){\n return uint(uint32(b));\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckReceiptsProof.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\n// check readme for focs\nfunction calcReceiptsHash(bytes[] calldata proof, bytes32 el, uint proofStart) pure returns (bytes32) {\n bytes memory s;\n\n for (uint i = proofStart; i < proof.length; i += 2) {\n s = abi.encodePacked(proof[i], el, proof[i + 1]);\n el = (s.length > 32) ? keccak256(s) : bytes32(s);\n }\n\n return el;\n}\n\n\nfunction calcTransferReceiptsHash(CommonStructs.TransferProof calldata p, address eventContractAddress) pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n p.receiptProof[0],\n eventContractAddress,\n p.receiptProof[1],\n toBinary(p.eventId),\n p.receiptProof[2],\n abi.encode(p.transfers),\n p.receiptProof[3]\n ));\n return calcReceiptsHash(p.receiptProof, el, 4);\n // start from proof[4]\n}\n\n\nfunction toBinary(uint _x) pure returns (bytes memory) {\n bytes memory b = new bytes(32);\n assembly {\n mstore(add(b, 32), _x)\n }\n uint i;\n for (i = 0; i < 32; i++) {\n if (b[i] != 0) {\n break;\n }\n }\n bytes memory res = new bytes(32 - i);\n for (uint j = 0; j < res.length; j++) {\n res[j] = b[i++];\n }\n return res;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" - }, - "contracts/checks/SignatureCheck.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" - }, - "contracts/common/CommonStructs.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address adminAddress;\n address relayAddress; address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" - }, - "contracts/networks/_AuraReceiver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract _AuraReceiver is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n}\n" - }, - "contracts/common/CommonBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // OWNER_ROLE must be DEFAULT_ADMIN_ROLE because by default only this role able to grant or revoke other roles\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\"); // can submit transfers\n bytes32 public constant WATCHDOG_ROLE = keccak256(\"WATCHDOG_ROLE\"); // can pause contract\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\"FEE_PROVIDER_ROLE\"); // fee signatures must be signed by this role\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable public transferFeeRecipient;\n address payable public bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRole(ADMIN_ROLE, args.adminAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId **and all after it**\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n require(eventId <= inputEventId, \"eventId must be <= inputEventId\");\n\n // now waiting for submitting a new transfer with `eventId` id\n inputEventId = eventId - 1;\n\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n\n }\n\n // pretend like bridge already receive and process all transfers up to `eventId` id\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\n }\n\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(WATCHDOG_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(FEE_PROVIDER_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" - }, - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\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, _msgSender());\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(IAccessControlUpgradeable).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" - }, - "contracts/tokens/IWrapper.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 IERC165Upgradeable {\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" - }, - "contracts/networks/ETH_EthBridge_AURA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract ETH_EthBridge_AURA is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/BSC_BscBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract BSC_BscBridge is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/ETH_EthBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract ETH_EthBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata _watchdogs,\n address _fee_provider\n ) public initializer {\n __CommonBridge_init(args);\n setWatchdogsAndFeeProvider(_watchdogs, _fee_provider);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n setWatchdogsAndFeeProvider(_watchdogs, _fee_provider);\n }\n\n function setWatchdogsAndFeeProvider(\n address[] calldata _watchdogs,\n address _fee_provider\n ) public onlyRole(ADMIN_ROLE) whenNotPaused {\n for (uint i = 0; i < _watchdogs.length; i++)\n _setupRole(WATCHDOG_ROLE, _watchdogs[i]);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n\n\n}\n" - }, - "contracts/checks/CheckUntrustless2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\ncontract CheckUntrustless2 {\n // this contract do nothing, but i think it's required to inheritance from it\n // todo check this\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckUntrustless.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckUntrustless {\n uint public confirmationsThreshold;\n\n // [hash of (eventId, transfers)] => [relayAddress] => isConfirmed\n mapping(bytes32 => mapping(address => bool)) public confirmations;\n\n // using this instead of RELAY_ROLE coz it simpler\n address[] public relays;\n\n event RelayAdd(address indexed relay);\n event RelayRemove(address indexed relay);\n event ThresholdChange(uint newThreshold);\n event RelayConfirmation(address indexed sender, uint indexed eventId, bytes32 hash);\n\n // return true if current call reach confirmationsThreshold\n function checkUntrustless_(uint eventId, CommonStructs.Transfer[] calldata transfers) internal returns (bool) {\n require(isRelay(msg.sender), \"You not in relay whitelist\");\n\n bytes32 hash = transfersHash(eventId, transfers);\n require(confirmations[hash][msg.sender] == false, \"You have already confirmed this\");\n\n uint confirmCount = confirmedCount(hash);\n require(confirmCount < confirmationsThreshold, \"Already confirmed\");\n\n confirmations[hash][msg.sender] = true;\n emit RelayConfirmation(msg.sender, eventId, hash);\n\n // +1 coz current relay confirmed just now\n return confirmCount + 1 >= confirmationsThreshold;\n }\n\n\n function isConfirmedByRelay(address relay, uint eventId, CommonStructs.Transfer[] calldata transfers) public view returns (bool) {\n bytes32 hash = transfersHash(eventId, transfers);\n return confirmations[hash][relay];\n }\n\n\n function confirmedCount(bytes32 hash) public view returns (uint) {\n uint res;\n for (uint i = 0; i < relays.length; i++)\n if (confirmations[hash][relays[i]])\n res++;\n return res;\n }\n\n\n function isRelay(address relay) public view returns (bool){\n for (uint i = 0; i < relays.length; i++)\n if (relays[i] == relay)\n return true;\n return false;\n }\n\n function getRelays() public view returns (address[] memory) {\n return relays;\n }\n\n function transfersHash(uint eventId, CommonStructs.Transfer[] calldata transfers) public pure returns (bytes32) {\n bytes memory payload = abi.encodePacked(eventId);\n\n // i guess we can hash transfers only in this way\n for (uint i = 0; i < transfers.length; i++)\n payload = abi.encodePacked(payload, transfers[i].amount, transfers[i].toAddress, transfers[i].tokenAddress);\n\n return keccak256(payload);\n }\n\n\n function _setRelaysAndConfirmations(address[] memory toRemove, address[] memory toAdd, uint _confirmations) internal {\n for (uint i = 0; i < toRemove.length; i++)\n _removeRelay(toRemove[i]);\n for (uint i = 0; i < toAdd.length; i++)\n _addRelay(toAdd[i]);\n\n if (confirmationsThreshold != _confirmations) {\n confirmationsThreshold = _confirmations;\n emit ThresholdChange(_confirmations);\n }\n }\n\n function _removeRelay(address relay) internal {\n for (uint i = 0; i < relays.length; i++) {\n if (relays[i] == relay) {\n relays[i] = relays[relays.length - 1];\n relays.pop();\n emit RelayRemove(relay);\n return;\n }\n }\n revert(\"Not a relay\");\n }\n\n function _addRelay(address relay) internal {\n require(!isRelay(relay), \"Already relay\");\n relays.push(relay);\n emit RelayAdd(relay);\n }\n\n uint256[15] private ___gap;\n\n}\n" - }, - "contracts/networks/ETH_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless.sol\";\n\n\ncontract ETH_AmbBridge is CommonBridge, CheckUntrustless {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint _confirmations,\n address[] calldata _relays\n ) public initializer {\n __CommonBridge_init(args);\n _setRelaysAndConfirmations(new address[](0), _relays, _confirmations);\n }\n\n function upgrade(\n uint _confirmations,\n address[] memory _relays\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n // _setRelaysAndConfirmations don't work during upgrade and nobody knows why\n relays = _relays;\n confirmationsThreshold = _confirmations;\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public whenNotPaused {\n // relay \"role\" checked at CheckUntrustless contract\n require(eventId == inputEventId + 1, \"EventId out of order\");\n\n bool confirm = checkUntrustless_(eventId, transfers);\n if (confirm) {// required count of confirmations reached\n ++inputEventId;\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n // todo need lock?\n }\n }\n\n function setRelaysAndConfirmations(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n require(msg.sender == address(this), \"This method require multisig\");\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n\n}\n" - }, - "contracts/contracts_for_tests/CheckUntrustlessTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckUntrustless.sol\";\n\ncontract CheckUntrustlessTest is CheckUntrustless {\n constructor() {}\n\n event checkUntrustlessTestResult(bool result);\n\n function checkUntrustlessTest(uint eventId, CommonStructs.Transfer[] calldata transfers) public {\n emit checkUntrustlessTestResult(checkUntrustless_(eventId, transfers));\n }\n\n function setRelaysAndConfirmationsTest(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n}\n" - }, - "contracts/checks/CheckPoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"./CheckPoW_Ethash.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckPoW is Initializable, Ethash {\n struct BlockPoW {\n bytes3 p0WithNonce;\n bytes3 p0WithoutNonce;\n\n bytes p1;\n bytes32 parentOrReceiptHash;\n bytes p2;\n bytes difficulty;\n bytes p3;\n bytes number;\n bytes p4; // end when extra end\n bytes p5; // after extra\n bytes nonce;\n bytes p6;\n\n uint[] dataSetLookup;\n uint[] witnessForLookup;\n }\n\n struct PoWProof {\n BlockPoW[] blocks;\n CommonStructs.TransferProof transfer;\n }\n\n uint256 minimumDifficulty;\n\n function __CheckPoW_init(\n uint256 minimumDifficulty_\n ) internal initializer {\n minimumDifficulty = minimumDifficulty_;\n }\n\n /*\n PoWProof.blocks contains:\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, checking it pow hash.\n Each block parentHash must be equal to the hash of the previous block.\n If there are no errors, the transfer is considered valid\n */\n function checkPoW_(PoWProof calldata powProof, address sideBridgeAddress) internal view\n {\n bytes32 hash = calcTransferReceiptsHash(powProof.transfer, sideBridgeAddress);\n for (uint i = 0; i < powProof.blocks.length; i++) {\n require(powProof.blocks[i].parentOrReceiptHash == hash, \"parentHash or receiptHash wrong\");\n hash = blockHash(powProof.blocks[i]);\n\n verifyEthash(powProof.blocks[i]);\n }\n }\n\n\n function verifyEthash(BlockPoW calldata block_) internal view {\n uint difficulty = bytesToUint(block_.difficulty);\n require(difficulty >= minimumDifficulty, \"difficulty too low\");\n verifyPoW(\n bytesToUint(block_.number),\n blockHashWithoutNonce(block_),\n bytesToUint(block_.nonce),\n difficulty,\n block_.dataSetLookup,\n block_.witnessForLookup\n );\n }\n\n function blockHash(BlockPoW calldata block_) internal pure returns (bytes32) {\n // Note: too much arguments in abi.encodePacked() function cause CompilerError: Stack too deep...\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2,\n block_.difficulty,\n block_.p3\n ),\n abi.encodePacked(\n block_.number,\n block_.p4,\n block_.p5,\n block_.nonce,\n block_.p6\n )\n ));\n }\n\n function blockHashWithoutNonce(BlockPoW calldata block_) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithoutNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2\n ),\n abi.encodePacked(\n block_.difficulty,\n block_.p3,\n block_.number,\n block_.p4,\n block_.p6\n )\n ));\n }\n\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckPoW_Ethash.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n/// @dev These contracts are used to verify Proof of Work within a smart contract.\n/// The algorithms have been extracted from the implementation of smart pool (https://github.com/smartpool)\ncontract SHA3_512 {\n constructor() {}\n\n function keccak_f(uint[25] memory A) pure private returns (uint[25] memory) {\n uint[25] memory B;\n uint[5] memory C;\n uint[5] memory D;\n\n uint[24] memory RC = [\n uint(0x0000000000000001),\n 0x0000000000008082,\n 0x800000000000808A,\n 0x8000000080008000,\n 0x000000000000808B,\n 0x0000000080000001,\n 0x8000000080008081,\n 0x8000000000008009,\n 0x000000000000008A,\n 0x0000000000000088,\n 0x0000000080008009,\n 0x000000008000000A,\n 0x000000008000808B,\n 0x800000000000008B,\n 0x8000000000008089,\n 0x8000000000008003,\n 0x8000000000008002,\n 0x8000000000000080,\n 0x000000000000800A,\n 0x800000008000000A,\n 0x8000000080008081,\n 0x8000000000008080,\n 0x0000000080000001,\n 0x8000000080008008];\n\n for (uint i = 0; i < 24; i++) {\n\n C[0] = A[0] ^ A[1] ^ A[2] ^ A[3] ^ A[4];\n C[1] = A[5] ^ A[6] ^ A[7] ^ A[8] ^ A[9];\n C[2] = A[10] ^ A[11] ^ A[12] ^ A[13] ^ A[14];\n C[3] = A[15] ^ A[16] ^ A[17] ^ A[18] ^ A[19];\n C[4] = A[20] ^ A[21] ^ A[22] ^ A[23] ^ A[24];\n\n D[0] = C[4] ^ ((C[1] * 2) & 0xffffffffffffffff | (C[1] / (2 ** 63)));\n D[1] = C[0] ^ ((C[2] * 2) & 0xffffffffffffffff | (C[2] / (2 ** 63)));\n D[2] = C[1] ^ ((C[3] * 2) & 0xffffffffffffffff | (C[3] / (2 ** 63)));\n D[3] = C[2] ^ ((C[4] * 2) & 0xffffffffffffffff | (C[4] / (2 ** 63)));\n D[4] = C[3] ^ ((C[0] * 2) & 0xffffffffffffffff | (C[0] / (2 ** 63)));\n\n A[0] = A[0] ^ D[0];\n A[1] = A[1] ^ D[0];\n A[2] = A[2] ^ D[0];\n A[3] = A[3] ^ D[0];\n A[4] = A[4] ^ D[0];\n A[5] = A[5] ^ D[1];\n A[6] = A[6] ^ D[1];\n A[7] = A[7] ^ D[1];\n A[8] = A[8] ^ D[1];\n A[9] = A[9] ^ D[1];\n A[10] = A[10] ^ D[2];\n A[11] = A[11] ^ D[2];\n A[12] = A[12] ^ D[2];\n A[13] = A[13] ^ D[2];\n A[14] = A[14] ^ D[2];\n A[15] = A[15] ^ D[3];\n A[16] = A[16] ^ D[3];\n A[17] = A[17] ^ D[3];\n A[18] = A[18] ^ D[3];\n A[19] = A[19] ^ D[3];\n A[20] = A[20] ^ D[4];\n A[21] = A[21] ^ D[4];\n A[22] = A[22] ^ D[4];\n A[23] = A[23] ^ D[4];\n A[24] = A[24] ^ D[4];\n\n /*Rho and pi steps*/\n B[0] = A[0];\n B[8] = ((A[1] * (2 ** 36)) & 0xffffffffffffffff | (A[1] / (2 ** 28)));\n B[11] = ((A[2] * (2 ** 3)) & 0xffffffffffffffff | (A[2] / (2 ** 61)));\n B[19] = ((A[3] * (2 ** 41)) & 0xffffffffffffffff | (A[3] / (2 ** 23)));\n B[22] = ((A[4] * (2 ** 18)) & 0xffffffffffffffff | (A[4] / (2 ** 46)));\n B[2] = ((A[5] * (2 ** 1)) & 0xffffffffffffffff | (A[5] / (2 ** 63)));\n B[5] = ((A[6] * (2 ** 44)) & 0xffffffffffffffff | (A[6] / (2 ** 20)));\n B[13] = ((A[7] * (2 ** 10)) & 0xffffffffffffffff | (A[7] / (2 ** 54)));\n B[16] = ((A[8] * (2 ** 45)) & 0xffffffffffffffff | (A[8] / (2 ** 19)));\n B[24] = ((A[9] * (2 ** 2)) & 0xffffffffffffffff | (A[9] / (2 ** 62)));\n B[4] = ((A[10] * (2 ** 62)) & 0xffffffffffffffff | (A[10] / (2 ** 2)));\n B[7] = ((A[11] * (2 ** 6)) & 0xffffffffffffffff | (A[11] / (2 ** 58)));\n B[10] = ((A[12] * (2 ** 43)) & 0xffffffffffffffff | (A[12] / (2 ** 21)));\n B[18] = ((A[13] * (2 ** 15)) & 0xffffffffffffffff | (A[13] / (2 ** 49)));\n B[21] = ((A[14] * (2 ** 61)) & 0xffffffffffffffff | (A[14] / (2 ** 3)));\n B[1] = ((A[15] * (2 ** 28)) & 0xffffffffffffffff | (A[15] / (2 ** 36)));\n B[9] = ((A[16] * (2 ** 55)) & 0xffffffffffffffff | (A[16] / (2 ** 9)));\n B[12] = ((A[17] * (2 ** 25)) & 0xffffffffffffffff | (A[17] / (2 ** 39)));\n B[15] = ((A[18] * (2 ** 21)) & 0xffffffffffffffff | (A[18] / (2 ** 43)));\n B[23] = ((A[19] * (2 ** 56)) & 0xffffffffffffffff | (A[19] / (2 ** 8)));\n B[3] = ((A[20] * (2 ** 27)) & 0xffffffffffffffff | (A[20] / (2 ** 37)));\n B[6] = ((A[21] * (2 ** 20)) & 0xffffffffffffffff | (A[21] / (2 ** 44)));\n B[14] = ((A[22] * (2 ** 39)) & 0xffffffffffffffff | (A[22] / (2 ** 25)));\n B[17] = ((A[23] * (2 ** 8)) & 0xffffffffffffffff | (A[23] / (2 ** 56)));\n B[20] = ((A[24] * (2 ** 14)) & 0xffffffffffffffff | (A[24] / (2 ** 50)));\n\n /*Xi state*/\n A[0] = B[0] ^ ((~B[5]) & B[10]);\n A[1] = B[1] ^ ((~B[6]) & B[11]);\n A[2] = B[2] ^ ((~B[7]) & B[12]);\n A[3] = B[3] ^ ((~B[8]) & B[13]);\n A[4] = B[4] ^ ((~B[9]) & B[14]);\n A[5] = B[5] ^ ((~B[10]) & B[15]);\n A[6] = B[6] ^ ((~B[11]) & B[16]);\n A[7] = B[7] ^ ((~B[12]) & B[17]);\n A[8] = B[8] ^ ((~B[13]) & B[18]);\n A[9] = B[9] ^ ((~B[14]) & B[19]);\n A[10] = B[10] ^ ((~B[15]) & B[20]);\n A[11] = B[11] ^ ((~B[16]) & B[21]);\n A[12] = B[12] ^ ((~B[17]) & B[22]);\n A[13] = B[13] ^ ((~B[18]) & B[23]);\n A[14] = B[14] ^ ((~B[19]) & B[24]);\n A[15] = B[15] ^ ((~B[20]) & B[0]);\n A[16] = B[16] ^ ((~B[21]) & B[1]);\n A[17] = B[17] ^ ((~B[22]) & B[2]);\n A[18] = B[18] ^ ((~B[23]) & B[3]);\n A[19] = B[19] ^ ((~B[24]) & B[4]);\n A[20] = B[20] ^ ((~B[0]) & B[5]);\n A[21] = B[21] ^ ((~B[1]) & B[6]);\n A[22] = B[22] ^ ((~B[2]) & B[7]);\n A[23] = B[23] ^ ((~B[3]) & B[8]);\n A[24] = B[24] ^ ((~B[4]) & B[9]);\n\n /*Last step*/\n A[0] = A[0] ^ RC[i];\n }\n\n return A;\n }\n\n\n function sponge(uint[9] memory M) pure internal returns (uint[16] memory) {\n require((M.length * 8) == 72, \"sponge error\");\n\n M[5] = 0x01;\n M[8] = 0x8000000000000000;\n\n uint r = 72;\n uint w = 8;\n uint size = M.length * 8;\n\n uint[25] memory S;\n uint i;\n uint y;\n uint x;\n /*Absorbing Phase*/\n for (i = 0; i < size / r; i++) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w)) {\n S[5 * x + y] = S[5 * x + y] ^ M[i * 9 + x + 5 * y];\n }\n }\n }\n S = keccak_f(S);\n }\n\n /*Squeezing phase*/\n uint[16] memory result;\n uint b = 0;\n while (b < 16) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w) && (b < 16)) {\n result[b] = S[5 * x + y] & 0xFFFFFFFF;\n result[b + 1] = S[5 * x + y] / 0x100000000;\n b += 2;\n }\n }\n }\n }\n\n return result;\n }\n\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\ncontract Ethash is SHA3_512 {\n\n uint constant EPOCH_LENGTH = 30000; // blocks per epoch\n\n constructor() {\n }\n\n struct EthashCacheOptData {\n uint[512] merkleNodes;\n uint fullSizeIn128Resultion;\n uint branchDepth;\n }\n\n mapping(uint => EthashCacheOptData) epochData;\n\n\n function verifyPoW(uint blockNumber, bytes32 rlpHeaderHashWithoutNonce, uint nonce, uint difficulty,\n uint[] memory dataSetLookup, uint[] memory witnessForLookup) internal view {\n\n uint epoch = blockNumber / EPOCH_LENGTH;\n uint ethash = hashimoto(rlpHeaderHashWithoutNonce, nonce, dataSetLookup, witnessForLookup, epoch);\n\n require(ethash <= (2 ** 256 - 1) / difficulty, \"Ethash difficulty too low\");\n }\n\n function isEpochDataSet(uint epochIndex) public view returns (bool) {\n return epochData[epochIndex].fullSizeIn128Resultion != 0;\n }\n\n function setEpochData(\n uint epochNum,\n uint fullSizeIn128Resultion,\n uint branchDepth,\n uint[] calldata merkleNodes\n ) public {\n\n // we store only previous and current epochs\n // so, delete second from the end epoch\n if (epochNum >= 2) // underflow check\n delete epochData[epochNum - 2];\n\n\n uint l = merkleNodes.length;\n uint[512] storage nodes = epochData[epochNum].merkleNodes;\n\n for (uint i = 0; i < l; i++) {\n nodes[i] = merkleNodes[i];\n }\n\n epochData[epochNum].fullSizeIn128Resultion = fullSizeIn128Resultion;\n epochData[epochNum].branchDepth = branchDepth;\n }\n\n\n function hashimoto(bytes32 header,\n uint nonceLe,\n uint[] memory dataSetLookup,\n uint[] memory witnessForLookup,\n uint epochIndex) private view returns (uint) {\n\n uint[16] memory s = computeS(uint(header), nonceLe);\n uint[32] memory mix;\n uint[8] memory cmix;\n\n\n uint depth = epochData[epochIndex].branchDepth;\n uint fullSize = epochData[epochIndex].fullSizeIn128Resultion;\n\n uint i;\n uint j;\n\n require(fullSize != 0, \"EpochData not set\");\n\n\n for (i = 0; i < 16; i++) {\n assembly {\n let offset := mul(i, 0x20)\n\n //mix[i] = s[i];\n mstore(add(mix, offset), mload(add(s, offset)))\n\n // mix[i+16] = s[i];\n mstore(add(mix, add(0x200, offset)), mload(add(s, offset)))\n }\n }\n\n for (i = 0; i < 64; i++) {\n uint p = fnv(i ^ s[0], mix[i % 32]) % fullSize;\n\n // console.log(computeCacheRoot( p, i, dataSetLookup, witnessForLookup, depthAndFullSize[0]));\n // console.log(getMerkleLeave( epochIndex, p ));\n\n if (computeCacheRoot(p, i, dataSetLookup, witnessForLookup, depth) != getMerkleLeave(epochIndex, p)) {\n // PoW failed\n revert(\"PoW failed\");\n }\n\n for (j = 0; j < 8; j++) {\n\n assembly{\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & varFFFFFFFF );\n let dataOffset := add(mul(0x80, i), add(dataSetLookup, 0x20))\n let dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n let mixOffset := add(mix, mul(0x20, j))\n let mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n let fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n }\n\n\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & 0xFFFFFFFF );\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n\n\n //dataSetLookup[4*i ] = dataSetLookup[4*i ]/(2**32);\n //dataSetLookup[4*i + 1] = dataSetLookup[4*i + 1]/(2**32);\n //dataSetLookup[4*i + 2] = dataSetLookup[4*i + 2]/(2**32);\n //dataSetLookup[4*i + 3] = dataSetLookup[4*i + 3]/(2**32);\n\n assembly{\n let offset := add(add(dataSetLookup, 0x20), mul(i, 0x80))\n let value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n }\n }\n }\n\n\n for (i = 0; i < 32; i += 4) {\n cmix[i / 4] = (fnv(fnv(fnv(mix[i], mix[i + 1]), mix[i + 2]), mix[i + 3]));\n }\n\n return computeSha3(s, cmix);\n\n }\n\n\n function fnv(uint v1, uint v2) pure internal returns (uint) {\n return ((v1 * 0x01000193) ^ v2) & 0xFFFFFFFF;\n }\n\n function computeCacheRoot(uint index,\n uint indexInElementsArray,\n uint[] memory elements,\n uint[] memory witness,\n uint branchSize) pure private returns (uint) {\n\n uint leaf = computeLeaf(elements, indexInElementsArray) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n\n uint left;\n uint right;\n uint node;\n bool oddBranchSize = (branchSize % 2) > 0;\n\n assembly {\n branchSize := div(branchSize, 2)\n //branchSize /= 2;\n }\n uint witnessIndex = indexInElementsArray * branchSize;\n if (oddBranchSize) witnessIndex += indexInElementsArray;\n\n uint depth;\n for (depth = 0; depth < branchSize; depth++) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n\n //node = witness[witnessIndex + depth] / (2**128);\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := div(node, 0x100000000000000000000000000000000)\n }\n }\n else {\n assembly {\n left := div(node, 0x100000000000000000000000000000000)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n }\n\n if (oddBranchSize) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n }\n\n\n return leaf;\n }\n\n\n function computeSha3(uint[16] memory s, uint[8] memory cmix) pure internal returns (uint) {\n uint s0 = s[0] + s[1] * (2 ** 32) + s[2] * (2 ** 64) + s[3] * (2 ** 96) +\n (s[4] + s[5] * (2 ** 32) + s[6] * (2 ** 64) + s[7] * (2 ** 96)) * (2 ** 128);\n\n uint s1 = s[8] + s[9] * (2 ** 32) + s[10] * (2 ** 64) + s[11] * (2 ** 96) +\n (s[12] + s[13] * (2 ** 32) + s[14] * (2 ** 64) + s[15] * (2 ** 96)) * (2 ** 128);\n\n uint c = cmix[0] + cmix[1] * (2 ** 32) + cmix[2] * (2 ** 64) + cmix[3] * (2 ** 96) +\n (cmix[4] + cmix[5] * (2 ** 32) + cmix[6] * (2 ** 64) + cmix[7] * (2 ** 96)) * (2 ** 128);\n\n\n /* god knows why need to convert to big endian */\n return uint(keccak256(abi.encodePacked(reverseBytes(s0), reverseBytes(s1), reverseBytes(c))));\n }\n\n\n function computeLeaf(uint[] memory dataSetLookup, uint index) pure internal returns (uint) {\n return uint(keccak256(abi.encodePacked(\n dataSetLookup[4 * index],\n dataSetLookup[4 * index + 1],\n dataSetLookup[4 * index + 2],\n dataSetLookup[4 * index + 3]\n )));\n\n }\n\n function computeS(uint header, uint nonceLe) pure internal returns (uint[16] memory) {\n uint[9] memory M;\n\n header = reverseBytes(header);\n\n M[0] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[1] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[2] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[3] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n\n // make little endian nonce\n M[4] = nonceLe;\n return sponge(M);\n }\n\n function reverseBytes(uint input) pure internal returns (uint) {\n uint result;\n for (uint i = 0; i < 32; i++) {\n result = (result << 8) + (input & 0xff);\n input = input >> 8;\n }\n return result;\n }\n\n\n function getMerkleLeave(uint epochIndex, uint p) view internal returns (uint) {\n uint rootIndex = uint(p >> epochData[epochIndex].branchDepth);\n uint expectedRoot = epochData[epochIndex].merkleNodes[(rootIndex >> 1)];\n\n if ((rootIndex % 2) == 0)\n return expectedRoot & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n return expectedRoot >> 128;\n }\n\n}\n" - }, - "contracts/networks/ETH_AmbBridge_PoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoW.sol\";\n\n\ncontract ETH_AmbBridge_PoW is CommonBridge, CheckPoW {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint minimumDifficulty\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoW_init(minimumDifficulty);\n }\n\n function submitTransferPoW(PoWProof calldata powProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(powProof.transfer.eventId);\n checkEventId(powProof.transfer.eventId);\n checkPoW_(powProof, sideBridgeAddress);\n // checkPoW_(powProof, sideBridgeAddress);\n lockTransfers(powProof.transfer.transfers, powProof.transfer.eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n}\n\n" - }, - "contracts/contracts_for_tests/CheckPoWTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoW.sol\";\n\ncontract CheckPoWTest is CheckPoW {\n\n constructor(\n uint minimumDifficulty_\n ) {\n minimumDifficulty = minimumDifficulty_;\n }\n\n function checkPoWTest(PoWProof calldata powProof, address sideBridgeAddress) public {\n checkPoW_(powProof, sideBridgeAddress);\n }\n\n function verifyEthashTest(BlockPoW calldata block_) public view {\n verifyEthash(block_);\n }\n\n function blockHashTest(BlockPoW calldata block_) public pure returns (bytes32) {\n return blockHash(block_);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CommonBridgeTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckReceiptsProof.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // used for signature check\n _setupRole(RELAY_ROLE, address(0x295C2707319ad4BecA6b5bb4086617fD6F240CfE));\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n checkEventId(eventId); // now its more like submitTransferTest\n lockTransfers(events, eventId);\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n // checkReceiptsProof\n\n function calcTransferReceiptsHashTest(CommonStructs.TransferProof calldata p, address eventContractAddress) public pure returns (bytes32) {\n return calcTransferReceiptsHash(p, eventContractAddress);\n }\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" - }, - "contracts/checks/CheckPoSA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckPoSA is Initializable {\n uint256 private constant ADDRESS_LENGTH = 20;\n uint256 private constant EXTRA_VANITY_LENGTH = 32;\n uint256 private constant EXTRA_SEAL_LENGTH = 65;\n uint256 private constant EPOCH_LENGTH = 200;\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n\n mapping(uint => mapping(address => bool)) internal allValidators;\n uint public currentEpoch;\n uint currentValidatorSetSize;\n\n bytes1 chainId;\n\n\n struct BlockPoSA {\n bytes3 p0Signed;\n bytes3 p0Unsigned;\n\n bytes32 parentHash;\n bytes p1;\n bytes32 receiptHash;\n bytes p2;\n bytes number;\n bytes p3;\n\n bytes p4Signed;\n bytes p4Unsigned;\n bytes extraData;\n\n bytes p5;\n }\n\n struct PoSAProof {\n BlockPoSA[] blocks;\n CommonStructs.TransferProof transfer;\n uint64 transferEventBlock;\n }\n\n\n function __CheckPoSA_init(\n address[] calldata initialValidators_,\n uint initialEpoch_,\n bytes1 chainId_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n chainId = chainId_;\n currentEpoch = initialEpoch_;\n currentValidatorSetSize = initialValidators_.length;\n\n for (uint i = 0; i < initialValidators_.length; i++) {\n allValidators[currentEpoch][initialValidators_[i]] = true;\n }\n }\n\n /*\n PoSAProof.blocks contains:\n - blocks for validate validatorSet changes, in that order:\n - first block in epoch (blockNum % 200 == 0)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize\n * repeated for each new epoch, all epochs must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between epochs\n If there are no errors, the transfer is considered valid\n */\n function checkPoSA_(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n bytes32 bareHash;\n bytes32 parentHash;\n uint finalizeVsBlock;\n uint nextVsSize;\n\n // posaProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (posaProof.transfer.eventId != 0) {\n bytes32 receiptHash = calcTransferReceiptsHash(posaProof.transfer, sideBridgeAddress);\n require(posaProof.blocks[posaProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(posaProof.blocks.length - posaProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < posaProof.blocks.length; i++) {\n BlockPoSA calldata block_ = posaProof.blocks[i];\n\n if (parentHash != bytes32(0))\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n\n (bareHash, parentHash) = calcBlockHash(block_);\n\n require(verifySignature(bareHash, getSignature(block_.extraData)), \"invalid signature\");\n\n // change validator set\n\n uint blockNumber = bytesToUint(block_.number);\n\n if (blockNumber % EPOCH_LENGTH == 0) {\n require(blockNumber / EPOCH_LENGTH == currentEpoch + 1, \"invalid epoch\");\n\n nextVsSize = newValidatorSet(block_.extraData);\n finalizeVsBlock = blockNumber + currentValidatorSetSize / 2;\n } else if (blockNumber == finalizeVsBlock) {\n currentEpoch++;\n currentValidatorSetSize = nextVsSize;\n\n // after finalizing vs change, next block in posaProof.blocks can have any parentHash (skipping some blocks)\n // but only if it's not the safety blocks for transfer event\n if (i < posaProof.transferEventBlock)\n parentHash = bytes32(0);\n }\n }\n }\n\n\n function calcBlockHash(BlockPoSA calldata block_) internal view returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p1, block_.receiptHash, block_.p2, block_.number, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Unsigned, chainId, commonRlp, block_.p4Unsigned, getExtraDataUnsigned(block_.extraData), block_.p5)),\n // hash with seal, for prev_hash check\n keccak256(abi.encodePacked(block_.p0Signed, commonRlp, block_.p4Signed, block_.extraData, block_.p5))\n );\n }\n\n function getSignature(bytes calldata extraData) private pure returns (bytes calldata) {\n uint start = extraData.length - EXTRA_SEAL_LENGTH;\n return extraData[start : start + EXTRA_SEAL_LENGTH];\n }\n\n function getExtraDataUnsigned(bytes calldata extraData) private pure returns (bytes memory) {\n return extraData[0 : extraData.length - EXTRA_SEAL_LENGTH];\n }\n\n function newValidatorSet(bytes calldata extraData) private returns (uint) {\n uint nextValidatorSet = currentEpoch + 1;\n uint endPos = extraData.length - EXTRA_SEAL_LENGTH;\n\n uint nextValidatorSetSize;\n for (uint pos = EXTRA_VANITY_LENGTH; pos < endPos; pos += ADDRESS_LENGTH) {\n address validator = address(bytes20(extraData[pos : pos + ADDRESS_LENGTH]));\n allValidators[nextValidatorSet][validator] = true;\n nextValidatorSetSize++;\n }\n\n return nextValidatorSetSize;\n }\n\n function verifySignature(bytes32 hash, bytes calldata signature) private view returns (bool) {\n address signer = ecdsaRecover(hash, signature);\n return allValidators[currentEpoch][signer];\n }\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n}\n" - }, - "contracts/networks/BSC_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract BSC_AmbBridge is CommonBridge, CheckPoSA {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n uint initialEpoch,\n bytes1 chainId\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoSA_init(initialValidators, initialEpoch, chainId);\n }\n\n function submitTransferPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(posaProof.transfer.eventId);\n checkEventId(posaProof.transfer.eventId);\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(posaProof.transfer.transfers, posaProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoSATest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract CheckPoSATest is CheckPoSA {\n constructor(\n bytes1 chainId_\n ) {\n chainId = chainId_;\n }\n\n function checkPoSATest(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress,\n address[] memory _initialValidators, uint _initialEpoch, bytes1 _chainId) public {\n // TODO: we can't use the `__CheckPoSA_init` twice, but copy-paste is also not good\n chainId = _chainId;\n currentEpoch = _initialEpoch;\n currentValidatorSetSize = _initialValidators.length;\n\n for (uint i = 0; i < _initialValidators.length; i++) {\n allValidators[currentEpoch][_initialValidators[i]] = true;\n }\n\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockPoSA calldata block_) public view returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockPoSA calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n}\n" - }, - "contracts/tokens/sAMB.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./IWrapper.sol\";\n\ncontract sAMB is IWrapper, ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\n\n function deposit() public override payable {\n _mint(msg.sender, msg.value);\n\n emit Deposit(msg.sender, msg.value);\n }\n\n function withdraw(uint amount) public override {\n _burn(msg.sender, amount);\n payable(msg.sender).transfer(amount);\n\n emit Withdrawal(msg.sender, amount);\n }\n\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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 * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, 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 * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), 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 * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\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 * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\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/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\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" - }, - "contracts/contracts_for_tests/MintableERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MintableERC20 is ERC20 {\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20 is ERC20, Ownable {\n address public bridgeAddress; // address of bridge contract on this network\n uint public bridgeBalance; // locked tokens on the bridge\n\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\n ERC20(name_, symbol_)\n Ownable() {\n bridgeAddress = bridgeAddress_;\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\n bridgeAddress = bridgeAddress_;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sender == bridgeAddress) {\n // user transfer tokens to ambrosus => need to mint it\n\n // same amount locked on side bridge\n bridgeBalance += amount;\n\n _mint(recipient, amount);\n } else if (recipient == bridgeAddress) {\n // user withdraw tokens from ambrosus => need to burn it\n\n // side bridge must have enough tokens to send\n require(bridgeBalance >= amount, \"not enough locked tokens on bridge\");\n bridgeBalance -= amount;\n\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/access/Ownable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 _setOwner(_msgSender());\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 called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _setOwner(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 _setOwner(newOwner);\n }\n\n function _setOwner(address newOwner) private {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20_Amb.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20_Amb is ERC20, Ownable {\n\n // decimals of token in side network\n // example:\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\n mapping(address => uint8) public sideTokenDecimals;\n\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\n\n uint8 _decimals;\n\n constructor(\n string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n ) ERC20(name_, symbol_) Ownable() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n }\n\n // todo check if we need this func\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \"wrong array lengths\");\n for (uint i = 0; i < bridgeAddresses_.length; i++)\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n // todo events\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n // user transfer tokens to ambrosus => need to mint it\n\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n\n\n // bridge mint money to user; same amount locked on side bridge\n bridgeBalances[sender] += amount_this;\n\n _mint(recipient, amount_this);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n // user withdraw tokens from ambrosus => need to burn it\n\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n\n\n // user burn tokens; side bridge must have enough tokens to send\n require(bridgeBalances[recipient] >= amount_this, \"not enough locked tokens on bridge\");\n bridgeBalances[recipient] -= amount_this;\n\n _burn(sender, amount_this);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\n if (dTo == dFrom)\n return amount;\n if (dTo > dFrom)\n return amount * (10 ** (dTo - dFrom));\n else\n return amount / (10 ** (dFrom - dTo));\n }\n\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20_AmbTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20_Amb.sol\";\n\ncontract BridgeERC20_AmbTest is BridgeERC20_Amb {\n constructor(string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n )\n BridgeERC20_Amb(name_, symbol_, decimals_, bridgeAddresses_, sideTokenDecimals_) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n function changeBridgeBalance(address bridge, uint balance) public {\n bridgeBalances[bridge] = balance;\n }\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20Test.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n function changeBridgeBalance(uint balance) public {\n bridgeBalance = balance;\n }\n}\n" - }, - "contracts/contracts_for_tests/CheckAuraTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckAura.sol\";\n\ncontract CheckAuraTest is CheckAura {\n constructor(address validatorSetAddress_, uint minSafetyBlocksValidators_) {\n validatorSetAddress = validatorSetAddress_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function checkAuraTest(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress, address[] memory initialValidators_) public {\n validatorSet = initialValidators_;\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockAura calldata block_) public pure returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockAura calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function bytesToUintTest(bytes4 b) public pure returns (uint) {\n return bytesToUint(b);\n }\n\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "evmVersion": "byzantium", - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/contracts/deployments/test/eth/solcInputs/14835e48c656ebed02c4fc9389a12566.json b/contracts/deployments/test/eth/solcInputs/14835e48c656ebed02c4fc9389a12566.json deleted file mode 100644 index 332844f0..00000000 --- a/contracts/deployments/test/eth/solcInputs/14835e48c656ebed02c4fc9389a12566.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/checks/CheckAura.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckAura is Initializable {\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n bytes1 constant STEP_PREFIX = 0x84;\n bytes2 constant SIGNATURE_PREFIX = 0xB841;\n\n address[] public validatorSet;\n address validatorSetAddress;\n bytes32 public lastProcessedBlock; // actually latest processed block in which *vs change event* emitted\n uint public minSafetyBlocksValidators;\n\n\n struct BlockAura {\n bytes3 p0Seal;\n bytes3 p0Bare;\n\n bytes32 parentHash;\n bytes p2;\n bytes32 receiptHash;\n bytes p3;\n\n bytes4 step;\n bytes signature; // todo maybe pass s r v values?\n\n uint64 finalizedVs;\n }\n\n\n struct ValidatorSetChange {\n address deltaAddress;\n uint16 deltaIndex; // add if 0, else remove\n }\n\n struct ValidatorSetProof {\n bytes[] receiptProof;\n ValidatorSetChange[] changes;\n uint64 eventBlock;\n }\n\n struct AuraProof {\n BlockAura[] blocks;\n CommonStructs.TransferProof transfer;\n ValidatorSetProof[] vsChanges;\n uint64 transferEventBlock;\n }\n\n\n function __CheckAura_init(\n address[] calldata initialValidators_,\n address validatorSetAddress_,\n bytes32 lastProcessedBlock_,\n uint minSafetyBlocksValidators_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n validatorSet = initialValidators_;\n validatorSetAddress = validatorSetAddress_;\n lastProcessedBlock = lastProcessedBlock_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n\n\n /*\n AuraProof.blocks contains:\n - blocks for validate validatorSet change event, in that order:\n - block with `InitiateChange` events (contains list of all validators)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize; have `finalizedVs` != 0\n * repeated for each vs change event; all events must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n AuraProof.vsChanges contains changes in validator set and receiptProof for validation.\n block.finalizedVs-1 is index in AuraProof.vsChanges array\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between vsChange events\n If there are no errors, the transfer is considered valid\n */\n function checkAura_(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n\n bytes32 parentHash;\n bytes32 receiptHash;\n\n // auraProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (auraProof.transfer.eventId != 0) {\n receiptHash = calcTransferReceiptsHash(auraProof.transfer, sideBridgeAddress);\n require(auraProof.blocks[auraProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(auraProof.blocks.length - auraProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < auraProof.blocks.length; i++) {\n BlockAura calldata block_ = auraProof.blocks[i];\n\n // check that parentHash is correct\n if (block_.parentHash != parentHash) {\n // we can ignore wrong parentHash if:\n // - it's NOT safety blocks for transfer event\n // - it's first block (don't know parentHash)\n // - it's finalizing block (there is gap BEFORE finalizing block)\n // - it's next block after finalizing (there is gap AFTER finalizing block)\n // else, raise error\n\n if (i > auraProof.transferEventBlock || // safety blocks for transfer event\n (i != 0 && // not first block\n block_.finalizedVs == 0 && // not finalizing block\n auraProof.blocks[i-1].finalizedVs == 0) // not next block after finalizing\n )\n revert(\"Wrong parent hash\");\n }\n\n // check validator for this block\n // calc block hash for this block\n parentHash = checkBlock(block_);\n\n // if this block is finalizing block\n // 0 means no events should be finalized, so indexes are shifted by 1\n if (block_.finalizedVs != 0) {\n // vs changes in that block\n ValidatorSetProof calldata vsProof = auraProof.vsChanges[block_.finalizedVs - 1];\n\n // apply vs changes\n for (uint k = 0; k < vsProof.changes.length; k++)\n applyVsChange(vsProof.changes[k]);\n\n // check proof\n receiptHash = calcValidatorSetReceiptHash(vsProof.receiptProof, validatorSetAddress, validatorSet);\n require(auraProof.blocks[vsProof.eventBlock].receiptHash == receiptHash, \"Wrong VS receipt hash\");\n require(i - vsProof.eventBlock >= minSafetyBlocksValidators, \"Few safety blocks validators\");\n }\n\n }\n\n // save block.parentHash in which latest processed vsChange event emitted\n if (auraProof.vsChanges.length > 0) {\n lastProcessedBlock = auraProof.blocks[auraProof.vsChanges[auraProof.vsChanges.length - 1].eventBlock].parentHash;\n }\n }\n\n function getValidatorSet() public view returns (address[] memory) {\n return validatorSet;\n }\n\n function applyVsChange(ValidatorSetChange calldata vsEvent) internal {\n if (vsEvent.deltaIndex == 0) {// add validator\n validatorSet.push(vsEvent.deltaAddress);\n } else {// delete validator\n uint index = uint(vsEvent.deltaIndex - 1);\n validatorSet[index] = validatorSet[validatorSet.length - 1];\n validatorSet.pop();\n }\n }\n\n function checkBlock(BlockAura calldata block_) internal view returns (bytes32) {\n (bytes32 bareHash, bytes32 sealHash) = calcBlockHash(block_);\n\n address validator = validatorSet[bytesToUint(block_.step) % validatorSet.length];\n require(ecdsaRecover(bareHash, block_.signature) == validator, \"Failed to verify sign\");\n\n return sealHash;\n }\n\n function calcBlockHash(BlockAura calldata block_) internal pure returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p2, block_.receiptHash, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Bare, commonRlp)),\n // hash with seal, for prevHash check\n keccak256(abi.encodePacked(block_.p0Seal, commonRlp, STEP_PREFIX, block_.step, SIGNATURE_PREFIX, block_.signature))\n );\n }\n\n\n function calcValidatorSetReceiptHash(bytes[] calldata receiptProof, address validatorSetAddress_, address[] storage vSet) private pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n receiptProof[0],\n validatorSetAddress_,\n receiptProof[1],\n abi.encode(vSet),\n receiptProof[2]\n ));\n return calcReceiptsHash(receiptProof, el, 3);\n }\n\n function bytesToUint(bytes4 b) internal pure returns (uint){\n return uint(uint32(b));\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckReceiptsProof.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\n// check readme for focs\nfunction calcReceiptsHash(bytes[] calldata proof, bytes32 el, uint proofStart) pure returns (bytes32) {\n bytes memory s;\n\n for (uint i = proofStart; i < proof.length; i += 2) {\n s = abi.encodePacked(proof[i], el, proof[i + 1]);\n el = (s.length > 32) ? keccak256(s) : bytes32(s);\n }\n\n return el;\n}\n\n\nfunction calcTransferReceiptsHash(CommonStructs.TransferProof calldata p, address eventContractAddress) pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n p.receiptProof[0],\n eventContractAddress,\n p.receiptProof[1],\n toBinary(p.eventId),\n p.receiptProof[2],\n abi.encode(p.transfers),\n p.receiptProof[3]\n ));\n return calcReceiptsHash(p.receiptProof, el, 4);\n // start from proof[4]\n}\n\n\nfunction toBinary(uint _x) pure returns (bytes memory) {\n bytes memory b = new bytes(32);\n assembly {\n mstore(add(b, 32), _x)\n }\n uint i;\n for (i = 0; i < 32; i++) {\n if (b[i] != 0) {\n break;\n }\n }\n bytes memory res = new bytes(32 - i);\n for (uint j = 0; j < res.length; j++) {\n res[j] = b[i++];\n }\n return res;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" - }, - "contracts/checks/SignatureCheck.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" - }, - "contracts/common/CommonStructs.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address relayAddress;\n address[] watchdogsAddresses; address feeProviderAddress;\n address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" - }, - "contracts/networks/_AuraReceiver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract _AuraReceiver is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n}\n" - }, - "contracts/common/CommonBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // DEFAULT_ADMIN_ROLE can grants and revokes all roles below; Set to multisig (proxy contract address)\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\"); // can submit transfers\n bytes32 public constant WATCHDOG_ROLE = keccak256(\"WATCHDOG_ROLE\"); // can pause contract\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\"FEE_PROVIDER_ROLE\"); // fee signatures must be signed by this role\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable public transferFeeRecipient;\n address payable public bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, address(this));\n _setupRole(ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRoles(WATCHDOG_ROLE, args.watchdogsAddresses);\n _setupRole(FEE_PROVIDER_ROLE, args.feeProviderAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId **and all after it**\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n require(eventId <= inputEventId, \"eventId must be <= inputEventId\");\n\n // now waiting for submitting a new transfer with `eventId` id\n inputEventId = eventId - 1;\n\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n\n }\n\n // pretend like bridge already receive and process all transfers up to `eventId` id\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\n }\n\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(WATCHDOG_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // roles\n\n function grantRoles(bytes32 role, address[] calldata accounts) public onlyRole(getRoleAdmin(role)) {\n // check permission to grant role via onlyRole(getRoleAdmin(role))\n _setupRoles(role, accounts);\n }\n function revokeRoles(bytes32 role, address[] calldata accounts) public {\n // revokeRole will check for permissions\n for (uint i = 0; i < accounts.length; i++)\n revokeRole(role, accounts[i]);\n }\n function _setupRoles(bytes32 role, address[] calldata accounts) internal {\n // no permissions check at all\n for (uint i = 0; i < accounts.length; i++)\n _setupRole(role, accounts[i]);\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(FEE_PROVIDER_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" - }, - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\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, _msgSender());\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(IAccessControlUpgradeable).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" - }, - "contracts/tokens/IWrapper.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 IERC165Upgradeable {\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" - }, - "contracts/networks/ETH_EthBridge_AURA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract ETH_EthBridge_AURA is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/BSC_BscBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./_AuraReceiver.sol\";\n\n\ncontract BSC_BscBridge is _AuraReceiver {\n\n}\n" - }, - "contracts/networks/ETH_EthBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract ETH_EthBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address oldDefaultAdmin\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n}\n" - }, - "contracts/checks/CheckUntrustless2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\ncontract CheckUntrustless2 {\n // this contract do nothing, but i think it's required to inheritance from it\n // todo check this\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckUntrustless.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckUntrustless {\n uint public confirmationsThreshold;\n\n // [hash of (eventId, transfers)] => [relayAddress] => isConfirmed\n mapping(bytes32 => mapping(address => bool)) public confirmations;\n\n // using this instead of RELAY_ROLE coz it simpler\n address[] public relays;\n\n event RelayAdd(address indexed relay);\n event RelayRemove(address indexed relay);\n event ThresholdChange(uint newThreshold);\n event RelayConfirmation(address indexed sender, uint indexed eventId, bytes32 hash);\n\n // return true if current call reach confirmationsThreshold\n function checkUntrustless_(uint eventId, CommonStructs.Transfer[] calldata transfers) internal returns (bool) {\n require(isRelay(msg.sender), \"You not in relay whitelist\");\n\n bytes32 hash = transfersHash(eventId, transfers);\n require(confirmations[hash][msg.sender] == false, \"You have already confirmed this\");\n\n uint confirmCount = confirmedCount(hash);\n require(confirmCount < confirmationsThreshold, \"Already confirmed\");\n\n confirmations[hash][msg.sender] = true;\n emit RelayConfirmation(msg.sender, eventId, hash);\n\n // +1 coz current relay confirmed just now\n return confirmCount + 1 >= confirmationsThreshold;\n }\n\n\n function isConfirmedByRelay(address relay, uint eventId, CommonStructs.Transfer[] calldata transfers) public view returns (bool) {\n bytes32 hash = transfersHash(eventId, transfers);\n return confirmations[hash][relay];\n }\n\n\n function confirmedCount(bytes32 hash) public view returns (uint) {\n uint res;\n for (uint i = 0; i < relays.length; i++)\n if (confirmations[hash][relays[i]])\n res++;\n return res;\n }\n\n\n function isRelay(address relay) public view returns (bool){\n for (uint i = 0; i < relays.length; i++)\n if (relays[i] == relay)\n return true;\n return false;\n }\n\n function getRelays() public view returns (address[] memory) {\n return relays;\n }\n\n function transfersHash(uint eventId, CommonStructs.Transfer[] calldata transfers) public pure returns (bytes32) {\n bytes memory payload = abi.encodePacked(eventId);\n\n // i guess we can hash transfers only in this way\n for (uint i = 0; i < transfers.length; i++)\n payload = abi.encodePacked(payload, transfers[i].amount, transfers[i].toAddress, transfers[i].tokenAddress);\n\n return keccak256(payload);\n }\n\n\n function _setRelaysAndConfirmations(address[] memory toRemove, address[] memory toAdd, uint _confirmations) internal {\n for (uint i = 0; i < toRemove.length; i++)\n _removeRelay(toRemove[i]);\n for (uint i = 0; i < toAdd.length; i++)\n _addRelay(toAdd[i]);\n\n if (confirmationsThreshold != _confirmations) {\n confirmationsThreshold = _confirmations;\n emit ThresholdChange(_confirmations);\n }\n }\n\n function _removeRelay(address relay) internal {\n for (uint i = 0; i < relays.length; i++) {\n if (relays[i] == relay) {\n relays[i] = relays[relays.length - 1];\n relays.pop();\n emit RelayRemove(relay);\n return;\n }\n }\n revert(\"Not a relay\");\n }\n\n function _addRelay(address relay) internal {\n require(!isRelay(relay), \"Already relay\");\n relays.push(relay);\n emit RelayAdd(relay);\n }\n\n uint256[15] private ___gap;\n\n}\n" - }, - "contracts/networks/ETH_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless.sol\";\n\n\ncontract ETH_AmbBridge is CommonBridge, CheckUntrustless {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint _confirmations,\n address[] calldata _relays\n ) public initializer {\n __CommonBridge_init(args);\n _setRelaysAndConfirmations(new address[](0), _relays, _confirmations);\n }\n\n function upgrade(\n uint _confirmations,\n address[] memory _relays\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n // _setRelaysAndConfirmations don't work during upgrade and nobody knows why\n relays = _relays;\n confirmationsThreshold = _confirmations;\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public whenNotPaused {\n // relay \"role\" checked at CheckUntrustless contract\n require(eventId == inputEventId + 1, \"EventId out of order\");\n\n bool confirm = checkUntrustless_(eventId, transfers);\n if (confirm) {// required count of confirmations reached\n ++inputEventId;\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n // todo need lock?\n }\n }\n\n function setRelaysAndConfirmations(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n require(msg.sender == address(this), \"This method require multisig\");\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n\n}\n" - }, - "contracts/contracts_for_tests/CheckUntrustlessTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckUntrustless.sol\";\n\ncontract CheckUntrustlessTest is CheckUntrustless {\n constructor() {}\n\n event checkUntrustlessTestResult(bool result);\n\n function checkUntrustlessTest(uint eventId, CommonStructs.Transfer[] calldata transfers) public {\n emit checkUntrustlessTestResult(checkUntrustless_(eventId, transfers));\n }\n\n function setRelaysAndConfirmationsTest(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n}\n" - }, - "contracts/checks/CheckPoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"./CheckPoW_Ethash.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckPoW is Initializable, Ethash {\n struct BlockPoW {\n bytes3 p0WithNonce;\n bytes3 p0WithoutNonce;\n\n bytes p1;\n bytes32 parentOrReceiptHash;\n bytes p2;\n bytes difficulty;\n bytes p3;\n bytes number;\n bytes p4; // end when extra end\n bytes p5; // after extra\n bytes nonce;\n bytes p6;\n\n uint[] dataSetLookup;\n uint[] witnessForLookup;\n }\n\n struct PoWProof {\n BlockPoW[] blocks;\n CommonStructs.TransferProof transfer;\n }\n\n uint256 minimumDifficulty;\n\n function __CheckPoW_init(\n uint256 minimumDifficulty_\n ) internal initializer {\n minimumDifficulty = minimumDifficulty_;\n }\n\n /*\n PoWProof.blocks contains:\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, checking it pow hash.\n Each block parentHash must be equal to the hash of the previous block.\n If there are no errors, the transfer is considered valid\n */\n function checkPoW_(PoWProof calldata powProof, address sideBridgeAddress) internal view\n {\n bytes32 hash = calcTransferReceiptsHash(powProof.transfer, sideBridgeAddress);\n for (uint i = 0; i < powProof.blocks.length; i++) {\n require(powProof.blocks[i].parentOrReceiptHash == hash, \"parentHash or receiptHash wrong\");\n hash = blockHash(powProof.blocks[i]);\n\n verifyEthash(powProof.blocks[i]);\n }\n }\n\n\n function verifyEthash(BlockPoW calldata block_) internal view {\n uint difficulty = bytesToUint(block_.difficulty);\n require(difficulty >= minimumDifficulty, \"difficulty too low\");\n verifyPoW(\n bytesToUint(block_.number),\n blockHashWithoutNonce(block_),\n bytesToUint(block_.nonce),\n difficulty,\n block_.dataSetLookup,\n block_.witnessForLookup\n );\n }\n\n function blockHash(BlockPoW calldata block_) internal pure returns (bytes32) {\n // Note: too much arguments in abi.encodePacked() function cause CompilerError: Stack too deep...\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2,\n block_.difficulty,\n block_.p3\n ),\n abi.encodePacked(\n block_.number,\n block_.p4,\n block_.p5,\n block_.nonce,\n block_.p6\n )\n ));\n }\n\n function blockHashWithoutNonce(BlockPoW calldata block_) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithoutNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2\n ),\n abi.encodePacked(\n block_.difficulty,\n block_.p3,\n block_.number,\n block_.p4,\n block_.p6\n )\n ));\n }\n\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckPoW_Ethash.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n/// @dev These contracts are used to verify Proof of Work within a smart contract.\n/// The algorithms have been extracted from the implementation of smart pool (https://github.com/smartpool)\ncontract SHA3_512 {\n constructor() {}\n\n function keccak_f(uint[25] memory A) pure private returns (uint[25] memory) {\n uint[25] memory B;\n uint[5] memory C;\n uint[5] memory D;\n\n uint[24] memory RC = [\n uint(0x0000000000000001),\n 0x0000000000008082,\n 0x800000000000808A,\n 0x8000000080008000,\n 0x000000000000808B,\n 0x0000000080000001,\n 0x8000000080008081,\n 0x8000000000008009,\n 0x000000000000008A,\n 0x0000000000000088,\n 0x0000000080008009,\n 0x000000008000000A,\n 0x000000008000808B,\n 0x800000000000008B,\n 0x8000000000008089,\n 0x8000000000008003,\n 0x8000000000008002,\n 0x8000000000000080,\n 0x000000000000800A,\n 0x800000008000000A,\n 0x8000000080008081,\n 0x8000000000008080,\n 0x0000000080000001,\n 0x8000000080008008];\n\n for (uint i = 0; i < 24; i++) {\n\n C[0] = A[0] ^ A[1] ^ A[2] ^ A[3] ^ A[4];\n C[1] = A[5] ^ A[6] ^ A[7] ^ A[8] ^ A[9];\n C[2] = A[10] ^ A[11] ^ A[12] ^ A[13] ^ A[14];\n C[3] = A[15] ^ A[16] ^ A[17] ^ A[18] ^ A[19];\n C[4] = A[20] ^ A[21] ^ A[22] ^ A[23] ^ A[24];\n\n D[0] = C[4] ^ ((C[1] * 2) & 0xffffffffffffffff | (C[1] / (2 ** 63)));\n D[1] = C[0] ^ ((C[2] * 2) & 0xffffffffffffffff | (C[2] / (2 ** 63)));\n D[2] = C[1] ^ ((C[3] * 2) & 0xffffffffffffffff | (C[3] / (2 ** 63)));\n D[3] = C[2] ^ ((C[4] * 2) & 0xffffffffffffffff | (C[4] / (2 ** 63)));\n D[4] = C[3] ^ ((C[0] * 2) & 0xffffffffffffffff | (C[0] / (2 ** 63)));\n\n A[0] = A[0] ^ D[0];\n A[1] = A[1] ^ D[0];\n A[2] = A[2] ^ D[0];\n A[3] = A[3] ^ D[0];\n A[4] = A[4] ^ D[0];\n A[5] = A[5] ^ D[1];\n A[6] = A[6] ^ D[1];\n A[7] = A[7] ^ D[1];\n A[8] = A[8] ^ D[1];\n A[9] = A[9] ^ D[1];\n A[10] = A[10] ^ D[2];\n A[11] = A[11] ^ D[2];\n A[12] = A[12] ^ D[2];\n A[13] = A[13] ^ D[2];\n A[14] = A[14] ^ D[2];\n A[15] = A[15] ^ D[3];\n A[16] = A[16] ^ D[3];\n A[17] = A[17] ^ D[3];\n A[18] = A[18] ^ D[3];\n A[19] = A[19] ^ D[3];\n A[20] = A[20] ^ D[4];\n A[21] = A[21] ^ D[4];\n A[22] = A[22] ^ D[4];\n A[23] = A[23] ^ D[4];\n A[24] = A[24] ^ D[4];\n\n /*Rho and pi steps*/\n B[0] = A[0];\n B[8] = ((A[1] * (2 ** 36)) & 0xffffffffffffffff | (A[1] / (2 ** 28)));\n B[11] = ((A[2] * (2 ** 3)) & 0xffffffffffffffff | (A[2] / (2 ** 61)));\n B[19] = ((A[3] * (2 ** 41)) & 0xffffffffffffffff | (A[3] / (2 ** 23)));\n B[22] = ((A[4] * (2 ** 18)) & 0xffffffffffffffff | (A[4] / (2 ** 46)));\n B[2] = ((A[5] * (2 ** 1)) & 0xffffffffffffffff | (A[5] / (2 ** 63)));\n B[5] = ((A[6] * (2 ** 44)) & 0xffffffffffffffff | (A[6] / (2 ** 20)));\n B[13] = ((A[7] * (2 ** 10)) & 0xffffffffffffffff | (A[7] / (2 ** 54)));\n B[16] = ((A[8] * (2 ** 45)) & 0xffffffffffffffff | (A[8] / (2 ** 19)));\n B[24] = ((A[9] * (2 ** 2)) & 0xffffffffffffffff | (A[9] / (2 ** 62)));\n B[4] = ((A[10] * (2 ** 62)) & 0xffffffffffffffff | (A[10] / (2 ** 2)));\n B[7] = ((A[11] * (2 ** 6)) & 0xffffffffffffffff | (A[11] / (2 ** 58)));\n B[10] = ((A[12] * (2 ** 43)) & 0xffffffffffffffff | (A[12] / (2 ** 21)));\n B[18] = ((A[13] * (2 ** 15)) & 0xffffffffffffffff | (A[13] / (2 ** 49)));\n B[21] = ((A[14] * (2 ** 61)) & 0xffffffffffffffff | (A[14] / (2 ** 3)));\n B[1] = ((A[15] * (2 ** 28)) & 0xffffffffffffffff | (A[15] / (2 ** 36)));\n B[9] = ((A[16] * (2 ** 55)) & 0xffffffffffffffff | (A[16] / (2 ** 9)));\n B[12] = ((A[17] * (2 ** 25)) & 0xffffffffffffffff | (A[17] / (2 ** 39)));\n B[15] = ((A[18] * (2 ** 21)) & 0xffffffffffffffff | (A[18] / (2 ** 43)));\n B[23] = ((A[19] * (2 ** 56)) & 0xffffffffffffffff | (A[19] / (2 ** 8)));\n B[3] = ((A[20] * (2 ** 27)) & 0xffffffffffffffff | (A[20] / (2 ** 37)));\n B[6] = ((A[21] * (2 ** 20)) & 0xffffffffffffffff | (A[21] / (2 ** 44)));\n B[14] = ((A[22] * (2 ** 39)) & 0xffffffffffffffff | (A[22] / (2 ** 25)));\n B[17] = ((A[23] * (2 ** 8)) & 0xffffffffffffffff | (A[23] / (2 ** 56)));\n B[20] = ((A[24] * (2 ** 14)) & 0xffffffffffffffff | (A[24] / (2 ** 50)));\n\n /*Xi state*/\n A[0] = B[0] ^ ((~B[5]) & B[10]);\n A[1] = B[1] ^ ((~B[6]) & B[11]);\n A[2] = B[2] ^ ((~B[7]) & B[12]);\n A[3] = B[3] ^ ((~B[8]) & B[13]);\n A[4] = B[4] ^ ((~B[9]) & B[14]);\n A[5] = B[5] ^ ((~B[10]) & B[15]);\n A[6] = B[6] ^ ((~B[11]) & B[16]);\n A[7] = B[7] ^ ((~B[12]) & B[17]);\n A[8] = B[8] ^ ((~B[13]) & B[18]);\n A[9] = B[9] ^ ((~B[14]) & B[19]);\n A[10] = B[10] ^ ((~B[15]) & B[20]);\n A[11] = B[11] ^ ((~B[16]) & B[21]);\n A[12] = B[12] ^ ((~B[17]) & B[22]);\n A[13] = B[13] ^ ((~B[18]) & B[23]);\n A[14] = B[14] ^ ((~B[19]) & B[24]);\n A[15] = B[15] ^ ((~B[20]) & B[0]);\n A[16] = B[16] ^ ((~B[21]) & B[1]);\n A[17] = B[17] ^ ((~B[22]) & B[2]);\n A[18] = B[18] ^ ((~B[23]) & B[3]);\n A[19] = B[19] ^ ((~B[24]) & B[4]);\n A[20] = B[20] ^ ((~B[0]) & B[5]);\n A[21] = B[21] ^ ((~B[1]) & B[6]);\n A[22] = B[22] ^ ((~B[2]) & B[7]);\n A[23] = B[23] ^ ((~B[3]) & B[8]);\n A[24] = B[24] ^ ((~B[4]) & B[9]);\n\n /*Last step*/\n A[0] = A[0] ^ RC[i];\n }\n\n return A;\n }\n\n\n function sponge(uint[9] memory M) pure internal returns (uint[16] memory) {\n require((M.length * 8) == 72, \"sponge error\");\n\n M[5] = 0x01;\n M[8] = 0x8000000000000000;\n\n uint r = 72;\n uint w = 8;\n uint size = M.length * 8;\n\n uint[25] memory S;\n uint i;\n uint y;\n uint x;\n /*Absorbing Phase*/\n for (i = 0; i < size / r; i++) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w)) {\n S[5 * x + y] = S[5 * x + y] ^ M[i * 9 + x + 5 * y];\n }\n }\n }\n S = keccak_f(S);\n }\n\n /*Squeezing phase*/\n uint[16] memory result;\n uint b = 0;\n while (b < 16) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w) && (b < 16)) {\n result[b] = S[5 * x + y] & 0xFFFFFFFF;\n result[b + 1] = S[5 * x + y] / 0x100000000;\n b += 2;\n }\n }\n }\n }\n\n return result;\n }\n\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\ncontract Ethash is SHA3_512 {\n\n uint constant EPOCH_LENGTH = 30000; // blocks per epoch\n\n constructor() {\n }\n\n struct EthashCacheOptData {\n uint[512] merkleNodes;\n uint fullSizeIn128Resultion;\n uint branchDepth;\n }\n\n mapping(uint => EthashCacheOptData) epochData;\n\n\n function verifyPoW(uint blockNumber, bytes32 rlpHeaderHashWithoutNonce, uint nonce, uint difficulty,\n uint[] memory dataSetLookup, uint[] memory witnessForLookup) internal view {\n\n uint epoch = blockNumber / EPOCH_LENGTH;\n uint ethash = hashimoto(rlpHeaderHashWithoutNonce, nonce, dataSetLookup, witnessForLookup, epoch);\n\n require(ethash <= (2 ** 256 - 1) / difficulty, \"Ethash difficulty too low\");\n }\n\n function isEpochDataSet(uint epochIndex) public view returns (bool) {\n return epochData[epochIndex].fullSizeIn128Resultion != 0;\n }\n\n function setEpochData(\n uint epochNum,\n uint fullSizeIn128Resultion,\n uint branchDepth,\n uint[] calldata merkleNodes\n ) public {\n\n // we store only previous and current epochs\n // so, delete second from the end epoch\n if (epochNum >= 2) // underflow check\n delete epochData[epochNum - 2];\n\n\n uint l = merkleNodes.length;\n uint[512] storage nodes = epochData[epochNum].merkleNodes;\n\n for (uint i = 0; i < l; i++) {\n nodes[i] = merkleNodes[i];\n }\n\n epochData[epochNum].fullSizeIn128Resultion = fullSizeIn128Resultion;\n epochData[epochNum].branchDepth = branchDepth;\n }\n\n\n function hashimoto(bytes32 header,\n uint nonceLe,\n uint[] memory dataSetLookup,\n uint[] memory witnessForLookup,\n uint epochIndex) private view returns (uint) {\n\n uint[16] memory s = computeS(uint(header), nonceLe);\n uint[32] memory mix;\n uint[8] memory cmix;\n\n\n uint depth = epochData[epochIndex].branchDepth;\n uint fullSize = epochData[epochIndex].fullSizeIn128Resultion;\n\n uint i;\n uint j;\n\n require(fullSize != 0, \"EpochData not set\");\n\n\n for (i = 0; i < 16; i++) {\n assembly {\n let offset := mul(i, 0x20)\n\n //mix[i] = s[i];\n mstore(add(mix, offset), mload(add(s, offset)))\n\n // mix[i+16] = s[i];\n mstore(add(mix, add(0x200, offset)), mload(add(s, offset)))\n }\n }\n\n for (i = 0; i < 64; i++) {\n uint p = fnv(i ^ s[0], mix[i % 32]) % fullSize;\n\n // console.log(computeCacheRoot( p, i, dataSetLookup, witnessForLookup, depthAndFullSize[0]));\n // console.log(getMerkleLeave( epochIndex, p ));\n\n if (computeCacheRoot(p, i, dataSetLookup, witnessForLookup, depth) != getMerkleLeave(epochIndex, p)) {\n // PoW failed\n revert(\"PoW failed\");\n }\n\n for (j = 0; j < 8; j++) {\n\n assembly{\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & varFFFFFFFF );\n let dataOffset := add(mul(0x80, i), add(dataSetLookup, 0x20))\n let dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n let mixOffset := add(mix, mul(0x20, j))\n let mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n let fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n }\n\n\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & 0xFFFFFFFF );\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n\n\n //dataSetLookup[4*i ] = dataSetLookup[4*i ]/(2**32);\n //dataSetLookup[4*i + 1] = dataSetLookup[4*i + 1]/(2**32);\n //dataSetLookup[4*i + 2] = dataSetLookup[4*i + 2]/(2**32);\n //dataSetLookup[4*i + 3] = dataSetLookup[4*i + 3]/(2**32);\n\n assembly{\n let offset := add(add(dataSetLookup, 0x20), mul(i, 0x80))\n let value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n }\n }\n }\n\n\n for (i = 0; i < 32; i += 4) {\n cmix[i / 4] = (fnv(fnv(fnv(mix[i], mix[i + 1]), mix[i + 2]), mix[i + 3]));\n }\n\n return computeSha3(s, cmix);\n\n }\n\n\n function fnv(uint v1, uint v2) pure internal returns (uint) {\n return ((v1 * 0x01000193) ^ v2) & 0xFFFFFFFF;\n }\n\n function computeCacheRoot(uint index,\n uint indexInElementsArray,\n uint[] memory elements,\n uint[] memory witness,\n uint branchSize) pure private returns (uint) {\n\n uint leaf = computeLeaf(elements, indexInElementsArray) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n\n uint left;\n uint right;\n uint node;\n bool oddBranchSize = (branchSize % 2) > 0;\n\n assembly {\n branchSize := div(branchSize, 2)\n //branchSize /= 2;\n }\n uint witnessIndex = indexInElementsArray * branchSize;\n if (oddBranchSize) witnessIndex += indexInElementsArray;\n\n uint depth;\n for (depth = 0; depth < branchSize; depth++) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n\n //node = witness[witnessIndex + depth] / (2**128);\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := div(node, 0x100000000000000000000000000000000)\n }\n }\n else {\n assembly {\n left := div(node, 0x100000000000000000000000000000000)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n }\n\n if (oddBranchSize) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n }\n\n\n return leaf;\n }\n\n\n function computeSha3(uint[16] memory s, uint[8] memory cmix) pure internal returns (uint) {\n uint s0 = s[0] + s[1] * (2 ** 32) + s[2] * (2 ** 64) + s[3] * (2 ** 96) +\n (s[4] + s[5] * (2 ** 32) + s[6] * (2 ** 64) + s[7] * (2 ** 96)) * (2 ** 128);\n\n uint s1 = s[8] + s[9] * (2 ** 32) + s[10] * (2 ** 64) + s[11] * (2 ** 96) +\n (s[12] + s[13] * (2 ** 32) + s[14] * (2 ** 64) + s[15] * (2 ** 96)) * (2 ** 128);\n\n uint c = cmix[0] + cmix[1] * (2 ** 32) + cmix[2] * (2 ** 64) + cmix[3] * (2 ** 96) +\n (cmix[4] + cmix[5] * (2 ** 32) + cmix[6] * (2 ** 64) + cmix[7] * (2 ** 96)) * (2 ** 128);\n\n\n /* god knows why need to convert to big endian */\n return uint(keccak256(abi.encodePacked(reverseBytes(s0), reverseBytes(s1), reverseBytes(c))));\n }\n\n\n function computeLeaf(uint[] memory dataSetLookup, uint index) pure internal returns (uint) {\n return uint(keccak256(abi.encodePacked(\n dataSetLookup[4 * index],\n dataSetLookup[4 * index + 1],\n dataSetLookup[4 * index + 2],\n dataSetLookup[4 * index + 3]\n )));\n\n }\n\n function computeS(uint header, uint nonceLe) pure internal returns (uint[16] memory) {\n uint[9] memory M;\n\n header = reverseBytes(header);\n\n M[0] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[1] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[2] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[3] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n\n // make little endian nonce\n M[4] = nonceLe;\n return sponge(M);\n }\n\n function reverseBytes(uint input) pure internal returns (uint) {\n uint result;\n for (uint i = 0; i < 32; i++) {\n result = (result << 8) + (input & 0xff);\n input = input >> 8;\n }\n return result;\n }\n\n\n function getMerkleLeave(uint epochIndex, uint p) view internal returns (uint) {\n uint rootIndex = uint(p >> epochData[epochIndex].branchDepth);\n uint expectedRoot = epochData[epochIndex].merkleNodes[(rootIndex >> 1)];\n\n if ((rootIndex % 2) == 0)\n return expectedRoot & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n return expectedRoot >> 128;\n }\n\n}\n" - }, - "contracts/networks/ETH_AmbBridge_PoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoW.sol\";\n\n\ncontract ETH_AmbBridge_PoW is CommonBridge, CheckPoW {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint minimumDifficulty\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoW_init(minimumDifficulty);\n }\n\n function submitTransferPoW(PoWProof calldata powProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(powProof.transfer.eventId);\n checkEventId(powProof.transfer.eventId);\n checkPoW_(powProof, sideBridgeAddress);\n // checkPoW_(powProof, sideBridgeAddress);\n lockTransfers(powProof.transfer.transfers, powProof.transfer.eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n}\n\n" - }, - "contracts/contracts_for_tests/CheckPoWTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoW.sol\";\n\ncontract CheckPoWTest is CheckPoW {\n\n constructor(\n uint minimumDifficulty_\n ) {\n minimumDifficulty = minimumDifficulty_;\n }\n\n function checkPoWTest(PoWProof calldata powProof, address sideBridgeAddress) public {\n checkPoW_(powProof, sideBridgeAddress);\n }\n\n function verifyEthashTest(BlockPoW calldata block_) public view {\n verifyEthash(block_);\n }\n\n function blockHashTest(BlockPoW calldata block_) public pure returns (bytes32) {\n return blockHash(block_);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CommonBridgeTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckReceiptsProof.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // deployer now can grant roles\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n checkEventId(eventId); // now its more like submitTransferTest\n lockTransfers(events, eventId);\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n // checkReceiptsProof\n\n function calcTransferReceiptsHashTest(CommonStructs.TransferProof calldata p, address eventContractAddress) public pure returns (bytes32) {\n return calcTransferReceiptsHash(p, eventContractAddress);\n }\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" - }, - "contracts/checks/CheckPoSA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckPoSA is Initializable {\n uint256 private constant ADDRESS_LENGTH = 20;\n uint256 private constant EXTRA_VANITY_LENGTH = 32;\n uint256 private constant EXTRA_SEAL_LENGTH = 65;\n uint256 private constant EPOCH_LENGTH = 200;\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n\n mapping(uint => mapping(address => bool)) internal allValidators;\n uint public currentEpoch;\n uint currentValidatorSetSize;\n\n bytes1 chainId;\n\n\n struct BlockPoSA {\n bytes3 p0Signed;\n bytes3 p0Unsigned;\n\n bytes32 parentHash;\n bytes p1;\n bytes32 receiptHash;\n bytes p2;\n bytes number;\n bytes p3;\n\n bytes p4Signed;\n bytes p4Unsigned;\n bytes extraData;\n\n bytes p5;\n }\n\n struct PoSAProof {\n BlockPoSA[] blocks;\n CommonStructs.TransferProof transfer;\n uint64 transferEventBlock;\n }\n\n\n function __CheckPoSA_init(\n address[] calldata initialValidators_,\n uint initialEpoch_,\n bytes1 chainId_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n chainId = chainId_;\n currentEpoch = initialEpoch_;\n currentValidatorSetSize = initialValidators_.length;\n\n for (uint i = 0; i < initialValidators_.length; i++) {\n allValidators[currentEpoch][initialValidators_[i]] = true;\n }\n }\n\n /*\n PoSAProof.blocks contains:\n - blocks for validate validatorSet changes, in that order:\n - first block in epoch (blockNum % 200 == 0)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize\n * repeated for each new epoch, all epochs must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between epochs\n If there are no errors, the transfer is considered valid\n */\n function checkPoSA_(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n bytes32 bareHash;\n bytes32 parentHash;\n uint finalizeVsBlock;\n uint nextVsSize;\n\n // posaProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (posaProof.transfer.eventId != 0) {\n bytes32 receiptHash = calcTransferReceiptsHash(posaProof.transfer, sideBridgeAddress);\n require(posaProof.blocks[posaProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(posaProof.blocks.length - posaProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < posaProof.blocks.length; i++) {\n BlockPoSA calldata block_ = posaProof.blocks[i];\n\n if (parentHash != bytes32(0))\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n\n (bareHash, parentHash) = calcBlockHash(block_);\n\n require(verifySignature(bareHash, getSignature(block_.extraData)), \"invalid signature\");\n\n // change validator set\n\n uint blockNumber = bytesToUint(block_.number);\n\n if (blockNumber % EPOCH_LENGTH == 0) {\n require(blockNumber / EPOCH_LENGTH == currentEpoch + 1, \"invalid epoch\");\n\n nextVsSize = newValidatorSet(block_.extraData);\n finalizeVsBlock = blockNumber + currentValidatorSetSize / 2;\n } else if (blockNumber == finalizeVsBlock) {\n currentEpoch++;\n currentValidatorSetSize = nextVsSize;\n\n // after finalizing vs change, next block in posaProof.blocks can have any parentHash (skipping some blocks)\n // but only if it's not the safety blocks for transfer event\n if (i < posaProof.transferEventBlock)\n parentHash = bytes32(0);\n }\n }\n }\n\n\n function calcBlockHash(BlockPoSA calldata block_) internal view returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p1, block_.receiptHash, block_.p2, block_.number, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Unsigned, chainId, commonRlp, block_.p4Unsigned, getExtraDataUnsigned(block_.extraData), block_.p5)),\n // hash with seal, for prev_hash check\n keccak256(abi.encodePacked(block_.p0Signed, commonRlp, block_.p4Signed, block_.extraData, block_.p5))\n );\n }\n\n function getSignature(bytes calldata extraData) private pure returns (bytes calldata) {\n uint start = extraData.length - EXTRA_SEAL_LENGTH;\n return extraData[start : start + EXTRA_SEAL_LENGTH];\n }\n\n function getExtraDataUnsigned(bytes calldata extraData) private pure returns (bytes memory) {\n return extraData[0 : extraData.length - EXTRA_SEAL_LENGTH];\n }\n\n function newValidatorSet(bytes calldata extraData) private returns (uint) {\n uint nextValidatorSet = currentEpoch + 1;\n uint endPos = extraData.length - EXTRA_SEAL_LENGTH;\n\n uint nextValidatorSetSize;\n for (uint pos = EXTRA_VANITY_LENGTH; pos < endPos; pos += ADDRESS_LENGTH) {\n address validator = address(bytes20(extraData[pos : pos + ADDRESS_LENGTH]));\n allValidators[nextValidatorSet][validator] = true;\n nextValidatorSetSize++;\n }\n\n return nextValidatorSetSize;\n }\n\n function verifySignature(bytes32 hash, bytes calldata signature) private view returns (bool) {\n address signer = ecdsaRecover(hash, signature);\n return allValidators[currentEpoch][signer];\n }\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n}\n" - }, - "contracts/networks/BSC_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract BSC_AmbBridge is CommonBridge, CheckPoSA {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n uint initialEpoch,\n bytes1 chainId\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoSA_init(initialValidators, initialEpoch, chainId);\n }\n\n function submitTransferPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(posaProof.transfer.eventId);\n checkEventId(posaProof.transfer.eventId);\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(posaProof.transfer.transfers, posaProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoSATest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract CheckPoSATest is CheckPoSA {\n constructor(\n bytes1 chainId_\n ) {\n chainId = chainId_;\n }\n\n function checkPoSATest(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress,\n address[] memory _initialValidators, uint _initialEpoch, bytes1 _chainId) public {\n // TODO: we can't use the `__CheckPoSA_init` twice, but copy-paste is also not good\n chainId = _chainId;\n currentEpoch = _initialEpoch;\n currentValidatorSetSize = _initialValidators.length;\n\n for (uint i = 0; i < _initialValidators.length; i++) {\n allValidators[currentEpoch][_initialValidators[i]] = true;\n }\n\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockPoSA calldata block_) public view returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockPoSA calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n}\n" - }, - "contracts/tokens/sAMB.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./IWrapper.sol\";\n\ncontract sAMB is IWrapper, ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\n\n function deposit() public override payable {\n _mint(msg.sender, msg.value);\n\n emit Deposit(msg.sender, msg.value);\n }\n\n function withdraw(uint amount) public override {\n _burn(msg.sender, amount);\n payable(msg.sender).transfer(amount);\n\n emit Withdrawal(msg.sender, amount);\n }\n\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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 * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, 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 * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), 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 * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\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 * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\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/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\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" - }, - "contracts/contracts_for_tests/MintableERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MintableERC20 is ERC20 {\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20 is ERC20, Ownable {\n address public bridgeAddress; // address of bridge contract on this network\n\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\n ERC20(name_, symbol_)\n Ownable() {\n bridgeAddress = bridgeAddress_;\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\n bridgeAddress = bridgeAddress_;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sender == bridgeAddress) {\n // user transfer tokens to ambrosus => need to mint it\n _mint(recipient, amount);\n } else if (recipient == bridgeAddress) {\n // user withdraw tokens from ambrosus => need to burn it\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/access/Ownable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 _setOwner(_msgSender());\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 called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _setOwner(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 _setOwner(newOwner);\n }\n\n function _setOwner(address newOwner) private {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" - }, - "contracts/tokens/BridgeERC20_Amb.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20_Amb is ERC20, Ownable {\n\n // decimals of token in side network\n // example:\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\n mapping(address => uint8) public sideTokenDecimals;\n\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\n\n uint8 _decimals;\n\n constructor(\n string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n ) ERC20(name_, symbol_) Ownable() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n }\n\n // todo check if we need this func\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \"wrong array lengths\");\n for (uint i = 0; i < bridgeAddresses_.length; i++)\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n // todo events\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n // user transfer tokens to ambrosus => need to mint it\n\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n\n\n // bridge mint money to user; same amount locked on side bridge\n bridgeBalances[sender] += amount_this;\n\n _mint(recipient, amount_this);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n // user withdraw tokens from ambrosus => need to burn it\n\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n\n\n // user burn tokens; side bridge must have enough tokens to send\n require(bridgeBalances[recipient] >= amount_this, \"not enough locked tokens on bridge\");\n bridgeBalances[recipient] -= amount_this;\n\n _burn(sender, amount_this);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\n if (dTo == dFrom)\n return amount;\n if (dTo > dFrom)\n return amount * (10 ** (dTo - dFrom));\n else\n return amount / (10 ** (dFrom - dTo));\n }\n\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20_AmbTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20_Amb.sol\";\n\ncontract BridgeERC20_AmbTest is BridgeERC20_Amb {\n constructor(string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n )\n BridgeERC20_Amb(name_, symbol_, decimals_, bridgeAddresses_, sideTokenDecimals_) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n function changeBridgeBalance(address bridge, uint balance) public {\n bridgeBalances[bridge] = balance;\n }\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20Test.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckAuraTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckAura.sol\";\n\ncontract CheckAuraTest is CheckAura {\n constructor(address validatorSetAddress_, uint minSafetyBlocksValidators_) {\n validatorSetAddress = validatorSetAddress_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function checkAuraTest(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress, address[] memory initialValidators_) public {\n validatorSet = initialValidators_;\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockAura calldata block_) public pure returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockAura calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function bytesToUintTest(bytes4 b) public pure returns (uint) {\n return bytesToUint(b);\n }\n\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "evmVersion": "byzantium", - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/contracts/deployments/test/eth/solcInputs/54d2ddebdc6c37a1b4fd5c90d287707b.json b/contracts/deployments/test/eth/solcInputs/54d2ddebdc6c37a1b4fd5c90d287707b.json new file mode 100644 index 00000000..17b731cd --- /dev/null +++ b/contracts/deployments/test/eth/solcInputs/54d2ddebdc6c37a1b4fd5c90d287707b.json @@ -0,0 +1,51 @@ +{ + "language": "Solidity", + "sources": { + "contracts/utils/MultiSigWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n\ncontract MultiSigWallet {\n\n /*\n * Events\n */\n event Confirmation(address indexed sender, uint indexed transactionId);\n event Revocation(address indexed sender, uint indexed transactionId);\n event Submission(uint indexed transactionId);\n event Execution(uint indexed transactionId);\n event ExecutionFailure(uint indexed transactionId);\n event OwnerAddition(address indexed owner);\n event OwnerRemoval(address indexed owner);\n event RequirementChange(uint required);\n\n /*\n * Constants\n */\n uint constant public MAX_OWNER_COUNT = 50;\n\n /*\n * Storage\n */\n mapping(uint => Transaction) public transactions;\n mapping(uint => mapping(address => bool)) public confirmations;\n mapping(address => bool) public isOwner;\n address[] public owners;\n uint public required;\n uint public transactionCount;\n\n struct Transaction {\n address destination;\n uint value;\n bytes data;\n bool executed;\n }\n\n /*\n * Modifiers\n */\n modifier onlyWallet() {\n require(msg.sender == address(this));\n _;\n }\n\n modifier ownerDoesNotExist(address owner) {\n require(!isOwner[owner]);\n _;\n }\n\n modifier ownerExists(address owner) {\n require(isOwner[owner]);\n _;\n }\n\n modifier transactionExists(uint transactionId) {\n require(transactions[transactionId].destination != address(0));\n _;\n }\n\n modifier confirmed(uint transactionId, address owner) {\n require(confirmations[transactionId][owner]);\n _;\n }\n\n modifier notConfirmed(uint transactionId, address owner) {\n require(!confirmations[transactionId][owner]);\n _;\n }\n\n modifier notExecuted(uint transactionId) {\n require(!transactions[transactionId].executed);\n _;\n }\n\n modifier notNull(address _address) {\n require(_address != address(0));\n _;\n }\n\n modifier validRequirement(uint ownerCount, uint _required) {\n require(ownerCount <= MAX_OWNER_COUNT\n && _required <= ownerCount\n && _required != 0\n && ownerCount != 0);\n _;\n }\n\n /*\n * Public functions\n */\n /// @dev Contract constructor sets initial owners and required number of confirmations.\n /// @param _owners List of initial owners.\n /// @param _required Number of required confirmations.\n constructor(address[] memory _owners, uint _required)\n validRequirement(_owners.length, _required)\n {\n for (uint i = 0; i < _owners.length; i++) {\n require(!isOwner[_owners[i]] && _owners[i] != address(0));\n isOwner[_owners[i]] = true;\n }\n owners = _owners;\n required = _required;\n }\n\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of new owner.\n function addOwner(address owner)\n public\n onlyWallet\n ownerDoesNotExist(owner)\n notNull(owner)\n validRequirement(owners.length + 1, required)\n {\n isOwner[owner] = true;\n owners.push(owner);\n emit OwnerAddition(owner);\n }\n\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner.\n function removeOwner(address owner)\n public\n onlyWallet\n ownerExists(owner)\n {\n isOwner[owner] = false;\n for (uint i = 0; i < owners.length - 1; i++)\n if (owners[i] == owner) {\n owners[i] = owners[owners.length - 1];\n break;\n }\n owners.pop();\n if (required > owners.length)\n changeRequirement(owners.length);\n emit OwnerRemoval(owner);\n }\n\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner to be replaced.\n /// @param newOwner Address of new owner.\n function replaceOwner(address owner, address newOwner)\n public\n onlyWallet\n ownerExists(owner)\n ownerDoesNotExist(newOwner)\n {\n for (uint i = 0; i < owners.length; i++)\n if (owners[i] == owner) {\n owners[i] = newOwner;\n break;\n }\n isOwner[owner] = false;\n isOwner[newOwner] = true;\n emit OwnerRemoval(owner);\n emit OwnerAddition(newOwner);\n }\n\n /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\n /// @param _required Number of required confirmations.\n function changeRequirement(uint _required)\n public\n onlyWallet\n validRequirement(owners.length, _required)\n {\n required = _required;\n emit RequirementChange(_required);\n }\n\n /// @dev Allows an owner to submit and confirm a transaction.\n /// @param destination Transaction target address.\n /// @param value Transaction ether value.\n /// @param data Transaction data payload.\n /// @return transactionId Returns transaction ID.\n function submitTransaction(\n address destination,\n uint value,\n bytes memory data\n ) public returns (uint transactionId)\n {\n transactionId = addTransaction(destination, value, data);\n confirmTransaction(transactionId);\n }\n\n /// @dev Allows an owner to confirm a transaction.\n /// @param transactionId Transaction ID.\n function confirmTransaction(uint transactionId)\n public\n ownerExists(msg.sender)\n transactionExists(transactionId)\n notConfirmed(transactionId, msg.sender)\n {\n confirmations[transactionId][msg.sender] = true;\n emit Confirmation(msg.sender, transactionId);\n executeTransaction(transactionId);\n }\n\n /// @dev Allows an owner to revoke a confirmation for a transaction.\n /// @param transactionId Transaction ID.\n function revokeConfirmation(uint transactionId)\n public\n ownerExists(msg.sender)\n confirmed(transactionId, msg.sender)\n notExecuted(transactionId)\n {\n confirmations[transactionId][msg.sender] = false;\n emit Revocation(msg.sender, transactionId);\n }\n\n /// @dev Allows anyone to execute a confirmed transaction.\n /// @param transactionId Transaction ID.\n function executeTransaction(uint transactionId)\n public\n ownerExists(msg.sender)\n confirmed(transactionId, msg.sender)\n notExecuted(transactionId)\n {\n if (isConfirmed(transactionId)) {\n Transaction storage txn = transactions[transactionId];\n txn.executed = true;\n if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\n emit Execution(transactionId);\n else {\n emit ExecutionFailure(transactionId);\n txn.executed = false;\n }\n }\n }\n\n // call has been separated into its own function in order to take advantage\n // of the Solidity's code generator to produce a loop that copies tx.data into memory.\n function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) {\n bool result;\n assembly {\n let x := mload(0x40) // \"Allocate\" memory for output (0x40 is where \"free memory\" pointer is stored by convention)\n let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\n result := call(\n sub(gas(), 36810), // 34710 is the value that solidity is currently emitting // todo\n // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\n // callNewAccountGas (25000, in case the destination address does not exist and needs creating) +\n // gasSLoadEIP2929 (2100)\n\n destination,\n value,\n d,\n dataLength, // Size of the input (in bytes) - this is what fixes the padding problem\n x,\n 0 // Output is ignored, therefore the output size is zero\n )\n }\n return result;\n }\n\n /// @dev Returns the confirmation status of a transaction.\n /// @param transactionId Transaction ID.\n /// @return Confirmation status.\n function isConfirmed(uint transactionId) public view returns (bool)\n {\n uint count = 0;\n for (uint i = 0; i < owners.length; i++) {\n if (confirmations[transactionId][owners[i]])\n count += 1;\n if (count == required)\n return true;\n }\n return false;\n }\n\n /*\n * Internal functions\n */\n /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\n /// @param destination Transaction target address.\n /// @param value Transaction ether value.\n /// @param data Transaction data payload.\n /// @return transactionId Returns transaction ID.\n function addTransaction(\n address destination,\n uint value,\n bytes memory data\n ) internal\n notNull(destination) returns (uint transactionId)\n {\n transactionId = transactionCount;\n transactions[transactionId] = Transaction({\n destination : destination,\n value : value,\n data : data,\n executed : false\n });\n transactionCount += 1;\n emit Submission(transactionId);\n }\n\n /*\n * Web3 call functions\n */\n /// @dev Returns number of confirmations of a transaction.\n /// @param transactionId Transaction ID.\n /// @return count Number of confirmations.\n function getConfirmationCount(uint transactionId)\n public\n view\n returns (uint count)\n {\n for (uint i = 0; i < owners.length; i++)\n if (confirmations[transactionId][owners[i]])\n count += 1;\n }\n\n /// @dev Returns total number of transactions after filers are applied.\n /// @param pending Include pending transactions.\n /// @param executed Include executed transactions.\n /// @return count Total number of transactions after filters are applied.\n function getTransactionCount(bool pending, bool executed)\n public\n view\n returns (uint count)\n {\n for (uint i = 0; i < transactionCount; i++)\n if (pending && !transactions[i].executed\n || executed && transactions[i].executed)\n count += 1;\n }\n\n /// @dev Returns list of owners.\n /// @return List of owner addresses.\n function getOwners() public view returns (address[] memory)\n {\n return owners;\n }\n\n /// @dev Returns array with owner addresses, which confirmed transaction.\n /// @param transactionId Transaction ID.\n /// @return _confirmations Returns array of owner addresses.\n function getConfirmations(uint transactionId) public view\n returns (address[] memory _confirmations)\n {\n address[] memory confirmationsTemp = new address[](owners.length);\n uint count = 0;\n uint i;\n for (i = 0; i < owners.length; i++)\n if (confirmations[transactionId][owners[i]]) {\n confirmationsTemp[count] = owners[i];\n count += 1;\n }\n _confirmations = new address[](count);\n for (i = 0; i < count; i++)\n _confirmations[i] = confirmationsTemp[i];\n }\n\n /// @dev Returns list of transaction IDs in defined range.\n /// @param from Index start position of transaction array.\n /// @param to Index end position of transaction array.\n /// @param pending Include pending transactions.\n /// @param executed Include executed transactions.\n /// @return _transactionIds Returns array of transaction IDs.\n function getTransactionIds(uint from, uint to, bool pending, bool executed)\n public\n view\n returns (uint[] memory _transactionIds)\n {\n uint[] memory transactionIdsTemp = new uint[](transactionCount);\n uint count = 0;\n uint i;\n for (i = 0; i < transactionCount; i++)\n if (pending && !transactions[i].executed\n || executed && transactions[i].executed)\n {\n transactionIdsTemp[count] = i;\n count += 1;\n }\n _transactionIds = new uint[](to - from);\n for (i = from; i < to; i++)\n _transactionIds[i - from] = transactionIdsTemp[i];\n }\n}\n" + }, + "contracts/utils/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/proxy/Proxy.sol\";\nimport \"@openzeppelin/contracts/utils/StorageSlot.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\nimport \"./MultiSigWallet.sol\";\nimport \"hardhat/console.sol\";\n\n\ncontract ProxyMultiSig is Proxy, MultiSigWallet {\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n bytes32 private constant ADMIN_STORAGE_LOCATION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n bytes4 private constant _UPGRADE_TO_AND_CALL_SIGNATURE = bytes4(keccak256(\"_upgradeToAndCall(address,bytes)\"));\n\n event Upgraded(address indexed implementation);\n\n\n constructor(\n address _logic,\n bytes memory _data,\n address[] memory owners,\n uint _required\n\n ) MultiSigWallet(owners, _required) {\n // Cannot use _upgradeToAndCall because of onlyWallet modifier\n _upgradeTo(_logic);\n if (_data.length > 0) {\n Address.functionDelegateCall(_logic, _data);\n }\n\n StorageSlot.getAddressSlot(ADMIN_STORAGE_LOCATION).value = msg.sender; // trick the hardhat-deploy\n }\n\n\n function implementation() external view returns (address) {\n return _implementation();\n }\n\n function upgradeTo(address newImplementation) external payable ownerExists(msg.sender) {\n submitTransaction(\n address(this),\n msg.value,\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, bytes(\"\"))\n );\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ownerExists(msg.sender) {\n submitTransaction(\n address(this),\n msg.value,\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, data)\n );\n }\n\n function _upgradeToAndCall(address newImplementation, bytes memory data) external onlyWallet payable {\n _upgradeTo(newImplementation);\n if (data.length > 0) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n function _upgradeTo(address newImplementation) internal {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n emit Upgraded(newImplementation);\n }\n\n function _implementation() internal view override returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overriden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \"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(\n address target,\n bytes memory data,\n uint256 value\n ) 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 require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(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 require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(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 require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason 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 // 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\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}\n" + }, + "hardhat/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >= 0.4.22 <0.9.0;\n\nlibrary console {\n\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n\tfunction _sendLogPayload(bytes memory payload) private view {\n\t\tuint256 payloadLength = payload.length;\n\t\taddress consoleAddress = CONSOLE_ADDRESS;\n\t\tassembly {\n\t\t\tlet payloadStart := add(payload, 32)\n\t\t\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n\t\t}\n\t}\n\n\tfunction log() internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log()\"));\n\t}\n\n\tfunction logInt(int p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n\t}\n\n\tfunction logUint(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction logString(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction logBool(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction logAddress(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction logBytes(bytes memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n\t}\n\n\tfunction logBytes1(bytes1 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n\t}\n\n\tfunction logBytes2(bytes2 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n\t}\n\n\tfunction logBytes3(bytes3 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n\t}\n\n\tfunction logBytes4(bytes4 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n\t}\n\n\tfunction logBytes5(bytes5 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n\t}\n\n\tfunction logBytes6(bytes6 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n\t}\n\n\tfunction logBytes7(bytes7 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n\t}\n\n\tfunction logBytes8(bytes8 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n\t}\n\n\tfunction logBytes9(bytes9 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n\t}\n\n\tfunction logBytes10(bytes10 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n\t}\n\n\tfunction logBytes11(bytes11 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n\t}\n\n\tfunction logBytes12(bytes12 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n\t}\n\n\tfunction logBytes13(bytes13 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n\t}\n\n\tfunction logBytes14(bytes14 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n\t}\n\n\tfunction logBytes15(bytes15 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n\t}\n\n\tfunction logBytes16(bytes16 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n\t}\n\n\tfunction logBytes17(bytes17 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n\t}\n\n\tfunction logBytes18(bytes18 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n\t}\n\n\tfunction logBytes19(bytes19 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n\t}\n\n\tfunction logBytes20(bytes20 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n\t}\n\n\tfunction logBytes21(bytes21 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n\t}\n\n\tfunction logBytes22(bytes22 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n\t}\n\n\tfunction logBytes23(bytes23 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n\t}\n\n\tfunction logBytes24(bytes24 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n\t}\n\n\tfunction logBytes25(bytes25 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n\t}\n\n\tfunction logBytes26(bytes26 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n\t}\n\n\tfunction logBytes27(bytes27 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n\t}\n\n\tfunction logBytes28(bytes28 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n\t}\n\n\tfunction logBytes29(bytes29 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n\t}\n\n\tfunction logBytes30(bytes30 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n\t}\n\n\tfunction logBytes31(bytes31 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n\t}\n\n\tfunction logBytes32(bytes32 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n\t}\n\n\tfunction log(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction log(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction log(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction log(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction log(uint p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n\t}\n\n\tfunction log(address p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n\t}\n\n\tfunction log(address p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n\t}\n\n\tfunction log(address p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n\t}\n\n\tfunction log(address p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "byzantium", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/contracts/deployments/test/eth/solcInputs/63b1c355e88e8fd19ebe2cd692a8475b.json b/contracts/deployments/test/eth/solcInputs/63b1c355e88e8fd19ebe2cd692a8475b.json deleted file mode 100644 index 15fb2537..00000000 --- a/contracts/deployments/test/eth/solcInputs/63b1c355e88e8fd19ebe2cd692a8475b.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/checks/CheckAura.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\nimport \"hardhat/console.sol\";\n\n\ncontract CheckAura is Initializable {\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n bytes1 constant STEP_PREFIX = 0x84;\n bytes2 constant SIGNATURE_PREFIX = 0xB841;\n\n address[] public validatorSet;\n address validatorSetAddress;\n bytes32 public lastProcessedBlock; // actually latest processed (finalized) *vs change event* block\n uint public minSafetyBlocksValidators;\n\n\n struct BlockAura {\n bytes3 p0Seal;\n bytes3 p0Bare;\n\n bytes32 parentHash;\n bytes p2;\n bytes32 receiptHash;\n bytes p3;\n\n bytes4 step;\n bytes signature; // todo maybe pass s r v values?\n\n uint64 finalizedVs;\n }\n\n\n struct ValidatorSetChange {\n address deltaAddress;\n int64 deltaIndex; // < 0 ? remove : add\n }\n\n struct ValidatorSetProof {\n bytes[] receiptProof;\n ValidatorSetChange[] changes;\n uint eventBlock;\n }\n\n struct AuraProof {\n BlockAura[] blocks;\n CommonStructs.TransferProof transfer;\n ValidatorSetProof[] vsChanges;\n uint64 transferEventBlock;\n }\n\n\n function __CheckAura_init(\n address[] calldata initialValidators_,\n address validatorSetAddress_,\n bytes32 lastProcessedBlock_,\n uint minSafetyBlocksValidators_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n validatorSet = initialValidators_;\n validatorSetAddress = validatorSetAddress_;\n lastProcessedBlock = lastProcessedBlock_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n\n\n /*\n AuraProof.blocks contains:\n - blocks for validate validatorSet change event, in that order:\n - block with `InitiateChange` events (contains list of all validators)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize; have `finalizedVs` != 0\n * repeated for each vs change event; all events must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n AuraProof.vsChanges contains changes in validator set and receiptProof for validation.\n block.finalizedVs-1 is index in AuraProof.vsChanges array\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between vsChange events\n If there are no errors, the transfer is considered valid\n */\n function checkAura_(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n\n bytes32 parentHash;\n bytes32 receiptHash;\n bytes32 lastProcessedBlockTemp;\n\n // auraProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (auraProof.transferEventBlock != 0) {\n receiptHash = calcTransferReceiptsHash(auraProof.transfer, sideBridgeAddress);\n require(auraProof.blocks[auraProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(auraProof.blocks.length - auraProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < auraProof.blocks.length; i++) {\n console.logUint(i);\n BlockAura calldata block_ = auraProof.blocks[i];\n\n checkBlock(block_);\n\n // 0 means no events should be finalized, so indexes are shifted by 1\n if (block_.finalizedVs != 0) {\n // vs changes in that block\n ValidatorSetProof calldata vsProof = auraProof.vsChanges[block_.finalizedVs - 1];\n console.logUint(vsProof.eventBlock);\n\n // apply vs changes\n for (uint k = 0; k < vsProof.changes.length; k++)\n applyVsChange(vsProof.changes[k]);\n\n // check proof\n receiptHash = calcValidatorSetReceiptHash(vsProof.receiptProof, validatorSetAddress, validatorSet);\n require(auraProof.blocks[vsProof.eventBlock].receiptHash == receiptHash, \"Wrong VS receipt hash\");\n require(i - vsProof.eventBlock >= minSafetyBlocksValidators, \"Few safety blocks validators\");\n\n // there is gap BEFORE finalizing block, so disable parentHash check for it\n // but only if it's not the safety blocks for transfer event\n if (i < auraProof.transferEventBlock){\n console.log(\"here 1\");\n parentHash = bytes32(0);\n }\n }\n\n // check that block.parentHash == parentHash (hash of prev block)\n // don't check parentHash for first block and for blocks before and after finalizing vs\n if (parentHash != bytes32(0)){\n console.logBytes32(parentHash);\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n }\n\n // calc block hash for this block\n (, parentHash) = calcBlockHash(block_);\n\n // and again, if this block is finalizing block\n if (block_.finalizedVs != 0) {\n // save it hash to `lastProcessedBlock`\n lastProcessedBlockTemp = parentHash;\n\n // there is gap AFTER finalizing block, so disable parentHash check for it\n // but only if it's not the safety blocks for transfer event\n if (i < auraProof.transferEventBlock){\n console.log(\"here 2\");\n parentHash = bytes32(0);\n }\n }\n\n }\n\n // saving in temp variable cost lower than saving in global `lastProcessedBlock`\n if (lastProcessedBlockTemp != bytes32(0)) {\n lastProcessedBlock = lastProcessedBlockTemp;\n }\n }\n\n function getValidatorSet() public view returns (address[] memory) {\n return validatorSet;\n }\n\n function applyVsChange(ValidatorSetChange calldata vsEvent) internal {\n // todo invert indexes sign meaning\n if (vsEvent.deltaIndex < 0) { // delete validator\n uint index = uint(int(vsEvent.deltaIndex * (- 1) - 1));\n validatorSet[index] = validatorSet[validatorSet.length - 1];\n validatorSet.pop();\n } else { // add validator\n validatorSet.push(vsEvent.deltaAddress);\n }\n }\n\n function checkBlock(BlockAura calldata block_) internal view returns (bytes32) {\n (bytes32 bareHash, bytes32 sealHash) = calcBlockHash(block_);\n\n for (uint i = 0; i < validatorSet.length; i++) {\n console.logAddress(validatorSet[i]);\n }\n\n address validator = validatorSet[bytesToUint(block_.step) % validatorSet.length];\n console.log();\n console.logAddress(validator);\n console.logAddress(ecdsaRecover(bareHash, block_.signature));\n require(ecdsaRecover(bareHash, block_.signature) == validator, \"Failed to verify sign\");\n\n return sealHash;\n }\n\n function calcBlockHash(BlockAura calldata block_) internal pure returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p2, block_.receiptHash, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Bare, commonRlp)),\n // hash with seal, for prevHash check\n keccak256(abi.encodePacked(block_.p0Seal, commonRlp, STEP_PREFIX, block_.step, SIGNATURE_PREFIX, block_.signature))\n );\n }\n\n\n function calcValidatorSetReceiptHash(bytes[] calldata receiptProof, address validatorSetAddress_, address[] storage vSet) private pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n receiptProof[0],\n validatorSetAddress_,\n receiptProof[1],\n abi.encode(vSet),\n receiptProof[2]\n ));\n return calcReceiptsHash(receiptProof, el, 3);\n }\n\n function bytesToUint(bytes4 b) internal pure returns (uint){\n return uint(uint32(b));\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckReceiptsProof.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\n// check readme for focs\nfunction calcReceiptsHash(bytes[] calldata proof, bytes32 el, uint proofStart) pure returns (bytes32) {\n bytes memory s;\n\n for (uint i = proofStart; i < proof.length; i += 2) {\n s = abi.encodePacked(proof[i], el, proof[i + 1]);\n el = (s.length > 32) ? keccak256(s) : bytes32(s);\n }\n\n return el;\n}\n\n\nfunction calcTransferReceiptsHash(CommonStructs.TransferProof calldata p, address eventContractAddress) pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n p.receiptProof[0],\n eventContractAddress,\n p.receiptProof[1],\n toBinary(p.eventId),\n p.receiptProof[2],\n abi.encode(p.transfers),\n p.receiptProof[3]\n ));\n return calcReceiptsHash(p.receiptProof, el, 4);\n // start from proof[4]\n}\n\n\nfunction toBinary(uint _x) pure returns (bytes memory) {\n bytes memory b = new bytes(32);\n assembly {\n mstore(add(b, 32), _x)\n }\n uint i;\n for (i = 0; i < 32; i++) {\n if (b[i] != 0) {\n break;\n }\n }\n bytes memory res = new bytes(32 - i);\n for (uint j = 0; j < res.length; j++) {\n res[j] = b[i++];\n }\n return res;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" - }, - "contracts/checks/SignatureCheck.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" - }, - "hardhat/console.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >= 0.4.22 <0.9.0;\n\nlibrary console {\n\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n\tfunction _sendLogPayload(bytes memory payload) private view {\n\t\tuint256 payloadLength = payload.length;\n\t\taddress consoleAddress = CONSOLE_ADDRESS;\n\t\tassembly {\n\t\t\tlet payloadStart := add(payload, 32)\n\t\t\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n\t\t}\n\t}\n\n\tfunction log() internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log()\"));\n\t}\n\n\tfunction logInt(int p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n\t}\n\n\tfunction logUint(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction logString(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction logBool(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction logAddress(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction logBytes(bytes memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n\t}\n\n\tfunction logBytes1(bytes1 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n\t}\n\n\tfunction logBytes2(bytes2 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n\t}\n\n\tfunction logBytes3(bytes3 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n\t}\n\n\tfunction logBytes4(bytes4 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n\t}\n\n\tfunction logBytes5(bytes5 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n\t}\n\n\tfunction logBytes6(bytes6 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n\t}\n\n\tfunction logBytes7(bytes7 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n\t}\n\n\tfunction logBytes8(bytes8 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n\t}\n\n\tfunction logBytes9(bytes9 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n\t}\n\n\tfunction logBytes10(bytes10 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n\t}\n\n\tfunction logBytes11(bytes11 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n\t}\n\n\tfunction logBytes12(bytes12 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n\t}\n\n\tfunction logBytes13(bytes13 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n\t}\n\n\tfunction logBytes14(bytes14 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n\t}\n\n\tfunction logBytes15(bytes15 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n\t}\n\n\tfunction logBytes16(bytes16 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n\t}\n\n\tfunction logBytes17(bytes17 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n\t}\n\n\tfunction logBytes18(bytes18 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n\t}\n\n\tfunction logBytes19(bytes19 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n\t}\n\n\tfunction logBytes20(bytes20 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n\t}\n\n\tfunction logBytes21(bytes21 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n\t}\n\n\tfunction logBytes22(bytes22 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n\t}\n\n\tfunction logBytes23(bytes23 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n\t}\n\n\tfunction logBytes24(bytes24 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n\t}\n\n\tfunction logBytes25(bytes25 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n\t}\n\n\tfunction logBytes26(bytes26 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n\t}\n\n\tfunction logBytes27(bytes27 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n\t}\n\n\tfunction logBytes28(bytes28 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n\t}\n\n\tfunction logBytes29(bytes29 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n\t}\n\n\tfunction logBytes30(bytes30 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n\t}\n\n\tfunction logBytes31(bytes31 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n\t}\n\n\tfunction logBytes32(bytes32 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n\t}\n\n\tfunction log(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction log(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction log(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction log(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction log(uint p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n\t}\n\n\tfunction log(address p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n\t}\n\n\tfunction log(address p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n\t}\n\n\tfunction log(address p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n\t}\n\n\tfunction log(address p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n}\n" - }, - "contracts/common/CommonStructs.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address adminAddress;\n address relayAddress; address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" - }, - "contracts/networks/ETH_EthBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract ETH_EthBridge is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n}\n" - }, - "contracts/common/CommonBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // OWNER_ROLE must be DEFAULT_ADMIN_ROLE because by default only this role able to grant or revoke other roles\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\");\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\");\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable transferFeeRecipient;\n address payable bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRole(ADMIN_ROLE, args.adminAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId and all after it\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\");\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n inputEventId = eventId - 1;\n // pretend like we don't receive that event\n }\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(ADMIN_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(RELAY_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" - }, - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\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, _msgSender());\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(IAccessControlUpgradeable).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" - }, - "contracts/tokens/IWrapper.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 IERC165Upgradeable {\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" - }, - "contracts/networks/ETH_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoW.sol\";\n\n\ncontract ETH_AmbBridge is CommonBridge, CheckPoW {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n uint minimumDifficulty\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoW_init(minimumDifficulty);\n }\n\n function submitTransferPoW(PoWProof calldata powProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(powProof.transfer.eventId);\n checkEventId(powProof.transfer.eventId);\n// checkPoW_(powProof, sideBridgeAddress);\n lockTransfers(powProof.transfer.transfers, powProof.transfer.eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n}\n" - }, - "contracts/checks/CheckPoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"./CheckPoW_Ethash.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckPoW is Initializable, Ethash {\n struct BlockPoW {\n bytes3 p0WithNonce;\n bytes3 p0WithoutNonce;\n\n bytes p1;\n bytes32 parentOrReceiptHash;\n bytes p2;\n bytes difficulty;\n bytes p3;\n bytes number;\n bytes p4; // end when extra end\n bytes p5; // after extra\n bytes nonce;\n bytes p6;\n\n uint[] dataSetLookup;\n uint[] witnessForLookup;\n }\n\n struct PoWProof {\n BlockPoW[] blocks;\n CommonStructs.TransferProof transfer;\n }\n\n uint256 minimumDifficulty;\n\n function __CheckPoW_init(\n uint256 minimumDifficulty_\n ) internal initializer {\n minimumDifficulty = minimumDifficulty_;\n }\n\n /*\n PoWProof.blocks contains:\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, checking it pow hash.\n Each block parentHash must be equal to the hash of the previous block.\n If there are no errors, the transfer is considered valid\n */\n function checkPoW_(PoWProof calldata powProof, address sideBridgeAddress) internal view\n {\n bytes32 hash = calcTransferReceiptsHash(powProof.transfer, sideBridgeAddress);\n for (uint i = 0; i < powProof.blocks.length; i++) {\n require(powProof.blocks[i].parentOrReceiptHash == hash, \"parentHash or receiptHash wrong\");\n hash = blockHash(powProof.blocks[i]);\n\n verifyEthash(powProof.blocks[i]);\n }\n }\n\n\n function verifyEthash(BlockPoW calldata block_) internal view {\n uint difficulty = bytesToUint(block_.difficulty);\n require(difficulty >= minimumDifficulty, \"difficulty too low\");\n verifyPoW(\n bytesToUint(block_.number),\n blockHashWithoutNonce(block_),\n bytesToUint(block_.nonce),\n difficulty,\n block_.dataSetLookup,\n block_.witnessForLookup\n );\n }\n\n function blockHash(BlockPoW calldata block_) internal pure returns (bytes32) {\n // Note: too much arguments in abi.encodePacked() function cause CompilerError: Stack too deep...\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2,\n block_.difficulty,\n block_.p3\n ),\n abi.encodePacked(\n block_.number,\n block_.p4,\n block_.p5,\n block_.nonce,\n block_.p6\n )\n ));\n }\n\n function blockHashWithoutNonce(BlockPoW calldata block_) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithoutNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2\n ),\n abi.encodePacked(\n block_.difficulty,\n block_.p3,\n block_.number,\n block_.p4,\n block_.p6\n )\n ));\n }\n\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckPoW_Ethash.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n/// @dev These contracts are used to verify Proof of Work within a smart contract.\n/// The algorithms have been extracted from the implementation of smart pool (https://github.com/smartpool)\ncontract SHA3_512 {\n constructor() {}\n\n function keccak_f(uint[25] memory A) pure private returns (uint[25] memory) {\n uint[25] memory B;\n uint[5] memory C;\n uint[5] memory D;\n\n uint[24] memory RC = [\n uint(0x0000000000000001),\n 0x0000000000008082,\n 0x800000000000808A,\n 0x8000000080008000,\n 0x000000000000808B,\n 0x0000000080000001,\n 0x8000000080008081,\n 0x8000000000008009,\n 0x000000000000008A,\n 0x0000000000000088,\n 0x0000000080008009,\n 0x000000008000000A,\n 0x000000008000808B,\n 0x800000000000008B,\n 0x8000000000008089,\n 0x8000000000008003,\n 0x8000000000008002,\n 0x8000000000000080,\n 0x000000000000800A,\n 0x800000008000000A,\n 0x8000000080008081,\n 0x8000000000008080,\n 0x0000000080000001,\n 0x8000000080008008];\n\n for (uint i = 0; i < 24; i++) {\n\n C[0] = A[0] ^ A[1] ^ A[2] ^ A[3] ^ A[4];\n C[1] = A[5] ^ A[6] ^ A[7] ^ A[8] ^ A[9];\n C[2] = A[10] ^ A[11] ^ A[12] ^ A[13] ^ A[14];\n C[3] = A[15] ^ A[16] ^ A[17] ^ A[18] ^ A[19];\n C[4] = A[20] ^ A[21] ^ A[22] ^ A[23] ^ A[24];\n\n D[0] = C[4] ^ ((C[1] * 2) & 0xffffffffffffffff | (C[1] / (2 ** 63)));\n D[1] = C[0] ^ ((C[2] * 2) & 0xffffffffffffffff | (C[2] / (2 ** 63)));\n D[2] = C[1] ^ ((C[3] * 2) & 0xffffffffffffffff | (C[3] / (2 ** 63)));\n D[3] = C[2] ^ ((C[4] * 2) & 0xffffffffffffffff | (C[4] / (2 ** 63)));\n D[4] = C[3] ^ ((C[0] * 2) & 0xffffffffffffffff | (C[0] / (2 ** 63)));\n\n A[0] = A[0] ^ D[0];\n A[1] = A[1] ^ D[0];\n A[2] = A[2] ^ D[0];\n A[3] = A[3] ^ D[0];\n A[4] = A[4] ^ D[0];\n A[5] = A[5] ^ D[1];\n A[6] = A[6] ^ D[1];\n A[7] = A[7] ^ D[1];\n A[8] = A[8] ^ D[1];\n A[9] = A[9] ^ D[1];\n A[10] = A[10] ^ D[2];\n A[11] = A[11] ^ D[2];\n A[12] = A[12] ^ D[2];\n A[13] = A[13] ^ D[2];\n A[14] = A[14] ^ D[2];\n A[15] = A[15] ^ D[3];\n A[16] = A[16] ^ D[3];\n A[17] = A[17] ^ D[3];\n A[18] = A[18] ^ D[3];\n A[19] = A[19] ^ D[3];\n A[20] = A[20] ^ D[4];\n A[21] = A[21] ^ D[4];\n A[22] = A[22] ^ D[4];\n A[23] = A[23] ^ D[4];\n A[24] = A[24] ^ D[4];\n\n /*Rho and pi steps*/\n B[0] = A[0];\n B[8] = ((A[1] * (2 ** 36)) & 0xffffffffffffffff | (A[1] / (2 ** 28)));\n B[11] = ((A[2] * (2 ** 3)) & 0xffffffffffffffff | (A[2] / (2 ** 61)));\n B[19] = ((A[3] * (2 ** 41)) & 0xffffffffffffffff | (A[3] / (2 ** 23)));\n B[22] = ((A[4] * (2 ** 18)) & 0xffffffffffffffff | (A[4] / (2 ** 46)));\n B[2] = ((A[5] * (2 ** 1)) & 0xffffffffffffffff | (A[5] / (2 ** 63)));\n B[5] = ((A[6] * (2 ** 44)) & 0xffffffffffffffff | (A[6] / (2 ** 20)));\n B[13] = ((A[7] * (2 ** 10)) & 0xffffffffffffffff | (A[7] / (2 ** 54)));\n B[16] = ((A[8] * (2 ** 45)) & 0xffffffffffffffff | (A[8] / (2 ** 19)));\n B[24] = ((A[9] * (2 ** 2)) & 0xffffffffffffffff | (A[9] / (2 ** 62)));\n B[4] = ((A[10] * (2 ** 62)) & 0xffffffffffffffff | (A[10] / (2 ** 2)));\n B[7] = ((A[11] * (2 ** 6)) & 0xffffffffffffffff | (A[11] / (2 ** 58)));\n B[10] = ((A[12] * (2 ** 43)) & 0xffffffffffffffff | (A[12] / (2 ** 21)));\n B[18] = ((A[13] * (2 ** 15)) & 0xffffffffffffffff | (A[13] / (2 ** 49)));\n B[21] = ((A[14] * (2 ** 61)) & 0xffffffffffffffff | (A[14] / (2 ** 3)));\n B[1] = ((A[15] * (2 ** 28)) & 0xffffffffffffffff | (A[15] / (2 ** 36)));\n B[9] = ((A[16] * (2 ** 55)) & 0xffffffffffffffff | (A[16] / (2 ** 9)));\n B[12] = ((A[17] * (2 ** 25)) & 0xffffffffffffffff | (A[17] / (2 ** 39)));\n B[15] = ((A[18] * (2 ** 21)) & 0xffffffffffffffff | (A[18] / (2 ** 43)));\n B[23] = ((A[19] * (2 ** 56)) & 0xffffffffffffffff | (A[19] / (2 ** 8)));\n B[3] = ((A[20] * (2 ** 27)) & 0xffffffffffffffff | (A[20] / (2 ** 37)));\n B[6] = ((A[21] * (2 ** 20)) & 0xffffffffffffffff | (A[21] / (2 ** 44)));\n B[14] = ((A[22] * (2 ** 39)) & 0xffffffffffffffff | (A[22] / (2 ** 25)));\n B[17] = ((A[23] * (2 ** 8)) & 0xffffffffffffffff | (A[23] / (2 ** 56)));\n B[20] = ((A[24] * (2 ** 14)) & 0xffffffffffffffff | (A[24] / (2 ** 50)));\n\n /*Xi state*/\n A[0] = B[0] ^ ((~B[5]) & B[10]);\n A[1] = B[1] ^ ((~B[6]) & B[11]);\n A[2] = B[2] ^ ((~B[7]) & B[12]);\n A[3] = B[3] ^ ((~B[8]) & B[13]);\n A[4] = B[4] ^ ((~B[9]) & B[14]);\n A[5] = B[5] ^ ((~B[10]) & B[15]);\n A[6] = B[6] ^ ((~B[11]) & B[16]);\n A[7] = B[7] ^ ((~B[12]) & B[17]);\n A[8] = B[8] ^ ((~B[13]) & B[18]);\n A[9] = B[9] ^ ((~B[14]) & B[19]);\n A[10] = B[10] ^ ((~B[15]) & B[20]);\n A[11] = B[11] ^ ((~B[16]) & B[21]);\n A[12] = B[12] ^ ((~B[17]) & B[22]);\n A[13] = B[13] ^ ((~B[18]) & B[23]);\n A[14] = B[14] ^ ((~B[19]) & B[24]);\n A[15] = B[15] ^ ((~B[20]) & B[0]);\n A[16] = B[16] ^ ((~B[21]) & B[1]);\n A[17] = B[17] ^ ((~B[22]) & B[2]);\n A[18] = B[18] ^ ((~B[23]) & B[3]);\n A[19] = B[19] ^ ((~B[24]) & B[4]);\n A[20] = B[20] ^ ((~B[0]) & B[5]);\n A[21] = B[21] ^ ((~B[1]) & B[6]);\n A[22] = B[22] ^ ((~B[2]) & B[7]);\n A[23] = B[23] ^ ((~B[3]) & B[8]);\n A[24] = B[24] ^ ((~B[4]) & B[9]);\n\n /*Last step*/\n A[0] = A[0] ^ RC[i];\n }\n\n return A;\n }\n\n\n function sponge(uint[9] memory M) pure internal returns (uint[16] memory) {\n require((M.length * 8) == 72, \"sponge error\");\n\n M[5] = 0x01;\n M[8] = 0x8000000000000000;\n\n uint r = 72;\n uint w = 8;\n uint size = M.length * 8;\n\n uint[25] memory S;\n uint i;\n uint y;\n uint x;\n /*Absorbing Phase*/\n for (i = 0; i < size / r; i++) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w)) {\n S[5 * x + y] = S[5 * x + y] ^ M[i * 9 + x + 5 * y];\n }\n }\n }\n S = keccak_f(S);\n }\n\n /*Squeezing phase*/\n uint[16] memory result;\n uint b = 0;\n while (b < 16) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w) && (b < 16)) {\n result[b] = S[5 * x + y] & 0xFFFFFFFF;\n result[b + 1] = S[5 * x + y] / 0x100000000;\n b += 2;\n }\n }\n }\n }\n\n return result;\n }\n\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\ncontract Ethash is SHA3_512 {\n\n uint constant EPOCH_LENGTH = 30000; // blocks per epoch\n\n constructor() {\n }\n\n struct EthashCacheOptData {\n uint[512] merkleNodes;\n uint fullSizeIn128Resultion;\n uint branchDepth;\n }\n\n mapping(uint => EthashCacheOptData) epochData;\n\n\n function verifyPoW(uint blockNumber, bytes32 rlpHeaderHashWithoutNonce, uint nonce, uint difficulty,\n uint[] memory dataSetLookup, uint[] memory witnessForLookup) internal view {\n\n uint epoch = blockNumber / EPOCH_LENGTH;\n uint ethash = hashimoto(rlpHeaderHashWithoutNonce, nonce, dataSetLookup, witnessForLookup, epoch);\n\n require(ethash <= (2 ** 256 - 1) / difficulty, \"Ethash difficulty too low\");\n }\n\n function isEpochDataSet(uint epochIndex) public view returns (bool) {\n return epochData[epochIndex].fullSizeIn128Resultion != 0;\n }\n\n function setEpochData(\n uint epochNum,\n uint fullSizeIn128Resultion,\n uint branchDepth,\n uint[] calldata merkleNodes\n ) public {\n\n // we store only previous and current epochs\n // so, delete second from the end epoch\n if (epochNum >= 2) // underflow check\n delete epochData[epochNum - 2];\n\n\n uint l = merkleNodes.length;\n uint[512] storage nodes = epochData[epochNum].merkleNodes;\n\n for (uint i = 0; i < l; i++) {\n nodes[i] = merkleNodes[i];\n }\n\n epochData[epochNum].fullSizeIn128Resultion = fullSizeIn128Resultion;\n epochData[epochNum].branchDepth = branchDepth;\n }\n\n\n function hashimoto(bytes32 header,\n uint nonceLe,\n uint[] memory dataSetLookup,\n uint[] memory witnessForLookup,\n uint epochIndex) private view returns (uint) {\n\n uint[16] memory s = computeS(uint(header), nonceLe);\n uint[32] memory mix;\n uint[8] memory cmix;\n\n\n uint depth = epochData[epochIndex].branchDepth;\n uint fullSize = epochData[epochIndex].fullSizeIn128Resultion;\n\n uint i;\n uint j;\n\n require(fullSize != 0, \"EpochData not set\");\n\n\n for (i = 0; i < 16; i++) {\n assembly {\n let offset := mul(i, 0x20)\n\n //mix[i] = s[i];\n mstore(add(mix, offset), mload(add(s, offset)))\n\n // mix[i+16] = s[i];\n mstore(add(mix, add(0x200, offset)), mload(add(s, offset)))\n }\n }\n\n for (i = 0; i < 64; i++) {\n uint p = fnv(i ^ s[0], mix[i % 32]) % fullSize;\n\n // console.log(computeCacheRoot( p, i, dataSetLookup, witnessForLookup, depthAndFullSize[0]));\n // console.log(getMerkleLeave( epochIndex, p ));\n\n if (computeCacheRoot(p, i, dataSetLookup, witnessForLookup, depth) != getMerkleLeave(epochIndex, p)) {\n // PoW failed\n revert(\"PoW failed\");\n }\n\n for (j = 0; j < 8; j++) {\n\n assembly{\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & varFFFFFFFF );\n let dataOffset := add(mul(0x80, i), add(dataSetLookup, 0x20))\n let dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n let mixOffset := add(mix, mul(0x20, j))\n let mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n let fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n }\n\n\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & 0xFFFFFFFF );\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n\n\n //dataSetLookup[4*i ] = dataSetLookup[4*i ]/(2**32);\n //dataSetLookup[4*i + 1] = dataSetLookup[4*i + 1]/(2**32);\n //dataSetLookup[4*i + 2] = dataSetLookup[4*i + 2]/(2**32);\n //dataSetLookup[4*i + 3] = dataSetLookup[4*i + 3]/(2**32);\n\n assembly{\n let offset := add(add(dataSetLookup, 0x20), mul(i, 0x80))\n let value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n }\n }\n }\n\n\n for (i = 0; i < 32; i += 4) {\n cmix[i / 4] = (fnv(fnv(fnv(mix[i], mix[i + 1]), mix[i + 2]), mix[i + 3]));\n }\n\n return computeSha3(s, cmix);\n\n }\n\n\n function fnv(uint v1, uint v2) pure internal returns (uint) {\n return ((v1 * 0x01000193) ^ v2) & 0xFFFFFFFF;\n }\n\n function computeCacheRoot(uint index,\n uint indexInElementsArray,\n uint[] memory elements,\n uint[] memory witness,\n uint branchSize) pure private returns (uint) {\n\n uint leaf = computeLeaf(elements, indexInElementsArray) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n\n uint left;\n uint right;\n uint node;\n bool oddBranchSize = (branchSize % 2) > 0;\n\n assembly {\n branchSize := div(branchSize, 2)\n //branchSize /= 2;\n }\n uint witnessIndex = indexInElementsArray * branchSize;\n if (oddBranchSize) witnessIndex += indexInElementsArray;\n\n uint depth;\n for (depth = 0; depth < branchSize; depth++) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n\n //node = witness[witnessIndex + depth] / (2**128);\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := div(node, 0x100000000000000000000000000000000)\n }\n }\n else {\n assembly {\n left := div(node, 0x100000000000000000000000000000000)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n }\n\n if (oddBranchSize) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n }\n\n\n return leaf;\n }\n\n\n function computeSha3(uint[16] memory s, uint[8] memory cmix) pure internal returns (uint) {\n uint s0 = s[0] + s[1] * (2 ** 32) + s[2] * (2 ** 64) + s[3] * (2 ** 96) +\n (s[4] + s[5] * (2 ** 32) + s[6] * (2 ** 64) + s[7] * (2 ** 96)) * (2 ** 128);\n\n uint s1 = s[8] + s[9] * (2 ** 32) + s[10] * (2 ** 64) + s[11] * (2 ** 96) +\n (s[12] + s[13] * (2 ** 32) + s[14] * (2 ** 64) + s[15] * (2 ** 96)) * (2 ** 128);\n\n uint c = cmix[0] + cmix[1] * (2 ** 32) + cmix[2] * (2 ** 64) + cmix[3] * (2 ** 96) +\n (cmix[4] + cmix[5] * (2 ** 32) + cmix[6] * (2 ** 64) + cmix[7] * (2 ** 96)) * (2 ** 128);\n\n\n /* god knows why need to convert to big endian */\n return uint(keccak256(abi.encodePacked(reverseBytes(s0), reverseBytes(s1), reverseBytes(c))));\n }\n\n\n function computeLeaf(uint[] memory dataSetLookup, uint index) pure internal returns (uint) {\n return uint(keccak256(abi.encodePacked(\n dataSetLookup[4 * index],\n dataSetLookup[4 * index + 1],\n dataSetLookup[4 * index + 2],\n dataSetLookup[4 * index + 3]\n )));\n\n }\n\n function computeS(uint header, uint nonceLe) pure internal returns (uint[16] memory) {\n uint[9] memory M;\n\n header = reverseBytes(header);\n\n M[0] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[1] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[2] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[3] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n\n // make little endian nonce\n M[4] = nonceLe;\n return sponge(M);\n }\n\n function reverseBytes(uint input) pure internal returns (uint) {\n uint result;\n for (uint i = 0; i < 32; i++) {\n result = (result << 8) + (input & 0xff);\n input = input >> 8;\n }\n return result;\n }\n\n\n function getMerkleLeave(uint epochIndex, uint p) view internal returns (uint) {\n uint rootIndex = uint(p >> epochData[epochIndex].branchDepth);\n uint expectedRoot = epochData[epochIndex].merkleNodes[(rootIndex >> 1)];\n\n if ((rootIndex % 2) == 0)\n return expectedRoot & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n return expectedRoot >> 128;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoWTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoW.sol\";\n\ncontract CheckPoWTest is CheckPoW {\n\n constructor(\n uint minimumDifficulty_\n ) {\n minimumDifficulty = minimumDifficulty_;\n }\n\n function checkPoWTest(PoWProof calldata powProof, address sideBridgeAddress) public {\n checkPoW_(powProof, sideBridgeAddress);\n }\n\n function verifyEthashTest(BlockPoW calldata block_) public view {\n verifyEthash(block_);\n }\n\n function blockHashTest(BlockPoW calldata block_) public pure returns (bytes32) {\n return blockHash(block_);\n }\n\n}\n" - }, - "contracts/checks/CheckPoSA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckPoSA is Initializable {\n uint256 private constant ADDRESS_LENGTH = 20;\n uint256 private constant EXTRA_VANITY_LENGTH = 32;\n uint256 private constant EXTRA_SEAL_LENGTH = 65;\n uint256 private constant EPOCH_LENGTH = 200;\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n\n mapping(uint => mapping(address => bool)) internal allValidators;\n uint public currentEpoch;\n uint currentValidatorSetSize;\n\n bytes1 chainId;\n\n\n struct BlockPoSA {\n bytes3 p0Signed;\n bytes3 p0Unsigned;\n\n bytes32 parentHash;\n bytes p1;\n bytes32 receiptHash;\n bytes p2;\n bytes number;\n bytes p3;\n\n bytes p4Signed;\n bytes p4Unsigned;\n bytes extraData;\n\n bytes p5;\n }\n\n struct PoSAProof {\n BlockPoSA[] blocks;\n CommonStructs.TransferProof transfer;\n uint64 transferEventBlock;\n }\n\n\n function __CheckPoSA_init(\n address[] calldata initialValidators_,\n uint initialEpoch_,\n bytes1 chainId_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n chainId = chainId_;\n currentEpoch = initialEpoch_;\n currentValidatorSetSize = initialValidators_.length;\n\n for (uint i = 0; i < initialValidators_.length; i++) {\n allValidators[currentEpoch][initialValidators_[i]] = true;\n }\n }\n\n /*\n PoSAProof.blocks contains:\n - blocks for validate validatorSet changes, in that order:\n - first block in epoch (blockNum % 200 == 0)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize\n * repeated for each new epoch, all epochs must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between epochs\n If there are no errors, the transfer is considered valid\n */\n function checkPoSA_(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n bytes32 bareHash;\n bytes32 parentHash;\n uint finalizeVsBlock;\n uint nextVsSize;\n\n // posaProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (posaProof.transferEventBlock != 0) {\n bytes32 receiptHash = calcTransferReceiptsHash(posaProof.transfer, sideBridgeAddress);\n require(posaProof.blocks[posaProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(posaProof.blocks.length - posaProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < posaProof.blocks.length; i++) {\n BlockPoSA calldata block_ = posaProof.blocks[i];\n\n if (parentHash != bytes32(0))\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n\n (bareHash, parentHash) = calcBlockHash(block_);\n\n require(verifySignature(bareHash, getSignature(block_.extraData)), \"invalid signature\");\n\n // change validator set\n\n uint blockNumber = bytesToUint(block_.number);\n\n if (blockNumber % EPOCH_LENGTH == 0) {\n require(blockNumber / EPOCH_LENGTH == currentEpoch + 1, \"invalid epoch\");\n\n nextVsSize = newValidatorSet(block_.extraData);\n finalizeVsBlock = blockNumber + currentValidatorSetSize / 2;\n } else if (blockNumber == finalizeVsBlock) {\n currentEpoch++;\n currentValidatorSetSize = nextVsSize;\n\n // after finalizing vs change, next block in posaProof.blocks can have any parentHash (skipping some blocks)\n // but only if it's not the safety blocks for transfer event\n if (i < posaProof.transferEventBlock)\n parentHash = bytes32(0);\n }\n }\n }\n\n\n function calcBlockHash(BlockPoSA calldata block_) internal view returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p1, block_.receiptHash, block_.p2, block_.number, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Unsigned, chainId, commonRlp, block_.p4Unsigned, getExtraDataUnsigned(block_.extraData), block_.p5)),\n // hash with seal, for prev_hash check\n keccak256(abi.encodePacked(block_.p0Signed, commonRlp, block_.p4Signed, block_.extraData, block_.p5))\n );\n }\n\n function getSignature(bytes calldata extraData) private pure returns (bytes calldata) {\n uint start = extraData.length - EXTRA_SEAL_LENGTH;\n return extraData[start : start + EXTRA_SEAL_LENGTH];\n }\n\n function getExtraDataUnsigned(bytes calldata extraData) private pure returns (bytes memory) {\n return extraData[0 : extraData.length - EXTRA_SEAL_LENGTH];\n }\n\n function newValidatorSet(bytes calldata extraData) private returns (uint) {\n uint nextValidatorSet = currentEpoch + 1;\n uint endPos = extraData.length - EXTRA_SEAL_LENGTH;\n\n uint nextValidatorSetSize;\n for (uint pos = EXTRA_VANITY_LENGTH; pos < endPos; pos += ADDRESS_LENGTH) {\n address validator = address(bytes20(extraData[pos : pos + ADDRESS_LENGTH]));\n allValidators[nextValidatorSet][validator] = true;\n nextValidatorSetSize++;\n }\n\n return nextValidatorSetSize;\n }\n\n function verifySignature(bytes32 hash, bytes calldata signature) private view returns (bool) {\n address signer = ecdsaRecover(hash, signature);\n return allValidators[currentEpoch][signer];\n }\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n}\n" - }, - "contracts/networks/BSC_AmbBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract BSC_AmbBridge is CommonBridge, CheckPoSA {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n uint initialEpoch,\n bytes1 chainId\n ) public initializer {\n __CommonBridge_init(args);\n __CheckPoSA_init(initialValidators, initialEpoch, chainId);\n }\n\n function submitTransferPoSA(PoSAProof calldata posaProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(posaProof.transfer.eventId);\n checkEventId(posaProof.transfer.eventId);\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(posaProof.transfer.transfers, posaProof.transfer.eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoSATest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract CheckPoSATest is CheckPoSA {\n constructor(\n bytes1 chainId_\n ) {\n chainId = chainId_;\n }\n\n function checkPoSATest(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress,\n address[] memory _initialValidators, uint _initialEpoch, bytes1 _chainId) public {\n // TODO: we can't use the `__CheckPoSA_init` twice, but copy-paste is also not good\n chainId = _chainId;\n currentEpoch = _initialEpoch;\n currentValidatorSetSize = _initialValidators.length;\n\n for (uint i = 0; i < _initialValidators.length; i++) {\n allValidators[currentEpoch][_initialValidators[i]] = true;\n }\n\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockPoSA calldata block_) public view returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockPoSA calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n}\n" - }, - "contracts/contracts_for_tests/commonBridgeTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckReceiptsProof.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // used for signature check\n _setupRole(RELAY_ROLE, address(0x295C2707319ad4BecA6b5bb4086617fD6F240CfE));\n }\n\n function getLockedTransferTest(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n lockTransfers(events, eventId);\n }\n\n function getOutputEventId() public view returns (uint) {\n return outputEventId;\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n // checkReceiptsProof\n\n function calcTransferReceiptsHashTest(CommonStructs.TransferProof calldata p, address eventContractAddress) public pure returns (bytes32) {\n return calcTransferReceiptsHash(p, eventContractAddress);\n }\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" - }, - "contracts/networks/BSC_BscBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract BSC_BscBridge is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n}\n" - }, - "contracts/tokens/sAMB.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./IWrapper.sol\";\n\ncontract sAMB is IWrapper, ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\n\n function deposit() public override payable {\n _mint(msg.sender, msg.value);\n\n emit Deposit(msg.sender, msg.value);\n }\n\n function withdraw(uint amount) public override {\n _burn(msg.sender, amount);\n payable(msg.sender).transfer(amount);\n\n emit Withdrawal(msg.sender, amount);\n }\n\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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 * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, 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 * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), 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 * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\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 * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\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/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\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/access/AccessControl.sol": { - "content": "// SPDX-License-Identifier: MIT\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 * ```\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 * ```\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.\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, _msgSender());\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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(uint160(account), 20),\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\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\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/utils/Strings.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" - }, - "@openzeppelin/contracts/utils/introspection/ERC165.sol": { - "content": "// SPDX-License-Identifier: MIT\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\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" - }, - "contracts/tokens/BridgeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\n\ncontract BridgeERC20 is ERC20, AccessControl {\n mapping (address => uint) public bridgeBalances;\n bytes32 public constant BRIDGE_ROLE = keccak256(\"BRIDGE_ROLE\");\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address[] memory bridgeAddresses)\n ERC20(name_, symbol_) {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setBridgeAddressesRole(bridgeAddresses);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddressesRole(address[] memory bridgeAddresses) public onlyRole(DEFAULT_ADMIN_ROLE) {\n _setBridgeAddressesRole(bridgeAddresses);\n }\n\n function _setBridgeAddressesRole(address[] memory bridgeAddresses) private {\n for (uint i = 0; i < bridgeAddresses.length; i++) {\n _setupRole(BRIDGE_ROLE, bridgeAddresses[i]);\n }\n }\n\n function _mint(address recipient, uint256 amount) internal virtual override {\n super._mint(recipient, amount);\n\n bridgeBalances[recipient] += amount;\n }\n\n function _burn(address sender, uint256 amount) internal virtual override {\n require(bridgeBalances[sender] >= amount, \"amount is bigger than balance\");\n\n bridgeBalances[sender] -= amount;\n\n super._burn(sender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (hasRole(BRIDGE_ROLE, sender)) {\n _mint(recipient, amount);\n } else if (hasRole(BRIDGE_ROLE, recipient)) {\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" - }, - "contracts/contracts_for_tests/BridgeERC20Test.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address[] memory bridgeAddresses)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddresses) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n}\n" - }, - "contracts/contracts_for_tests/CheckAuraTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckAura.sol\";\n\ncontract CheckAuraTest is CheckAura {\n constructor(address validatorSetAddress_, uint minSafetyBlocksValidators_) {\n validatorSetAddress = validatorSetAddress_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function checkAuraTest(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress, address[] memory initialValidators_) public {\n validatorSet = initialValidators_;\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockAura calldata block_) public pure returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockAura calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function bytesToUintTest(bytes4 b) public pure returns (uint) {\n return bytesToUint(b);\n }\n\n}\n" - }, - "contracts/utils/Proxy.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/proxy/Proxy.sol\";\nimport \"@openzeppelin/contracts/utils/StorageSlot.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\nimport \"./MultiSigWallet.sol\";\nimport \"hardhat/console.sol\";\n\n\ncontract ProxyMultiSig is Proxy, MultiSigWallet {\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n bytes32 private constant ADMIN_STORAGE_LOCATION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n bytes4 private constant _UPGRADE_TO_AND_CALL_SIGNATURE = bytes4(keccak256(\"_upgradeToAndCall(address,bytes)\"));\n\n event Upgraded(address indexed implementation);\n\n\n constructor(\n address _logic,\n bytes memory _data,\n address[] memory owners,\n uint _required\n\n ) MultiSigWallet(owners, _required) {\n // Cannot use _upgradeToAndCall because of onlyWallet modifier\n _upgradeTo(_logic);\n if (_data.length > 0) {\n Address.functionDelegateCall(_logic, _data);\n }\n\n StorageSlot.getAddressSlot(ADMIN_STORAGE_LOCATION).value = msg.sender; // trick the hardhat-deploy\n }\n\n\n function implementation() external view returns (address) {\n return _implementation();\n }\n\n function upgradeTo(address newImplementation) external payable ownerExists(msg.sender) {\n submitTransaction(\n address(this),\n msg.value,\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, bytes(\"\"))\n );\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ownerExists(msg.sender) {\n submitTransaction(\n address(this),\n msg.value,\n abi.encodeWithSelector(_UPGRADE_TO_AND_CALL_SIGNATURE, newImplementation, data)\n );\n }\n\n function _upgradeToAndCall(address newImplementation, bytes memory data) external onlyWallet payable {\n _upgradeTo(newImplementation);\n if (data.length > 0) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n function _upgradeTo(address newImplementation) internal {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n emit Upgraded(newImplementation);\n }\n\n function _implementation() internal view override returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/Proxy.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overriden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/utils/StorageSlot.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n}\n" - }, - "@openzeppelin/contracts/utils/Address.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \"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(\n address target,\n bytes memory data,\n uint256 value\n ) 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 require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(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 require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(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 require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason 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 // 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\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}\n" - }, - "contracts/utils/MultiSigWallet.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n\ncontract MultiSigWallet {\n\n /*\n * Events\n */\n event Confirmation(address indexed sender, uint indexed transactionId);\n event Revocation(address indexed sender, uint indexed transactionId);\n event Submission(uint indexed transactionId);\n event Execution(uint indexed transactionId);\n event ExecutionFailure(uint indexed transactionId);\n event OwnerAddition(address indexed owner);\n event OwnerRemoval(address indexed owner);\n event RequirementChange(uint required);\n\n /*\n * Constants\n */\n uint constant public MAX_OWNER_COUNT = 50;\n\n /*\n * Storage\n */\n mapping(uint => Transaction) public transactions;\n mapping(uint => mapping(address => bool)) public confirmations;\n mapping(address => bool) public isOwner;\n address[] public owners;\n uint public required;\n uint public transactionCount;\n\n struct Transaction {\n address destination;\n uint value;\n bytes data;\n bool executed;\n }\n\n /*\n * Modifiers\n */\n modifier onlyWallet() {\n require(msg.sender == address(this));\n _;\n }\n\n modifier ownerDoesNotExist(address owner) {\n require(!isOwner[owner]);\n _;\n }\n\n modifier ownerExists(address owner) {\n require(isOwner[owner]);\n _;\n }\n\n modifier transactionExists(uint transactionId) {\n require(transactions[transactionId].destination != address(0));\n _;\n }\n\n modifier confirmed(uint transactionId, address owner) {\n require(confirmations[transactionId][owner]);\n _;\n }\n\n modifier notConfirmed(uint transactionId, address owner) {\n require(!confirmations[transactionId][owner]);\n _;\n }\n\n modifier notExecuted(uint transactionId) {\n require(!transactions[transactionId].executed);\n _;\n }\n\n modifier notNull(address _address) {\n require(_address != address(0));\n _;\n }\n\n modifier validRequirement(uint ownerCount, uint _required) {\n require(ownerCount <= MAX_OWNER_COUNT\n && _required <= ownerCount\n && _required != 0\n && ownerCount != 0);\n _;\n }\n\n /*\n * Public functions\n */\n /// @dev Contract constructor sets initial owners and required number of confirmations.\n /// @param _owners List of initial owners.\n /// @param _required Number of required confirmations.\n constructor(address[] memory _owners, uint _required)\n validRequirement(_owners.length, _required)\n {\n for (uint i = 0; i < _owners.length; i++) {\n require(!isOwner[_owners[i]] && _owners[i] != address(0));\n isOwner[_owners[i]] = true;\n }\n owners = _owners;\n required = _required;\n }\n\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of new owner.\n function addOwner(address owner)\n public\n onlyWallet\n ownerDoesNotExist(owner)\n notNull(owner)\n validRequirement(owners.length + 1, required)\n {\n isOwner[owner] = true;\n owners.push(owner);\n emit OwnerAddition(owner);\n }\n\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner.\n function removeOwner(address owner)\n public\n onlyWallet\n ownerExists(owner)\n {\n isOwner[owner] = false;\n for (uint i = 0; i < owners.length - 1; i++)\n if (owners[i] == owner) {\n owners[i] = owners[owners.length - 1];\n break;\n }\n owners.pop();\n if (required > owners.length)\n changeRequirement(owners.length);\n emit OwnerRemoval(owner);\n }\n\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner to be replaced.\n /// @param newOwner Address of new owner.\n function replaceOwner(address owner, address newOwner)\n public\n onlyWallet\n ownerExists(owner)\n ownerDoesNotExist(newOwner)\n {\n for (uint i = 0; i < owners.length; i++)\n if (owners[i] == owner) {\n owners[i] = newOwner;\n break;\n }\n isOwner[owner] = false;\n isOwner[newOwner] = true;\n emit OwnerRemoval(owner);\n emit OwnerAddition(newOwner);\n }\n\n /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\n /// @param _required Number of required confirmations.\n function changeRequirement(uint _required)\n public\n onlyWallet\n validRequirement(owners.length, _required)\n {\n required = _required;\n emit RequirementChange(_required);\n }\n\n /// @dev Allows an owner to submit and confirm a transaction.\n /// @param destination Transaction target address.\n /// @param value Transaction ether value.\n /// @param data Transaction data payload.\n /// @return transactionId Returns transaction ID.\n function submitTransaction(\n address destination,\n uint value,\n bytes memory data\n ) public returns (uint transactionId)\n {\n transactionId = addTransaction(destination, value, data);\n confirmTransaction(transactionId);\n }\n\n /// @dev Allows an owner to confirm a transaction.\n /// @param transactionId Transaction ID.\n function confirmTransaction(uint transactionId)\n public\n ownerExists(msg.sender)\n transactionExists(transactionId)\n notConfirmed(transactionId, msg.sender)\n {\n confirmations[transactionId][msg.sender] = true;\n emit Confirmation(msg.sender, transactionId);\n executeTransaction(transactionId);\n }\n\n /// @dev Allows an owner to revoke a confirmation for a transaction.\n /// @param transactionId Transaction ID.\n function revokeConfirmation(uint transactionId)\n public\n ownerExists(msg.sender)\n confirmed(transactionId, msg.sender)\n notExecuted(transactionId)\n {\n confirmations[transactionId][msg.sender] = false;\n emit Revocation(msg.sender, transactionId);\n }\n\n /// @dev Allows anyone to execute a confirmed transaction.\n /// @param transactionId Transaction ID.\n function executeTransaction(uint transactionId)\n public\n ownerExists(msg.sender)\n confirmed(transactionId, msg.sender)\n notExecuted(transactionId)\n {\n if (isConfirmed(transactionId)) {\n Transaction storage txn = transactions[transactionId];\n txn.executed = true;\n if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\n emit Execution(transactionId);\n else {\n emit ExecutionFailure(transactionId);\n txn.executed = false;\n }\n }\n }\n\n // call has been separated into its own function in order to take advantage\n // of the Solidity's code generator to produce a loop that copies tx.data into memory.\n function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) {\n bool result;\n assembly {\n let x := mload(0x40) // \"Allocate\" memory for output (0x40 is where \"free memory\" pointer is stored by convention)\n let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\n result := call(\n sub(gas(), 36810), // 34710 is the value that solidity is currently emitting // todo\n // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\n // callNewAccountGas (25000, in case the destination address does not exist and needs creating) +\n // gasSLoadEIP2929 (2100)\n\n destination,\n value,\n d,\n dataLength, // Size of the input (in bytes) - this is what fixes the padding problem\n x,\n 0 // Output is ignored, therefore the output size is zero\n )\n }\n return result;\n }\n\n /// @dev Returns the confirmation status of a transaction.\n /// @param transactionId Transaction ID.\n /// @return Confirmation status.\n function isConfirmed(uint transactionId) public view returns (bool)\n {\n uint count = 0;\n for (uint i = 0; i < owners.length; i++) {\n if (confirmations[transactionId][owners[i]])\n count += 1;\n if (count == required)\n return true;\n }\n return false;\n }\n\n /*\n * Internal functions\n */\n /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\n /// @param destination Transaction target address.\n /// @param value Transaction ether value.\n /// @param data Transaction data payload.\n /// @return transactionId Returns transaction ID.\n function addTransaction(\n address destination,\n uint value,\n bytes memory data\n ) internal\n notNull(destination) returns (uint transactionId)\n {\n transactionId = transactionCount;\n transactions[transactionId] = Transaction({\n destination : destination,\n value : value,\n data : data,\n executed : false\n });\n transactionCount += 1;\n emit Submission(transactionId);\n }\n\n /*\n * Web3 call functions\n */\n /// @dev Returns number of confirmations of a transaction.\n /// @param transactionId Transaction ID.\n /// @return count Number of confirmations.\n function getConfirmationCount(uint transactionId)\n public\n view\n returns (uint count)\n {\n for (uint i = 0; i < owners.length; i++)\n if (confirmations[transactionId][owners[i]])\n count += 1;\n }\n\n /// @dev Returns total number of transactions after filers are applied.\n /// @param pending Include pending transactions.\n /// @param executed Include executed transactions.\n /// @return count Total number of transactions after filters are applied.\n function getTransactionCount(bool pending, bool executed)\n public\n view\n returns (uint count)\n {\n for (uint i = 0; i < transactionCount; i++)\n if (pending && !transactions[i].executed\n || executed && transactions[i].executed)\n count += 1;\n }\n\n /// @dev Returns list of owners.\n /// @return List of owner addresses.\n function getOwners() public view returns (address[] memory)\n {\n return owners;\n }\n\n /// @dev Returns array with owner addresses, which confirmed transaction.\n /// @param transactionId Transaction ID.\n /// @return _confirmations Returns array of owner addresses.\n function getConfirmations(uint transactionId) public view\n returns (address[] memory _confirmations)\n {\n address[] memory confirmationsTemp = new address[](owners.length);\n uint count = 0;\n uint i;\n for (i = 0; i < owners.length; i++)\n if (confirmations[transactionId][owners[i]]) {\n confirmationsTemp[count] = owners[i];\n count += 1;\n }\n _confirmations = new address[](count);\n for (i = 0; i < count; i++)\n _confirmations[i] = confirmationsTemp[i];\n }\n\n /// @dev Returns list of transaction IDs in defined range.\n /// @param from Index start position of transaction array.\n /// @param to Index end position of transaction array.\n /// @param pending Include pending transactions.\n /// @param executed Include executed transactions.\n /// @return _transactionIds Returns array of transaction IDs.\n function getTransactionIds(uint from, uint to, bool pending, bool executed)\n public\n view\n returns (uint[] memory _transactionIds)\n {\n uint[] memory transactionIdsTemp = new uint[](transactionCount);\n uint count = 0;\n uint i;\n for (i = 0; i < transactionCount; i++)\n if (pending && !transactions[i].executed\n || executed && transactions[i].executed)\n {\n transactionIdsTemp[count] = i;\n count += 1;\n }\n _transactionIds = new uint[](to - from);\n for (i = from; i < to; i++)\n _transactionIds[i - from] = transactionIdsTemp[i];\n }\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "evmVersion": "byzantium", - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/contracts/deployments/test/amb/solcInputs/b5a0243e5a7a5c6045b818e3d2d0a636.json b/contracts/deployments/test/eth/solcInputs/af3862e0ddcca2861ee723b668139921.json similarity index 64% rename from contracts/deployments/test/amb/solcInputs/b5a0243e5a7a5c6045b818e3d2d0a636.json rename to contracts/deployments/test/eth/solcInputs/af3862e0ddcca2861ee723b668139921.json index f94190ff..5c4c023e 100644 --- a/contracts/deployments/test/amb/solcInputs/b5a0243e5a7a5c6045b818e3d2d0a636.json +++ b/contracts/deployments/test/eth/solcInputs/af3862e0ddcca2861ee723b668139921.json @@ -1,45 +1,30 @@ { "language": "Solidity", "sources": { - "contracts/checks/CheckAura.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckAura is Initializable {\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n bytes1 constant STEP_PREFIX = 0x84;\n bytes2 constant SIGNATURE_PREFIX = 0xB841;\n\n address[] public validatorSet;\n address validatorSetAddress;\n bytes32 public lastProcessedBlock; // actually latest processed block in which *vs change event* emitted\n uint public minSafetyBlocksValidators;\n\n\n struct BlockAura {\n bytes3 p0Seal;\n bytes3 p0Bare;\n\n bytes32 parentHash;\n bytes p2;\n bytes32 receiptHash;\n bytes p3;\n\n bytes4 step;\n bytes signature; // todo maybe pass s r v values?\n\n uint64 finalizedVs;\n }\n\n\n struct ValidatorSetChange {\n address deltaAddress;\n uint16 deltaIndex; // add if 0, else remove\n }\n\n struct ValidatorSetProof {\n bytes[] receiptProof;\n ValidatorSetChange[] changes;\n uint64 eventBlock;\n }\n\n struct AuraProof {\n BlockAura[] blocks;\n CommonStructs.TransferProof transfer;\n ValidatorSetProof[] vsChanges;\n uint64 transferEventBlock;\n }\n\n\n function __CheckAura_init(\n address[] calldata initialValidators_,\n address validatorSetAddress_,\n bytes32 lastProcessedBlock_,\n uint minSafetyBlocksValidators_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n validatorSet = initialValidators_;\n validatorSetAddress = validatorSetAddress_;\n lastProcessedBlock = lastProcessedBlock_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n\n\n /*\n AuraProof.blocks contains:\n - blocks for validate validatorSet change event, in that order:\n - block with `InitiateChange` events (contains list of all validators)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize; have `finalizedVs` != 0\n * repeated for each vs change event; all events must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n AuraProof.vsChanges contains changes in validator set and receiptProof for validation.\n block.finalizedVs-1 is index in AuraProof.vsChanges array\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between vsChange events\n If there are no errors, the transfer is considered valid\n */\n function checkAura_(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n\n bytes32 parentHash;\n bytes32 receiptHash;\n\n // auraProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (auraProof.transfer.eventId != 0) {\n receiptHash = calcTransferReceiptsHash(auraProof.transfer, sideBridgeAddress);\n require(auraProof.blocks[auraProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(auraProof.blocks.length - auraProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < auraProof.blocks.length; i++) {\n BlockAura calldata block_ = auraProof.blocks[i];\n\n // check that parentHash is correct\n if (block_.parentHash != parentHash) {\n // we can ignore wrong parentHash if:\n // - it's NOT safety blocks for transfer event\n // - it's first block (don't know parentHash)\n // - it's finalizing block (there is gap BEFORE finalizing block)\n // - it's next block after finalizing (there is gap AFTER finalizing block)\n // else, raise error\n\n if (i > auraProof.transferEventBlock || // safety blocks for transfer event\n (i != 0 && // not first block\n block_.finalizedVs == 0 && // not finalizing block\n auraProof.blocks[i-1].finalizedVs == 0) // not next block after finalizing\n )\n revert(\"Wrong parent hash\");\n }\n\n // check validator for this block\n // calc block hash for this block\n parentHash = checkBlock(block_);\n\n // if this block is finalizing block\n // 0 means no events should be finalized, so indexes are shifted by 1\n if (block_.finalizedVs != 0) {\n // vs changes in that block\n ValidatorSetProof calldata vsProof = auraProof.vsChanges[block_.finalizedVs - 1];\n\n // apply vs changes\n for (uint k = 0; k < vsProof.changes.length; k++)\n applyVsChange(vsProof.changes[k]);\n\n // check proof\n receiptHash = calcValidatorSetReceiptHash(vsProof.receiptProof, validatorSetAddress, validatorSet);\n require(auraProof.blocks[vsProof.eventBlock].receiptHash == receiptHash, \"Wrong VS receipt hash\");\n require(i - vsProof.eventBlock >= minSafetyBlocksValidators, \"Few safety blocks validators\");\n }\n\n }\n\n // save block.parentHash in which latest processed vsChange event emitted\n if (auraProof.vsChanges.length > 0) {\n lastProcessedBlock = auraProof.blocks[auraProof.vsChanges[auraProof.vsChanges.length - 1].eventBlock].parentHash;\n }\n }\n\n function getValidatorSet() public view returns (address[] memory) {\n return validatorSet;\n }\n\n function applyVsChange(ValidatorSetChange calldata vsEvent) internal {\n if (vsEvent.deltaIndex == 0) {// add validator\n validatorSet.push(vsEvent.deltaAddress);\n } else {// delete validator\n uint index = uint(vsEvent.deltaIndex - 1);\n validatorSet[index] = validatorSet[validatorSet.length - 1];\n validatorSet.pop();\n }\n }\n\n function checkBlock(BlockAura calldata block_) internal view returns (bytes32) {\n (bytes32 bareHash, bytes32 sealHash) = calcBlockHash(block_);\n\n address validator = validatorSet[bytesToUint(block_.step) % validatorSet.length];\n require(ecdsaRecover(bareHash, block_.signature) == validator, \"Failed to verify sign\");\n\n return sealHash;\n }\n\n function calcBlockHash(BlockAura calldata block_) internal pure returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p2, block_.receiptHash, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Bare, commonRlp)),\n // hash with seal, for prevHash check\n keccak256(abi.encodePacked(block_.p0Seal, commonRlp, STEP_PREFIX, block_.step, SIGNATURE_PREFIX, block_.signature))\n );\n }\n\n\n function calcValidatorSetReceiptHash(bytes[] calldata receiptProof, address validatorSetAddress_, address[] storage vSet) private pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n receiptProof[0],\n validatorSetAddress_,\n receiptProof[1],\n abi.encode(vSet),\n receiptProof[2]\n ));\n return calcReceiptsHash(receiptProof, el, 3);\n }\n\n function bytesToUint(bytes4 b) internal pure returns (uint){\n return uint(uint32(b));\n }\n\n uint256[15] private ___gap;\n}\n" + "contracts/checks/CheckUntrustless.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckUntrustless {\n uint public confirmationsThreshold;\n\n // [hash of (eventId, transfers)] => [relayAddress] => isConfirmed\n mapping(bytes32 => mapping(address => bool)) public confirmations;\n\n // using this instead of RELAY_ROLE coz it simpler\n address[] public relays;\n\n event RelayAdd(address indexed relay);\n event RelayRemove(address indexed relay);\n event ThresholdChange(uint newThreshold);\n event RelayConfirmation(address indexed sender, uint indexed eventId, bytes32 hash);\n\n // return true if current call reach confirmationsThreshold\n function checkUntrustless_(uint eventId, CommonStructs.Transfer[] calldata transfers) internal returns (bool) {\n require(isRelay(msg.sender), \"You not in relay whitelist\");\n\n bytes32 hash = transfersHash(eventId, transfers);\n require(confirmations[hash][msg.sender] == false, \"You have already confirmed this\");\n\n uint confirmCount = confirmedCount(hash);\n require(confirmCount < confirmationsThreshold, \"Already confirmed\");\n\n confirmations[hash][msg.sender] = true;\n emit RelayConfirmation(msg.sender, eventId, hash);\n\n // +1 coz current relay confirmed just now\n return confirmCount + 1 >= confirmationsThreshold;\n }\n\n\n function isConfirmedByRelay(address relay, uint eventId, CommonStructs.Transfer[] calldata transfers) public view returns (bool) {\n bytes32 hash = transfersHash(eventId, transfers);\n return confirmations[hash][relay];\n }\n\n\n function confirmedCount(bytes32 hash) public view returns (uint) {\n uint res;\n for (uint i = 0; i < relays.length; i++)\n if (confirmations[hash][relays[i]])\n res++;\n return res;\n }\n\n\n function isRelay(address relay) public view returns (bool){\n for (uint i = 0; i < relays.length; i++)\n if (relays[i] == relay)\n return true;\n return false;\n }\n\n function getRelays() public view returns (address[] memory) {\n return relays;\n }\n\n function transfersHash(uint eventId, CommonStructs.Transfer[] calldata transfers) public pure returns (bytes32) {\n bytes memory payload = abi.encodePacked(eventId);\n\n // i guess we can hash transfers only in this way\n for (uint i = 0; i < transfers.length; i++)\n payload = abi.encodePacked(payload, transfers[i].amount, transfers[i].toAddress, transfers[i].tokenAddress);\n\n return keccak256(payload);\n }\n\n\n function _setRelaysAndConfirmations(address[] memory toRemove, address[] memory toAdd, uint _confirmations) internal {\n for (uint i = 0; i < toRemove.length; i++)\n _removeRelay(toRemove[i]);\n for (uint i = 0; i < toAdd.length; i++)\n _addRelay(toAdd[i]);\n\n if (confirmationsThreshold != _confirmations) {\n confirmationsThreshold = _confirmations;\n emit ThresholdChange(_confirmations);\n }\n }\n\n function _removeRelay(address relay) internal {\n for (uint i = 0; i < relays.length; i++) {\n if (relays[i] == relay) {\n relays[i] = relays[relays.length - 1];\n relays.pop();\n emit RelayRemove(relay);\n return;\n }\n }\n revert(\"Not a relay\");\n }\n\n function _addRelay(address relay) internal {\n require(!isRelay(relay), \"Already relay\");\n relays.push(relay);\n emit RelayAdd(relay);\n }\n\n uint256[15] private ___gap;\n\n}\n" }, - "contracts/checks/CheckReceiptsProof.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\n// check readme for focs\nfunction calcReceiptsHash(bytes[] calldata proof, bytes32 el, uint proofStart) pure returns (bytes32) {\n bytes memory s;\n\n for (uint i = proofStart; i < proof.length; i += 2) {\n s = abi.encodePacked(proof[i], el, proof[i + 1]);\n el = (s.length > 32) ? keccak256(s) : bytes32(s);\n }\n\n return el;\n}\n\n\nfunction calcTransferReceiptsHash(CommonStructs.TransferProof calldata p, address eventContractAddress) pure returns (bytes32) {\n bytes32 el = keccak256(abi.encodePacked(\n p.receiptProof[0],\n eventContractAddress,\n p.receiptProof[1],\n toBinary(p.eventId),\n p.receiptProof[2],\n abi.encode(p.transfers),\n p.receiptProof[3]\n ));\n return calcReceiptsHash(p.receiptProof, el, 4);\n // start from proof[4]\n}\n\n\nfunction toBinary(uint _x) pure returns (bytes memory) {\n bytes memory b = new bytes(32);\n assembly {\n mstore(add(b, 32), _x)\n }\n uint i;\n for (i = 0; i < 32; i++) {\n if (b[i] != 0) {\n break;\n }\n }\n bytes memory res = new bytes(32 - i);\n for (uint j = 0; j < res.length; j++) {\n res[j] = b[i++];\n }\n return res;\n}\n" + "contracts/common/CommonStructs.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address relayAddress;\n address[] watchdogsAddresses; address feeProviderAddress;\n address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" }, "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" }, - "contracts/checks/SignatureCheck.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" - }, - "contracts/common/CommonStructs.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address relayAddress;\n address[] watchdogsAddresses; address feeProviderAddress;\n address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" - }, - "contracts/networks/_AuraReceiver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckAura.sol\";\n\n\ncontract _AuraReceiver is CommonBridge, CheckAura {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args,\n address[] calldata initialValidators,\n address validatorSetAddress,\n bytes32 lastProcessedBlock,\n uint minSafetyBlocksValidators\n ) public initializer {\n __CommonBridge_init(args);\n __CheckAura_init(initialValidators, validatorSetAddress, lastProcessedBlock, minSafetyBlocksValidators);\n }\n\n\n function changeMinSafetyBlocksValidators(uint minSafetyBlocksValidators_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function submitTransferAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n emit TransferSubmit(auraProof.transfer.eventId);\n checkEventId(auraProof.transfer.eventId);\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n lockTransfers(auraProof.transfer.transfers, auraProof.transfer.eventId);\n }\n\n function submitValidatorSetChangesAura(AuraProof calldata auraProof) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n}\n" + "contracts/contracts_for_tests/CheckUntrustlessTest.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckUntrustless.sol\";\n\ncontract CheckUntrustlessTest is CheckUntrustless {\n constructor() {}\n\n event checkUntrustlessTestResult(bool result);\n\n function checkUntrustlessTest(uint eventId, CommonStructs.Transfer[] calldata transfers) public {\n emit checkUntrustlessTestResult(checkUntrustless_(eventId, transfers));\n }\n\n function setRelaysAndConfirmationsTest(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n}\n" }, - "contracts/common/CommonBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // DEFAULT_ADMIN_ROLE can grants and revokes all roles below; Set to multisig (proxy contract address)\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\"); // can submit transfers\n bytes32 public constant WATCHDOG_ROLE = keccak256(\"WATCHDOG_ROLE\"); // can pause contract\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\"FEE_PROVIDER_ROLE\"); // fee signatures must be signed by this role\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable public transferFeeRecipient;\n address payable public bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, address(this));\n _setupRole(ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRoles(WATCHDOG_ROLE, args.watchdogsAddresses);\n _setupRole(FEE_PROVIDER_ROLE, args.feeProviderAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId **and all after it**\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n require(eventId <= inputEventId, \"eventId must be <= inputEventId\");\n\n // now waiting for submitting a new transfer with `eventId` id\n inputEventId = eventId - 1;\n\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n\n }\n\n // pretend like bridge already receive and process all transfers up to `eventId` id\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\n }\n\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(WATCHDOG_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // roles\n\n function grantRoles(bytes32 role, address[] calldata accounts) public onlyRole(getRoleAdmin(role)) {\n // check permission to grant role via onlyRole(getRoleAdmin(role))\n _setupRoles(role, accounts);\n }\n function revokeRoles(bytes32 role, address[] calldata accounts) public {\n // revokeRole will check for permissions\n for (uint i = 0; i < accounts.length; i++)\n revokeRole(role, accounts[i]);\n }\n function _setupRoles(bytes32 role, address[] calldata accounts) internal {\n // no permissions check at all\n for (uint i = 0; i < accounts.length; i++)\n _setupRole(role, accounts[i]);\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(FEE_PROVIDER_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" + "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" }, "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\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, _msgSender());\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(IAccessControlUpgradeable).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" }, - "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" - }, - "contracts/tokens/IWrapper.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" - }, "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" - }, "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" }, @@ -49,6 +34,18 @@ "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { "content": "// SPDX-License-Identifier: MIT\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 IERC165Upgradeable {\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" }, + "contracts/common/CommonBridge.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // DEFAULT_ADMIN_ROLE can grants and revokes all roles below; Set to multisig (proxy contract address)\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\"); // can submit transfers\n bytes32 public constant WATCHDOG_ROLE = keccak256(\"WATCHDOG_ROLE\"); // can pause contract\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\"FEE_PROVIDER_ROLE\"); // fee signatures must be signed by this role\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable public transferFeeRecipient;\n address payable public bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, address(this));\n _setupRole(ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRoles(WATCHDOG_ROLE, args.watchdogsAddresses);\n _setupRole(FEE_PROVIDER_ROLE, args.feeProviderAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId **and all after it**\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n require(eventId <= inputEventId, \"eventId must be <= inputEventId\");\n\n // now waiting for submitting a new transfer with `eventId` id\n inputEventId = eventId - 1;\n\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n\n }\n\n // pretend like bridge already receive and process all transfers up to `eventId` id\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\n }\n\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(WATCHDOG_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // roles\n\n function grantRoles(bytes32 role, address[] calldata accounts) public onlyRole(getRoleAdmin(role)) {\n // check permission to grant role via onlyRole(getRoleAdmin(role))\n _setupRoles(role, accounts);\n }\n function revokeRoles(bytes32 role, address[] calldata accounts) public {\n // revokeRole will check for permissions\n for (uint i = 0; i < accounts.length; i++)\n revokeRole(role, accounts[i]);\n }\n function _setupRoles(bytes32 role, address[] calldata accounts) internal {\n // no permissions check at all\n for (uint i = 0; i < accounts.length; i++)\n _setupRole(role, accounts[i]);\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(FEE_PROVIDER_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" + }, + "contracts/tokens/IWrapper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" + }, + "contracts/checks/SignatureCheck.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" + }, "contracts/networks/ETH_EthBridge.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract ETH_EthBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address oldDefaultAdmin\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n}\n" }, @@ -64,29 +61,8 @@ "contracts/networks/BSC_AmbBridge.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract BSC_AmbBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address mpcRelay,\n address oldDefaultAdmin,\n address oldRelay\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n\n // revoke RELAY_ROLE from old relay\n revokeRole(RELAY_ROLE, oldRelay);\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n _setupRole(RELAY_ROLE, mpcRelay);\n\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n\n}\n" }, - "contracts/checks/CheckUntrustless.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckUntrustless {\n uint public confirmationsThreshold;\n\n // [hash of (eventId, transfers)] => [relayAddress] => isConfirmed\n mapping(bytes32 => mapping(address => bool)) public confirmations;\n\n // using this instead of RELAY_ROLE coz it simpler\n address[] public relays;\n\n event RelayAdd(address indexed relay);\n event RelayRemove(address indexed relay);\n event ThresholdChange(uint newThreshold);\n event RelayConfirmation(address indexed sender, uint indexed eventId, bytes32 hash);\n\n // return true if current call reach confirmationsThreshold\n function checkUntrustless_(uint eventId, CommonStructs.Transfer[] calldata transfers) internal returns (bool) {\n require(isRelay(msg.sender), \"You not in relay whitelist\");\n\n bytes32 hash = transfersHash(eventId, transfers);\n require(confirmations[hash][msg.sender] == false, \"You have already confirmed this\");\n\n uint confirmCount = confirmedCount(hash);\n require(confirmCount < confirmationsThreshold, \"Already confirmed\");\n\n confirmations[hash][msg.sender] = true;\n emit RelayConfirmation(msg.sender, eventId, hash);\n\n // +1 coz current relay confirmed just now\n return confirmCount + 1 >= confirmationsThreshold;\n }\n\n\n function isConfirmedByRelay(address relay, uint eventId, CommonStructs.Transfer[] calldata transfers) public view returns (bool) {\n bytes32 hash = transfersHash(eventId, transfers);\n return confirmations[hash][relay];\n }\n\n\n function confirmedCount(bytes32 hash) public view returns (uint) {\n uint res;\n for (uint i = 0; i < relays.length; i++)\n if (confirmations[hash][relays[i]])\n res++;\n return res;\n }\n\n\n function isRelay(address relay) public view returns (bool){\n for (uint i = 0; i < relays.length; i++)\n if (relays[i] == relay)\n return true;\n return false;\n }\n\n function getRelays() public view returns (address[] memory) {\n return relays;\n }\n\n function transfersHash(uint eventId, CommonStructs.Transfer[] calldata transfers) public pure returns (bytes32) {\n bytes memory payload = abi.encodePacked(eventId);\n\n // i guess we can hash transfers only in this way\n for (uint i = 0; i < transfers.length; i++)\n payload = abi.encodePacked(payload, transfers[i].amount, transfers[i].toAddress, transfers[i].tokenAddress);\n\n return keccak256(payload);\n }\n\n\n function _setRelaysAndConfirmations(address[] memory toRemove, address[] memory toAdd, uint _confirmations) internal {\n for (uint i = 0; i < toRemove.length; i++)\n _removeRelay(toRemove[i]);\n for (uint i = 0; i < toAdd.length; i++)\n _addRelay(toAdd[i]);\n\n if (confirmationsThreshold != _confirmations) {\n confirmationsThreshold = _confirmations;\n emit ThresholdChange(_confirmations);\n }\n }\n\n function _removeRelay(address relay) internal {\n for (uint i = 0; i < relays.length; i++) {\n if (relays[i] == relay) {\n relays[i] = relays[relays.length - 1];\n relays.pop();\n emit RelayRemove(relay);\n return;\n }\n }\n revert(\"Not a relay\");\n }\n\n function _addRelay(address relay) internal {\n require(!isRelay(relay), \"Already relay\");\n relays.push(relay);\n emit RelayAdd(relay);\n }\n\n uint256[15] private ___gap;\n\n}\n" - }, - "contracts/contracts_for_tests/CheckUntrustlessTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckUntrustless.sol\";\n\ncontract CheckUntrustlessTest is CheckUntrustless {\n constructor() {}\n\n event checkUntrustlessTestResult(bool result);\n\n function checkUntrustlessTest(uint eventId, CommonStructs.Transfer[] calldata transfers) public {\n emit checkUntrustlessTestResult(checkUntrustless_(eventId, transfers));\n }\n\n function setRelaysAndConfirmationsTest(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n}\n" - }, - "contracts/checks/CheckPoW.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./CheckReceiptsProof.sol\";\nimport \"./CheckPoW_Ethash.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckPoW is Initializable, Ethash {\n struct BlockPoW {\n bytes3 p0WithNonce;\n bytes3 p0WithoutNonce;\n\n bytes p1;\n bytes32 parentOrReceiptHash;\n bytes p2;\n bytes difficulty;\n bytes p3;\n bytes number;\n bytes p4; // end when extra end\n bytes p5; // after extra\n bytes nonce;\n bytes p6;\n\n uint[] dataSetLookup;\n uint[] witnessForLookup;\n }\n\n struct PoWProof {\n BlockPoW[] blocks;\n CommonStructs.TransferProof transfer;\n }\n\n uint256 minimumDifficulty;\n\n function __CheckPoW_init(\n uint256 minimumDifficulty_\n ) internal initializer {\n minimumDifficulty = minimumDifficulty_;\n }\n\n /*\n PoWProof.blocks contains:\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, checking it pow hash.\n Each block parentHash must be equal to the hash of the previous block.\n If there are no errors, the transfer is considered valid\n */\n function checkPoW_(PoWProof calldata powProof, address sideBridgeAddress) internal view\n {\n bytes32 hash = calcTransferReceiptsHash(powProof.transfer, sideBridgeAddress);\n for (uint i = 0; i < powProof.blocks.length; i++) {\n require(powProof.blocks[i].parentOrReceiptHash == hash, \"parentHash or receiptHash wrong\");\n hash = blockHash(powProof.blocks[i]);\n\n verifyEthash(powProof.blocks[i]);\n }\n }\n\n\n function verifyEthash(BlockPoW calldata block_) internal view {\n uint difficulty = bytesToUint(block_.difficulty);\n require(difficulty >= minimumDifficulty, \"difficulty too low\");\n verifyPoW(\n bytesToUint(block_.number),\n blockHashWithoutNonce(block_),\n bytesToUint(block_.nonce),\n difficulty,\n block_.dataSetLookup,\n block_.witnessForLookup\n );\n }\n\n function blockHash(BlockPoW calldata block_) internal pure returns (bytes32) {\n // Note: too much arguments in abi.encodePacked() function cause CompilerError: Stack too deep...\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2,\n block_.difficulty,\n block_.p3\n ),\n abi.encodePacked(\n block_.number,\n block_.p4,\n block_.p5,\n block_.nonce,\n block_.p6\n )\n ));\n }\n\n function blockHashWithoutNonce(BlockPoW calldata block_) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\n abi.encodePacked(\n block_.p0WithoutNonce,\n block_.p1,\n block_.parentOrReceiptHash,\n block_.p2\n ),\n abi.encodePacked(\n block_.difficulty,\n block_.p3,\n block_.number,\n block_.p4,\n block_.p6\n )\n ));\n }\n\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n\n uint256[15] private ___gap;\n}\n" - }, - "contracts/checks/CheckPoW_Ethash.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\n/// @dev These contracts are used to verify Proof of Work within a smart contract.\n/// The algorithms have been extracted from the implementation of smart pool (https://github.com/smartpool)\ncontract SHA3_512 {\n constructor() {}\n\n function keccak_f(uint[25] memory A) pure private returns (uint[25] memory) {\n uint[25] memory B;\n uint[5] memory C;\n uint[5] memory D;\n\n uint[24] memory RC = [\n uint(0x0000000000000001),\n 0x0000000000008082,\n 0x800000000000808A,\n 0x8000000080008000,\n 0x000000000000808B,\n 0x0000000080000001,\n 0x8000000080008081,\n 0x8000000000008009,\n 0x000000000000008A,\n 0x0000000000000088,\n 0x0000000080008009,\n 0x000000008000000A,\n 0x000000008000808B,\n 0x800000000000008B,\n 0x8000000000008089,\n 0x8000000000008003,\n 0x8000000000008002,\n 0x8000000000000080,\n 0x000000000000800A,\n 0x800000008000000A,\n 0x8000000080008081,\n 0x8000000000008080,\n 0x0000000080000001,\n 0x8000000080008008];\n\n for (uint i = 0; i < 24; i++) {\n\n C[0] = A[0] ^ A[1] ^ A[2] ^ A[3] ^ A[4];\n C[1] = A[5] ^ A[6] ^ A[7] ^ A[8] ^ A[9];\n C[2] = A[10] ^ A[11] ^ A[12] ^ A[13] ^ A[14];\n C[3] = A[15] ^ A[16] ^ A[17] ^ A[18] ^ A[19];\n C[4] = A[20] ^ A[21] ^ A[22] ^ A[23] ^ A[24];\n\n D[0] = C[4] ^ ((C[1] * 2) & 0xffffffffffffffff | (C[1] / (2 ** 63)));\n D[1] = C[0] ^ ((C[2] * 2) & 0xffffffffffffffff | (C[2] / (2 ** 63)));\n D[2] = C[1] ^ ((C[3] * 2) & 0xffffffffffffffff | (C[3] / (2 ** 63)));\n D[3] = C[2] ^ ((C[4] * 2) & 0xffffffffffffffff | (C[4] / (2 ** 63)));\n D[4] = C[3] ^ ((C[0] * 2) & 0xffffffffffffffff | (C[0] / (2 ** 63)));\n\n A[0] = A[0] ^ D[0];\n A[1] = A[1] ^ D[0];\n A[2] = A[2] ^ D[0];\n A[3] = A[3] ^ D[0];\n A[4] = A[4] ^ D[0];\n A[5] = A[5] ^ D[1];\n A[6] = A[6] ^ D[1];\n A[7] = A[7] ^ D[1];\n A[8] = A[8] ^ D[1];\n A[9] = A[9] ^ D[1];\n A[10] = A[10] ^ D[2];\n A[11] = A[11] ^ D[2];\n A[12] = A[12] ^ D[2];\n A[13] = A[13] ^ D[2];\n A[14] = A[14] ^ D[2];\n A[15] = A[15] ^ D[3];\n A[16] = A[16] ^ D[3];\n A[17] = A[17] ^ D[3];\n A[18] = A[18] ^ D[3];\n A[19] = A[19] ^ D[3];\n A[20] = A[20] ^ D[4];\n A[21] = A[21] ^ D[4];\n A[22] = A[22] ^ D[4];\n A[23] = A[23] ^ D[4];\n A[24] = A[24] ^ D[4];\n\n /*Rho and pi steps*/\n B[0] = A[0];\n B[8] = ((A[1] * (2 ** 36)) & 0xffffffffffffffff | (A[1] / (2 ** 28)));\n B[11] = ((A[2] * (2 ** 3)) & 0xffffffffffffffff | (A[2] / (2 ** 61)));\n B[19] = ((A[3] * (2 ** 41)) & 0xffffffffffffffff | (A[3] / (2 ** 23)));\n B[22] = ((A[4] * (2 ** 18)) & 0xffffffffffffffff | (A[4] / (2 ** 46)));\n B[2] = ((A[5] * (2 ** 1)) & 0xffffffffffffffff | (A[5] / (2 ** 63)));\n B[5] = ((A[6] * (2 ** 44)) & 0xffffffffffffffff | (A[6] / (2 ** 20)));\n B[13] = ((A[7] * (2 ** 10)) & 0xffffffffffffffff | (A[7] / (2 ** 54)));\n B[16] = ((A[8] * (2 ** 45)) & 0xffffffffffffffff | (A[8] / (2 ** 19)));\n B[24] = ((A[9] * (2 ** 2)) & 0xffffffffffffffff | (A[9] / (2 ** 62)));\n B[4] = ((A[10] * (2 ** 62)) & 0xffffffffffffffff | (A[10] / (2 ** 2)));\n B[7] = ((A[11] * (2 ** 6)) & 0xffffffffffffffff | (A[11] / (2 ** 58)));\n B[10] = ((A[12] * (2 ** 43)) & 0xffffffffffffffff | (A[12] / (2 ** 21)));\n B[18] = ((A[13] * (2 ** 15)) & 0xffffffffffffffff | (A[13] / (2 ** 49)));\n B[21] = ((A[14] * (2 ** 61)) & 0xffffffffffffffff | (A[14] / (2 ** 3)));\n B[1] = ((A[15] * (2 ** 28)) & 0xffffffffffffffff | (A[15] / (2 ** 36)));\n B[9] = ((A[16] * (2 ** 55)) & 0xffffffffffffffff | (A[16] / (2 ** 9)));\n B[12] = ((A[17] * (2 ** 25)) & 0xffffffffffffffff | (A[17] / (2 ** 39)));\n B[15] = ((A[18] * (2 ** 21)) & 0xffffffffffffffff | (A[18] / (2 ** 43)));\n B[23] = ((A[19] * (2 ** 56)) & 0xffffffffffffffff | (A[19] / (2 ** 8)));\n B[3] = ((A[20] * (2 ** 27)) & 0xffffffffffffffff | (A[20] / (2 ** 37)));\n B[6] = ((A[21] * (2 ** 20)) & 0xffffffffffffffff | (A[21] / (2 ** 44)));\n B[14] = ((A[22] * (2 ** 39)) & 0xffffffffffffffff | (A[22] / (2 ** 25)));\n B[17] = ((A[23] * (2 ** 8)) & 0xffffffffffffffff | (A[23] / (2 ** 56)));\n B[20] = ((A[24] * (2 ** 14)) & 0xffffffffffffffff | (A[24] / (2 ** 50)));\n\n /*Xi state*/\n A[0] = B[0] ^ ((~B[5]) & B[10]);\n A[1] = B[1] ^ ((~B[6]) & B[11]);\n A[2] = B[2] ^ ((~B[7]) & B[12]);\n A[3] = B[3] ^ ((~B[8]) & B[13]);\n A[4] = B[4] ^ ((~B[9]) & B[14]);\n A[5] = B[5] ^ ((~B[10]) & B[15]);\n A[6] = B[6] ^ ((~B[11]) & B[16]);\n A[7] = B[7] ^ ((~B[12]) & B[17]);\n A[8] = B[8] ^ ((~B[13]) & B[18]);\n A[9] = B[9] ^ ((~B[14]) & B[19]);\n A[10] = B[10] ^ ((~B[15]) & B[20]);\n A[11] = B[11] ^ ((~B[16]) & B[21]);\n A[12] = B[12] ^ ((~B[17]) & B[22]);\n A[13] = B[13] ^ ((~B[18]) & B[23]);\n A[14] = B[14] ^ ((~B[19]) & B[24]);\n A[15] = B[15] ^ ((~B[20]) & B[0]);\n A[16] = B[16] ^ ((~B[21]) & B[1]);\n A[17] = B[17] ^ ((~B[22]) & B[2]);\n A[18] = B[18] ^ ((~B[23]) & B[3]);\n A[19] = B[19] ^ ((~B[24]) & B[4]);\n A[20] = B[20] ^ ((~B[0]) & B[5]);\n A[21] = B[21] ^ ((~B[1]) & B[6]);\n A[22] = B[22] ^ ((~B[2]) & B[7]);\n A[23] = B[23] ^ ((~B[3]) & B[8]);\n A[24] = B[24] ^ ((~B[4]) & B[9]);\n\n /*Last step*/\n A[0] = A[0] ^ RC[i];\n }\n\n return A;\n }\n\n\n function sponge(uint[9] memory M) pure internal returns (uint[16] memory) {\n require((M.length * 8) == 72, \"sponge error\");\n\n M[5] = 0x01;\n M[8] = 0x8000000000000000;\n\n uint r = 72;\n uint w = 8;\n uint size = M.length * 8;\n\n uint[25] memory S;\n uint i;\n uint y;\n uint x;\n /*Absorbing Phase*/\n for (i = 0; i < size / r; i++) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w)) {\n S[5 * x + y] = S[5 * x + y] ^ M[i * 9 + x + 5 * y];\n }\n }\n }\n S = keccak_f(S);\n }\n\n /*Squeezing phase*/\n uint[16] memory result;\n uint b = 0;\n while (b < 16) {\n for (y = 0; y < 5; y++) {\n for (x = 0; x < 5; x++) {\n if ((x + 5 * y) < (r / w) && (b < 16)) {\n result[b] = S[5 * x + y] & 0xFFFFFFFF;\n result[b + 1] = S[5 * x + y] / 0x100000000;\n b += 2;\n }\n }\n }\n }\n\n return result;\n }\n\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\ncontract Ethash is SHA3_512 {\n\n uint constant EPOCH_LENGTH = 30000; // blocks per epoch\n\n constructor() {\n }\n\n struct EthashCacheOptData {\n uint[512] merkleNodes;\n uint fullSizeIn128Resultion;\n uint branchDepth;\n }\n\n mapping(uint => EthashCacheOptData) epochData;\n\n\n function verifyPoW(uint blockNumber, bytes32 rlpHeaderHashWithoutNonce, uint nonce, uint difficulty,\n uint[] memory dataSetLookup, uint[] memory witnessForLookup) internal view {\n\n uint epoch = blockNumber / EPOCH_LENGTH;\n uint ethash = hashimoto(rlpHeaderHashWithoutNonce, nonce, dataSetLookup, witnessForLookup, epoch);\n\n require(ethash <= (2 ** 256 - 1) / difficulty, \"Ethash difficulty too low\");\n }\n\n function isEpochDataSet(uint epochIndex) public view returns (bool) {\n return epochData[epochIndex].fullSizeIn128Resultion != 0;\n }\n\n function setEpochData(\n uint epochNum,\n uint fullSizeIn128Resultion,\n uint branchDepth,\n uint[] calldata merkleNodes\n ) public {\n\n // we store only previous and current epochs\n // so, delete second from the end epoch\n if (epochNum >= 2) // underflow check\n delete epochData[epochNum - 2];\n\n\n uint l = merkleNodes.length;\n uint[512] storage nodes = epochData[epochNum].merkleNodes;\n\n for (uint i = 0; i < l; i++) {\n nodes[i] = merkleNodes[i];\n }\n\n epochData[epochNum].fullSizeIn128Resultion = fullSizeIn128Resultion;\n epochData[epochNum].branchDepth = branchDepth;\n }\n\n\n function hashimoto(bytes32 header,\n uint nonceLe,\n uint[] memory dataSetLookup,\n uint[] memory witnessForLookup,\n uint epochIndex) private view returns (uint) {\n\n uint[16] memory s = computeS(uint(header), nonceLe);\n uint[32] memory mix;\n uint[8] memory cmix;\n\n\n uint depth = epochData[epochIndex].branchDepth;\n uint fullSize = epochData[epochIndex].fullSizeIn128Resultion;\n\n uint i;\n uint j;\n\n require(fullSize != 0, \"EpochData not set\");\n\n\n for (i = 0; i < 16; i++) {\n assembly {\n let offset := mul(i, 0x20)\n\n //mix[i] = s[i];\n mstore(add(mix, offset), mload(add(s, offset)))\n\n // mix[i+16] = s[i];\n mstore(add(mix, add(0x200, offset)), mload(add(s, offset)))\n }\n }\n\n for (i = 0; i < 64; i++) {\n uint p = fnv(i ^ s[0], mix[i % 32]) % fullSize;\n\n // console.log(computeCacheRoot( p, i, dataSetLookup, witnessForLookup, depthAndFullSize[0]));\n // console.log(getMerkleLeave( epochIndex, p ));\n\n if (computeCacheRoot(p, i, dataSetLookup, witnessForLookup, depth) != getMerkleLeave(epochIndex, p)) {\n // PoW failed\n revert(\"PoW failed\");\n }\n\n for (j = 0; j < 8; j++) {\n\n assembly{\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & varFFFFFFFF );\n let dataOffset := add(mul(0x80, i), add(dataSetLookup, 0x20))\n let dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n let mixOffset := add(mix, mul(0x20, j))\n let mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n let fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n dataOffset := add(dataOffset, 0x20)\n dataValue := and(mload(dataOffset), 0xFFFFFFFF)\n\n mixOffset := add(mixOffset, 0x100)\n mixValue := mload(mixOffset)\n\n // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;\n fnvValue := and(xor(mul(mixValue, 0x01000193), dataValue), 0xFFFFFFFF)\n mstore(mixOffset, fnvValue)\n\n }\n\n\n //mix[j] = fnv(mix[j], dataSetLookup[4*i] & 0xFFFFFFFF );\n //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );\n //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );\n //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );\n\n\n //dataSetLookup[4*i ] = dataSetLookup[4*i ]/(2**32);\n //dataSetLookup[4*i + 1] = dataSetLookup[4*i + 1]/(2**32);\n //dataSetLookup[4*i + 2] = dataSetLookup[4*i + 2]/(2**32);\n //dataSetLookup[4*i + 3] = dataSetLookup[4*i + 3]/(2**32);\n\n assembly{\n let offset := add(add(dataSetLookup, 0x20), mul(i, 0x80))\n let value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n\n offset := add(offset, 0x20)\n value := div(mload(offset), 0x100000000)\n mstore(offset, value)\n }\n }\n }\n\n\n for (i = 0; i < 32; i += 4) {\n cmix[i / 4] = (fnv(fnv(fnv(mix[i], mix[i + 1]), mix[i + 2]), mix[i + 3]));\n }\n\n return computeSha3(s, cmix);\n\n }\n\n\n function fnv(uint v1, uint v2) pure internal returns (uint) {\n return ((v1 * 0x01000193) ^ v2) & 0xFFFFFFFF;\n }\n\n function computeCacheRoot(uint index,\n uint indexInElementsArray,\n uint[] memory elements,\n uint[] memory witness,\n uint branchSize) pure private returns (uint) {\n\n uint leaf = computeLeaf(elements, indexInElementsArray) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n\n uint left;\n uint right;\n uint node;\n bool oddBranchSize = (branchSize % 2) > 0;\n\n assembly {\n branchSize := div(branchSize, 2)\n //branchSize /= 2;\n }\n uint witnessIndex = indexInElementsArray * branchSize;\n if (oddBranchSize) witnessIndex += indexInElementsArray;\n\n uint depth;\n for (depth = 0; depth < branchSize; depth++) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n\n //node = witness[witnessIndex + depth] / (2**128);\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := div(node, 0x100000000000000000000000000000000)\n }\n }\n else {\n assembly {\n left := div(node, 0x100000000000000000000000000000000)\n }\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n assembly {\n index := div(index, 2)\n }\n }\n\n if (oddBranchSize) {\n assembly {\n node := mload(add(add(witness, 0x20), mul(add(depth, witnessIndex), 0x20)))\n }\n\n //node = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n if (index & 0x1 == 0) {\n left = leaf;\n assembly{\n right := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n }\n else {\n assembly{\n left := and(node, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n }\n\n right = leaf;\n }\n\n leaf = uint(keccak256(abi.encodePacked(left, right))) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n }\n\n\n return leaf;\n }\n\n\n function computeSha3(uint[16] memory s, uint[8] memory cmix) pure internal returns (uint) {\n uint s0 = s[0] + s[1] * (2 ** 32) + s[2] * (2 ** 64) + s[3] * (2 ** 96) +\n (s[4] + s[5] * (2 ** 32) + s[6] * (2 ** 64) + s[7] * (2 ** 96)) * (2 ** 128);\n\n uint s1 = s[8] + s[9] * (2 ** 32) + s[10] * (2 ** 64) + s[11] * (2 ** 96) +\n (s[12] + s[13] * (2 ** 32) + s[14] * (2 ** 64) + s[15] * (2 ** 96)) * (2 ** 128);\n\n uint c = cmix[0] + cmix[1] * (2 ** 32) + cmix[2] * (2 ** 64) + cmix[3] * (2 ** 96) +\n (cmix[4] + cmix[5] * (2 ** 32) + cmix[6] * (2 ** 64) + cmix[7] * (2 ** 96)) * (2 ** 128);\n\n\n /* god knows why need to convert to big endian */\n return uint(keccak256(abi.encodePacked(reverseBytes(s0), reverseBytes(s1), reverseBytes(c))));\n }\n\n\n function computeLeaf(uint[] memory dataSetLookup, uint index) pure internal returns (uint) {\n return uint(keccak256(abi.encodePacked(\n dataSetLookup[4 * index],\n dataSetLookup[4 * index + 1],\n dataSetLookup[4 * index + 2],\n dataSetLookup[4 * index + 3]\n )));\n\n }\n\n function computeS(uint header, uint nonceLe) pure internal returns (uint[16] memory) {\n uint[9] memory M;\n\n header = reverseBytes(header);\n\n M[0] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[1] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[2] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n header = header / 2 ** 64;\n M[3] = uint(header) & 0xFFFFFFFFFFFFFFFF;\n\n // make little endian nonce\n M[4] = nonceLe;\n return sponge(M);\n }\n\n function reverseBytes(uint input) pure internal returns (uint) {\n uint result;\n for (uint i = 0; i < 32; i++) {\n result = (result << 8) + (input & 0xff);\n input = input >> 8;\n }\n return result;\n }\n\n\n function getMerkleLeave(uint epochIndex, uint p) view internal returns (uint) {\n uint rootIndex = uint(p >> epochData[epochIndex].branchDepth);\n uint expectedRoot = epochData[epochIndex].merkleNodes[(rootIndex >> 1)];\n\n if ((rootIndex % 2) == 0)\n return expectedRoot & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n return expectedRoot >> 128;\n }\n\n}\n" - }, - "contracts/contracts_for_tests/CheckPoWTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoW.sol\";\n\ncontract CheckPoWTest is CheckPoW {\n\n constructor(\n uint minimumDifficulty_\n ) {\n minimumDifficulty = minimumDifficulty_;\n }\n\n function checkPoWTest(PoWProof calldata powProof, address sideBridgeAddress) public {\n checkPoW_(powProof, sideBridgeAddress);\n }\n\n function verifyEthashTest(BlockPoW calldata block_) public view {\n verifyEthash(block_);\n }\n\n function blockHashTest(BlockPoW calldata block_) public pure returns (bytes32) {\n return blockHash(block_);\n }\n\n}\n" - }, "contracts/contracts_for_tests/CommonBridgeTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckReceiptsProof.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // deployer now can grant roles\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n checkEventId(eventId); // now its more like submitTransferTest\n lockTransfers(events, eventId);\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n // checkReceiptsProof\n\n function calcTransferReceiptsHashTest(CommonStructs.TransferProof calldata p, address eventContractAddress) public pure returns (bytes32) {\n return calcTransferReceiptsHash(p, eventContractAddress);\n }\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" - }, - "contracts/checks/CheckPoSA.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"./CheckReceiptsProof.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SignatureCheck.sol\";\n\n\ncontract CheckPoSA is Initializable {\n uint256 private constant ADDRESS_LENGTH = 20;\n uint256 private constant EXTRA_VANITY_LENGTH = 32;\n uint256 private constant EXTRA_SEAL_LENGTH = 65;\n uint256 private constant EPOCH_LENGTH = 200;\n bytes1 constant PARENT_HASH_PREFIX = 0xA0;\n\n mapping(uint => mapping(address => bool)) internal allValidators;\n uint public currentEpoch;\n uint currentValidatorSetSize;\n\n bytes1 chainId;\n\n\n struct BlockPoSA {\n bytes3 p0Signed;\n bytes3 p0Unsigned;\n\n bytes32 parentHash;\n bytes p1;\n bytes32 receiptHash;\n bytes p2;\n bytes number;\n bytes p3;\n\n bytes p4Signed;\n bytes p4Unsigned;\n bytes extraData;\n\n bytes p5;\n }\n\n struct PoSAProof {\n BlockPoSA[] blocks;\n CommonStructs.TransferProof transfer;\n uint64 transferEventBlock;\n }\n\n\n function __CheckPoSA_init(\n address[] calldata initialValidators_,\n uint initialEpoch_,\n bytes1 chainId_\n ) internal initializer {\n require(initialValidators_.length > 0, \"Length of _initialValidators must be bigger than 0\");\n\n chainId = chainId_;\n currentEpoch = initialEpoch_;\n currentValidatorSetSize = initialValidators_.length;\n\n for (uint i = 0; i < initialValidators_.length; i++) {\n allValidators[currentEpoch][initialValidators_[i]] = true;\n }\n }\n\n /*\n PoSAProof.blocks contains:\n - blocks for validate validatorSet changes, in that order:\n - first block in epoch (blockNum % 200 == 0)\n - some blocks, that need for validation (the amount depends on the length of the current validator set)\n - block, when validators finalize\n * repeated for each new epoch, all epochs must go in order, without omissions *\n\n - block with transfer event;\n - safety blocks for transfer event\n\n Function will check all blocks, processing vs change events if needed.\n Each block parentHash must be equal to the seal hash of the previous block, except for gaps between epochs\n If there are no errors, the transfer is considered valid\n */\n function checkPoSA_(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress) internal {\n bytes32 bareHash;\n bytes32 parentHash;\n uint finalizeVsBlock;\n uint nextVsSize;\n\n // posaProof can be without transfer event when we have to many vsChanges and transfer doesn't fit into proof\n if (posaProof.transfer.eventId != 0) {\n bytes32 receiptHash = calcTransferReceiptsHash(posaProof.transfer, sideBridgeAddress);\n require(posaProof.blocks[posaProof.transferEventBlock].receiptHash == receiptHash, \"Transfer event validation failed\");\n require(posaProof.blocks.length - posaProof.transferEventBlock >= minSafetyBlocks, \"Not enough safety blocks\");\n }\n\n for (uint i = 0; i < posaProof.blocks.length; i++) {\n BlockPoSA calldata block_ = posaProof.blocks[i];\n\n if (parentHash != bytes32(0))\n require(block_.parentHash == parentHash, \"Wrong parent hash\");\n\n (bareHash, parentHash) = calcBlockHash(block_);\n\n require(verifySignature(bareHash, getSignature(block_.extraData)), \"invalid signature\");\n\n // change validator set\n\n uint blockNumber = bytesToUint(block_.number);\n\n if (blockNumber % EPOCH_LENGTH == 0) {\n require(blockNumber / EPOCH_LENGTH == currentEpoch + 1, \"invalid epoch\");\n\n nextVsSize = newValidatorSet(block_.extraData);\n finalizeVsBlock = blockNumber + currentValidatorSetSize / 2;\n } else if (blockNumber == finalizeVsBlock) {\n currentEpoch++;\n currentValidatorSetSize = nextVsSize;\n\n // after finalizing vs change, next block in posaProof.blocks can have any parentHash (skipping some blocks)\n // but only if it's not the safety blocks for transfer event\n if (i < posaProof.transferEventBlock)\n parentHash = bytes32(0);\n }\n }\n }\n\n\n function calcBlockHash(BlockPoSA calldata block_) internal view returns (bytes32, bytes32) {\n bytes memory commonRlp = abi.encodePacked(PARENT_HASH_PREFIX, block_.parentHash, block_.p1, block_.receiptHash, block_.p2, block_.number, block_.p3);\n return (\n // hash without seal (bare), for signature check\n keccak256(abi.encodePacked(block_.p0Unsigned, chainId, commonRlp, block_.p4Unsigned, getExtraDataUnsigned(block_.extraData), block_.p5)),\n // hash with seal, for prev_hash check\n keccak256(abi.encodePacked(block_.p0Signed, commonRlp, block_.p4Signed, block_.extraData, block_.p5))\n );\n }\n\n function getSignature(bytes calldata extraData) private pure returns (bytes calldata) {\n uint start = extraData.length - EXTRA_SEAL_LENGTH;\n return extraData[start : start + EXTRA_SEAL_LENGTH];\n }\n\n function getExtraDataUnsigned(bytes calldata extraData) private pure returns (bytes memory) {\n return extraData[0 : extraData.length - EXTRA_SEAL_LENGTH];\n }\n\n function newValidatorSet(bytes calldata extraData) private returns (uint) {\n uint nextValidatorSet = currentEpoch + 1;\n uint endPos = extraData.length - EXTRA_SEAL_LENGTH;\n\n uint nextValidatorSetSize;\n for (uint pos = EXTRA_VANITY_LENGTH; pos < endPos; pos += ADDRESS_LENGTH) {\n address validator = address(bytes20(extraData[pos : pos + ADDRESS_LENGTH]));\n allValidators[nextValidatorSet][validator] = true;\n nextValidatorSetSize++;\n }\n\n return nextValidatorSetSize;\n }\n\n function verifySignature(bytes32 hash, bytes calldata signature) private view returns (bool) {\n address signer = ecdsaRecover(hash, signature);\n return allValidators[currentEpoch][signer];\n }\n\n function bytesToUint(bytes calldata b) private pure returns (uint){\n return uint(bytes32(b)) >> (256 - b.length * 8);\n }\n}\n" - }, - "contracts/contracts_for_tests/CheckPoSATest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckPoSA.sol\";\n\n\ncontract CheckPoSATest is CheckPoSA {\n constructor(\n bytes1 chainId_\n ) {\n chainId = chainId_;\n }\n\n function checkPoSATest(PoSAProof calldata posaProof, uint minSafetyBlocks, address sideBridgeAddress,\n address[] memory _initialValidators, uint _initialEpoch, bytes1 _chainId) public {\n // TODO: we can't use the `__CheckPoSA_init` twice, but copy-paste is also not good\n chainId = _chainId;\n currentEpoch = _initialEpoch;\n currentValidatorSetSize = _initialValidators.length;\n\n for (uint i = 0; i < _initialValidators.length; i++) {\n allValidators[currentEpoch][_initialValidators[i]] = true;\n }\n\n checkPoSA_(posaProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockPoSA calldata block_) public view returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockPoSA calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n}\n" + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // deployer now can grant roles\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n checkEventId(eventId); // now its more like submitTransferTest\n lockTransfers(events, eventId);\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" }, "contracts/tokens/sAMB.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./IWrapper.sol\";\n\ncontract sAMB is IWrapper, ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\n\n function deposit() public override payable {\n _mint(msg.sender, msg.value);\n\n emit Deposit(msg.sender, msg.value);\n }\n\n function withdraw(uint amount) public override {\n _burn(msg.sender, amount);\n payable(msg.sender).transfer(amount);\n\n emit Withdrawal(msg.sender, amount);\n }\n\n}\n" @@ -109,9 +85,30 @@ "contracts/tokens/BridgeERC20.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20 is ERC20, Ownable {\n address public bridgeAddress; // address of bridge contract on this network\n\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\n ERC20(name_, symbol_)\n Ownable() {\n bridgeAddress = bridgeAddress_;\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\n bridgeAddress = bridgeAddress_;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sender == bridgeAddress) {\n // user transfer tokens to ambrosus => need to mint it\n _mint(recipient, amount);\n } else if (recipient == bridgeAddress) {\n // user withdraw tokens from ambrosus => need to burn it\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" }, + "contracts/tokens/BridgeERC20_Fix.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./BridgeERC20.sol\";\n\ncontract BridgeERC20_Fix is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_,\n address[] memory oldAddresses, uint[] memory oldBalances\n )\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress_) {\n for (uint i = 0; i < oldAddresses.length; i++)\n _mint(oldAddresses[i], oldBalances[i]);\n }\n}\n" + }, "contracts/contracts_for_tests/BridgeERC20Test.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n}\n" }, + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\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 * ```\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 * ```\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.\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, _msgSender());\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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(uint160(account), 20),\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\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\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/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\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\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" + }, + "contracts/utils/Faucet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\n\ncontract Faucet is AccessControl {\n event Faucet(address indexed to, uint256 indexed eventId, uint256 indexed chainId, uint256 amount);\n\n constructor(address[] memory admins) payable {\n for (uint i = 0; i < admins.length; i++)\n _setupRole(DEFAULT_ADMIN_ROLE, admins[i]);\n }\n\n function faucet(address toAddress, uint256 eventId, uint256 chainId, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\n withdraw(toAddress, amount);\n emit Faucet(toAddress, eventId, chainId, amount);\n }\n\n function withdraw(address toAddress, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(address(this).balance >= amount, \"not enough funds\");\n payable(toAddress).transfer(amount);\n }\n\n receive() external payable {}\n\n\n}\n" + }, "contracts/tokens/BridgeERC20_Amb.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20_Amb is ERC20, Ownable {\n\n // decimals of token in side network\n // example:\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\n mapping(address => uint8) public sideTokenDecimals;\n\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\n\n uint8 _decimals;\n\n constructor(\n string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n ) ERC20(name_, symbol_) Ownable() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n }\n\n // todo check if we need this func\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \"wrong array lengths\");\n for (uint i = 0; i < bridgeAddresses_.length; i++)\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\n }\n\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n // convert decimals just like in _transfer function\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n amount = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n amount = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n }\n\n uint256 currentAllowance = allowance(sender,_msgSender());\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n // user transfer tokens to ambrosus => need to mint it\n\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n\n\n // bridge mint money to user; same amount locked on side bridge\n bridgeBalances[sender] += amount_this;\n\n _mint(recipient, amount_this);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n // user withdraw tokens from ambrosus => need to burn it\n\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n\n\n // user burn tokens; side bridge must have enough tokens to send\n require(bridgeBalances[recipient] >= amount_this, \"not enough locked tokens on bridge\");\n bridgeBalances[recipient] -= amount_this;\n\n _burn(sender, amount_this);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\n if (dTo == dFrom)\n return amount;\n if (dTo > dFrom)\n return amount * (10 ** (dTo - dFrom));\n else\n return amount / (10 ** (dFrom - dTo));\n }\n\n}\n" }, @@ -120,9 +117,6 @@ }, "contracts/contracts_for_tests/MintableERC20.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MintableERC20 is ERC20 {\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n}\n" - }, - "contracts/contracts_for_tests/CheckAuraTest.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckAura.sol\";\n\ncontract CheckAuraTest is CheckAura {\n constructor(address validatorSetAddress_, uint minSafetyBlocksValidators_) {\n validatorSetAddress = validatorSetAddress_;\n minSafetyBlocksValidators = minSafetyBlocksValidators_;\n }\n\n function checkAuraTest(AuraProof calldata auraProof, uint minSafetyBlocks, address sideBridgeAddress, address[] memory initialValidators_) public {\n validatorSet = initialValidators_;\n checkAura_(auraProof, minSafetyBlocks, sideBridgeAddress);\n }\n\n function blockHashTest(BlockAura calldata block_) public pure returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function blockHashTestPaid(BlockAura calldata block_) public returns (bytes32, bytes32) {\n return calcBlockHash(block_);\n }\n\n function bytesToUintTest(bytes4 b) public pure returns (uint) {\n return bytesToUint(b);\n }\n\n}\n" } }, "settings": { diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 179a3476..bde96a86 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -42,7 +42,7 @@ const config: HardhatUserConfig = { url: "https://sepolia.infura.io/v3/" + process.env.INFURA_KEY, tags: ["eth", "testnet"], companionNetworks: {amb: 'test/amb'}, - accounts: [devPK], + accounts: [process.env.PRIVATEKEY_OWNER_ETH || ethers.constants.HashZero], }, "main/eth": { url: "https://mainnet.infura.io/v3/" + process.env.INFURA_KEY, diff --git a/relay/configs/dev-eth-untrustless.json b/relay/configs/dev-eth-untrustless.json deleted file mode 100644 index 76f7eff9..00000000 --- a/relay/configs/dev-eth-untrustless.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "networks": { - "sideBridgeNetwork": "ETH", - "AMB": { - "httpUrl": "https://network.ambrosus-dev.io", - "wsUrl": "wss://network.ambrosus-dev.io/ws", - "contractAddr": "0xA6DA88253D4aBFf6b8aC1E1CD9e66D2081C47851", - "privateKey": "in env" - }, - "ETH": { - "httpUrl": "https://goerli.infura.io/v3/73b4b0b7af6c459e97f8350277274156", - "wsUrl": "wss://goerli.infura.io/ws/v3/73b4b0b7af6c459e97f8350277274156", - "contractAddr": "0x0c3001D98a02dFFf10814E2e5e1DA5a276C2552a", - "privateKey": "" - } - }, - "submitters": { - "enable": false - }, - "validityWatchdogs": { - "enable": false - }, - "pauseUnpauseWatchdogs": { - "enable": false - }, - "triggers": { - "enable": false - }, - "unlockers": { - "enable": false - }, - "feeApi": { - "enable": false - }, - "externalLogger": { - "telegram": { - "enable": false - } - }, - "prometheus": { - "enable": false - } -} diff --git a/relay/configs/test-bsc-untrustless.json b/relay/configs/test-bsc-untrustless.json deleted file mode 100644 index 02dcd3a2..00000000 --- a/relay/configs/test-bsc-untrustless.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "networks": { - "sideBridgeNetwork": "BSC", - "AMB": { - "httpUrl": "https://network.ambrosus-test.io", - "wsUrl": "wss://network.ambrosus-test.io/ws", - "contractAddr": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", - "privateKey": "in env" - }, - "BSC": { - "httpUrl": "https://bsc-testnet.nodereal.io/v1/32ada8ed8d834ea3b2afa0a9a035a42c", - "wsUrl": "wss://bsc-testnet.nodereal.io/ws/v1/32ada8ed8d834ea3b2afa0a9a035a42c", - "contractAddr": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", - "privateKey": "" - } - }, - "eventsApi": { - "baseUrl": "backoffice-api.ambrosus-test.io" - }, - "submitters": { - "enable": true, - "sideToAmb": { - "variant": "untrustless-mpc", - "mpc": { - "isServer": false, - "meID": "in env", - "partyIDs": [ - "master", - "Max", - "AndreyM" - ], - "threshold": 2, - "serverURL": "ws://95.217.211.229:6555", - "accessToken": "in env", - "sharePath": "in env" - } - }, - "ambToSide": { - "variant": "untrustless-mpc", - "mpc": { - "isServer": false, - "meID": "in env", - "partyIDs": [ - "master", - "Max", - "AndreyM" - ], - "threshold": 2, - "serverURL": "ws://95.217.211.229:6455", - "accessToken": "in env", - "sharePath": "in env" - } - } - }, - "validityWatchdogs": { - "enable": true, - "enableForAmb": true, - "enableForSide": true, - "__description__": "user relay for untrustless2 will only check that transfers pushed into side network (eth) are valid" - }, - "pauseUnpauseWatchdogs": { - "enable": false - }, - "triggers": { - "enable": false - }, - "unlockers": { - "enable": false - }, - "feeApi": { - "enable": false - }, - "externalLogger": { - "telegram": { - "enable": true, - "token": "in env", - "chatId": "-1001753338316" - } - }, - "prometheus": { - "enable": false - } -} diff --git a/relay/configs/test-bsc.json b/relay/configs/test-bsc.json index 8e8d5293..bda87fc2 100644 --- a/relay/configs/test-bsc.json +++ b/relay/configs/test-bsc.json @@ -4,13 +4,13 @@ "AMB": { "httpUrl": "https://network.ambrosus-test.io", "wsUrl": "wss://network.ambrosus-test.io/ws", - "contractAddr": "0xa09De74437D2453Df47deF3F5C2d14Cd3f0cF8c0", + "contractAddr": "0xdC103bf9a3789f78958f365321F3BA07e369667A", "privateKey": "in env" }, "BSC": { - "httpUrl": "https://bsc-testnet.nodereal.io/v1/32ada8ed8d834ea3b2afa0a9a035a42c", - "wsUrl": "wss://bsc-testnet.nodereal.io/ws/v1/32ada8ed8d834ea3b2afa0a9a035a42c", - "contractAddr": "0x4a69003c355656Acf4860Ff3e7cdd6f37CdC3248", + "httpUrl": "https://bsc-testnet.nodereal.io/v1/7e4174dba68f4a18aeb1ebd839b1f197", + "wsUrl": "wss://bsc-testnet.nodereal.io/ws/v1/7e4174dba68f4a18aeb1ebd839b1f197", + "contractAddr": "0x8619f5E8315aff3E7Eba238492906329414084Da", "privateKey": "in env" } }, @@ -20,7 +20,7 @@ "submitters": { "enable": true, "sideToAmb": { - "variant": "untrustless-mpc", + "variant": "untrustless2", "mpc": { "isServer": true, "meID": "master", @@ -36,7 +36,7 @@ } }, "ambToSide": { - "variant": "untrustless-mpc", + "variant": "untrustless2", "mpc": { "isServer": true, "meID": "master", @@ -53,7 +53,7 @@ }, "ambFaucet": { "enable": true, - "faucetAddress": "0x7b8A17Fc98711db0870c7F37A45d069f2B750637", + "faucetAddress": "0xE2Fb2d9014B4c7b2705F81D21a6693219Cc518Ba", "minBalance": "0", "sendAmount": "1000000000000000000" } diff --git a/relay/configs/test-eth-untrustless.json b/relay/configs/test-eth-untrustless.json deleted file mode 100644 index 0b016a87..00000000 --- a/relay/configs/test-eth-untrustless.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "networks": { - "sideBridgeNetwork": "ETH", - "AMB": { - "httpUrl": "https://network.ambrosus-test.io", - "wsUrl": "wss://network.ambrosus-test.io/ws", - "contractAddr": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", - "privateKey": "in env" - }, - "ETH": { - "httpUrl": "https://sepolia.infura.io/v3/73b4b0b7af6c459e97f8350277274156", - "wsUrl": "wss://sepolia.infura.io/ws/v3/73b4b0b7af6c459e97f8350277274156", - "contractAddr": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", - "privateKey": "" - } - }, - "eventsApi": { - "baseUrl": "backoffice-api.ambrosus-test.io" - }, - "submitters": { - "enable": true, - "sideToAmb": { - "variant": "untrustless-mpc", - "mpc": { - "isServer": false, - "meID": "in env", - "partyIDs": [ - "master", - "Max", - "AndreyM" - ], - "threshold": 2, - "serverURL": "wss://relay-eth.ambrosus-test.io/mpcAmb/ws", - "accessToken": "in env", - "sharePath": "in env" - } - }, - "ambToSide": { - "variant": "untrustless-mpc", - "mpc": { - "isServer": false, - "meID": "in env", - "partyIDs": [ - "master", - "Max", - "AndreyM" - ], - "threshold": 2, - "serverURL": "wss://relay-eth.ambrosus-test.io/mpcSide/ws", - "accessToken": "in env", - "sharePath": "in env" - } - } - }, - "validityWatchdogs": { - "enable": true, - "enableForAmb": true, - "enableForSide": true, - "__description__": "user relay for untrustless2 will only check that transfers pushed into side network (eth) are valid" - }, - "pauseUnpauseWatchdogs": { - "enable": false - }, - "triggers": { - "enable": false - }, - "unlockers": { - "enable": false - }, - "feeApi": { - "enable": false - }, - "externalLogger": { - "telegram": { - "enable": true, - "token": "in env", - "chatId": "-1001753338316" - } - }, - "prometheus": { - "enable": false - } -} diff --git a/relay/configs/test-eth.json b/relay/configs/test-eth.json index 05fe25be..2e180fed 100644 --- a/relay/configs/test-eth.json +++ b/relay/configs/test-eth.json @@ -4,13 +4,13 @@ "AMB": { "httpUrl": "https://network.ambrosus-test.io", "wsUrl": "wss://network.ambrosus-test.io/ws", - "contractAddr": "0xcdea3ECb85D0F386Ea5D498D39c9c127380F254a", + "contractAddr": "0xb08cFc95eEA0F1d9Bb79002d23FA204B8836A536", "privateKey": "in env" }, "ETH": { - "httpUrl": "https://sepolia.infura.io/v3/73b4b0b7af6c459e97f8350277274156", - "wsUrl": "wss://sepolia.infura.io/ws/v3/73b4b0b7af6c459e97f8350277274156", - "contractAddr": "0xACf183fB8C6382d7cB0D5e9832528AEafC151Fcf", + "httpUrl": "https://sepolia.infura.io/v3/01117e8ede8e4f36801a6a838b24f36c", + "wsUrl": "wss://sepolia.infura.io/ws/v3/01117e8ede8e4f36801a6a838b24f36c", + "contractAddr": "0xFCE5b5ca100e58E5635B15b79F0163be4CbD258b", "privateKey": "in env" } }, @@ -20,7 +20,7 @@ "submitters": { "enable": true, "sideToAmb": { - "variant": "untrustless-mpc", + "variant": "untrustless2", "mpc": { "isServer": true, "meID": "master", @@ -36,7 +36,7 @@ } }, "ambToSide": { - "variant": "untrustless-mpc", + "variant": "untrustless2", "mpc": { "isServer": true, "meID": "master", @@ -53,7 +53,7 @@ }, "ambFaucet": { "enable": true, - "faucetAddress": "0x7b8A17Fc98711db0870c7F37A45d069f2B750637", + "faucetAddress": "0xE2Fb2d9014B4c7b2705F81D21a6693219Cc518Ba", "minBalance": "0", "sendAmount": "1000000000000000000" } diff --git a/relay/go.mod b/relay/go.mod index e94cf32b..340a6012 100644 --- a/relay/go.mod +++ b/relay/go.mod @@ -5,20 +5,19 @@ go 1.18 require ( github.com/avast/retry-go v3.0.0+incompatible github.com/bnb-chain/tss-lib v1.3.5 - github.com/ethereum/go-ethereum v1.10.13 + github.com/ethereum/go-ethereum v1.11.5 github.com/golang/mock v1.4.4 github.com/gorilla/websocket v1.4.2 github.com/kofalt/go-memoize v0.0.0-20210721235729-46a601ff34b8 - github.com/prometheus/client_golang v1.12.1 + github.com/prometheus/client_golang v1.14.0 github.com/rs/cors v1.8.2 github.com/rs/zerolog v1.26.1 github.com/shopspring/decimal v1.3.1 github.com/slok/go-http-metrics v0.10.0 github.com/spf13/viper v1.10.1 - github.com/stretchr/testify v1.7.0 - golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e - golang.org/x/exp v0.0.0-20220428152302-39d4317da171 - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c + github.com/stretchr/testify v1.8.0 + golang.org/x/exp v0.0.0-20230206171751-46f607a40771 + golang.org/x/sync v0.1.0 golang.org/x/time v0.2.0 ) @@ -26,27 +25,29 @@ require ( github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/btcsuite/btcd v0.20.1-beta // indirect + github.com/btcsuite/btcd v0.0.0-20190629003639-c26ffa870fd8 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea // indirect + github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0 // indirect - github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-ole/go-ole v1.2.1 // indirect - github.com/go-stack/stack v1.8.0 // indirect - github.com/gogo/protobuf v1.3.1 // indirect + github.com/go-stack/stack v1.8.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.7 // indirect - github.com/google/uuid v1.1.5 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-multierror v1.0.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/holiman/uint256 v1.2.0 // indirect github.com/ipfs/go-log v0.0.1 // indirect github.com/magiconair/properties v1.8.5 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/mapstructure v1.4.3 // indirect github.com/opentracing/opentracing-go v1.1.0 // indirect github.com/otiai10/primes v0.0.0-20180210170552-f6d2a1ba97c4 // indirect @@ -54,10 +55,9 @@ require ( github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.32.1 // indirect - github.com/prometheus/procfs v0.7.3 // indirect - github.com/rjeczalik/notify v0.9.1 // indirect + github.com/prometheus/client_model v0.3.0 // indirect + github.com/prometheus/common v0.39.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/spf13/afero v1.6.0 // indirect github.com/spf13/cast v1.4.1 // indirect @@ -67,11 +67,12 @@ require ( github.com/tklauser/go-sysconf v0.3.5 // indirect github.com/tklauser/numcpus v0.2.2 // indirect github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc // indirect - golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect - golang.org/x/text v0.3.7 // indirect - google.golang.org/protobuf v1.27.1 // indirect + golang.org/x/crypto v0.1.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/relay/go.sum b/relay/go.sum index 5e7739e8..f6873fa6 100644 --- a/relay/go.sum +++ b/relay/go.sum @@ -1,97 +1,22 @@ bou.ke/monkey v1.0.1 h1:zEMLInw9xvNakzUUPjfS4Ds6jYPqCFx3m7bRmG5NH2U= bou.ke/monkey v1.0.1/go.mod h1:FgHuK96Rv2Nlf+0u1OOVDpCMdsWyOFmeeketDHE7LIg= -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= -github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= -github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= -github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 h1:w1UutsfOrms1J05zt7ISrnJIXKzwaspym5BTKGx93EI= github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0= github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= -github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= -github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= -github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= -github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= -github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= -github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= -github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/bnb-chain/tss-lib v1.3.5 h1:HqhrsiZfR+YPTOuedi65JnwE1HxsHAxKdoy7I2QQAPs= github.com/bnb-chain/tss-lib v1.3.5/go.mod h1:o3zAAo7A88ZJnCE1qpjy1hTqPn+GPQlxRsj8soz14UU= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/btcsuite/btcd v0.0.0-20190629003639-c26ffa870fd8 h1:mOg8/RgDSHTQ1R0IR+LMDuW4TDShPv+JzYHuR4GLoNA= github.com/btcsuite/btcd v0.0.0-20190629003639-c26ffa870fd8/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= -github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= -github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= +github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= @@ -100,301 +25,109 @@ github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVa github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= -github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= -github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoGMWEhDvS3zToKcDpRsLuRolQJBVGdozk= +github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= +github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea h1:j4317fAZh7X6GqbFowYdYdI0L9bwxL07jyPZIdepyZ0= -github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= +github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0 h1:E5KszxGgpjpmW8vN811G6rBAZg0/S/DftdGqN4FW5x4= github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc= -github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= -github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= -github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethereum/go-ethereum v1.10.13 h1:DEYFP9zk+Gruf3ae1JOJVhNmxK28ee+sMELPLgYTXpA= -github.com/ethereum/go-ethereum v1.10.13/go.mod h1:W3yfrFyL9C1pHcwY5hmRHVDaorTiQxhYBkKyu5mEDHw= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/ethereum/go-ethereum v1.11.5 h1:3M1uan+LAUvdn+7wCEFrcMM4LJTeuxDrPTg/f31a5QQ= +github.com/ethereum/go-ethereum v1.11.5/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= -github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= -github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= +github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.5 h1:kxhtnfFVi+rYdOALN0B3k9UT86zVJKfBimRaciULW4I= -github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= -github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= -github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huin/goupnp v1.0.2 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI= -github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= -github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= -github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= -github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= -github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= -github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= -github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= -github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= +github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= github.com/ipfs/go-log v0.0.1 h1:9XTUN/rW64BCG1YhPK9Hoy3q8nr4gOmHHBpgFdfw6Lc= github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= -github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA= -github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= +github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= -github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw= github.com/kofalt/go-memoize v0.0.0-20210721235729-46a601ff34b8 h1:2jbnDjGj28ir9Uw0KWmUYmZT6lRX3RLLoyn0j/Ok/Gw= github.com/kofalt/go-memoize v0.0.0-20210721235729-46a601ff34b8/go.mod h1:PefxSAzYu6p3N4eaOGZ4/YxQnQok+6Fx22dU0VBBrng= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= -github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= -github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= @@ -404,497 +137,154 @@ github.com/otiai10/primes v0.0.0-20180210170552-f6d2a1ba97c4 h1:blMAhTXF6uL1+e3e github.com/otiai10/primes v0.0.0-20180210170552-f6d2a1ba97c4/go.mod h1:UmSP7QeU3XmAdGu5+dnrTJqjBc+IscpVZkQzk473cjM= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= -github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= -github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= +github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.26.1 h1:/ihwxqH+4z8UxyI70wM1z9yCvkWcfz/a3mj48k/Zngc= github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/slok/go-http-metrics v0.10.0 h1:rh0LaYEKza5eaYRGDXujKrOln57nHBi4TtVhmNEpbgM= github.com/slok/go-http-metrics v0.10.0/go.mod h1:lFqdaS4kWMfUKCSukjC47PdCeTk+hXDUVm8kLHRqJ38= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs= github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/gunit v1.4.2 h1:tyWYZffdPhQPfK5VsMQXfauwnJkqg7Tv5DLuQVYxq3Q= github.com/smartystreets/gunit v1.4.2/go.mod h1:ZjM1ozSIMJlAz/ay4SG8PeKF00ckUp+zMHZXV9/bvak= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= -github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg= -github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= +github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA= github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= -github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef h1:wHSqTBrZW24CsNJDfeh9Ex6Pm0Rcpc7qrgKBiL44vF4= -github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= +github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa h1:5SqCsI/2Qya2bCzK15ozrqo2sZxkh0FHynJZOTVoV6Q= github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc h1:9lDbC6Rz4bwmou+oE6Dt4Cb2BGMur5eR/GYptkKUVHo= github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= -github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e h1:1SzTfNOXwIS2oWiMF+6qu0OUDKb0dauo6MoDUQyu+yU= golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220428152302-39d4317da171 h1:TfdoLivD44QwvssI9Sv1xwa5DcL5XQr4au4sZ2F2NV4= -golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/exp v0.0.0-20230206171751-46f607a40771 h1:xP7rWLUr1e1n2xkK5YB4LI0hPEy3LJC6Wk+D4pGlOJg= +golang.org/x/exp v0.0.0-20230206171751-46f607a40771/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.2.0 h1:52I/1L54xyEQAYdtcSuxtiT84KGYTBGXwayxmIpNJhE= golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= -gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= -gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/relay/internal/networks/common/common.go b/relay/internal/networks/common/common.go index 40d9a7f4..2da52878 100644 --- a/relay/internal/networks/common/common.go +++ b/relay/internal/networks/common/common.go @@ -151,10 +151,12 @@ func (b *CommonBridge) GetRelayAddress() common.Address { func (b *CommonBridge) IsEventRemoved(eventLog *types.Log) error { header, err := b.Client.HeaderByNumber(context.Background(), big.NewInt(int64(eventLog.BlockNumber))) if err != nil { - return fmt.Errorf("parityHeaderByNumber: %w", err) + return fmt.Errorf("HeaderByNumber: %w", err) } if header.Hash() != eventLog.BlockHash { - return fmt.Errorf("looks like the event has been removed") + cid, err := b.Client.ChainID(context.Background()) + print("chainId ", cid.Uint64(), " ", err) + return fmt.Errorf("%s != %s (blockNum: %v)", header.Hash().Hex(), eventLog.BlockHash.Hex(), eventLog.BlockNumber) } return nil } From c46451bacfc8dca5ce11048c76fae3d2e1cb89b8 Mon Sep 17 00:00:00 2001 From: svin Date: Wed, 19 Apr 2023 10:49:44 +0300 Subject: [PATCH 2/3] Add deploy config for USDT in mainnet --- contracts/configs/main.json | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/contracts/configs/main.json b/contracts/configs/main.json index e5fa6620..6b8c84df 100644 --- a/contracts/configs/main.json +++ b/contracts/configs/main.json @@ -108,6 +108,27 @@ "bsc": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56" }, "nativeAnalog": "" + }, + "USDT": { + "isActive": true, + "name": "Tether USD", + "symbol": "USDT", + "denomination": 18, + "decimals": { + "eth": 6, + "bsc": 18 + }, + "logo": "https://etherscan.io/token/images/tether_32.png", + "primaryNets": [ + "eth", + "bsc" + ], + "addresses": { + "amb": "DEPLOY", + "eth": "0xdac17f958d2ee523a2206206994597c13d831ec7", + "bsc": "0x55d398326f99059ff775485246999027b3197955" + }, + "nativeAnalog": "" } } -} \ No newline at end of file +} From 37a1e13804be4abd93f6a71a9fd06ac4295b00ce Mon Sep 17 00:00:00 2001 From: Oleksiy Pyltsov Date: Wed, 19 Apr 2023 12:50:02 +0200 Subject: [PATCH 3/3] Deploy USDT --- contracts/configs/main.json | 7 +- contracts/deployments/main/amb/Faucet.json | 470 +++++++++++++ contracts/deployments/main/amb/USDT.json | 635 ++++++++++++++++++ .../af3862e0ddcca2861ee723b668139921.json | 150 +++++ 4 files changed, 1259 insertions(+), 3 deletions(-) create mode 100644 contracts/deployments/main/amb/Faucet.json create mode 100644 contracts/deployments/main/amb/USDT.json create mode 100644 contracts/deployments/main/amb/solcInputs/af3862e0ddcca2861ee723b668139921.json diff --git a/contracts/configs/main.json b/contracts/configs/main.json index 6b8c84df..355782a0 100644 --- a/contracts/configs/main.json +++ b/contracts/configs/main.json @@ -124,11 +124,12 @@ "bsc" ], "addresses": { - "amb": "DEPLOY", + "amb": "0xfEE01F2D120250A0a59bfbF9C144F8ECC4425fCc", "eth": "0xdac17f958d2ee523a2206206994597c13d831ec7", "bsc": "0x55d398326f99059ff775485246999027b3197955" }, "nativeAnalog": "" } - } -} + }, + "ambFaucetAddress": "0x5B72903b7D2711134DD2120Bc3CA61DB6f10cB92" +} \ No newline at end of file diff --git a/contracts/deployments/main/amb/Faucet.json b/contracts/deployments/main/amb/Faucet.json new file mode 100644 index 00000000..d4345c6b --- /dev/null +++ b/contracts/deployments/main/amb/Faucet.json @@ -0,0 +1,470 @@ +{ + "address": "0x5B72903b7D2711134DD2120Bc3CA61DB6f10cB92", + "abi": [ + { + "inputs": [ + { + "internalType": "address[]", + "name": "admins", + "type": "address[]" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "eventId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Faucet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "eventId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "faucet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xa68f3623ed93c463394725626ebb4e5b1c6f416af9a3ecff94ade872c03915fb", + "receipt": { + "to": null, + "from": "0x203F8dCBce61d9BFa48A95F588152Da073d9c693", + "contractAddress": "0x5B72903b7D2711134DD2120Bc3CA61DB6f10cB92", + "transactionIndex": 0, + "gasUsed": "913089", + "logsBloom": "0x00000004000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000008000000000000000000000000000000000000000000020000000000000000000800000000100000000000000000008000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000040000001100000000000002000000000000000000000000000000000000000000000100000000000020000000000000000000000100000000000000000000000000200000000000002000", + "blockHash": "0x71bcb76a3ab37f6ffbdd531a5b5de02d76e749ec79a3933bd696e2005cb23a73", + "transactionHash": "0xa68f3623ed93c463394725626ebb4e5b1c6f416af9a3ecff94ade872c03915fb", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 24103813, + "transactionHash": "0xa68f3623ed93c463394725626ebb4e5b1c6f416af9a3ecff94ade872c03915fb", + "address": "0x5B72903b7D2711134DD2120Bc3CA61DB6f10cB92", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000203f8dcbce61d9bfa48a95f588152da073d9c693", + "0x000000000000000000000000203f8dcbce61d9bfa48a95f588152da073d9c693" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x71bcb76a3ab37f6ffbdd531a5b5de02d76e749ec79a3933bd696e2005cb23a73" + }, + { + "transactionIndex": 0, + "blockNumber": 24103813, + "transactionHash": "0xa68f3623ed93c463394725626ebb4e5b1c6f416af9a3ecff94ade872c03915fb", + "address": "0x5B72903b7D2711134DD2120Bc3CA61DB6f10cB92", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000de99f453d76d5f485d90244319593b12d5eede8b", + "0x000000000000000000000000203f8dcbce61d9bfa48a95f588152da073d9c693" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x71bcb76a3ab37f6ffbdd531a5b5de02d76e749ec79a3933bd696e2005cb23a73" + }, + { + "transactionIndex": 0, + "blockNumber": 24103813, + "transactionHash": "0xa68f3623ed93c463394725626ebb4e5b1c6f416af9a3ecff94ade872c03915fb", + "address": "0x5B72903b7D2711134DD2120Bc3CA61DB6f10cB92", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000f071e1785e3e115360e04c9c8d53e958e6f85fe", + "0x000000000000000000000000203f8dcbce61d9bfa48a95f588152da073d9c693" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x71bcb76a3ab37f6ffbdd531a5b5de02d76e749ec79a3933bd696e2005cb23a73" + } + ], + "blockNumber": 24103813, + "cumulativeGasUsed": "913089", + "status": 1, + "byzantium": true + }, + "args": [ + [ + "0x203F8dCBce61d9BFa48A95F588152Da073d9c693", + "0xDE99F453d76D5f485d90244319593b12D5eeDe8B", + "0x0f071e1785e3E115360E04c9C8D53e958E6f85FE" + ] + ], + "numDeployments": 1, + "solcInputHash": "af3862e0ddcca2861ee723b668139921", + "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"admins\",\"type\":\"address[]\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Faucet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"eventId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"faucet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/utils/Faucet.sol\":\"Faucet\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 * ```\\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 * ```\\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.\\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, _msgSender());\\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 override returns (bool) {\\n return _roles[role].members[account];\\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 {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x183481af1c40d2efb26b86f63d6fe9e22f24c87e436d60a69f261b38500e7cd6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xfe0edb09653ed10e8a1bfe03eb9b0ff06775666eee817a95bd3d0799f1ee2b44\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x391d3ba97ab6856a16b225d6ee29617ad15ff00db70f3b4df1ab5ea33aa47c9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x5718c5df9bd67ac68a796961df938821bb5dc0cd4c6118d77e9145afb187409b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0xa28007762d9da9db878dd421960c8cb9a10471f47ab5c1b3309bfe48e9e79ff4\",\"license\":\"MIT\"},\"contracts/utils/Faucet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\n\\ncontract Faucet is AccessControl {\\n event Faucet(address indexed to, uint256 indexed eventId, uint256 indexed chainId, uint256 amount);\\n\\n constructor(address[] memory admins) payable {\\n for (uint i = 0; i < admins.length; i++)\\n _setupRole(DEFAULT_ADMIN_ROLE, admins[i]);\\n }\\n\\n function faucet(address toAddress, uint256 eventId, uint256 chainId, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n withdraw(toAddress, amount);\\n emit Faucet(toAddress, eventId, chainId, amount);\\n }\\n\\n function withdraw(address toAddress, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n require(address(this).balance >= amount, \\\"not enough funds\\\");\\n payable(toAddress).transfer(amount);\\n }\\n\\n receive() external payable {}\\n\\n\\n}\\n\",\"keccak256\":\"0x96d0a71f87664633b199ce61daf47233bf90540b92c677e886563b5176092a44\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000e4538038062000e4583398101604081905262000026916200018a565b60005b815181101562000083576200006e6000600102838381518110620000515762000051620002a6565b60200260200101516200008b640100000000026401000000009004565b806200007a8162000263565b91505062000029565b505062000304565b620000a08282640100000000620000a4810204565b5050565b620000b9828264010000000062000140810204565b620000a057600082815260208181526040808320600160a060020a03851684529091529020805460ff19166001179055620000fc64010000000062000169810204565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600091825260208281526040808420600160a060020a0393909316845291905290205460ff1690565b3390565b8051600160a060020a03811681146200018557600080fd5b919050565b600060208083850312156200019e57600080fd5b825167ffffffffffffffff80821115620001b757600080fd5b818501915085601f830112620001cc57600080fd5b815181811115620001e157620001e1620002d5565b838102604051601f19603f83011681018181108582111715620002085762000208620002d5565b604052828152858101935084860182860187018a10156200022857600080fd5b600095505b83861015620002565762000241816200016d565b8552600195909501949386019386016200022d565b5098975050505050505050565b60006000198214156200029f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610b3180620003146000396000f3fe6080604052600436106100a7576000357c01000000000000000000000000000000000000000000000000000000009004806336568abe1161007657806336568abe1461016857806391d1485414610188578063a217fddf146101a8578063d547741f146101bd578063f3fef3a3146101dd57600080fd5b806301ffc9a7146100b3578063248a9ca3146100e85780632a13b891146101265780632f2ff15d1461014857600080fd5b366100ae57005b600080fd5b3480156100bf57600080fd5b506100d36100ce366004610901565b6101fd565b60405190151581526020015b60405180910390f35b3480156100f457600080fd5b506101186101033660046108bc565b60009081526020819052604090206001015490565b6040519081526020016100df565b34801561013257600080fd5b50610146610141366004610883565b610290565b005b34801561015457600080fd5b506101466101633660046108d5565b6102f2565b34801561017457600080fd5b506101466101833660046108d5565b61031d565b34801561019457600080fd5b506100d36101a33660046108d5565b6103b1565b3480156101b457600080fd5b50610118600081565b3480156101c957600080fd5b506101466101d83660046108d5565b6103da565b3480156101e957600080fd5b506101466101f8366004610859565b610400565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b00000000000000000000000000000000000000000000000000000000148061028a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b600061029c813361049c565b6102a68583610400565b828486600160a060020a03167f4828ab435cca543539934276b7cad7900854b86fadd6284f6af7a8706161c698856040516102e391815260200190565b60405180910390a45050505050565b60008281526020819052604090206001015461030e813361049c565b6103188383610503565b505050565b600160a060020a03811633146103a35760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6103ad8282610587565b5050565b600091825260208281526040808420600160a060020a0393909316845291905290205460ff1690565b6000828152602081905260409020600101546103f6813361049c565b6103188383610587565b600061040c813361049c565b30318211156104605760405160e560020a62461bcd02815260206004820152601060248201527f6e6f7420656e6f7567682066756e647300000000000000000000000000000000604482015260640161039a565b604051600160a060020a0384169083156108fc029084906000818181858888f19350505050158015610496573d6000803e3d6000fd5b50505050565b6104a682826103b1565b6103ad576104be81600160a060020a031660146105ec565b6104c98360206105ec565b6040516020016104da929190610940565b60408051601f198184030181529082905260e560020a62461bcd02825261039a916004016109c1565b61050d82826103b1565b6103ad57600082815260208181526040808320600160a060020a03851684529091529020805460ff191660011790556105433390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61059182826103b1565b156103ad57600082815260208181526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606060006105fb836002610a0c565b6106069060026109f4565b67ffffffffffffffff81111561061e5761061e610acc565b6040519080825280601f01601f191660200182016040528015610648576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061067f5761067f610a9d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106106e2576106e2610a9d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061071e846002610a0c565b6107299060016109f4565b90505b60018111156107e4577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061076a5761076a610a9d565b1a7f01000000000000000000000000000000000000000000000000000000000000000282828151811061079f5761079f610a9d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506010909404936107dd81610a57565b905061072c565b5083156108365760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161039a565b9392505050565b8035600160a060020a038116811461085457600080fd5b919050565b6000806040838503121561086c57600080fd5b6108758361083d565b946020939093013593505050565b6000806000806080858703121561089957600080fd5b6108a28561083d565b966020860135965060408601359560600135945092505050565b6000602082840312156108ce57600080fd5b5035919050565b600080604083850312156108e857600080fd5b823591506108f86020840161083d565b90509250929050565b60006020828403121561091357600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198116811461083657600080fd5b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610978816017850160208801610a2b565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516109b5816028840160208801610a2b565b01602801949350505050565b60208152600082518060208401526109e0816040850160208701610a2b565b601f01601f19169190910160400192915050565b60008219821115610a0757610a07610a6e565b500190565b6000816000190483118215151615610a2657610a26610a6e565b500290565b60005b83811015610a46578181015183820152602001610a2e565b838111156104965750506000910152565b600081610a6657610a66610a6e565b506000190190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea264697066735822122090abbd268922dd22b983d6453d204ec1f62b3eeeb0a034d23af06082f7b0352f64736f6c63430008060033", + "deployedBytecode": "0x6080604052600436106100a7576000357c01000000000000000000000000000000000000000000000000000000009004806336568abe1161007657806336568abe1461016857806391d1485414610188578063a217fddf146101a8578063d547741f146101bd578063f3fef3a3146101dd57600080fd5b806301ffc9a7146100b3578063248a9ca3146100e85780632a13b891146101265780632f2ff15d1461014857600080fd5b366100ae57005b600080fd5b3480156100bf57600080fd5b506100d36100ce366004610901565b6101fd565b60405190151581526020015b60405180910390f35b3480156100f457600080fd5b506101186101033660046108bc565b60009081526020819052604090206001015490565b6040519081526020016100df565b34801561013257600080fd5b50610146610141366004610883565b610290565b005b34801561015457600080fd5b506101466101633660046108d5565b6102f2565b34801561017457600080fd5b506101466101833660046108d5565b61031d565b34801561019457600080fd5b506100d36101a33660046108d5565b6103b1565b3480156101b457600080fd5b50610118600081565b3480156101c957600080fd5b506101466101d83660046108d5565b6103da565b3480156101e957600080fd5b506101466101f8366004610859565b610400565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f7965db0b00000000000000000000000000000000000000000000000000000000148061028a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198316145b92915050565b600061029c813361049c565b6102a68583610400565b828486600160a060020a03167f4828ab435cca543539934276b7cad7900854b86fadd6284f6af7a8706161c698856040516102e391815260200190565b60405180910390a45050505050565b60008281526020819052604090206001015461030e813361049c565b6103188383610503565b505050565b600160a060020a03811633146103a35760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6103ad8282610587565b5050565b600091825260208281526040808420600160a060020a0393909316845291905290205460ff1690565b6000828152602081905260409020600101546103f6813361049c565b6103188383610587565b600061040c813361049c565b30318211156104605760405160e560020a62461bcd02815260206004820152601060248201527f6e6f7420656e6f7567682066756e647300000000000000000000000000000000604482015260640161039a565b604051600160a060020a0384169083156108fc029084906000818181858888f19350505050158015610496573d6000803e3d6000fd5b50505050565b6104a682826103b1565b6103ad576104be81600160a060020a031660146105ec565b6104c98360206105ec565b6040516020016104da929190610940565b60408051601f198184030181529082905260e560020a62461bcd02825261039a916004016109c1565b61050d82826103b1565b6103ad57600082815260208181526040808320600160a060020a03851684529091529020805460ff191660011790556105433390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61059182826103b1565b156103ad57600082815260208181526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606060006105fb836002610a0c565b6106069060026109f4565b67ffffffffffffffff81111561061e5761061e610acc565b6040519080825280601f01601f191660200182016040528015610648576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061067f5761067f610a9d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106106e2576106e2610a9d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061071e846002610a0c565b6107299060016109f4565b90505b60018111156107e4577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061076a5761076a610a9d565b1a7f01000000000000000000000000000000000000000000000000000000000000000282828151811061079f5761079f610a9d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506010909404936107dd81610a57565b905061072c565b5083156108365760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161039a565b9392505050565b8035600160a060020a038116811461085457600080fd5b919050565b6000806040838503121561086c57600080fd5b6108758361083d565b946020939093013593505050565b6000806000806080858703121561089957600080fd5b6108a28561083d565b966020860135965060408601359560600135945092505050565b6000602082840312156108ce57600080fd5b5035919050565b600080604083850312156108e857600080fd5b823591506108f86020840161083d565b90509250929050565b60006020828403121561091357600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff198116811461083657600080fd5b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610978816017850160208801610a2b565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516109b5816028840160208801610a2b565b01602801949350505050565b60208152600082518060208401526109e0816040850160208701610a2b565b601f01601f19169190910160400192915050565b60008219821115610a0757610a07610a6e565b500190565b6000816000190483118215151615610a2657610a26610a6e565b500290565b60005b83811015610a46578181015183820152602001610a2e565b838111156104965750506000910152565b600081610a6657610a66610a6e565b506000190190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea264697066735822122090abbd268922dd22b983d6453d204ec1f62b3eeeb0a034d23af06082f7b0352f64736f6c63430008060033", + "devdoc": { + "kind": "dev", + "methods": { + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "grantRole(bytes32,address)": { + "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "renounceRole(bytes32,address)": { + "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "revokeRole(bytes32,address)": { + "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 896, + "contract": "contracts/utils/Faucet.sol:Faucet", + "label": "_roles", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_struct(RoleData)891_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(RoleData)891_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)891_storage" + }, + "t_struct(RoleData)891_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "members": [ + { + "astId": 888, + "contract": "contracts/utils/Faucet.sol:Faucet", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 890, + "contract": "contracts/utils/Faucet.sol:Faucet", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + } + } + } +} \ No newline at end of file diff --git a/contracts/deployments/main/amb/USDT.json b/contracts/deployments/main/amb/USDT.json new file mode 100644 index 00000000..e38579bf --- /dev/null +++ b/contracts/deployments/main/amb/USDT.json @@ -0,0 +1,635 @@ +{ + "address": "0xfEE01F2D120250A0a59bfbF9C144F8ECC4425fCc", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "bridgeAddresses_", + "type": "address[]" + }, + { + "internalType": "uint8[]", + "name": "sideTokenDecimals_", + "type": "uint8[]" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "bridgeBalances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "bridgeAddresses_", + "type": "address[]" + }, + { + "internalType": "uint8[]", + "name": "sideTokenDecimals_", + "type": "uint8[]" + } + ], + "name": "setSideTokenDecimals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "sideTokenDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x26d01b0d95e07a7bb077f67c8bb0098069351c90f9883767cc240e81e4a38983", + "receipt": { + "to": null, + "from": "0x203F8dCBce61d9BFa48A95F588152Da073d9c693", + "contractAddress": "0xfEE01F2D120250A0a59bfbF9C144F8ECC4425fCc", + "transactionIndex": 0, + "gasUsed": "1748138", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000008000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000008000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000020000000000000000000000000000000000000000000000040000000000000002000", + "blockHash": "0x6bb11304506a23d4d6bcbf89ec13bbc617d5aa1241c83804c425a4b0f907ce18", + "transactionHash": "0x26d01b0d95e07a7bb077f67c8bb0098069351c90f9883767cc240e81e4a38983", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 24103801, + "transactionHash": "0x26d01b0d95e07a7bb077f67c8bb0098069351c90f9883767cc240e81e4a38983", + "address": "0xfEE01F2D120250A0a59bfbF9C144F8ECC4425fCc", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000203f8dcbce61d9bfa48a95f588152da073d9c693" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x6bb11304506a23d4d6bcbf89ec13bbc617d5aa1241c83804c425a4b0f907ce18" + } + ], + "blockNumber": 24103801, + "cumulativeGasUsed": "1748138", + "status": 1, + "byzantium": true + }, + "args": [ + "Tether USD", + "USDT", + 18, + [ + "0x19caBC1E34Ab0CC5C62DaA1394f6022B38b75c78", + "0xe10eB55f6EeF66218BbE58B749428ec4A51D6659" + ], + [ + 6, + 18 + ] + ], + "numDeployments": 1, + "solcInputHash": "af3862e0ddcca2861ee723b668139921", + "metadata": "{\"compiler\":{\"version\":\"0.8.6+commit.11564f7e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgeBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeAddresses_\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"sideTokenDecimals_\",\"type\":\"uint8[]\"}],\"name\":\"setSideTokenDecimals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"sideTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/BridgeERC20_Amb.sol\":\"BridgeERC20_Amb\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 _setOwner(_msgSender());\\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 called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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 * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, 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 * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), 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 * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\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 * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xb03df8481a954604ad0c9125680893b2e3f7ff770fe470e38b89ac61b84e8072\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/tokens/BridgeERC20_Amb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract BridgeERC20_Amb is ERC20, Ownable {\\n\\n // decimals of token in side network\\n // example:\\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\\n mapping(address => uint8) public sideTokenDecimals;\\n\\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\\n\\n uint8 _decimals;\\n\\n constructor(\\n string memory name_, string memory symbol_, uint8 decimals_,\\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\\n ) ERC20(name_, symbol_) Ownable() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n _decimals = decimals_;\\n }\\n\\n function decimals() public view override returns (uint8) {\\n return _decimals;\\n }\\n\\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\\n }\\n\\n // todo check if we need this func\\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \\\"wrong array lengths\\\");\\n for (uint i = 0; i < bridgeAddresses_.length; i++)\\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\\n }\\n\\n\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n // convert decimals just like in _transfer function\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n amount = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n amount = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n }\\n\\n uint256 currentAllowance = allowance(sender,_msgSender());\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n function _transfer(\\n address sender,\\n address recipient,\\n uint amount\\n ) internal virtual override {\\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\\n // user transfer tokens to ambrosus => need to mint it\\n\\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\\n\\n\\n // bridge mint money to user; same amount locked on side bridge\\n bridgeBalances[sender] += amount_this;\\n\\n _mint(recipient, amount_this);\\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\\n // user withdraw tokens from ambrosus => need to burn it\\n\\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\\n // convert amount with SIDE network decimals form to SELF decimals form\\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\\n\\n\\n // user burn tokens; side bridge must have enough tokens to send\\n require(bridgeBalances[recipient] >= amount_this, \\\"not enough locked tokens on bridge\\\");\\n bridgeBalances[recipient] -= amount_this;\\n\\n _burn(sender, amount_this);\\n } else {\\n super._transfer(sender, recipient, amount);\\n }\\n }\\n\\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\\n if (dTo == dFrom)\\n return amount;\\n if (dTo > dFrom)\\n return amount * (10 ** (dTo - dFrom));\\n else\\n return amount / (10 ** (dFrom - dTo));\\n }\\n\\n}\\n\",\"keccak256\":\"0xf2f414a753c0e2046491b76a7e7898f5f6820f62f2d6187d3fd061add6a17feb\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162001c6038038062001c608339810160408190526200003491620003fc565b8451859085906200004d9060039060208501906200022a565b508051620000639060049060208401906200022a565b5050506200009262000083620000c6640100000000026401000000009004565b640100000000620000ca810204565b620000a782826401000000006200011c810204565b50506008805460ff191660ff92909216919091179055506200068b9050565b3390565b60058054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80518251146200018c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e6774687300000000000000000000000000604482015260640160405180910390fd5b60005b82518110156200022557818181518110620001ae57620001ae6200062d565b602002602001015160066000858481518110620001cf57620001cf6200062d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff16021790555080806200021c90620005ea565b9150506200018f565b505050565b828054620002389062000594565b90600052602060002090601f0160209004810192826200025c5760008555620002a7565b82601f106200027757805160ff1916838001178555620002a7565b82800160010185558215620002a7579182015b82811115620002a75782518255916020019190600101906200028a565b50620002b5929150620002b9565b5090565b5b80821115620002b55760008155600101620002ba565b600082601f830112620002e257600080fd5b81516020620002fb620002f5836200056e565b6200053b565b82815281810190858301838502870184018810156200031957600080fd5b60005b8581101562000343576200033082620003e5565b845292840192908401906001016200031c565b5090979650505050505050565b600082601f8301126200036257600080fd5b81516001604060020a038111156200037e576200037e6200065c565b602062000394601f8301601f191682016200053b565b8281528582848701011115620003a957600080fd5b60005b83811015620003c9578581018301518282018401528201620003ac565b83811115620003db5760008385840101525b5095945050505050565b805160ff81168114620003f757600080fd5b919050565b600080600080600060a086880312156200041557600080fd5b85516001604060020a03808211156200042d57600080fd5b6200043b89838a0162000350565b96506020915081880151818111156200045357600080fd5b620004618a828b0162000350565b9650506200047260408901620003e5565b94506060880151818111156200048757600080fd5b8801601f81018a136200049957600080fd5b8051620004aa620002f5826200056e565b81815284810190838601868402850187018e1015620004c857600080fd5b600094505b8385101562000503578051600160a060020a0381168114620004ee57600080fd5b835260019490940193918601918601620004cd565b5060808c01519097509450505050808211156200051f57600080fd5b506200052e88828901620002d0565b9150509295509295909350565b604051601f8201601f191681016001604060020a03811182821017156200056657620005666200065c565b604052919050565b60006001604060020a038211156200058a576200058a6200065c565b5060209081020190565b600281046001821680620005a957607f821691505b60208210811415620005e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060001982141562000626577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6115c5806200069b6000396000f3fe608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b6040516101429190611285565b60405180910390f35b61015e610159366004611197565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461110d565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c336600461115b565b61038a565b60085460ff166101a3565b61015e6101e1366004611197565b6104e5565b6101726101f436600461110d565b600160a060020a031660009081526020819052604090205490565b610217610521565b005b600554604051600160a060020a039091168152602001610142565b61013561055a565b61015e61024a366004611197565b610569565b61015e61025d366004611197565b61061d565b61017261027036600461110d565b60076020526000908152604090205481565b610172610290366004611128565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461110d565b61062a565b6102176102dc3660046111c1565b6106e2565b6060600380546102f0906114eb565b80601f016020809104026020016040519081016040528092919081815260200182805461031c906114eb565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461071d565b5060015b92915050565b600061039784848461087b565b600160a060020a03841660009081526006602052604090205460ff16156103ed57600160a060020a0384166000908152600660205260409020546008546103e691849160ff9182169116610a38565b915061043f565b600160a060020a03831660009081526006602052604090205460ff161561043f57600160a060020a03831660009081526006602052604090205460085461043c91849160ff9182169116610a38565b91505b600061044b8533610290565b9050828110156104cb5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104d8853385840361071d565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061051c908690611364565b61071d565b600554600160a060020a0316331461054e5760405160e560020a62461bcd0281526004016104c2906112da565b6105586000610aa2565b565b6060600480546102f0906114eb565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156106065760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016104c2565b610613338585840361071d565b5060019392505050565b600061038033848461087b565b600554600160a060020a031633146106575760405160e560020a62461bcd0281526004016104c2906112da565b600160a060020a0381166106d65760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104c2565b6106df81610aa2565b50565b600554600160a060020a0316331461070f5760405160e560020a62461bcd0281526004016104c2906112da565b6107198282610b01565b5050565b600160a060020a03831661079b5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821661081a5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561090d57600160a060020a0383166000908152600660205260408120546008546108ca91849160ff9182169116610a38565b600160a060020a0385166000908152600760205260408120805492935083929091906108f7908490611364565b9091555061090790508382610be4565b50505050565b600160a060020a03821660009081526006602052604090205460ff1615610a2857600160a060020a03821660009081526006602052604081205460085461095c91849160ff9182169116610a38565b600160a060020a0384166000908152600760205260409020549091508111156109f05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f676500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526007602052604081208054839290610a189084906114b1565b9091555061090790508482610cc6565b610a33838383610e51565b505050565b60008260ff168260ff161415610a4f5750826104de565b8260ff168260ff161115610a8357610a6783836114c8565b610a7290600a6113e6565b610a7c9085611492565b90506104de565b610a8d82846114c8565b610a9890600a6113e6565b610a7c908561137c565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610b555760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064016104c2565b60005b8251811015610a3357818181518110610b7357610b7361155d565b602002602001015160066000858481518110610b9157610b9161155d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610bdc90611529565b915050610b58565b600160a060020a038216610c3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104c2565b8060026000828254610c4f9190611364565b9091555050600160a060020a03821660009081526020819052604081208054839290610c7c908490611364565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610d455760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821660009081526020819052604090205481811015610dd75760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383166000908152602081905260408120838303905560028054849290610e069084906114b1565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610ed05760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a038216610f4f5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526020819052604090205481811015610fe15760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290611018908490611364565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161106491815260200190565b60405180910390a350505050565b8035600160a060020a038116811461108957600080fd5b919050565b600082601f83011261109f57600080fd5b813560206110b46110af83611340565b61130f565b82815281810190858301838502870184018810156110d157600080fd5b6000805b868110156110ff57823560ff811681146110ed578283fd5b855293850193918501916001016110d5565b509198975050505050505050565b60006020828403121561111f57600080fd5b6104de82611072565b6000806040838503121561113b57600080fd5b61114483611072565b915061115260208401611072565b90509250929050565b60008060006060848603121561117057600080fd5b61117984611072565b925061118760208501611072565b9150604084013590509250925092565b600080604083850312156111aa57600080fd5b6111b383611072565b946020939093013593505050565b600080604083850312156111d457600080fd5b823567ffffffffffffffff808211156111ec57600080fd5b818501915085601f83011261120057600080fd5b813560206112106110af83611340565b82815281810190858301838502870184018b101561122d57600080fd5b600096505b848710156112575761124381611072565b835260019690960195918301918301611232565b509650508601359250508082111561126e57600080fd5b5061127b8582860161108e565b9150509250929050565b600060208083528351808285015260005b818110156112b257858101830151858201604001528201611296565b818111156112c4576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561133857611338611576565b604052919050565b600067ffffffffffffffff82111561135a5761135a611576565b5060209081020190565b6000821982111561137757611377611544565b500190565b60008261139c5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b808511156113de5781600019048211156113c2576113c2611544565b808516156113cf57918102915b600290940493908002906113a6565b509250929050565b60006104de60ff8416836000826113ff57506001610384565b8161140c57506000610384565b8160018114611422576002811461142c57611449565b6001915050610384565b60ff84111561143d5761143d611544565b8360020a915050610384565b5060208310610133831016604e8410600b841016171561146c575081810a610384565b61147683836113a1565b806000190482111561148a5761148a611544565b029392505050565b60008160001904831182151516156114ac576114ac611544565b500290565b6000828210156114c3576114c3611544565b500390565b600060ff821660ff8416808210156114e2576114e2611544565b90039392505050565b6002810460018216806114ff57607f821691505b602082108114156115235760e060020a634e487b7102600052602260045260246000fd5b50919050565b600060001982141561153d5761153d611544565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212208c84ff84563dca0a3e128ed404345f130db0415ba23e7368c16a212b29455baf64736f6c63430008060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a9059cbb1161008e578063a9059cbb1461024f578063dc1ab98a14610262578063dd62ed3e14610282578063f2fde38b146102bb578063f590e1e6146102ce57600080fd5b8063715018a61461020f5780638da5cb5b1461021957806395d89b4114610234578063a457c2d71461023c57600080fd5b806323b872dd116100fb57806323b872dd146101b5578063313ce567146101c857806339509351146101d357806370a08231146101e657600080fd5b806306fdde031461012d578063095ea7b31461014b57806318160ddd1461016e5780631d836adf14610180575b600080fd5b6101356102e1565b6040516101429190611285565b60405180910390f35b61015e610159366004611197565b610373565b6040519015158152602001610142565b6002545b604051908152602001610142565b6101a361018e36600461110d565b60066020526000908152604090205460ff1681565b60405160ff9091168152602001610142565b61015e6101c336600461115b565b61038a565b60085460ff166101a3565b61015e6101e1366004611197565b6104e5565b6101726101f436600461110d565b600160a060020a031660009081526020819052604090205490565b610217610521565b005b600554604051600160a060020a039091168152602001610142565b61013561055a565b61015e61024a366004611197565b610569565b61015e61025d366004611197565b61061d565b61017261027036600461110d565b60076020526000908152604090205481565b610172610290366004611128565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6102176102c936600461110d565b61062a565b6102176102dc3660046111c1565b6106e2565b6060600380546102f0906114eb565b80601f016020809104026020016040519081016040528092919081815260200182805461031c906114eb565b80156103695780601f1061033e57610100808354040283529160200191610369565b820191906000526020600020905b81548152906001019060200180831161034c57829003601f168201915b5050505050905090565b600061038033848461071d565b5060015b92915050565b600061039784848461087b565b600160a060020a03841660009081526006602052604090205460ff16156103ed57600160a060020a0384166000908152600660205260409020546008546103e691849160ff9182169116610a38565b915061043f565b600160a060020a03831660009081526006602052604090205460ff161561043f57600160a060020a03831660009081526006602052604090205460085461043c91849160ff9182169116610a38565b91505b600061044b8533610290565b9050828110156104cb5760405160e560020a62461bcd02815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104d8853385840361071d565b60019150505b9392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161038091859061051c908690611364565b61071d565b600554600160a060020a0316331461054e5760405160e560020a62461bcd0281526004016104c2906112da565b6105586000610aa2565b565b6060600480546102f0906114eb565b336000908152600160209081526040808320600160a060020a0386168452909152812054828110156106065760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016104c2565b610613338585840361071d565b5060019392505050565b600061038033848461087b565b600554600160a060020a031633146106575760405160e560020a62461bcd0281526004016104c2906112da565b600160a060020a0381166106d65760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104c2565b6106df81610aa2565b50565b600554600160a060020a0316331461070f5760405160e560020a62461bcd0281526004016104c2906112da565b6107198282610b01565b5050565b600160a060020a03831661079b5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821661081a5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600160a060020a03831660009081526006602052604090205460ff161561090d57600160a060020a0383166000908152600660205260408120546008546108ca91849160ff9182169116610a38565b600160a060020a0385166000908152600760205260408120805492935083929091906108f7908490611364565b9091555061090790508382610be4565b50505050565b600160a060020a03821660009081526006602052604090205460ff1615610a2857600160a060020a03821660009081526006602052604081205460085461095c91849160ff9182169116610a38565b600160a060020a0384166000908152600760205260409020549091508111156109f05760405160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f756768206c6f636b656420746f6b656e73206f6e206272696460448201527f676500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526007602052604081208054839290610a189084906114b1565b9091555061090790508482610cc6565b610a33838383610e51565b505050565b60008260ff168260ff161415610a4f5750826104de565b8260ff168260ff161115610a8357610a6783836114c8565b610a7290600a6113e6565b610a7c9085611492565b90506104de565b610a8d82846114c8565b610a9890600a6113e6565b610a7c908561137c565b60058054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114610b555760405160e560020a62461bcd02815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064016104c2565b60005b8251811015610a3357818181518110610b7357610b7361155d565b602002602001015160066000858481518110610b9157610b9161155d565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610bdc90611529565b915050610b58565b600160a060020a038216610c3d5760405160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104c2565b8060026000828254610c4f9190611364565b9091555050600160a060020a03821660009081526020819052604081208054839290610c7c908490611364565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600160a060020a038216610d455760405160e560020a62461bcd02815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03821660009081526020819052604090205481811015610dd75760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a0383166000908152602081905260408120838303905560028054849290610e069084906114b1565b9091555050604051828152600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600160a060020a038316610ed05760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a038216610f4f5760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03831660009081526020819052604090205481811015610fe15760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016104c2565b600160a060020a03808516600090815260208190526040808220858503905591851681529081208054849290611018908490611364565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161106491815260200190565b60405180910390a350505050565b8035600160a060020a038116811461108957600080fd5b919050565b600082601f83011261109f57600080fd5b813560206110b46110af83611340565b61130f565b82815281810190858301838502870184018810156110d157600080fd5b6000805b868110156110ff57823560ff811681146110ed578283fd5b855293850193918501916001016110d5565b509198975050505050505050565b60006020828403121561111f57600080fd5b6104de82611072565b6000806040838503121561113b57600080fd5b61114483611072565b915061115260208401611072565b90509250929050565b60008060006060848603121561117057600080fd5b61117984611072565b925061118760208501611072565b9150604084013590509250925092565b600080604083850312156111aa57600080fd5b6111b383611072565b946020939093013593505050565b600080604083850312156111d457600080fd5b823567ffffffffffffffff808211156111ec57600080fd5b818501915085601f83011261120057600080fd5b813560206112106110af83611340565b82815281810190858301838502870184018b101561122d57600080fd5b600096505b848710156112575761124381611072565b835260019690960195918301918301611232565b509650508601359250508082111561126e57600080fd5b5061127b8582860161108e565b9150509250929050565b600060208083528351808285015260005b818110156112b257858101830151858201604001528201611296565b818111156112c4576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561133857611338611576565b604052919050565b600067ffffffffffffffff82111561135a5761135a611576565b5060209081020190565b6000821982111561137757611377611544565b500190565b60008261139c5760e060020a634e487b7102600052601260045260246000fd5b500490565b600181815b808511156113de5781600019048211156113c2576113c2611544565b808516156113cf57918102915b600290940493908002906113a6565b509250929050565b60006104de60ff8416836000826113ff57506001610384565b8161140c57506000610384565b8160018114611422576002811461142c57611449565b6001915050610384565b60ff84111561143d5761143d611544565b8360020a915050610384565b5060208310610133831016604e8410600b841016171561146c575081810a610384565b61147683836113a1565b806000190482111561148a5761148a611544565b029392505050565b60008160001904831182151516156114ac576114ac611544565b500290565b6000828210156114c3576114c3611544565b500390565b600060ff821660ff8416808210156114e2576114e2611544565b90039392505050565b6002810460018216806114ff57607f821691505b602082108114156115235760e060020a634e487b7102600052602260045260246000fd5b50919050565b600060001982141561153d5761153d611544565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052604160045260246000fdfea26469706673582212208c84ff84563dca0a3e128ed404345f130db0415ba23e7368c16a212b29455baf64736f6c63430008060033", + "devdoc": { + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "name()": { + "details": "Returns the name of the token." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1371, + "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1377, + "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", + "label": "_allowances", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1379, + "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", + "label": "_totalSupply", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 1381, + "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 1383, + "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", + "label": "_symbol", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 1259, + "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", + "label": "_owner", + "offset": 0, + "slot": "5", + "type": "t_address" + }, + { + "astId": 4869, + "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", + "label": "sideTokenDecimals", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_uint8)" + }, + { + "astId": 4873, + "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", + "label": "bridgeBalances", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 4875, + "contract": "contracts/tokens/BridgeERC20_Amb.sol:BridgeERC20_Amb", + "label": "_decimals", + "offset": 0, + "slot": "8", + "type": "t_uint8" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_address,t_uint8)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint8)", + "numberOfBytes": "32", + "value": "t_uint8" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/contracts/deployments/main/amb/solcInputs/af3862e0ddcca2861ee723b668139921.json b/contracts/deployments/main/amb/solcInputs/af3862e0ddcca2861ee723b668139921.json new file mode 100644 index 00000000..5c4c023e --- /dev/null +++ b/contracts/deployments/main/amb/solcInputs/af3862e0ddcca2861ee723b668139921.json @@ -0,0 +1,150 @@ +{ + "language": "Solidity", + "sources": { + "contracts/checks/CheckUntrustless.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n\ncontract CheckUntrustless {\n uint public confirmationsThreshold;\n\n // [hash of (eventId, transfers)] => [relayAddress] => isConfirmed\n mapping(bytes32 => mapping(address => bool)) public confirmations;\n\n // using this instead of RELAY_ROLE coz it simpler\n address[] public relays;\n\n event RelayAdd(address indexed relay);\n event RelayRemove(address indexed relay);\n event ThresholdChange(uint newThreshold);\n event RelayConfirmation(address indexed sender, uint indexed eventId, bytes32 hash);\n\n // return true if current call reach confirmationsThreshold\n function checkUntrustless_(uint eventId, CommonStructs.Transfer[] calldata transfers) internal returns (bool) {\n require(isRelay(msg.sender), \"You not in relay whitelist\");\n\n bytes32 hash = transfersHash(eventId, transfers);\n require(confirmations[hash][msg.sender] == false, \"You have already confirmed this\");\n\n uint confirmCount = confirmedCount(hash);\n require(confirmCount < confirmationsThreshold, \"Already confirmed\");\n\n confirmations[hash][msg.sender] = true;\n emit RelayConfirmation(msg.sender, eventId, hash);\n\n // +1 coz current relay confirmed just now\n return confirmCount + 1 >= confirmationsThreshold;\n }\n\n\n function isConfirmedByRelay(address relay, uint eventId, CommonStructs.Transfer[] calldata transfers) public view returns (bool) {\n bytes32 hash = transfersHash(eventId, transfers);\n return confirmations[hash][relay];\n }\n\n\n function confirmedCount(bytes32 hash) public view returns (uint) {\n uint res;\n for (uint i = 0; i < relays.length; i++)\n if (confirmations[hash][relays[i]])\n res++;\n return res;\n }\n\n\n function isRelay(address relay) public view returns (bool){\n for (uint i = 0; i < relays.length; i++)\n if (relays[i] == relay)\n return true;\n return false;\n }\n\n function getRelays() public view returns (address[] memory) {\n return relays;\n }\n\n function transfersHash(uint eventId, CommonStructs.Transfer[] calldata transfers) public pure returns (bytes32) {\n bytes memory payload = abi.encodePacked(eventId);\n\n // i guess we can hash transfers only in this way\n for (uint i = 0; i < transfers.length; i++)\n payload = abi.encodePacked(payload, transfers[i].amount, transfers[i].toAddress, transfers[i].tokenAddress);\n\n return keccak256(payload);\n }\n\n\n function _setRelaysAndConfirmations(address[] memory toRemove, address[] memory toAdd, uint _confirmations) internal {\n for (uint i = 0; i < toRemove.length; i++)\n _removeRelay(toRemove[i]);\n for (uint i = 0; i < toAdd.length; i++)\n _addRelay(toAdd[i]);\n\n if (confirmationsThreshold != _confirmations) {\n confirmationsThreshold = _confirmations;\n emit ThresholdChange(_confirmations);\n }\n }\n\n function _removeRelay(address relay) internal {\n for (uint i = 0; i < relays.length; i++) {\n if (relays[i] == relay) {\n relays[i] = relays[relays.length - 1];\n relays.pop();\n emit RelayRemove(relay);\n return;\n }\n }\n revert(\"Not a relay\");\n }\n\n function _addRelay(address relay) internal {\n require(!isRelay(relay), \"Already relay\");\n relays.push(relay);\n emit RelayAdd(relay);\n }\n\n uint256[15] private ___gap;\n\n}\n" + }, + "contracts/common/CommonStructs.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n\nlibrary CommonStructs {\n struct Transfer {\n address tokenAddress;\n address toAddress;\n uint amount;\n }\n\n struct TransferProof {\n bytes[] receiptProof;\n uint eventId;\n Transfer[] transfers;\n }\n\n struct LockedTransfers {\n Transfer[] transfers;\n uint endTimestamp;\n }\n\n struct ConstructorArgs {\n address sideBridgeAddress; address relayAddress;\n address[] watchdogsAddresses; address feeProviderAddress;\n address wrappingTokenAddress;\n address[] tokenThisAddresses; address[] tokenSideAddresses;\n address payable transferFeeRecipient; address payable bridgeFeeRecipient;\n uint timeframeSeconds; uint lockTime; uint minSafetyBlocks;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" + }, + "contracts/contracts_for_tests/CheckUntrustlessTest.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../checks/CheckUntrustless.sol\";\n\ncontract CheckUntrustlessTest is CheckUntrustless {\n constructor() {}\n\n event checkUntrustlessTestResult(bool result);\n\n function checkUntrustlessTest(uint eventId, CommonStructs.Transfer[] calldata transfers) public {\n emit checkUntrustlessTestResult(checkUntrustless_(eventId, transfers));\n }\n\n function setRelaysAndConfirmationsTest(address[] calldata toRemove, address[] calldata toAdd, uint _confirmations) public {\n _setRelaysAndConfirmations(toRemove, toAdd, _confirmations);\n }\n\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\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 function __Pausable_init() internal initializer {\n __Context_init_unchained();\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal initializer {\n _paused = false;\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 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 require(!paused(), \"Pausable: paused\");\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 require(paused(), \"Pausable: not paused\");\n _;\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 uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\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 initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\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 uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\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, _msgSender());\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(IAccessControlUpgradeable).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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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-upgradeable/utils/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\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 IERC165Upgradeable {\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" + }, + "contracts/common/CommonBridge.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./CommonStructs.sol\";\nimport \"../tokens/IWrapper.sol\";\nimport \"../checks/SignatureCheck.sol\";\n\n\ncontract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgradeable {\n // DEFAULT_ADMIN_ROLE can grants and revokes all roles below; Set to multisig (proxy contract address)\n bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN_ROLE\"); // can change tokens; unpause contract; change params like lockTime, minSafetyBlocks, ...\n bytes32 public constant RELAY_ROLE = keccak256(\"RELAY_ROLE\"); // can submit transfers\n bytes32 public constant WATCHDOG_ROLE = keccak256(\"WATCHDOG_ROLE\"); // can pause contract\n bytes32 public constant FEE_PROVIDER_ROLE = keccak256(\"FEE_PROVIDER_ROLE\"); // fee signatures must be signed by this role\n\n // Signature contains timestamp divided by SIGNATURE_FEE_TIMESTAMP; SIGNATURE_FEE_TIMESTAMP should be the same on relay;\n uint private constant SIGNATURE_FEE_TIMESTAMP = 1800; // 30 min\n // Signature will be valid for `SIGNATURE_FEE_TIMESTAMP` * `signatureFeeCheckNumber` seconds after creation\n uint internal signatureFeeCheckNumber;\n\n\n // queue of Transfers to be pushed in another network\n CommonStructs.Transfer[] queue;\n\n // locked transfers from another network\n mapping(uint => CommonStructs.LockedTransfers) public lockedTransfers;\n // head index of lockedTransfers 'queue' mapping\n uint public oldestLockedEventId;\n\n\n // this network to side network token addresses mapping\n mapping(address => address) public tokenAddresses;\n // token that implement `IWrapper` interface and used to wrap native coin\n address public wrapperAddress;\n\n // addresses that will receive fees\n address payable public transferFeeRecipient;\n address payable public bridgeFeeRecipient;\n\n address public sideBridgeAddress; // transfer events from side networks must be created by this address\n uint public minSafetyBlocks; // proof must contains at least `minSafetyBlocks` blocks after block with transfer\n uint public timeframeSeconds; // `withdrawFinish` func will be produce Transfer event no more often than `timeframeSeconds`\n uint public lockTime; // transfers received from side networks can be unlocked after `lockTime` seconds\n\n uint public inputEventId; // last processed event from side network\n uint public outputEventId; // last created event in this network. start from 1 coz 0 consider already processed\n\n uint public lastTimeframe; // timestamp / `timeframeSeconds` of latest withdraw\n\n\n event Withdraw(address indexed from, uint eventId, address tokenFrom, address tokenTo, uint amount,\n uint transferFeeAmount, uint bridgeFeeAmount);\n event Transfer(uint indexed eventId, CommonStructs.Transfer[] queue);\n event TransferSubmit(uint indexed eventId);\n event TransferFinish(uint indexed eventId);\n\n function __CommonBridge_init(CommonStructs.ConstructorArgs calldata args) internal initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, address(this));\n _setupRole(ADMIN_ROLE, msg.sender);\n _setupRole(RELAY_ROLE, args.relayAddress);\n _setupRoles(WATCHDOG_ROLE, args.watchdogsAddresses);\n _setupRole(FEE_PROVIDER_ROLE, args.feeProviderAddress);\n\n // initialise tokenAddresses with start values\n _tokensAddBatch(args.tokenThisAddresses, args.tokenSideAddresses);\n wrapperAddress = args.wrappingTokenAddress;\n\n sideBridgeAddress = args.sideBridgeAddress;\n transferFeeRecipient = args.transferFeeRecipient;\n bridgeFeeRecipient = args.bridgeFeeRecipient;\n minSafetyBlocks = args.minSafetyBlocks;\n timeframeSeconds = args.timeframeSeconds;\n lockTime = args.lockTime;\n\n // 1, coz eventId 0 considered already processed\n oldestLockedEventId = 1;\n outputEventId = 1;\n\n signatureFeeCheckNumber = 3;\n\n lastTimeframe = block.timestamp / timeframeSeconds;\n }\n\n\n // `wrapWithdraw` function used for wrap some amount of native coins and send it to side network;\n /// @dev Amount to wrap is calculated by subtracting fees from msg.value; Use `wrapperAddress` token to wrap;\n\n /// @param toAddress Address in side network that will receive the tokens\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function wrapWithdraw(address toAddress,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) public payable {\n address tokenSideAddress = tokenAddresses[wrapperAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n\n require(msg.value > transferFee + bridgeFee, \"Sent value <= fee\");\n\n uint amount = msg.value - transferFee - bridgeFee;\n feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n IWrapper(wrapperAddress).deposit{value : amount}();\n\n //\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, address(0), tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // `withdraw` function used for sending tokens from this network to side network;\n /// @param tokenThisAddress Address of token [that will be transferred] in current network\n /// @param toAddress Address in side network that will receive the tokens\n /// @param amount Amount of tokens to be sent\n /** @param unwrapSide If true, user on side network will receive native network coin instead of ERC20 token.\n Transferred token MUST be wrapper of side network native coin (ex: WETH, if side net is Ethereum)\n `tokenAddresses[0x0] == tokenThisAddress` means that `tokenThisAddress` is thisNet analogue of wrapper token in sideNet\n */\n /// @param transferFee Amount (in native coins), payed to compensate gas fees in side network\n /// @param bridgeFee Amount (in native coins), payed as bridge earnings\n /// @param feeSignature Signature signed by relay that confirms that the fee values are valid\n function withdraw(\n address tokenThisAddress, address toAddress, uint amount, bool unwrapSide,\n bytes calldata feeSignature, uint transferFee, uint bridgeFee\n ) payable public {\n address tokenSideAddress;\n if (unwrapSide) {\n require(tokenAddresses[address(0)] == tokenThisAddress, \"Token not point to native token\");\n // tokenSideAddress will be 0x0000000000000000000000000000000000000000 - for native token\n } else {\n tokenSideAddress = tokenAddresses[tokenThisAddress];\n require(tokenSideAddress != address(0), \"Unknown token address\");\n }\n\n require(msg.value == transferFee + bridgeFee, \"Sent value != fee\");\n\n require(amount > 0, \"Cannot withdraw 0\");\n\n feeCheck(tokenThisAddress, feeSignature, transferFee, bridgeFee, amount);\n transferFeeRecipient.transfer(transferFee);\n bridgeFeeRecipient.transfer(bridgeFee);\n\n require(IERC20(tokenThisAddress).transferFrom(msg.sender, address(this), amount), \"Fail transfer coins\");\n\n queue.push(CommonStructs.Transfer(tokenSideAddress, toAddress, amount));\n emit Withdraw(msg.sender, outputEventId, tokenThisAddress, tokenSideAddress, amount, transferFee, bridgeFee);\n\n withdrawFinish();\n }\n\n // can be called to force emit `Transfer` event, without waiting for withdraw in next timeframe\n function triggerTransfers() public {\n require(queue.length != 0, \"Queue is empty\");\n\n emit Transfer(outputEventId++, queue);\n delete queue;\n }\n\n\n // after `lockTime` period, transfers can be unlocked\n function unlockTransfers(uint eventId) public whenNotPaused {\n require(eventId == oldestLockedEventId, \"can unlock only oldest event\");\n\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n require(transfersLocked.endTimestamp > 0, \"no locked transfers with this id\");\n require(transfersLocked.endTimestamp < block.timestamp, \"lockTime has not yet passed\");\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n\n oldestLockedEventId = eventId + 1;\n }\n\n // optimized version of unlockTransfers that unlock all transfer that can be unlocked in one call\n function unlockTransfersBatch() public whenNotPaused {\n uint eventId = oldestLockedEventId;\n for (;; eventId++) {\n CommonStructs.LockedTransfers memory transfersLocked = lockedTransfers[eventId];\n if (transfersLocked.endTimestamp == 0 || transfersLocked.endTimestamp > block.timestamp) break;\n\n proceedTransfers(transfersLocked.transfers);\n\n delete lockedTransfers[eventId];\n emit TransferFinish(eventId);\n }\n oldestLockedEventId = eventId;\n }\n\n // delete transfers with passed eventId **and all after it**\n function removeLockedTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n require(eventId <= inputEventId, \"eventId must be <= inputEventId\");\n\n // now waiting for submitting a new transfer with `eventId` id\n inputEventId = eventId - 1;\n\n for (; lockedTransfers[eventId].endTimestamp != 0; eventId++)\n delete lockedTransfers[eventId];\n\n }\n\n // pretend like bridge already receive and process all transfers up to `eventId` id\n // BIG WARNING: CAN'T BE UNDONE coz of security reasons\n function skipTransfers(uint eventId) public onlyRole(ADMIN_ROLE) whenPaused {\n require(eventId >= oldestLockedEventId, \"eventId must be >= oldestLockedEventId\"); // can't undo unlocked :(\n\n inputEventId = eventId - 1; // now waiting for submitting a new transfer with `eventId` id\n oldestLockedEventId = eventId; // and no need to unlock previous transfers\n }\n\n\n // views\n\n // returns locked transfers from another network\n function getLockedTransfers(uint eventId) public view returns (CommonStructs.LockedTransfers memory) {\n return lockedTransfers[eventId];\n }\n\n\n function isQueueEmpty() public view returns (bool) {\n return queue.length == 0;\n }\n\n\n // admin setters\n function changeMinSafetyBlocks(uint minSafetyBlocks_) public onlyRole(ADMIN_ROLE) {\n minSafetyBlocks = minSafetyBlocks_;\n }\n\n function changeTransferFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n transferFeeRecipient = feeRecipient_;\n }\n\n function changeBridgeFeeRecipient(address payable feeRecipient_) public onlyRole(ADMIN_ROLE) {\n bridgeFeeRecipient = feeRecipient_;\n }\n\n function changeTimeframeSeconds(uint timeframeSeconds_) public onlyRole(ADMIN_ROLE) {\n lastTimeframe = (lastTimeframe * timeframeSeconds) / timeframeSeconds_;\n timeframeSeconds = timeframeSeconds_;\n }\n\n function changeLockTime(uint lockTime_) public onlyRole(ADMIN_ROLE) {\n lockTime = lockTime_;\n }\n\n function changeSignatureFeeCheckNumber(uint signatureFeeCheckNumber_) public onlyRole(ADMIN_ROLE) {\n signatureFeeCheckNumber = signatureFeeCheckNumber_;\n }\n\n // token addressed mapping\n\n function tokensAdd(address tokenThisAddress, address tokenSideAddress) public onlyRole(ADMIN_ROLE) {\n tokenAddresses[tokenThisAddress] = tokenSideAddress;\n }\n\n function tokensRemove(address tokenThisAddress) public onlyRole(ADMIN_ROLE) {\n delete tokenAddresses[tokenThisAddress];\n }\n\n function tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) public onlyRole(ADMIN_ROLE) {\n _tokensAddBatch(tokenThisAddresses, tokenSideAddresses);\n }\n\n function _tokensAddBatch(address[] calldata tokenThisAddresses, address[] calldata tokenSideAddresses) private {\n require(tokenThisAddresses.length == tokenSideAddresses.length, \"sizes of tokenThisAddresses and tokenSideAddresses must be same\");\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n tokenAddresses[tokenThisAddresses[i]] = tokenSideAddresses[i];\n }\n\n function tokensRemoveBatch(address[] calldata tokenThisAddresses) public onlyRole(ADMIN_ROLE) {\n uint arrayLength = tokenThisAddresses.length;\n for (uint i = 0; i < arrayLength; i++)\n delete tokenAddresses[tokenThisAddresses[i]];\n }\n\n // pause\n\n function pause() public onlyRole(WATCHDOG_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(ADMIN_ROLE) {\n _unpause();\n }\n\n // roles\n\n function grantRoles(bytes32 role, address[] calldata accounts) public onlyRole(getRoleAdmin(role)) {\n // check permission to grant role via onlyRole(getRoleAdmin(role))\n _setupRoles(role, accounts);\n }\n function revokeRoles(bytes32 role, address[] calldata accounts) public {\n // revokeRole will check for permissions\n for (uint i = 0; i < accounts.length; i++)\n revokeRole(role, accounts[i]);\n }\n function _setupRoles(bytes32 role, address[] calldata accounts) internal {\n // no permissions check at all\n for (uint i = 0; i < accounts.length; i++)\n _setupRole(role, accounts[i]);\n }\n\n // internal\n\n // submitted transfers saves in `lockedTransfers` for `lockTime` period\n function lockTransfers(CommonStructs.Transfer[] calldata events, uint eventId) internal {\n lockedTransfers[eventId].endTimestamp = block.timestamp + lockTime;\n for (uint i = 0; i < events.length; i++)\n lockedTransfers[eventId].transfers.push(events[i]);\n }\n\n\n // sends money according to the information in the Transfer structure\n // if transfer.tokenAddress == 0x0, then it's transfer of `wrapperAddress` token with auto-unwrap to native coin\n function proceedTransfers(CommonStructs.Transfer[] memory transfers) internal {\n for (uint i = 0; i < transfers.length; i++) {\n\n if (transfers[i].tokenAddress == address(0)) {// native token\n IWrapper(wrapperAddress).withdraw(transfers[i].amount);\n payable(transfers[i].toAddress).transfer(transfers[i].amount);\n } else {// ERC20 token\n require(\n IERC20(transfers[i].tokenAddress).transfer(transfers[i].toAddress, transfers[i].amount),\n \"Fail transfer coins\");\n }\n\n }\n }\n\n // used by `withdraw` and `wrapWithdraw` functions;\n // emit `Transfer` event with current queue if timeframe was changed;\n function withdrawFinish() internal {\n uint nowTimeframe = block.timestamp / timeframeSeconds;\n if (nowTimeframe != lastTimeframe) {\n emit Transfer(outputEventId++, queue);\n delete queue;\n\n lastTimeframe = nowTimeframe;\n }\n }\n\n // encode message with received values and current timestamp;\n // check that signature is same message signed by address with RELAY_ROLE;\n // make `signatureFeeCheckNumber` attempts, each time decrementing timestampEpoch (workaround for old signature)\n function feeCheck(address token, bytes calldata signature, uint transferFee, uint bridgeFee, uint amount) internal view {\n bytes32 messageHash;\n address signer;\n uint timestampEpoch = block.timestamp / SIGNATURE_FEE_TIMESTAMP;\n\n for (uint i = 0; i < signatureFeeCheckNumber; i++) {\n messageHash = keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encodePacked(token, timestampEpoch, transferFee, bridgeFee, amount))\n ));\n\n signer = ecdsaRecover(messageHash, signature);\n if (hasRole(FEE_PROVIDER_ROLE, signer))\n return;\n timestampEpoch--;\n }\n revert(\"Signature check failed\");\n }\n\n function checkEventId(uint eventId) internal {\n require(eventId == ++inputEventId, \"EventId out of order\");\n }\n\n receive() external payable {} // need to receive native token from wrapper contract\n\n uint256[15] private __gap;\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\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 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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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" + }, + "contracts/tokens/IWrapper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\ninterface IWrapper {\n event Deposit(address indexed dst, uint amount);\n event Withdrawal(address indexed src, uint amount);\n\n function deposit() external payable;\n\n function withdraw(uint amount) external;\n}\n" + }, + "contracts/checks/SignatureCheck.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nfunction ecdsaRecover(bytes32 messageHash, bytes memory signature) pure returns(address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(signature, 32))\n s := mload(add(signature, 64))\n v := byte(0, mload(add(signature, 96)))\n if lt(v, 27) {v := add(v, 27)}\n }\n return ecrecover(messageHash, v, r, s);\n}\n" + }, + "contracts/networks/ETH_EthBridge.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract ETH_EthBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address oldDefaultAdmin\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n}\n" + }, + "contracts/checks/CheckUntrustless2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonStructs.sol\";\n\n\ncontract CheckUntrustless2 {\n // this contract do nothing, but i think it's required to inheritance from it\n // todo check this\n uint256[15] private ___gap;\n}\n" + }, + "contracts/networks/ETH_AmbBridge.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract ETH_AmbBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address mpcRelay,\n address oldDefaultAdmin,\n address oldRelay\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n\n // revoke RELAY_ROLE from old relay\n revokeRole(RELAY_ROLE, oldRelay);\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n _setupRole(RELAY_ROLE, mpcRelay);\n\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n\n}\n" + }, + "contracts/networks/BSC_BscBridge.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract BSC_BscBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address mpcRelay,\n address oldDefaultAdmin,\n address oldRelay\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n\n // revoke RELAY_ROLE from old relay\n revokeRole(RELAY_ROLE, oldRelay);\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n _setupRole(RELAY_ROLE, mpcRelay);\n\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n}\n" + }, + "contracts/networks/BSC_AmbBridge.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\nimport \"../checks/CheckUntrustless2.sol\";\n\n\ncontract BSC_AmbBridge is CommonBridge, CheckUntrustless2 {\n\n function initialize(\n CommonStructs.ConstructorArgs calldata args\n ) public initializer {\n __CommonBridge_init(args);\n }\n\n function upgrade(\n address[] calldata _watchdogs,\n address _fee_provider,\n address mpcRelay,\n address oldDefaultAdmin,\n address oldRelay\n ) public {\n require(msg.sender == address(this), \"This method require multisig\");\n\n // add DEFAULT_ADMIN_ROLE to multisig\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n\n // revoke RELAY_ROLE from old relay\n revokeRole(RELAY_ROLE, oldRelay);\n\n // new roles for untrustless mpc\n _setupRoles(WATCHDOG_ROLE, _watchdogs);\n _setupRole(FEE_PROVIDER_ROLE, _fee_provider);\n _setupRole(RELAY_ROLE, mpcRelay);\n\n // revoke DEFAULT_ADMIN_ROLE from deployer\n revokeRole(DEFAULT_ADMIN_ROLE, oldDefaultAdmin);\n }\n\n\n function submitTransferUntrustless(uint eventId, CommonStructs.Transfer[] calldata transfers) public onlyRole(RELAY_ROLE) whenNotPaused {\n checkEventId(eventId);\n emit TransferSubmit(eventId);\n lockTransfers(transfers, eventId);\n }\n\n function setSideBridge(address _sideBridgeAddress) public onlyRole(ADMIN_ROLE) {\n require(sideBridgeAddress == address(0), \"sideBridgeAddress already set\");\n sideBridgeAddress = _sideBridgeAddress;\n }\n\n\n}\n" + }, + "contracts/contracts_for_tests/CommonBridgeTest.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../common/CommonBridge.sol\";\n\ncontract CommonBridgeTest is CommonBridge {\n\n // normal constructor can't have calldata args\n function constructor_(CommonStructs.ConstructorArgs calldata args) public {\n __CommonBridge_init(args);\n\n // deployer now can grant roles\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n function lockTransfersTest(CommonStructs.Transfer[] calldata events, uint eventId) public {\n checkEventId(eventId); // now its more like submitTransferTest\n lockTransfers(events, eventId);\n }\n\n function addElementToQueue() public {\n queue.push(CommonStructs.Transfer(address(0), address(0), 100));\n }\n\n\n function checkSignatureTest(bytes32 hash, bytes memory signature) public view returns(address) {\n return ecdsaRecover(hash, signature);\n }\n\n\n function FeeCheckTest(address token, bytes calldata signature, uint fee1, uint fee2) public payable {\n feeCheck(token, signature, fee1, fee2, msg.value);\n }\n\n function getSignatureFeeCheckNumber() public view returns (uint) {\n return signatureFeeCheckNumber;\n }\n}\n" + }, + "contracts/tokens/sAMB.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./IWrapper.sol\";\n\ncontract sAMB is IWrapper, ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {}\n\n function deposit() public override payable {\n _mint(msg.sender, msg.value);\n\n emit Deposit(msg.sender, msg.value);\n }\n\n function withdraw(uint amount) public override {\n _burn(msg.sender, amount);\n payable(msg.sender).transfer(amount);\n\n emit Withdrawal(msg.sender, amount);\n }\n\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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 * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, 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 * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), 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 * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\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 _approve(_msgSender(), spender, _allowances[_msgSender()][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 uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\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 * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, 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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\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/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\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" + }, + "contracts/tokens/BridgeERC20_Amb_OLD.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\n\n// this contract is already deployed on mainnets as USDC and BUSD tokens, but\n// it has an unpleasant feature: allowance need to be set with ANOTHER token denomination\n// and user will see counterintuitive amount in increaseAllowance() function.\n// SO, FRONT SHOULD CHECK FOR USDC AND BUSD TOKENS AND USE THIS LEGACY LOGIC FOR THEM\ncontract BridgeERC20_Amb_OLD is ERC20, Ownable {\n\n // decimals of token in side network\n // example:\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\n mapping(address => uint8) public sideTokenDecimals;\n\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\n\n uint8 _decimals;\n\n constructor(\n string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n ) ERC20(name_, symbol_) Ownable() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n }\n\n // todo check if we need this func\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \"wrong array lengths\");\n for (uint i = 0; i < bridgeAddresses_.length; i++)\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n // todo events\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n // user transfer tokens to ambrosus => need to mint it\n\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n\n\n // bridge mint money to user; same amount locked on side bridge\n bridgeBalances[sender] += amount_this;\n\n _mint(recipient, amount_this);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n // user withdraw tokens from ambrosus => need to burn it\n\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n\n\n // user burn tokens; side bridge must have enough tokens to send\n require(bridgeBalances[recipient] >= amount_this, \"not enough locked tokens on bridge\");\n bridgeBalances[recipient] -= amount_this;\n\n _burn(sender, amount_this);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\n if (dTo == dFrom)\n return amount;\n if (dTo > dFrom)\n return amount * (10 ** (dTo - dFrom));\n else\n return amount / (10 ** (dFrom - dTo));\n }\n\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\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 _setOwner(_msgSender());\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 called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _setOwner(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 _setOwner(newOwner);\n }\n\n function _setOwner(address newOwner) private {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "contracts/tokens/BridgeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20 is ERC20, Ownable {\n address public bridgeAddress; // address of bridge contract on this network\n\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_)\n ERC20(name_, symbol_)\n Ownable() {\n bridgeAddress = bridgeAddress_;\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setBridgeAddress(address bridgeAddress_) public onlyOwner() {\n bridgeAddress = bridgeAddress_;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sender == bridgeAddress) {\n // user transfer tokens to ambrosus => need to mint it\n _mint(recipient, amount);\n } else if (recipient == bridgeAddress) {\n // user withdraw tokens from ambrosus => need to burn it\n _burn(sender, amount);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n}\n" + }, + "contracts/tokens/BridgeERC20_Fix.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"./BridgeERC20.sol\";\n\ncontract BridgeERC20_Fix is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress_,\n address[] memory oldAddresses, uint[] memory oldBalances\n )\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress_) {\n for (uint i = 0; i < oldAddresses.length; i++)\n _mint(oldAddresses[i], oldBalances[i]);\n }\n}\n" + }, + "contracts/contracts_for_tests/BridgeERC20Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20.sol\";\n\ncontract BridgeERC20Test is BridgeERC20 {\n constructor(string memory name_, string memory symbol_, uint8 decimals_, address bridgeAddress)\n BridgeERC20(name_, symbol_, decimals_, bridgeAddress) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n}\n" + }, + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\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 * ```\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 * ```\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.\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, _msgSender());\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 override returns (bool) {\n return _roles[role].members[account];\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 {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(uint160(account), 20),\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 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 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 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 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) 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 * [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 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 function _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\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\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/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\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\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" + }, + "contracts/utils/Faucet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\n\ncontract Faucet is AccessControl {\n event Faucet(address indexed to, uint256 indexed eventId, uint256 indexed chainId, uint256 amount);\n\n constructor(address[] memory admins) payable {\n for (uint i = 0; i < admins.length; i++)\n _setupRole(DEFAULT_ADMIN_ROLE, admins[i]);\n }\n\n function faucet(address toAddress, uint256 eventId, uint256 chainId, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\n withdraw(toAddress, amount);\n emit Faucet(toAddress, eventId, chainId, amount);\n }\n\n function withdraw(address toAddress, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\n require(address(this).balance >= amount, \"not enough funds\");\n payable(toAddress).transfer(amount);\n }\n\n receive() external payable {}\n\n\n}\n" + }, + "contracts/tokens/BridgeERC20_Amb.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BridgeERC20_Amb is ERC20, Ownable {\n\n // decimals of token in side network\n // example:\n // 0xBSC_Amb => 18 (AMB contract of BSC bridge => 18 decimals)\n // 0xETH_Amb => 6 (AMB contract of ETH bridge => 6 decimals)\n // now, token will auto convert self _decimals to side _decimals (or vice versa) on bridge transfer\n // NOTE: value 0 means that address is not a bridge; DON'T SET NON ZERO VALUES FOR NON BRIDGE ADDRESSES\n mapping(address => uint8) public sideTokenDecimals;\n\n mapping(address => uint) public bridgeBalances; // locked tokens on the side bridge\n\n uint8 _decimals;\n\n constructor(\n string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n ) ERC20(name_, symbol_) Ownable() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) public onlyOwner() {\n _setSideTokenDecimals(bridgeAddresses_, sideTokenDecimals_);\n }\n\n // todo check if we need this func\n function _setSideTokenDecimals(address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_) private {\n require(bridgeAddresses_.length == sideTokenDecimals_.length, \"wrong array lengths\");\n for (uint i = 0; i < bridgeAddresses_.length; i++)\n sideTokenDecimals[bridgeAddresses_[i]] = sideTokenDecimals_[i];\n }\n\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n // convert decimals just like in _transfer function\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n amount = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n amount = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n }\n\n uint256 currentAllowance = allowance(sender,_msgSender());\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint amount\n ) internal virtual override {\n if (sideTokenDecimals[sender] != 0) { // sender is bridge\n // user transfer tokens to ambrosus => need to mint it\n\n // we receive tokens from network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[sender], _decimals);\n\n\n // bridge mint money to user; same amount locked on side bridge\n bridgeBalances[sender] += amount_this;\n\n _mint(recipient, amount_this);\n } else if (sideTokenDecimals[recipient] != 0) { // recipient is bridge\n // user withdraw tokens from ambrosus => need to burn it\n\n // we transfer tokens to network where token have sideTokenDecimals[sender] decimals\n // convert amount with SIDE network decimals form to SELF decimals form\n uint amount_this = _convertDecimals(amount, sideTokenDecimals[recipient], _decimals);\n\n\n // user burn tokens; side bridge must have enough tokens to send\n require(bridgeBalances[recipient] >= amount_this, \"not enough locked tokens on bridge\");\n bridgeBalances[recipient] -= amount_this;\n\n _burn(sender, amount_this);\n } else {\n super._transfer(sender, recipient, amount);\n }\n }\n\n function _convertDecimals(uint256 amount, uint8 dFrom, uint8 dTo) internal pure returns (uint256) {\n if (dTo == dFrom)\n return amount;\n if (dTo > dFrom)\n return amount * (10 ** (dTo - dFrom));\n else\n return amount / (10 ** (dFrom - dTo));\n }\n\n}\n" + }, + "contracts/contracts_for_tests/BridgeERC20_AmbTest.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"../tokens/BridgeERC20_Amb.sol\";\n\ncontract BridgeERC20_AmbTest is BridgeERC20_Amb {\n constructor(string memory name_, string memory symbol_, uint8 decimals_,\n address[] memory bridgeAddresses_, uint8[] memory sideTokenDecimals_\n )\n BridgeERC20_Amb(name_, symbol_, decimals_, bridgeAddresses_, sideTokenDecimals_) {}\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n\n function changeBridgeBalance(address bridge, uint balance) public {\n bridgeBalances[bridge] = balance;\n }\n}\n" + }, + "contracts/contracts_for_tests/MintableERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MintableERC20 is ERC20 {\n uint8 _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function mint(address to, uint256 amount) public {\n _mint(to, amount);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "byzantium", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file