From 23cae1a89c8d704dbf8e315408db47a66e620056 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Fri, 26 Jul 2024 14:42:18 +0200 Subject: [PATCH 01/32] Deployer script draft --- scripts/deployment/deployUsdcBridge.ts | 220 +++++++++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 scripts/deployment/deployUsdcBridge.ts diff --git a/scripts/deployment/deployUsdcBridge.ts b/scripts/deployment/deployUsdcBridge.ts new file mode 100644 index 0000000000..ae9de62c47 --- /dev/null +++ b/scripts/deployment/deployUsdcBridge.ts @@ -0,0 +1,220 @@ +import { BigNumber, ethers, Wallet } from 'ethers' +import { + IOwnable__factory, + L1GatewayRouter__factory, + L1USDCGateway, + L1USDCGateway__factory, + L2GatewayRouter__factory, + L2USDCGateway, + L2USDCGateway__factory, + ProxyAdmin__factory, + TransparentUpgradeableProxy__factory, + UpgradeExecutor__factory, +} from '../../build/types' +import { JsonRpcProvider } from '@ethersproject/providers' +import dotenv from 'dotenv' +import { L1ToL2MessageGasEstimator } from '@arbitrum/sdk' +import { getBaseFee } from '@arbitrum/sdk/dist/lib/utils/lib' + +dotenv.config() + +main().then(() => console.log('Done.')) + +async function main() { + const { deployerL1, deployerL2 } = await _loadWallets() + + /// create L2 USDC from Circle's repo, set the address in .env and load it here + const l2Usdc = process.env['BRIDGED_USDC_ADDRESS'] as string + + const { l1USDCCustomGateway, l2USDCCustomGateway } = await _deployGateways( + deployerL1, + deployerL2 + ) + + await _initializeGateways( + l1USDCCustomGateway, + l2USDCCustomGateway, + l2Usdc, + deployerL1, + deployerL2 + ) +} + +async function _loadWallets(): Promise<{ + deployerL1: Wallet + deployerL2: Wallet +}> { + const parentRpc = process.env['PARENT_RPC'] as string + const parentDeployerKey = process.env['PARENT_DEPLOYER_KEY'] as string + const childRpc = process.env['CHILD_RPC'] as string + const childDeployerKey = process.env['CHILD_DEPLOYER_KEY'] as string + + if (!parentRpc || !parentDeployerKey || !childRpc || !childDeployerKey) { + throw new Error('Missing env vars') + } + + const parentProvider = new JsonRpcProvider(parentRpc) + const deployerL1 = new ethers.Wallet(parentDeployerKey, parentProvider) + + const childProvider = new JsonRpcProvider(childRpc) + const deployerL2 = new ethers.Wallet(childDeployerKey, childProvider) + + return { deployerL1, deployerL2 } +} + +async function _deployGateways( + deployerL1: Wallet, + deployerL2: Wallet +): Promise<{ + l1USDCCustomGateway: L1USDCGateway + l2USDCCustomGateway: L2USDCGateway +}> { + /// create new L1 usdc gateway behind proxy + const proxyAdminFac = await new ProxyAdmin__factory(deployerL1).deploy() + const proxyAdmin = await proxyAdminFac.deployed() + const l1USDCCustomGatewayFactory = await new L1USDCGateway__factory( + deployerL1 + ).deploy() + const l1USDCCustomGatewayLogic = await l1USDCCustomGatewayFactory.deployed() + const tupFactory = await new TransparentUpgradeableProxy__factory( + deployerL1 + ).deploy(l1USDCCustomGatewayLogic.address, proxyAdmin.address, '0x') + const tup = await tupFactory.deployed() + const l1USDCCustomGateway = L1USDCGateway__factory.connect( + tup.address, + deployerL1 + ) + console.log('L1 ProxyAdmin address: ', proxyAdmin.address) + console.log('L1USDCGateway address: ', l1USDCCustomGateway.address) + + /// create new L2 usdc gateway behind proxy + const proxyAdminL2Fac = await new ProxyAdmin__factory(deployerL2).deploy() + const proxyAdminL2 = await proxyAdminL2Fac.deployed() + const l2USDCCustomGatewayFactory = await new L2USDCGateway__factory( + deployerL2 + ).deploy() + const l2USDCCustomGatewayLogic = await l2USDCCustomGatewayFactory.deployed() + const tupL2Factory = await new TransparentUpgradeableProxy__factory( + deployerL2 + ).deploy(l2USDCCustomGatewayLogic.address, proxyAdminL2.address, '0x') + const tupL2 = await tupL2Factory.deployed() + const l2USDCCustomGateway = L2USDCGateway__factory.connect( + tupL2.address, + deployerL2 + ) + console.log('L2 ProxyAdmin address: ', proxyAdminL2.address) + console.log('L2USDCGateway address: ', l2USDCCustomGateway.address) + + return { l1USDCCustomGateway, l2USDCCustomGateway } +} + +async function _initializeGateways( + l1USDCCustomGateway: L1USDCGateway, + l2USDCCustomGateway: L2USDCGateway, + l2Usdc: string, + deployerL1: Wallet, + deployerL2: Wallet +) { + /// initialize L1 gateway + const _l2CounterPart = l2USDCCustomGateway.address + const _l1Router = '0xcE18836b233C83325Cc8848CA4487e94C6288264' + const _inbox = '0xaAe29B0366299461418F5324a79Afc425BE5ae21' + const _l1USDC = '0xf4FEa76b87D9bCedE79EB29bBD5EDAefcA0E7dcA' + const _l2USDC = l2Usdc + const _owner = deployerL1.address + await ( + await l1USDCCustomGateway.initialize( + _l2CounterPart, + _l1Router, + _inbox, + _l1USDC, + _l2USDC, + _owner + ) + ).wait() + console.log('L1 USDC custom gateway initialized') + + /// initialize L2 gateway + const _l1Counterpart = l1USDCCustomGateway.address + const _l2Router = '0x9fDD1C4E4AA24EEc1d913FABea925594a20d43C7' + const _ownerL2 = deployerL2.address + await ( + await l2USDCCustomGateway.initialize( + _l1Counterpart, + _l2Router, + _l1USDC, + _l2USDC, + _ownerL2 + ) + ).wait() + console.log('L2 USDC custom gateway initialized') +} + +async function _print(deployerL1Wallet: Wallet, deployerL2Wallet: Wallet) { + /// register USDC custom gateway + const router = L1GatewayRouter__factory.connect( + '0xcE18836b233C83325Cc8848CA4487e94C6288264', + deployerL1Wallet + ) + const l2Router = L2GatewayRouter__factory.connect( + '0x9fDD1C4E4AA24EEc1d913FABea925594a20d43C7', + deployerL2Wallet + ) + + const l1Usdc = '0xf4FEa76b87D9bCedE79EB29bBD5EDAefcA0E7dcA' + const l1USDCCustomGateway = '0xE6C04c453BE367AAEF8E8bab26E5Ce6366Be3Fe6' + const l2USDCCustomGateway = '0xCC083dDee542023FC7CE8Cf52C8666519B981ec2' + + const l1ToL2MsgGasEstimate = new L1ToL2MessageGasEstimator( + deployerL2Wallet.provider + ) + + // const payload = abi.encodeWithSelector( + // L2GatewayRouter.setGateway.selector, + // _token, + // _gateway + // ); + const iface = new ethers.utils.Interface([ + 'function setGateway(address _token, address _gateway)', + ]) + const payload = iface.encodeFunctionData('setGateway', [ + l1Usdc, + l1USDCCustomGateway, + ]) + + const gasParams = await l1ToL2MsgGasEstimate.estimateAll( + { + from: l1USDCCustomGateway, + to: l2USDCCustomGateway, + l2CallValue: BigNumber.from(0), + excessFeeRefundAddress: deployerL1Wallet.address, + callValueRefundAddress: deployerL1Wallet.address, + data: payload, + }, + await getBaseFee(deployerL1Wallet.provider!), + deployerL1Wallet.provider! + ) + console.log('Gas params: ', gasParams) + + // const maxGas = BigNumber.from(1) + // const gasPriceBid = BigNumber.from(1) + // let maxSubmissionCost = BigNumber.from(257600000000) + // const registrationCalldata = router.interface.encodeFunctionData( + // 'setGateways', + // [[l1Usdc], [l1USDCCustomGateway], maxGas, gasPriceBid, maxSubmissionCost] + // ) + + // const upExec = UpgradeExecutor__factory.connect( + // '0x5FEe78FE9AD96c1d8557C6D6BB22Eb5A61eeD315', + // deployerL1Wallet + // ) + // const gwRegistrationTx = await upExec.executeCall( + // router.address, + // registrationCalldata, + // { + // value: maxGas.mul(gasPriceBid).add(maxSubmissionCost), + // } + // ) + // await waitOnL2Msg(gwRegistrationTx) + // console.log('USDC custom gateway registered') +} From 726ac927ff994aa02f3e623ff2e79410a3e6f87b Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Fri, 26 Jul 2024 16:12:00 +0200 Subject: [PATCH 02/32] Deploy bridged usdc --- scripts/deployment/deployUsdcBridge.ts | 151 ++++++++++++++++++++++--- 1 file changed, 136 insertions(+), 15 deletions(-) diff --git a/scripts/deployment/deployUsdcBridge.ts b/scripts/deployment/deployUsdcBridge.ts index ae9de62c47..c8aa79d074 100644 --- a/scripts/deployment/deployUsdcBridge.ts +++ b/scripts/deployment/deployUsdcBridge.ts @@ -1,20 +1,35 @@ -import { BigNumber, ethers, Wallet } from 'ethers' +import { BigNumber, Wallet } from 'ethers' +import { ethers } from 'hardhat' import { - IOwnable__factory, + IERC20__factory, + IFiatToken__factory, + IFiatTokenProxy__factory, L1GatewayRouter__factory, L1USDCGateway, L1USDCGateway__factory, L2GatewayRouter__factory, L2USDCGateway, L2USDCGateway__factory, + ProxyAdmin, ProxyAdmin__factory, TransparentUpgradeableProxy__factory, - UpgradeExecutor__factory, } from '../../build/types' import { JsonRpcProvider } from '@ethersproject/providers' import dotenv from 'dotenv' import { L1ToL2MessageGasEstimator } from '@arbitrum/sdk' import { getBaseFee } from '@arbitrum/sdk/dist/lib/utils/lib' +import { + abi as SigCheckerAbi, + bytecode as SigCheckerBytecode, +} from '@offchainlabs/stablecoin-evm/artifacts/hardhat/contracts/util/SignatureChecker.sol/SignatureChecker.json' +import { + abi as UsdcAbi, + bytecode as UsdcBytecode, +} from '@offchainlabs/stablecoin-evm/artifacts/hardhat/contracts/v2/FiatTokenV2_2.sol/FiatTokenV2_2.json' +import { + abi as UsdcProxyAbi, + bytecode as UsdcProxyBytecode, +} from '@offchainlabs/stablecoin-evm/artifacts/hardhat/contracts/v1/FiatTokenProxy.sol/FiatTokenProxy.json' dotenv.config() @@ -23,21 +38,27 @@ main().then(() => console.log('Done.')) async function main() { const { deployerL1, deployerL2 } = await _loadWallets() + const proxyAdminL2 = await _deployL2ProxyAdmin(deployerL2) + console.log('L2 ProxyAdmin address: ', proxyAdminL2) + + const bridgedUsdc = await _deployBridgedUsdc(deployerL2, proxyAdminL2) + console.log('Bridged USDC address: ', bridgedUsdc) + /// create L2 USDC from Circle's repo, set the address in .env and load it here - const l2Usdc = process.env['BRIDGED_USDC_ADDRESS'] as string + // const l2Usdc = process.env['BRIDGED_USDC_ADDRESS'] as string - const { l1USDCCustomGateway, l2USDCCustomGateway } = await _deployGateways( - deployerL1, - deployerL2 - ) + // const { l1USDCCustomGateway, l2USDCCustomGateway } = await _deployGateways( + // deployerL1, + // deployerL2 + // ) - await _initializeGateways( - l1USDCCustomGateway, - l2USDCCustomGateway, - l2Usdc, - deployerL1, - deployerL2 - ) + // await _initializeGateways( + // l1USDCCustomGateway, + // l2USDCCustomGateway, + // l2Usdc, + // deployerL1, + // deployerL2 + // ) } async function _loadWallets(): Promise<{ @@ -62,6 +83,106 @@ async function _loadWallets(): Promise<{ return { deployerL1, deployerL2 } } +async function _deployL2ProxyAdmin(deployerL2Wallet: Wallet): Promise { + const proxyAdminFac = await new ProxyAdmin__factory(deployerL2Wallet).deploy() + return (await proxyAdminFac.deployed()).address +} + +async function _deployBridgedUsdc( + deployerL2Wallet: Wallet, + proxyAdminL2: string +): Promise { + /// create l2 usdc behind proxy + const l2UsdcLogic = await _deployUsdcLogic(deployerL2Wallet) + const l2UsdcProxyAddress = await _deployUsdcProxy( + deployerL2Wallet, + l2UsdcLogic.address, + proxyAdminL2 + ) + + const l2UsdcFiatToken = IFiatToken__factory.connect( + l2UsdcProxyAddress, + deployerL2Wallet + ) + const masterMinterL2 = deployerL2Wallet + await ( + await l2UsdcFiatToken.initialize( + 'USDC token', + 'USDC.e', + 'USD', + 6, + masterMinterL2.address, + ethers.Wallet.createRandom().address, + ethers.Wallet.createRandom().address, + deployerL2Wallet.address + ) + ).wait() + await (await l2UsdcFiatToken.initializeV2('USDC')).wait() + await ( + await l2UsdcFiatToken.initializeV2_1(ethers.Wallet.createRandom().address) + ).wait() + await (await l2UsdcFiatToken.initializeV2_2([], 'USDC.e')).wait() + const l2Usdc = IERC20__factory.connect( + l2UsdcFiatToken.address, + deployerL2Wallet + ) + + return l2Usdc.address +} + +async function _deployUsdcLogic(deployer: Wallet) { + /// deploy sig checker library + const sigCheckerFac = new ethers.ContractFactory( + SigCheckerAbi, + SigCheckerBytecode, + deployer + ) + const sigCheckerLib = await sigCheckerFac.deploy() + + // link library to usdc bytecode + const bytecodeWithPlaceholder: string = UsdcBytecode + const placeholder = '__$715109b5d747ea58b675c6ea3f0dba8c60$__' + + const libAddressStripped = sigCheckerLib.address.replace(/^0x/, '') + const bridgedUsdcLogicBytecode = bytecodeWithPlaceholder + .split(placeholder) + .join(libAddressStripped) + + // deploy bridged usdc logic + const bridgedUsdcLogicFactory = new ethers.ContractFactory( + UsdcAbi, + bridgedUsdcLogicBytecode, + deployer + ) + const bridgedUsdcLogic = await bridgedUsdcLogicFactory.deploy() + + return bridgedUsdcLogic +} + +async function _deployUsdcProxy( + deployer: Wallet, + bridgedUsdcLogic: string, + proxyAdmin: string +) { + /// deploy circle's proxy used for usdc + const usdcProxyFactory = new ethers.ContractFactory( + UsdcProxyAbi, + UsdcProxyBytecode, + deployer + ) + const usdcProxy = await usdcProxyFactory.deploy(bridgedUsdcLogic) + + /// set proxy admin + await ( + await IFiatTokenProxy__factory.connect( + usdcProxy.address, + deployer + ).changeAdmin(proxyAdmin) + ).wait() + + return usdcProxy.address +} + async function _deployGateways( deployerL1: Wallet, deployerL2: Wallet From 5d5d860709187aa8713a50032d14ef5fa3955b53 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Fri, 26 Jul 2024 17:09:55 +0200 Subject: [PATCH 03/32] Init gateways --- scripts/deployment/deployUsdcBridge.ts | 208 ++++++++----------------- 1 file changed, 68 insertions(+), 140 deletions(-) diff --git a/scripts/deployment/deployUsdcBridge.ts b/scripts/deployment/deployUsdcBridge.ts index c8aa79d074..83e0618f9a 100644 --- a/scripts/deployment/deployUsdcBridge.ts +++ b/scripts/deployment/deployUsdcBridge.ts @@ -38,27 +38,43 @@ main().then(() => console.log('Done.')) async function main() { const { deployerL1, deployerL2 } = await _loadWallets() - const proxyAdminL2 = await _deployL2ProxyAdmin(deployerL2) + const proxyAdminL1 = await _deployProxyAdmin(deployerL1) + console.log('L1 ProxyAdmin address: ', proxyAdminL1) + + const proxyAdminL2 = await _deployProxyAdmin(deployerL2) console.log('L2 ProxyAdmin address: ', proxyAdminL2) const bridgedUsdc = await _deployBridgedUsdc(deployerL2, proxyAdminL2) console.log('Bridged USDC address: ', bridgedUsdc) - /// create L2 USDC from Circle's repo, set the address in .env and load it here - // const l2Usdc = process.env['BRIDGED_USDC_ADDRESS'] as string - - // const { l1USDCCustomGateway, l2USDCCustomGateway } = await _deployGateways( - // deployerL1, - // deployerL2 - // ) + const l1UsdcGateway = await _deployParentChainUsdcGateway( + deployerL1, + proxyAdminL1 + ) + console.log('L1 USDC gateway address: ', l1UsdcGateway.address) - // await _initializeGateways( - // l1USDCCustomGateway, - // l2USDCCustomGateway, - // l2Usdc, - // deployerL1, - // deployerL2 - // ) + const l2UsdcGateway = await _deployChildChainUsdcGateway( + deployerL2, + proxyAdminL2 + ) + console.log('L2 USDC gateway address: ', l2UsdcGateway.address) + + const l1Router = process.env['L1_ROUTER'] as string + const l2Router = process.env['L2_ROUTER'] as string + const inbox = process.env['INBOX'] as string + const l1Usdc = process.env['L1_USDC'] as string + await _initializeGateways( + l1UsdcGateway, + l2UsdcGateway, + l1Router, + l2Router, + inbox, + l1Usdc, + bridgedUsdc, + deployerL1, + deployerL2 + ) + console.log('Usdc gateways initialized') } async function _loadWallets(): Promise<{ @@ -83,21 +99,21 @@ async function _loadWallets(): Promise<{ return { deployerL1, deployerL2 } } -async function _deployL2ProxyAdmin(deployerL2Wallet: Wallet): Promise { - const proxyAdminFac = await new ProxyAdmin__factory(deployerL2Wallet).deploy() - return (await proxyAdminFac.deployed()).address +async function _deployProxyAdmin(deployer: Wallet): Promise { + const proxyAdminFac = await new ProxyAdmin__factory(deployer).deploy() + return await proxyAdminFac.deployed() } async function _deployBridgedUsdc( deployerL2Wallet: Wallet, - proxyAdminL2: string + proxyAdminL2: ProxyAdmin ): Promise { /// create l2 usdc behind proxy const l2UsdcLogic = await _deployUsdcLogic(deployerL2Wallet) const l2UsdcProxyAddress = await _deployUsdcProxy( deployerL2Wallet, l2UsdcLogic.address, - proxyAdminL2 + proxyAdminL2.address ) const l2UsdcFiatToken = IFiatToken__factory.connect( @@ -183,16 +199,10 @@ async function _deployUsdcProxy( return usdcProxy.address } -async function _deployGateways( +async function _deployParentChainUsdcGateway( deployerL1: Wallet, - deployerL2: Wallet -): Promise<{ - l1USDCCustomGateway: L1USDCGateway - l2USDCCustomGateway: L2USDCGateway -}> { - /// create new L1 usdc gateway behind proxy - const proxyAdminFac = await new ProxyAdmin__factory(deployerL1).deploy() - const proxyAdmin = await proxyAdminFac.deployed() + proxyAdmin: ProxyAdmin +): Promise { const l1USDCCustomGatewayFactory = await new L1USDCGateway__factory( deployerL1 ).deploy() @@ -201,141 +211,59 @@ async function _deployGateways( deployerL1 ).deploy(l1USDCCustomGatewayLogic.address, proxyAdmin.address, '0x') const tup = await tupFactory.deployed() - const l1USDCCustomGateway = L1USDCGateway__factory.connect( - tup.address, - deployerL1 - ) - console.log('L1 ProxyAdmin address: ', proxyAdmin.address) - console.log('L1USDCGateway address: ', l1USDCCustomGateway.address) + return L1USDCGateway__factory.connect(tup.address, deployerL1) +} - /// create new L2 usdc gateway behind proxy - const proxyAdminL2Fac = await new ProxyAdmin__factory(deployerL2).deploy() - const proxyAdminL2 = await proxyAdminL2Fac.deployed() +async function _deployChildChainUsdcGateway( + deployerL2: Wallet, + proxyAdmin: ProxyAdmin +): Promise { const l2USDCCustomGatewayFactory = await new L2USDCGateway__factory( deployerL2 ).deploy() const l2USDCCustomGatewayLogic = await l2USDCCustomGatewayFactory.deployed() - const tupL2Factory = await new TransparentUpgradeableProxy__factory( - deployerL2 - ).deploy(l2USDCCustomGatewayLogic.address, proxyAdminL2.address, '0x') - const tupL2 = await tupL2Factory.deployed() - const l2USDCCustomGateway = L2USDCGateway__factory.connect( - tupL2.address, + const tupFactory = await new TransparentUpgradeableProxy__factory( deployerL2 - ) - console.log('L2 ProxyAdmin address: ', proxyAdminL2.address) - console.log('L2USDCGateway address: ', l2USDCCustomGateway.address) - - return { l1USDCCustomGateway, l2USDCCustomGateway } + ).deploy(l2USDCCustomGatewayLogic.address, proxyAdmin.address, '0x') + const tup = await tupFactory.deployed() + return L2USDCGateway__factory.connect(tup.address, deployerL2) } async function _initializeGateways( - l1USDCCustomGateway: L1USDCGateway, - l2USDCCustomGateway: L2USDCGateway, + l1UsdcGateway: L1USDCGateway, + l2UsdcGateway: L2USDCGateway, + l1Router: string, + l2Router: string, + inbox: string, + l1USDC: string, l2Usdc: string, deployerL1: Wallet, deployerL2: Wallet ) { /// initialize L1 gateway - const _l2CounterPart = l2USDCCustomGateway.address - const _l1Router = '0xcE18836b233C83325Cc8848CA4487e94C6288264' - const _inbox = '0xaAe29B0366299461418F5324a79Afc425BE5ae21' - const _l1USDC = '0xf4FEa76b87D9bCedE79EB29bBD5EDAefcA0E7dcA' - const _l2USDC = l2Usdc + const _l2CounterPart = l2UsdcGateway.address const _owner = deployerL1.address await ( - await l1USDCCustomGateway.initialize( + await l1UsdcGateway.initialize( _l2CounterPart, - _l1Router, - _inbox, - _l1USDC, - _l2USDC, + l1Router, + inbox, + l1USDC, + l2Usdc, _owner ) ).wait() - console.log('L1 USDC custom gateway initialized') /// initialize L2 gateway - const _l1Counterpart = l1USDCCustomGateway.address - const _l2Router = '0x9fDD1C4E4AA24EEc1d913FABea925594a20d43C7' - const _ownerL2 = deployerL2.address + const _l1Counterpart = l1UsdcGateway.address + const ownerL2 = deployerL2.address await ( - await l2USDCCustomGateway.initialize( + await l2UsdcGateway.initialize( _l1Counterpart, - _l2Router, - _l1USDC, - _l2USDC, - _ownerL2 + l2Router, + l1USDC, + l2Usdc, + ownerL2 ) ).wait() - console.log('L2 USDC custom gateway initialized') -} - -async function _print(deployerL1Wallet: Wallet, deployerL2Wallet: Wallet) { - /// register USDC custom gateway - const router = L1GatewayRouter__factory.connect( - '0xcE18836b233C83325Cc8848CA4487e94C6288264', - deployerL1Wallet - ) - const l2Router = L2GatewayRouter__factory.connect( - '0x9fDD1C4E4AA24EEc1d913FABea925594a20d43C7', - deployerL2Wallet - ) - - const l1Usdc = '0xf4FEa76b87D9bCedE79EB29bBD5EDAefcA0E7dcA' - const l1USDCCustomGateway = '0xE6C04c453BE367AAEF8E8bab26E5Ce6366Be3Fe6' - const l2USDCCustomGateway = '0xCC083dDee542023FC7CE8Cf52C8666519B981ec2' - - const l1ToL2MsgGasEstimate = new L1ToL2MessageGasEstimator( - deployerL2Wallet.provider - ) - - // const payload = abi.encodeWithSelector( - // L2GatewayRouter.setGateway.selector, - // _token, - // _gateway - // ); - const iface = new ethers.utils.Interface([ - 'function setGateway(address _token, address _gateway)', - ]) - const payload = iface.encodeFunctionData('setGateway', [ - l1Usdc, - l1USDCCustomGateway, - ]) - - const gasParams = await l1ToL2MsgGasEstimate.estimateAll( - { - from: l1USDCCustomGateway, - to: l2USDCCustomGateway, - l2CallValue: BigNumber.from(0), - excessFeeRefundAddress: deployerL1Wallet.address, - callValueRefundAddress: deployerL1Wallet.address, - data: payload, - }, - await getBaseFee(deployerL1Wallet.provider!), - deployerL1Wallet.provider! - ) - console.log('Gas params: ', gasParams) - - // const maxGas = BigNumber.from(1) - // const gasPriceBid = BigNumber.from(1) - // let maxSubmissionCost = BigNumber.from(257600000000) - // const registrationCalldata = router.interface.encodeFunctionData( - // 'setGateways', - // [[l1Usdc], [l1USDCCustomGateway], maxGas, gasPriceBid, maxSubmissionCost] - // ) - - // const upExec = UpgradeExecutor__factory.connect( - // '0x5FEe78FE9AD96c1d8557C6D6BB22Eb5A61eeD315', - // deployerL1Wallet - // ) - // const gwRegistrationTx = await upExec.executeCall( - // router.address, - // registrationCalldata, - // { - // value: maxGas.mul(gasPriceBid).add(maxSubmissionCost), - // } - // ) - // await waitOnL2Msg(gwRegistrationTx) - // console.log('USDC custom gateway registered') } From 4379de375cacdddd442d077ec421904e230e512b Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Mon, 29 Jul 2024 12:09:11 +0200 Subject: [PATCH 04/32] Add env.example --- .../deployUsdcBridge.ts | 20 ++++++++----------- scripts/usdc-bridge-deployment/env.example | 8 ++++++++ 2 files changed, 16 insertions(+), 12 deletions(-) rename scripts/{deployment => usdc-bridge-deployment}/deployUsdcBridge.ts (96%) create mode 100644 scripts/usdc-bridge-deployment/env.example diff --git a/scripts/deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts similarity index 96% rename from scripts/deployment/deployUsdcBridge.ts rename to scripts/usdc-bridge-deployment/deployUsdcBridge.ts index 83e0618f9a..be50ad643d 100644 --- a/scripts/deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -39,10 +39,10 @@ async function main() { const { deployerL1, deployerL2 } = await _loadWallets() const proxyAdminL1 = await _deployProxyAdmin(deployerL1) - console.log('L1 ProxyAdmin address: ', proxyAdminL1) + console.log('L1 ProxyAdmin address: ', proxyAdminL1.address) const proxyAdminL2 = await _deployProxyAdmin(deployerL2) - console.log('L2 ProxyAdmin address: ', proxyAdminL2) + console.log('L2 ProxyAdmin address: ', proxyAdminL2.address) const bridgedUsdc = await _deployBridgedUsdc(deployerL2, proxyAdminL2) console.log('Bridged USDC address: ', bridgedUsdc) @@ -235,7 +235,7 @@ async function _initializeGateways( l1Router: string, l2Router: string, inbox: string, - l1USDC: string, + l1Usdc: string, l2Usdc: string, deployerL1: Wallet, deployerL2: Wallet @@ -243,15 +243,11 @@ async function _initializeGateways( /// initialize L1 gateway const _l2CounterPart = l2UsdcGateway.address const _owner = deployerL1.address + await ( - await l1UsdcGateway.initialize( - _l2CounterPart, - l1Router, - inbox, - l1USDC, - l2Usdc, - _owner - ) + await l1UsdcGateway + .connect(deployerL1) + .initialize(_l2CounterPart, l1Router, inbox, l1Usdc, l2Usdc, _owner) ).wait() /// initialize L2 gateway @@ -261,7 +257,7 @@ async function _initializeGateways( await l2UsdcGateway.initialize( _l1Counterpart, l2Router, - l1USDC, + l1Usdc, l2Usdc, ownerL2 ) diff --git a/scripts/usdc-bridge-deployment/env.example b/scripts/usdc-bridge-deployment/env.example new file mode 100644 index 0000000000..06e0a8407b --- /dev/null +++ b/scripts/usdc-bridge-deployment/env.example @@ -0,0 +1,8 @@ +PARENT_RPC= +PARENT_DEPLOYER_KEY= +CHILD_RPC= +CHILD_DEPLOYER_KEY= +L1_ROUTER= +L2_ROUTER= +INBOX= +L1_USDC= \ No newline at end of file From 6e595891fc73d3daf78f906389ad17de8f6da036 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Mon, 29 Jul 2024 12:59:50 +0200 Subject: [PATCH 05/32] Add register gateway script draft --- .../deployUsdcBridge.ts | 8 ++---- .../registerUsdcGateway.ts | 28 +++++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 scripts/usdc-bridge-deployment/registerUsdcGateway.ts diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index be50ad643d..f85d996cde 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -1,13 +1,11 @@ -import { BigNumber, Wallet } from 'ethers' +import { Wallet } from 'ethers' import { ethers } from 'hardhat' import { IERC20__factory, IFiatToken__factory, IFiatTokenProxy__factory, - L1GatewayRouter__factory, L1USDCGateway, L1USDCGateway__factory, - L2GatewayRouter__factory, L2USDCGateway, L2USDCGateway__factory, ProxyAdmin, @@ -16,8 +14,6 @@ import { } from '../../build/types' import { JsonRpcProvider } from '@ethersproject/providers' import dotenv from 'dotenv' -import { L1ToL2MessageGasEstimator } from '@arbitrum/sdk' -import { getBaseFee } from '@arbitrum/sdk/dist/lib/utils/lib' import { abi as SigCheckerAbi, bytecode as SigCheckerBytecode, @@ -262,4 +258,6 @@ async function _initializeGateways( ownerL2 ) ).wait() + + ///// init logic } diff --git a/scripts/usdc-bridge-deployment/registerUsdcGateway.ts b/scripts/usdc-bridge-deployment/registerUsdcGateway.ts new file mode 100644 index 0000000000..7e5df6c0d4 --- /dev/null +++ b/scripts/usdc-bridge-deployment/registerUsdcGateway.ts @@ -0,0 +1,28 @@ +import dotenv from 'dotenv' +import { Wallet } from 'ethers' +import { ethers } from 'hardhat' +import { JsonRpcProvider } from '@ethersproject/providers' + +dotenv.config() + +main().then(() => console.log('Done.')) + +async function main() { + const { deployerL1 } = await _loadWallet() +} + +async function _loadWallet(): Promise<{ + deployerL1: Wallet +}> { + const parentRpc = process.env['PARENT_RPC'] as string + const parentDeployerKey = process.env['PARENT_DEPLOYER_KEY'] as string + + if (!parentRpc || !parentDeployerKey) { + throw new Error('Missing env vars') + } + + const parentProvider = new JsonRpcProvider(parentRpc) + const deployerL1 = new ethers.Wallet(parentDeployerKey, parentProvider) + + return { deployerL1 } +} From ac532b5be59c85062b23800348ad9c91e9f75865 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Mon, 29 Jul 2024 13:17:04 +0200 Subject: [PATCH 06/32] Load upg executor --- .../registerUsdcGateway.ts | 54 ++++++++++++++++--- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/scripts/usdc-bridge-deployment/registerUsdcGateway.ts b/scripts/usdc-bridge-deployment/registerUsdcGateway.ts index 7e5df6c0d4..d64d6878a7 100644 --- a/scripts/usdc-bridge-deployment/registerUsdcGateway.ts +++ b/scripts/usdc-bridge-deployment/registerUsdcGateway.ts @@ -2,27 +2,69 @@ import dotenv from 'dotenv' import { Wallet } from 'ethers' import { ethers } from 'hardhat' import { JsonRpcProvider } from '@ethersproject/providers' +import { + L1GatewayRouter__factory, + UpgradeExecutor__factory, +} from '../../build/types' dotenv.config() main().then(() => console.log('Done.')) async function main() { - const { deployerL1 } = await _loadWallet() + const { rollupOwner } = await _loadWallet() + + const l1RouterAddress = process.env['L1_ROUTER'] as string + const l1Router = L1GatewayRouter__factory.connect(l1RouterAddress, rollupOwner) + + const routerOwnerAddress = await l1Router.owner() + if (!(await _isUpgradeExecutor(routerOwnerAddress, rollupOwner))) { + throw new Error('Router owner is expected to be an UpgradeExecutor') + } + + const upgradeExecutor = UpgradeExecutor__factory.connect( + routerOwnerAddress, + rollupOwner + ) } async function _loadWallet(): Promise<{ - deployerL1: Wallet + rollupOwner: Wallet }> { const parentRpc = process.env['PARENT_RPC'] as string - const parentDeployerKey = process.env['PARENT_DEPLOYER_KEY'] as string + const parentRollupOwnerKey = process.env['ROLLUP_OWNER'] as string - if (!parentRpc || !parentDeployerKey) { + if (!parentRpc || !parentRollupOwnerKey) { throw new Error('Missing env vars') } const parentProvider = new JsonRpcProvider(parentRpc) - const deployerL1 = new ethers.Wallet(parentDeployerKey, parentProvider) + const rollupOwner = new ethers.Wallet(parentRollupOwnerKey, parentProvider) + + return { rollupOwner } +} + +/** + * Check if owner is UpgardeExecutor by polling ADMIN_ROLE() and EXECUTOR_ROLE() + * @param routerOwnerAddress + * @param rollupOwner + * @returns + */ +async function _isUpgradeExecutor( + routerOwnerAddress: string, + rollupOwner: Wallet +): Promise { + // check if address implements ADMIN_ROLE() and EXECUTOR_ROLE() + const upgExecutor = UpgradeExecutor__factory.connect( + routerOwnerAddress, + rollupOwner + ) + try { + await upgExecutor.ADMIN_ROLE() + await upgExecutor.EXECUTOR_ROLE() + } catch { + return false + } - return { deployerL1 } + return true } From 0dc12e10c4719bec31214479fc975b58ff54eee7 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Mon, 29 Jul 2024 15:26:09 +0200 Subject: [PATCH 07/32] Add registration logic --- .../registerUsdcGateway.ts | 152 +++++++++++++++++- 1 file changed, 144 insertions(+), 8 deletions(-) diff --git a/scripts/usdc-bridge-deployment/registerUsdcGateway.ts b/scripts/usdc-bridge-deployment/registerUsdcGateway.ts index d64d6878a7..f3c3c5d0cf 100644 --- a/scripts/usdc-bridge-deployment/registerUsdcGateway.ts +++ b/scripts/usdc-bridge-deployment/registerUsdcGateway.ts @@ -1,47 +1,93 @@ import dotenv from 'dotenv' -import { Wallet } from 'ethers' +import { BigNumber, ContractTransaction, Wallet } from 'ethers' import { ethers } from 'hardhat' -import { JsonRpcProvider } from '@ethersproject/providers' +import { JsonRpcProvider, Provider } from '@ethersproject/providers' import { L1GatewayRouter__factory, UpgradeExecutor__factory, } from '../../build/types' +import { + addCustomNetwork, + L1Network, + L1ToL2MessageStatus, + L1TransactionReceipt, + L2Network, +} from '@arbitrum/sdk' +import { RollupAdminLogic__factory } from '@arbitrum/sdk/dist/lib/abi/factories/RollupAdminLogic__factory' dotenv.config() main().then(() => console.log('Done.')) async function main() { - const { rollupOwner } = await _loadWallet() + const { rollupOwner, childProvider } = await _loadWallet() + + const rollup = process.env['ROLLUP'] as string + _registerNetworks(rollupOwner.provider!, childProvider, rollup) const l1RouterAddress = process.env['L1_ROUTER'] as string - const l1Router = L1GatewayRouter__factory.connect(l1RouterAddress, rollupOwner) + const l1Router = L1GatewayRouter__factory.connect( + l1RouterAddress, + rollupOwner + ) + /// load upgrade executor const routerOwnerAddress = await l1Router.owner() if (!(await _isUpgradeExecutor(routerOwnerAddress, rollupOwner))) { throw new Error('Router owner is expected to be an UpgradeExecutor') } - const upgradeExecutor = UpgradeExecutor__factory.connect( routerOwnerAddress, rollupOwner ) + + /// prepare calldata for executor + const l1UsdcAddress = process.env['L1_USDC'] as string + const l1UsdcGatewayAddress = process.env['L1_USDC_GATEWAY'] as string + + const maxGas = BigNumber.from(500000) + const gasPriceBid = BigNumber.from(200000000) + let maxSubmissionCost = BigNumber.from(257600000000) + const registrationCalldata = l1Router.interface.encodeFunctionData( + 'setGateways', + [ + [l1UsdcAddress], + [l1UsdcGatewayAddress], + maxGas, + gasPriceBid, + maxSubmissionCost, + ] + ) + + /// execute the registration + const gwRegistrationTx = await upgradeExecutor.executeCall( + l1Router.address, + registrationCalldata, + { + value: maxGas.mul(gasPriceBid).add(maxSubmissionCost), + } + ) + await waitOnL2Msg(gwRegistrationTx, childProvider) + console.log('USDC custom gateway registered') } async function _loadWallet(): Promise<{ rollupOwner: Wallet + childProvider: JsonRpcProvider }> { const parentRpc = process.env['PARENT_RPC'] as string - const parentRollupOwnerKey = process.env['ROLLUP_OWNER'] as string + const parentRollupOwnerKey = process.env['ROLLUP_OWNER_KEY'] as string + const childRpc = process.env['CHILD_RPC'] as string - if (!parentRpc || !parentRollupOwnerKey) { + if (!parentRpc || !parentRollupOwnerKey || !childRpc) { throw new Error('Missing env vars') } const parentProvider = new JsonRpcProvider(parentRpc) const rollupOwner = new ethers.Wallet(parentRollupOwnerKey, parentProvider) + const childProvider = new JsonRpcProvider(childRpc) - return { rollupOwner } + return { rollupOwner, childProvider } } /** @@ -68,3 +114,93 @@ async function _isUpgradeExecutor( return true } + +async function waitOnL2Msg( + tx: ContractTransaction, + childProvider: JsonRpcProvider +) { + const retryableReceipt = await tx.wait() + const l1TxReceipt = new L1TransactionReceipt(retryableReceipt) + const messages = await l1TxReceipt.getL1ToL2Messages(childProvider) + + // 1 msg expected + const messageResult = await messages[0].waitForStatus() + const status = messageResult.status + + if (status != L1ToL2MessageStatus.REDEEMED) { + throw new Error('L1->L2 message not redeemed') + } +} + +const _registerNetworks = async ( + l1Provider: Provider, + l2Provider: Provider, + rollupAddress: string +): Promise<{ + l1Network: L1Network + l2Network: Omit +}> => { + const l1NetworkInfo = await l1Provider.getNetwork() + const l2NetworkInfo = await l2Provider.getNetwork() + + const l1Network: L1Network = { + blockTime: 10, + chainID: l1NetworkInfo.chainId, + explorerUrl: '', + isCustom: true, + name: l1NetworkInfo.name, + partnerChainIDs: [l2NetworkInfo.chainId], + isArbitrum: false, + } + + const rollup = RollupAdminLogic__factory.connect(rollupAddress, l1Provider) + const l2Network: L2Network = { + blockTime: 10, + partnerChainIDs: [], + chainID: l2NetworkInfo.chainId, + confirmPeriodBlocks: (await rollup.confirmPeriodBlocks()).toNumber(), + ethBridge: { + bridge: await rollup.bridge(), + inbox: await rollup.inbox(), + outbox: await rollup.outbox(), + rollup: rollup.address, + sequencerInbox: await rollup.sequencerInbox(), + }, + explorerUrl: '', + isArbitrum: true, + isCustom: true, + name: 'OrbitChain', + partnerChainID: l1NetworkInfo.chainId, + retryableLifetimeSeconds: 7 * 24 * 60 * 60, + nitroGenesisBlock: 0, + nitroGenesisL1Block: 0, + depositTimeout: 900000, + tokenBridge: { + l1CustomGateway: '', + l1ERC20Gateway: '', + l1GatewayRouter: '', + l1MultiCall: '', + l1ProxyAdmin: '', + l1Weth: '', + l1WethGateway: '', + l2CustomGateway: '', + l2ERC20Gateway: '', + l2GatewayRouter: '', + l2Multicall: '', + l2ProxyAdmin: '', + l2Weth: '', + l2WethGateway: '', + }, + } + + // register - needed for retryables + addCustomNetwork({ + customL1Network: l1Network, + customL2Network: l2Network, + }) + + return { + l1Network, + l2Network, + } +} From ef6845dfa44b345dd223e447e4c32538133953af Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Mon, 29 Jul 2024 15:26:34 +0200 Subject: [PATCH 08/32] Add env examples --- .../{env.example => env.example.deployment} | 0 scripts/usdc-bridge-deployment/env.example.registration | 6 ++++++ 2 files changed, 6 insertions(+) rename scripts/usdc-bridge-deployment/{env.example => env.example.deployment} (100%) create mode 100644 scripts/usdc-bridge-deployment/env.example.registration diff --git a/scripts/usdc-bridge-deployment/env.example b/scripts/usdc-bridge-deployment/env.example.deployment similarity index 100% rename from scripts/usdc-bridge-deployment/env.example rename to scripts/usdc-bridge-deployment/env.example.deployment diff --git a/scripts/usdc-bridge-deployment/env.example.registration b/scripts/usdc-bridge-deployment/env.example.registration new file mode 100644 index 0000000000..3b07fe0736 --- /dev/null +++ b/scripts/usdc-bridge-deployment/env.example.registration @@ -0,0 +1,6 @@ +PARENT_RPC= +ROLLUP_OWNER_KEY= +CHILD_RPC= +L1_ROUTER= +L1_USDC= +L1_USDC_GATEWAY= \ No newline at end of file From 184d2087ffc31b7fe090ca652c1bc49e4c6a307e Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Mon, 29 Jul 2024 16:06:48 +0200 Subject: [PATCH 09/32] Do registration in the same script --- .../deployUsdcBridge.ts | 185 +++++++++++++++++- 1 file changed, 181 insertions(+), 4 deletions(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index f85d996cde..146cb779bc 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -1,9 +1,10 @@ -import { Wallet } from 'ethers' +import { BigNumber, ContractTransaction, Wallet } from 'ethers' import { ethers } from 'hardhat' import { IERC20__factory, IFiatToken__factory, IFiatTokenProxy__factory, + L1GatewayRouter__factory, L1USDCGateway, L1USDCGateway__factory, L2USDCGateway, @@ -11,8 +12,9 @@ import { ProxyAdmin, ProxyAdmin__factory, TransparentUpgradeableProxy__factory, + UpgradeExecutor__factory, } from '../../build/types' -import { JsonRpcProvider } from '@ethersproject/providers' +import { JsonRpcProvider, Provider } from '@ethersproject/providers' import dotenv from 'dotenv' import { abi as SigCheckerAbi, @@ -26,13 +28,21 @@ import { abi as UsdcProxyAbi, bytecode as UsdcProxyBytecode, } from '@offchainlabs/stablecoin-evm/artifacts/hardhat/contracts/v1/FiatTokenProxy.sol/FiatTokenProxy.json' +import { + addCustomNetwork, + L1Network, + L1ToL2MessageStatus, + L1TransactionReceipt, + L2Network, +} from '@arbitrum/sdk' +import { RollupAdminLogic__factory } from '@arbitrum/sdk/dist/lib/abi/factories/RollupAdminLogic__factory' dotenv.config() main().then(() => console.log('Done.')) async function main() { - const { deployerL1, deployerL2 } = await _loadWallets() + const { deployerL1, deployerL2, rollupOwner } = await _loadWallets() const proxyAdminL1 = await _deployProxyAdmin(deployerL1) console.log('L1 ProxyAdmin address: ', proxyAdminL1.address) @@ -71,11 +81,15 @@ async function main() { deployerL2 ) console.log('Usdc gateways initialized') + + await _registerGateway(rollupOwner, deployerL2.provider!) + console.log('Usdc gateway registered') } async function _loadWallets(): Promise<{ deployerL1: Wallet deployerL2: Wallet + rollupOwner: Wallet }> { const parentRpc = process.env['PARENT_RPC'] as string const parentDeployerKey = process.env['PARENT_DEPLOYER_KEY'] as string @@ -92,7 +106,13 @@ async function _loadWallets(): Promise<{ const childProvider = new JsonRpcProvider(childRpc) const deployerL2 = new ethers.Wallet(childDeployerKey, childProvider) - return { deployerL1, deployerL2 } + const rollupOwnerKey = process.env['ROLLUP_OWNER_KEY'] as string + const rollupOwner = new ethers.Wallet(rollupOwnerKey, parentProvider) + + const rollup = process.env['ROLLUP'] as string + await _registerNetworks(parentProvider, childProvider, rollup) + + return { deployerL1, deployerL2, rollupOwner } } async function _deployProxyAdmin(deployer: Wallet): Promise { @@ -261,3 +281,160 @@ async function _initializeGateways( ///// init logic } + +async function _registerGateway(rollupOwner: Wallet, childProvider: Provider) { + const l1RouterAddress = process.env['L1_ROUTER'] as string + const l1Router = L1GatewayRouter__factory.connect( + l1RouterAddress, + rollupOwner + ) + + /// load upgrade executor + const routerOwnerAddress = await l1Router.owner() + if (!(await _isUpgradeExecutor(routerOwnerAddress, rollupOwner))) { + throw new Error('Router owner is expected to be an UpgradeExecutor') + } + const upgradeExecutor = UpgradeExecutor__factory.connect( + routerOwnerAddress, + rollupOwner + ) + + /// prepare calldata for executor + const l1UsdcAddress = process.env['L1_USDC'] as string + const l1UsdcGatewayAddress = process.env['L1_USDC_GATEWAY'] as string + + const maxGas = BigNumber.from(500000) + const gasPriceBid = BigNumber.from(200000000) + let maxSubmissionCost = BigNumber.from(257600000000) + const registrationCalldata = l1Router.interface.encodeFunctionData( + 'setGateways', + [ + [l1UsdcAddress], + [l1UsdcGatewayAddress], + maxGas, + gasPriceBid, + maxSubmissionCost, + ] + ) + + /// execute the registration + const gwRegistrationTx = await upgradeExecutor.executeCall( + l1Router.address, + registrationCalldata, + { + value: maxGas.mul(gasPriceBid).add(maxSubmissionCost), + } + ) + await _waitOnL2Msg(gwRegistrationTx, childProvider) +} + +/** + * Check if owner is UpgardeExecutor by polling ADMIN_ROLE() and EXECUTOR_ROLE() + * @param routerOwnerAddress + * @param rollupOwner + * @returns + */ +async function _isUpgradeExecutor( + routerOwnerAddress: string, + rollupOwner: Wallet +): Promise { + const upgExecutor = UpgradeExecutor__factory.connect( + routerOwnerAddress, + rollupOwner + ) + try { + await upgExecutor.ADMIN_ROLE() + await upgExecutor.EXECUTOR_ROLE() + } catch { + return false + } + + return true +} + +async function _waitOnL2Msg(tx: ContractTransaction, childProvider: Provider) { + const retryableReceipt = await tx.wait() + const l1TxReceipt = new L1TransactionReceipt(retryableReceipt) + const messages = await l1TxReceipt.getL1ToL2Messages(childProvider) + + // 1 msg expected + const messageResult = await messages[0].waitForStatus() + const status = messageResult.status + + if (status != L1ToL2MessageStatus.REDEEMED) { + throw new Error('L1->L2 message not redeemed') + } +} + +async function _registerNetworks( + l1Provider: Provider, + l2Provider: Provider, + rollupAddress: string +): Promise<{ + l1Network: L1Network + l2Network: Omit +}> { + const l1NetworkInfo = await l1Provider.getNetwork() + const l2NetworkInfo = await l2Provider.getNetwork() + + const l1Network: L1Network = { + blockTime: 10, + chainID: l1NetworkInfo.chainId, + explorerUrl: '', + isCustom: true, + name: l1NetworkInfo.name, + partnerChainIDs: [l2NetworkInfo.chainId], + isArbitrum: false, + } + + const rollup = RollupAdminLogic__factory.connect(rollupAddress, l1Provider) + const l2Network: L2Network = { + blockTime: 10, + partnerChainIDs: [], + chainID: l2NetworkInfo.chainId, + confirmPeriodBlocks: (await rollup.confirmPeriodBlocks()).toNumber(), + ethBridge: { + bridge: await rollup.bridge(), + inbox: await rollup.inbox(), + outbox: await rollup.outbox(), + rollup: rollup.address, + sequencerInbox: await rollup.sequencerInbox(), + }, + explorerUrl: '', + isArbitrum: true, + isCustom: true, + name: 'OrbitChain', + partnerChainID: l1NetworkInfo.chainId, + retryableLifetimeSeconds: 7 * 24 * 60 * 60, + nitroGenesisBlock: 0, + nitroGenesisL1Block: 0, + depositTimeout: 900000, + tokenBridge: { + l1CustomGateway: '', + l1ERC20Gateway: '', + l1GatewayRouter: '', + l1MultiCall: '', + l1ProxyAdmin: '', + l1Weth: '', + l1WethGateway: '', + l2CustomGateway: '', + l2ERC20Gateway: '', + l2GatewayRouter: '', + l2Multicall: '', + l2ProxyAdmin: '', + l2Weth: '', + l2WethGateway: '', + }, + } + + // register - needed for retryables + addCustomNetwork({ + customL1Network: l1Network, + customL2Network: l2Network, + }) + + return { + l1Network, + l2Network, + } +} From f185268fcf4fe969aa0d87f3bcca223d834bb3f6 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Mon, 29 Jul 2024 16:08:01 +0200 Subject: [PATCH 10/32] Remove separate script for registration --- .../{env.example.deployment => env.example} | 0 .../env.example.registration | 6 - .../registerUsdcGateway.ts | 206 ------------------ 3 files changed, 212 deletions(-) rename scripts/usdc-bridge-deployment/{env.example.deployment => env.example} (100%) delete mode 100644 scripts/usdc-bridge-deployment/env.example.registration delete mode 100644 scripts/usdc-bridge-deployment/registerUsdcGateway.ts diff --git a/scripts/usdc-bridge-deployment/env.example.deployment b/scripts/usdc-bridge-deployment/env.example similarity index 100% rename from scripts/usdc-bridge-deployment/env.example.deployment rename to scripts/usdc-bridge-deployment/env.example diff --git a/scripts/usdc-bridge-deployment/env.example.registration b/scripts/usdc-bridge-deployment/env.example.registration deleted file mode 100644 index 3b07fe0736..0000000000 --- a/scripts/usdc-bridge-deployment/env.example.registration +++ /dev/null @@ -1,6 +0,0 @@ -PARENT_RPC= -ROLLUP_OWNER_KEY= -CHILD_RPC= -L1_ROUTER= -L1_USDC= -L1_USDC_GATEWAY= \ No newline at end of file diff --git a/scripts/usdc-bridge-deployment/registerUsdcGateway.ts b/scripts/usdc-bridge-deployment/registerUsdcGateway.ts deleted file mode 100644 index f3c3c5d0cf..0000000000 --- a/scripts/usdc-bridge-deployment/registerUsdcGateway.ts +++ /dev/null @@ -1,206 +0,0 @@ -import dotenv from 'dotenv' -import { BigNumber, ContractTransaction, Wallet } from 'ethers' -import { ethers } from 'hardhat' -import { JsonRpcProvider, Provider } from '@ethersproject/providers' -import { - L1GatewayRouter__factory, - UpgradeExecutor__factory, -} from '../../build/types' -import { - addCustomNetwork, - L1Network, - L1ToL2MessageStatus, - L1TransactionReceipt, - L2Network, -} from '@arbitrum/sdk' -import { RollupAdminLogic__factory } from '@arbitrum/sdk/dist/lib/abi/factories/RollupAdminLogic__factory' - -dotenv.config() - -main().then(() => console.log('Done.')) - -async function main() { - const { rollupOwner, childProvider } = await _loadWallet() - - const rollup = process.env['ROLLUP'] as string - _registerNetworks(rollupOwner.provider!, childProvider, rollup) - - const l1RouterAddress = process.env['L1_ROUTER'] as string - const l1Router = L1GatewayRouter__factory.connect( - l1RouterAddress, - rollupOwner - ) - - /// load upgrade executor - const routerOwnerAddress = await l1Router.owner() - if (!(await _isUpgradeExecutor(routerOwnerAddress, rollupOwner))) { - throw new Error('Router owner is expected to be an UpgradeExecutor') - } - const upgradeExecutor = UpgradeExecutor__factory.connect( - routerOwnerAddress, - rollupOwner - ) - - /// prepare calldata for executor - const l1UsdcAddress = process.env['L1_USDC'] as string - const l1UsdcGatewayAddress = process.env['L1_USDC_GATEWAY'] as string - - const maxGas = BigNumber.from(500000) - const gasPriceBid = BigNumber.from(200000000) - let maxSubmissionCost = BigNumber.from(257600000000) - const registrationCalldata = l1Router.interface.encodeFunctionData( - 'setGateways', - [ - [l1UsdcAddress], - [l1UsdcGatewayAddress], - maxGas, - gasPriceBid, - maxSubmissionCost, - ] - ) - - /// execute the registration - const gwRegistrationTx = await upgradeExecutor.executeCall( - l1Router.address, - registrationCalldata, - { - value: maxGas.mul(gasPriceBid).add(maxSubmissionCost), - } - ) - await waitOnL2Msg(gwRegistrationTx, childProvider) - console.log('USDC custom gateway registered') -} - -async function _loadWallet(): Promise<{ - rollupOwner: Wallet - childProvider: JsonRpcProvider -}> { - const parentRpc = process.env['PARENT_RPC'] as string - const parentRollupOwnerKey = process.env['ROLLUP_OWNER_KEY'] as string - const childRpc = process.env['CHILD_RPC'] as string - - if (!parentRpc || !parentRollupOwnerKey || !childRpc) { - throw new Error('Missing env vars') - } - - const parentProvider = new JsonRpcProvider(parentRpc) - const rollupOwner = new ethers.Wallet(parentRollupOwnerKey, parentProvider) - const childProvider = new JsonRpcProvider(childRpc) - - return { rollupOwner, childProvider } -} - -/** - * Check if owner is UpgardeExecutor by polling ADMIN_ROLE() and EXECUTOR_ROLE() - * @param routerOwnerAddress - * @param rollupOwner - * @returns - */ -async function _isUpgradeExecutor( - routerOwnerAddress: string, - rollupOwner: Wallet -): Promise { - // check if address implements ADMIN_ROLE() and EXECUTOR_ROLE() - const upgExecutor = UpgradeExecutor__factory.connect( - routerOwnerAddress, - rollupOwner - ) - try { - await upgExecutor.ADMIN_ROLE() - await upgExecutor.EXECUTOR_ROLE() - } catch { - return false - } - - return true -} - -async function waitOnL2Msg( - tx: ContractTransaction, - childProvider: JsonRpcProvider -) { - const retryableReceipt = await tx.wait() - const l1TxReceipt = new L1TransactionReceipt(retryableReceipt) - const messages = await l1TxReceipt.getL1ToL2Messages(childProvider) - - // 1 msg expected - const messageResult = await messages[0].waitForStatus() - const status = messageResult.status - - if (status != L1ToL2MessageStatus.REDEEMED) { - throw new Error('L1->L2 message not redeemed') - } -} - -const _registerNetworks = async ( - l1Provider: Provider, - l2Provider: Provider, - rollupAddress: string -): Promise<{ - l1Network: L1Network - l2Network: Omit -}> => { - const l1NetworkInfo = await l1Provider.getNetwork() - const l2NetworkInfo = await l2Provider.getNetwork() - - const l1Network: L1Network = { - blockTime: 10, - chainID: l1NetworkInfo.chainId, - explorerUrl: '', - isCustom: true, - name: l1NetworkInfo.name, - partnerChainIDs: [l2NetworkInfo.chainId], - isArbitrum: false, - } - - const rollup = RollupAdminLogic__factory.connect(rollupAddress, l1Provider) - const l2Network: L2Network = { - blockTime: 10, - partnerChainIDs: [], - chainID: l2NetworkInfo.chainId, - confirmPeriodBlocks: (await rollup.confirmPeriodBlocks()).toNumber(), - ethBridge: { - bridge: await rollup.bridge(), - inbox: await rollup.inbox(), - outbox: await rollup.outbox(), - rollup: rollup.address, - sequencerInbox: await rollup.sequencerInbox(), - }, - explorerUrl: '', - isArbitrum: true, - isCustom: true, - name: 'OrbitChain', - partnerChainID: l1NetworkInfo.chainId, - retryableLifetimeSeconds: 7 * 24 * 60 * 60, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 900000, - tokenBridge: { - l1CustomGateway: '', - l1ERC20Gateway: '', - l1GatewayRouter: '', - l1MultiCall: '', - l1ProxyAdmin: '', - l1Weth: '', - l1WethGateway: '', - l2CustomGateway: '', - l2ERC20Gateway: '', - l2GatewayRouter: '', - l2Multicall: '', - l2ProxyAdmin: '', - l2Weth: '', - l2WethGateway: '', - }, - } - - // register - needed for retryables - addCustomNetwork({ - customL1Network: l1Network, - customL2Network: l2Network, - }) - - return { - l1Network, - l2Network, - } -} From e5c841b3175b7be73eb5c710952bf3163921c746 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Mon, 29 Jul 2024 16:28:20 +0200 Subject: [PATCH 11/32] Add env var check --- .../deployUsdcBridge.ts | 51 +++++++++++++++---- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index 146cb779bc..10c870eecc 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -42,6 +42,7 @@ dotenv.config() main().then(() => console.log('Done.')) async function main() { + _checkEnvVars() const { deployerL1, deployerL2, rollupOwner } = await _loadWallets() const proxyAdminL1 = await _deployProxyAdmin(deployerL1) @@ -82,7 +83,13 @@ async function main() { ) console.log('Usdc gateways initialized') - await _registerGateway(rollupOwner, deployerL2.provider!) + await _registerGateway( + rollupOwner, + deployerL2.provider!, + l1Router, + l1Usdc, + l1UsdcGateway.address + ) console.log('Usdc gateway registered') } @@ -96,9 +103,7 @@ async function _loadWallets(): Promise<{ const childRpc = process.env['CHILD_RPC'] as string const childDeployerKey = process.env['CHILD_DEPLOYER_KEY'] as string - if (!parentRpc || !parentDeployerKey || !childRpc || !childDeployerKey) { - throw new Error('Missing env vars') - } + const parentProvider = new JsonRpcProvider(parentRpc) const deployerL1 = new ethers.Wallet(parentDeployerKey, parentProvider) @@ -282,8 +287,13 @@ async function _initializeGateways( ///// init logic } -async function _registerGateway(rollupOwner: Wallet, childProvider: Provider) { - const l1RouterAddress = process.env['L1_ROUTER'] as string +async function _registerGateway( + rollupOwner: Wallet, + childProvider: Provider, + l1RouterAddress: string, + l1UsdcAddress: string, + l1UsdcGatewayAddress: string +) { const l1Router = L1GatewayRouter__factory.connect( l1RouterAddress, rollupOwner @@ -300,9 +310,6 @@ async function _registerGateway(rollupOwner: Wallet, childProvider: Provider) { ) /// prepare calldata for executor - const l1UsdcAddress = process.env['L1_USDC'] as string - const l1UsdcGatewayAddress = process.env['L1_USDC_GATEWAY'] as string - const maxGas = BigNumber.from(500000) const gasPriceBid = BigNumber.from(200000000) let maxSubmissionCost = BigNumber.from(257600000000) @@ -438,3 +445,29 @@ async function _registerNetworks( l2Network, } } + +/** + * Check if all required env vars are set + */ +function _checkEnvVars() { + const requiredEnvVars = [ + 'PARENT_RPC', + 'PARENT_DEPLOYER_KEY', + 'CHILD_RPC', + 'CHILD_DEPLOYER_KEY', + 'ROLLUP_OWNER_KEY', + 'ROLLUP', + 'L1_ROUTER', + 'L2_ROUTER', + 'INBOX', + 'L1_USDC', + 'ROLLUP_OWNER_KEY', + 'ROLLUP', + ] + + for (const envVar of requiredEnvVars) { + if (!process.env[envVar]) { + throw new Error(`Missing env var ${envVar}`) + } + } +} From 9ea831d84ed1c0a08bf5cfdb58a3b2864422f91d Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Mon, 29 Jul 2024 16:35:57 +0200 Subject: [PATCH 12/32] Get rollup address from inbox --- .../deployUsdcBridge.ts | 36 +++++++++++++------ 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index 10c870eecc..5e10312099 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -1,9 +1,11 @@ import { BigNumber, ContractTransaction, Wallet } from 'ethers' import { ethers } from 'hardhat' import { + IBridge__factory, IERC20__factory, IFiatToken__factory, IFiatTokenProxy__factory, + IInboxBase__factory, L1GatewayRouter__factory, L1USDCGateway, L1USDCGateway__factory, @@ -45,6 +47,9 @@ async function main() { _checkEnvVars() const { deployerL1, deployerL2, rollupOwner } = await _loadWallets() + const inbox = process.env['INBOX'] as string + await _registerNetworks(deployerL1.provider, deployerL2.provider, inbox) + const proxyAdminL1 = await _deployProxyAdmin(deployerL1) console.log('L1 ProxyAdmin address: ', proxyAdminL1.address) @@ -68,7 +73,6 @@ async function main() { const l1Router = process.env['L1_ROUTER'] as string const l2Router = process.env['L2_ROUTER'] as string - const inbox = process.env['INBOX'] as string const l1Usdc = process.env['L1_USDC'] as string await _initializeGateways( l1UsdcGateway, @@ -103,8 +107,6 @@ async function _loadWallets(): Promise<{ const childRpc = process.env['CHILD_RPC'] as string const childDeployerKey = process.env['CHILD_DEPLOYER_KEY'] as string - - const parentProvider = new JsonRpcProvider(parentRpc) const deployerL1 = new ethers.Wallet(parentDeployerKey, parentProvider) @@ -114,9 +116,6 @@ async function _loadWallets(): Promise<{ const rollupOwnerKey = process.env['ROLLUP_OWNER_KEY'] as string const rollupOwner = new ethers.Wallet(rollupOwnerKey, parentProvider) - const rollup = process.env['ROLLUP'] as string - await _registerNetworks(parentProvider, childProvider, rollup) - return { deployerL1, deployerL2, rollupOwner } } @@ -250,6 +249,9 @@ async function _deployChildChainUsdcGateway( return L2USDCGateway__factory.connect(tup.address, deployerL2) } +/** + * Initialize gateways + */ async function _initializeGateways( l1UsdcGateway: L1USDCGateway, l2UsdcGateway: L2USDCGateway, @@ -287,6 +289,9 @@ async function _initializeGateways( ///// init logic } +/** + * Set token to gateway mapping in the routers + */ async function _registerGateway( rollupOwner: Wallet, childProvider: Provider, @@ -337,9 +342,6 @@ async function _registerGateway( /** * Check if owner is UpgardeExecutor by polling ADMIN_ROLE() and EXECUTOR_ROLE() - * @param routerOwnerAddress - * @param rollupOwner - * @returns */ async function _isUpgradeExecutor( routerOwnerAddress: string, @@ -359,6 +361,9 @@ async function _isUpgradeExecutor( return true } +/** + * Wait for L1->L2 message to be redeemed + */ async function _waitOnL2Msg(tx: ContractTransaction, childProvider: Provider) { const retryableReceipt = await tx.wait() const l1TxReceipt = new L1TransactionReceipt(retryableReceipt) @@ -373,10 +378,17 @@ async function _waitOnL2Msg(tx: ContractTransaction, childProvider: Provider) { } } +/** + * Register L1 and L2 networks in the SDK + * @param l1Provider + * @param l2Provider + * @param inboxAddress + * @returns + */ async function _registerNetworks( l1Provider: Provider, l2Provider: Provider, - rollupAddress: string + inboxAddress: string ): Promise<{ l1Network: L1Network l2Network: Omit @@ -394,6 +406,10 @@ async function _registerNetworks( isArbitrum: false, } + const rollupAddress = await IBridge__factory.connect( + await IInboxBase__factory.connect(inboxAddress, l1Provider).bridge(), + l1Provider + ).rollup() const rollup = RollupAdminLogic__factory.connect(rollupAddress, l1Provider) const l2Network: L2Network = { blockTime: 10, From 0f4d6419321b5dd328113568f99d491a5ee09374 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Mon, 29 Jul 2024 17:08:29 +0200 Subject: [PATCH 13/32] Init logic to dummy values --- .../deployUsdcBridge.ts | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index 5e10312099..ba30fa5f3d 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -46,9 +46,11 @@ main().then(() => console.log('Done.')) async function main() { _checkEnvVars() const { deployerL1, deployerL2, rollupOwner } = await _loadWallets() + console.log('Loaded deployer wallets') const inbox = process.env['INBOX'] as string await _registerNetworks(deployerL1.provider, deployerL2.provider, inbox) + console.log('SDK registration prepared') const proxyAdminL1 = await _deployProxyAdmin(deployerL1) console.log('L1 ProxyAdmin address: ', proxyAdminL1.address) @@ -136,11 +138,14 @@ async function _deployBridgedUsdc( proxyAdminL2.address ) + /// init usdc proxy const l2UsdcFiatToken = IFiatToken__factory.connect( l2UsdcProxyAddress, deployerL2Wallet ) const masterMinterL2 = deployerL2Wallet + const pauserL2 = deployerL2Wallet + const blacklisterL2 = deployerL2Wallet await ( await l2UsdcFiatToken.initialize( 'USDC token', @@ -148,8 +153,8 @@ async function _deployBridgedUsdc( 'USD', 6, masterMinterL2.address, - ethers.Wallet.createRandom().address, - ethers.Wallet.createRandom().address, + pauserL2.address, + blacklisterL2.address, deployerL2Wallet.address ) ).wait() @@ -158,11 +163,24 @@ async function _deployBridgedUsdc( await l2UsdcFiatToken.initializeV2_1(ethers.Wallet.createRandom().address) ).wait() await (await l2UsdcFiatToken.initializeV2_2([], 'USDC.e')).wait() + + /// init usdc logic to dummy values + const l2UsdcLogicInit = IFiatToken__factory.connect( + l2UsdcLogic.address, + deployerL2Wallet + ) + const DEAD = '0x000000000000000000000000000000000000dead' + await ( + await l2UsdcLogicInit.initialize('', '', '', 0, DEAD, DEAD, DEAD, DEAD) + ).wait() + await (await l2UsdcLogicInit.initializeV2('')).wait() + await (await l2UsdcLogicInit.initializeV2_1(DEAD)).wait() + await (await l2UsdcLogicInit.initializeV2_2([], '')).wait() + const l2Usdc = IERC20__factory.connect( l2UsdcFiatToken.address, deployerL2Wallet ) - return l2Usdc.address } From ce7865193ba86f7f9c17d7cd62031fe4a4261108 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Mon, 29 Jul 2024 17:24:10 +0200 Subject: [PATCH 14/32] Use SDK estimations instead of hard-coding retryable params --- .../deployUsdcBridge.ts | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index ba30fa5f3d..0e4d812339 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -9,6 +9,7 @@ import { L1GatewayRouter__factory, L1USDCGateway, L1USDCGateway__factory, + L2GatewayRouter__factory, L2USDCGateway, L2USDCGateway__factory, ProxyAdmin, @@ -33,11 +34,13 @@ import { import { addCustomNetwork, L1Network, + L1ToL2MessageGasEstimator, L1ToL2MessageStatus, L1TransactionReceipt, L2Network, } from '@arbitrum/sdk' import { RollupAdminLogic__factory } from '@arbitrum/sdk/dist/lib/abi/factories/RollupAdminLogic__factory' +import { getBaseFee } from '@arbitrum/sdk/dist/lib/utils/lib' dotenv.config() @@ -45,6 +48,7 @@ main().then(() => console.log('Done.')) async function main() { _checkEnvVars() + const { deployerL1, deployerL2, rollupOwner } = await _loadWallets() console.log('Loaded deployer wallets') @@ -93,6 +97,7 @@ async function main() { rollupOwner, deployerL2.provider!, l1Router, + l2Router, l1Usdc, l1UsdcGateway.address ) @@ -314,6 +319,7 @@ async function _registerGateway( rollupOwner: Wallet, childProvider: Provider, l1RouterAddress: string, + l2RouterAddress: string, l1UsdcAddress: string, l1UsdcGatewayAddress: string ) { @@ -333,9 +339,29 @@ async function _registerGateway( ) /// prepare calldata for executor - const maxGas = BigNumber.from(500000) - const gasPriceBid = BigNumber.from(200000000) - let maxSubmissionCost = BigNumber.from(257600000000) + const routerRegistrationData = + L2GatewayRouter__factory.createInterface().encodeFunctionData( + 'setGateway', + [[l1UsdcAddress], [l1UsdcGatewayAddress]] + ) + + const l1ToL2MessageGasEstimate = new L1ToL2MessageGasEstimator(childProvider) + const retryableParams = await l1ToL2MessageGasEstimate.estimateAll( + { + from: l1RouterAddress, + to: l2RouterAddress, + l2CallValue: BigNumber.from(0), + excessFeeRefundAddress: rollupOwner.address, + callValueRefundAddress: rollupOwner.address, + data: routerRegistrationData, + }, + await getBaseFee(rollupOwner.provider), + rollupOwner.provider + ) + + const maxGas = retryableParams.gasLimit + const gasPriceBid = retryableParams.maxFeePerGas.mul(3) + let maxSubmissionCost = retryableParams.maxSubmissionCost const registrationCalldata = l1Router.interface.encodeFunctionData( 'setGateways', [ From 3b147cae436cd3173926d428ccd0f430ae56c335 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Tue, 30 Jul 2024 10:55:54 +0200 Subject: [PATCH 15/32] If owner is multisig print TX data to a file --- .gitignore | 5 +- .../deployUsdcBridge.ts | 86 ++++++++++++------- scripts/usdc-bridge-deployment/env.example | 7 +- 3 files changed, 67 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index 6b590d4029..359ea6a55c 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,7 @@ network.json # Gambit (mutation test) files gambit_out/ -test-mutation/mutant_test_env/ \ No newline at end of file +test-mutation/mutant_test_env/ + +# bridged usdc deployment script +registerUsdcGatewayTx.json \ No newline at end of file diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index 0e4d812339..f779c5b065 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -41,15 +41,18 @@ import { } from '@arbitrum/sdk' import { RollupAdminLogic__factory } from '@arbitrum/sdk/dist/lib/abi/factories/RollupAdminLogic__factory' import { getBaseFee } from '@arbitrum/sdk/dist/lib/utils/lib' +import fs from 'fs' dotenv.config() +const REGISTRATION_TX_FILE = 'registerUsdcGatewayTx.json' + main().then(() => console.log('Done.')) async function main() { _checkEnvVars() - const { deployerL1, deployerL2, rollupOwner } = await _loadWallets() + const { deployerL1, deployerL2 } = await _loadWallets() console.log('Loaded deployer wallets') const inbox = process.env['INBOX'] as string @@ -93,21 +96,29 @@ async function main() { ) console.log('Usdc gateways initialized') + const ownerIsMultisig = process.env['OWNER_IS_MULTISIG'] === 'true' await _registerGateway( - rollupOwner, - deployerL2.provider!, + deployerL1.provider, + deployerL2.provider, l1Router, l2Router, l1Usdc, - l1UsdcGateway.address + l1UsdcGateway.address, + ownerIsMultisig ) - console.log('Usdc gateway registered') + if (ownerIsMultisig) { + console.log( + 'Multisig transaction prepared and stored in', + REGISTRATION_TX_FILE + ) + } else { + console.log('Usdc gateway registered') + } } async function _loadWallets(): Promise<{ deployerL1: Wallet deployerL2: Wallet - rollupOwner: Wallet }> { const parentRpc = process.env['PARENT_RPC'] as string const parentDeployerKey = process.env['PARENT_DEPLOYER_KEY'] as string @@ -120,10 +131,7 @@ async function _loadWallets(): Promise<{ const childProvider = new JsonRpcProvider(childRpc) const deployerL2 = new ethers.Wallet(childDeployerKey, childProvider) - const rollupOwnerKey = process.env['ROLLUP_OWNER_KEY'] as string - const rollupOwner = new ethers.Wallet(rollupOwnerKey, parentProvider) - - return { deployerL1, deployerL2, rollupOwner } + return { deployerL1, deployerL2 } } async function _deployProxyAdmin(deployer: Wallet): Promise { @@ -316,26 +324,27 @@ async function _initializeGateways( * Set token to gateway mapping in the routers */ async function _registerGateway( - rollupOwner: Wallet, + parentProvider: Provider, childProvider: Provider, l1RouterAddress: string, l2RouterAddress: string, l1UsdcAddress: string, - l1UsdcGatewayAddress: string + l1UsdcGatewayAddress: string, + ownerIsMultisig: boolean ) { const l1Router = L1GatewayRouter__factory.connect( l1RouterAddress, - rollupOwner + parentProvider ) /// load upgrade executor const routerOwnerAddress = await l1Router.owner() - if (!(await _isUpgradeExecutor(routerOwnerAddress, rollupOwner))) { + if (!(await _isUpgradeExecutor(routerOwnerAddress, parentProvider))) { throw new Error('Router owner is expected to be an UpgradeExecutor') } const upgradeExecutor = UpgradeExecutor__factory.connect( routerOwnerAddress, - rollupOwner + parentProvider ) /// prepare calldata for executor @@ -351,12 +360,12 @@ async function _registerGateway( from: l1RouterAddress, to: l2RouterAddress, l2CallValue: BigNumber.from(0), - excessFeeRefundAddress: rollupOwner.address, - callValueRefundAddress: rollupOwner.address, + excessFeeRefundAddress: upgradeExecutor.address, + callValueRefundAddress: upgradeExecutor.address, data: routerRegistrationData, }, - await getBaseFee(rollupOwner.provider), - rollupOwner.provider + await getBaseFee(parentProvider), + parentProvider ) const maxGas = retryableParams.gasLimit @@ -373,15 +382,34 @@ async function _registerGateway( ] ) - /// execute the registration - const gwRegistrationTx = await upgradeExecutor.executeCall( - l1Router.address, - registrationCalldata, - { - value: maxGas.mul(gasPriceBid).add(maxSubmissionCost), + if (ownerIsMultisig) { + // prepare multisig transaction + const upgExecutorData = upgradeExecutor.interface.encodeFunctionData( + 'executeCall', + [l1Router.address, registrationCalldata] + ) + const value = maxGas.mul(gasPriceBid).add(maxSubmissionCost) + const to = upgradeExecutor.address + + // store the multisig transaction to file + const multisigTx = { + to, + value: value.toString(), + data: upgExecutorData, } - ) - await _waitOnL2Msg(gwRegistrationTx, childProvider) + fs.writeFileSync(REGISTRATION_TX_FILE, JSON.stringify(multisigTx)) + } else { + // execute the registration + const rollupOwnerKey = process.env['ROLLUP_OWNER_KEY'] as string + const rollupOwner = new ethers.Wallet(rollupOwnerKey, parentProvider) + + const gwRegistrationTx = await upgradeExecutor + .connect(rollupOwner) + .executeCall(l1Router.address, registrationCalldata, { + value: maxGas.mul(gasPriceBid).add(maxSubmissionCost), + }) + await _waitOnL2Msg(gwRegistrationTx, childProvider) + } } /** @@ -389,11 +417,11 @@ async function _registerGateway( */ async function _isUpgradeExecutor( routerOwnerAddress: string, - rollupOwner: Wallet + provider: Provider ): Promise { const upgExecutor = UpgradeExecutor__factory.connect( routerOwnerAddress, - rollupOwner + provider ) try { await upgExecutor.ADMIN_ROLE() diff --git a/scripts/usdc-bridge-deployment/env.example b/scripts/usdc-bridge-deployment/env.example index 06e0a8407b..063ffa8ebf 100644 --- a/scripts/usdc-bridge-deployment/env.example +++ b/scripts/usdc-bridge-deployment/env.example @@ -5,4 +5,9 @@ CHILD_DEPLOYER_KEY= L1_ROUTER= L2_ROUTER= INBOX= -L1_USDC= \ No newline at end of file +L1_USDC= +ROLLUP= +## if OWNER_IS_MULTISIG == true, then script will prepare multisig TX and store it in file +OWNER_IS_MULTISIG= +## if OWNER_IS_MULTISIG is not true, then script will use this key to perform registration +ROLLUP_OWNER_KEY= \ No newline at end of file From d9e6bb29b03d3cd8aa8b197a01916f189830f990 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Tue, 30 Jul 2024 15:36:36 +0200 Subject: [PATCH 16/32] Make gw registration work for fee token chains --- .../deployUsdcBridge.ts | 114 ++++++++++++++---- scripts/usdc-bridge-deployment/env.example | 1 - 2 files changed, 90 insertions(+), 25 deletions(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index f779c5b065..2f9c7baf25 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -3,10 +3,12 @@ import { ethers } from 'hardhat' import { IBridge__factory, IERC20__factory, + IERC20Bridge__factory, IFiatToken__factory, IFiatTokenProxy__factory, IInboxBase__factory, L1GatewayRouter__factory, + L1OrbitGatewayRouter__factory, L1USDCGateway, L1USDCGateway__factory, L2GatewayRouter__factory, @@ -50,6 +52,8 @@ const REGISTRATION_TX_FILE = 'registerUsdcGatewayTx.json' main().then(() => console.log('Done.')) async function main() { + console.log('Starting USDC bridge deployment') + _checkEnvVars() const { deployerL1, deployerL2 } = await _loadWallets() @@ -100,6 +104,7 @@ async function main() { await _registerGateway( deployerL1.provider, deployerL2.provider, + inbox, l1Router, l2Router, l1Usdc, @@ -108,7 +113,7 @@ async function main() { ) if (ownerIsMultisig) { console.log( - 'Multisig transaction prepared and stored in', + 'Multisig transaction to register USDC gateway prepared and stored in', REGISTRATION_TX_FILE ) } else { @@ -326,16 +331,19 @@ async function _initializeGateways( async function _registerGateway( parentProvider: Provider, childProvider: Provider, + inbox: string, l1RouterAddress: string, l2RouterAddress: string, l1UsdcAddress: string, l1UsdcGatewayAddress: string, ownerIsMultisig: boolean ) { - const l1Router = L1GatewayRouter__factory.connect( - l1RouterAddress, - parentProvider - ) + const isFeeToken = + (await _getFeeToken(inbox, parentProvider)) != ethers.constants.AddressZero + + const l1Router = isFeeToken + ? L1OrbitGatewayRouter__factory.connect(l1RouterAddress, parentProvider) + : L1GatewayRouter__factory.connect(l1RouterAddress, parentProvider) /// load upgrade executor const routerOwnerAddress = await l1Router.owner() @@ -360,8 +368,8 @@ async function _registerGateway( from: l1RouterAddress, to: l2RouterAddress, l2CallValue: BigNumber.from(0), - excessFeeRefundAddress: upgradeExecutor.address, - callValueRefundAddress: upgradeExecutor.address, + excessFeeRefundAddress: ethers.Wallet.createRandom().address, + callValueRefundAddress: ethers.Wallet.createRandom().address, data: routerRegistrationData, }, await getBaseFee(parentProvider), @@ -371,16 +379,30 @@ async function _registerGateway( const maxGas = retryableParams.gasLimit const gasPriceBid = retryableParams.maxFeePerGas.mul(3) let maxSubmissionCost = retryableParams.maxSubmissionCost - const registrationCalldata = l1Router.interface.encodeFunctionData( - 'setGateways', - [ - [l1UsdcAddress], - [l1UsdcGatewayAddress], - maxGas, - gasPriceBid, - maxSubmissionCost, - ] - ) + const totalFee = maxGas.mul(gasPriceBid).add(maxSubmissionCost) + + const registrationCalldata = isFeeToken + ? L1OrbitGatewayRouter__factory.createInterface().encodeFunctionData( + 'setGateways(address[],address[],uint256,uint256,uint256,uint256)', + [ + [l1UsdcAddress], + [l1UsdcGatewayAddress], + maxGas, + gasPriceBid, + maxSubmissionCost, + totalFee, + ] + ) + : L1GatewayRouter__factory.createInterface().encodeFunctionData( + 'setGateways(address[],address[],uint256,uint256,uint256)', + [ + [l1UsdcAddress], + [l1UsdcGatewayAddress], + maxGas, + gasPriceBid, + maxSubmissionCost, + ] + ) if (ownerIsMultisig) { // prepare multisig transaction @@ -388,25 +410,49 @@ async function _registerGateway( 'executeCall', [l1Router.address, registrationCalldata] ) - const value = maxGas.mul(gasPriceBid).add(maxSubmissionCost) const to = upgradeExecutor.address // store the multisig transaction to file const multisigTx = { to, - value: value.toString(), + value: isFeeToken ? BigNumber.from(0).toString() : totalFee.toString(), data: upgExecutorData, } fs.writeFileSync(REGISTRATION_TX_FILE, JSON.stringify(multisigTx)) } else { - // execute the registration + // load rollup owner (account with executor rights on the upgrade executor) const rollupOwnerKey = process.env['ROLLUP_OWNER_KEY'] as string const rollupOwner = new ethers.Wallet(rollupOwnerKey, parentProvider) + if (isFeeToken) { + // transfer the fee amount to upgrade executor + const feeToken = await _getFeeToken(inbox, parentProvider) + const feeTokenContract = IERC20__factory.connect(feeToken, rollupOwner) + await ( + await feeTokenContract + .connect(rollupOwner) + .transfer(upgradeExecutor.address, totalFee) + ).wait() + + // approve router to spend the fee token + await ( + await upgradeExecutor + .connect(rollupOwner) + .executeCall( + feeToken, + feeTokenContract.interface.encodeFunctionData('approve', [ + l1RouterAddress, + totalFee, + ]) + ) + ).wait() + } + + // execute the registration const gwRegistrationTx = await upgradeExecutor .connect(rollupOwner) .executeCall(l1Router.address, registrationCalldata, { - value: maxGas.mul(gasPriceBid).add(maxSubmissionCost), + value: isFeeToken ? BigNumber.from(0) : totalFee, }) await _waitOnL2Msg(gwRegistrationTx, childProvider) } @@ -534,6 +580,29 @@ async function _registerNetworks( } } +/** + * Fetch fee token if it exists or return zero address + */ +async function _getFeeToken( + inbox: string, + provider: Provider +): Promise { + const bridge = await IInboxBase__factory.connect(inbox, provider).bridge() + + let feeToken = ethers.constants.AddressZero + + try { + feeToken = await IERC20Bridge__factory.connect( + bridge, + provider + ).nativeToken() + } catch { + // ignore + } + + return feeToken +} + /** * Check if all required env vars are set */ @@ -543,14 +612,11 @@ function _checkEnvVars() { 'PARENT_DEPLOYER_KEY', 'CHILD_RPC', 'CHILD_DEPLOYER_KEY', - 'ROLLUP_OWNER_KEY', - 'ROLLUP', 'L1_ROUTER', 'L2_ROUTER', 'INBOX', 'L1_USDC', 'ROLLUP_OWNER_KEY', - 'ROLLUP', ] for (const envVar of requiredEnvVars) { diff --git a/scripts/usdc-bridge-deployment/env.example b/scripts/usdc-bridge-deployment/env.example index 063ffa8ebf..5240f13130 100644 --- a/scripts/usdc-bridge-deployment/env.example +++ b/scripts/usdc-bridge-deployment/env.example @@ -6,7 +6,6 @@ L1_ROUTER= L2_ROUTER= INBOX= L1_USDC= -ROLLUP= ## if OWNER_IS_MULTISIG == true, then script will prepare multisig TX and store it in file OWNER_IS_MULTISIG= ## if OWNER_IS_MULTISIG is not true, then script will use this key to perform registration From baf7487f3c86f1e3e3d7e3deac9bb409937e95fb Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Wed, 31 Jul 2024 09:27:10 +0200 Subject: [PATCH 17/32] Deploy orbit gateway when fee token used --- .../deployUsdcBridge.ts | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index 2f9c7baf25..c59ae6d68e 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -9,6 +9,8 @@ import { IInboxBase__factory, L1GatewayRouter__factory, L1OrbitGatewayRouter__factory, + L1OrbitUSDCGateway, + L1OrbitUSDCGateway__factory, L1USDCGateway, L1USDCGateway__factory, L2GatewayRouter__factory, @@ -61,28 +63,32 @@ async function main() { const inbox = process.env['INBOX'] as string await _registerNetworks(deployerL1.provider, deployerL2.provider, inbox) - console.log('SDK registration prepared') + console.log('Networks registered in SDK') const proxyAdminL1 = await _deployProxyAdmin(deployerL1) - console.log('L1 ProxyAdmin address: ', proxyAdminL1.address) + console.log('L1 ProxyAdmin deployed: ', proxyAdminL1.address) const proxyAdminL2 = await _deployProxyAdmin(deployerL2) - console.log('L2 ProxyAdmin address: ', proxyAdminL2.address) + console.log('L2 ProxyAdmin deployed: ', proxyAdminL2.address) const bridgedUsdc = await _deployBridgedUsdc(deployerL2, proxyAdminL2) - console.log('Bridged USDC address: ', bridgedUsdc) + console.log('Bridged (L2) USDC deployed: ', bridgedUsdc) + const isFeeToken = + (await _getFeeToken(inbox, deployerL1.provider)) != + ethers.constants.AddressZero const l1UsdcGateway = await _deployParentChainUsdcGateway( deployerL1, - proxyAdminL1 + proxyAdminL1, + isFeeToken ) - console.log('L1 USDC gateway address: ', l1UsdcGateway.address) + console.log('L1 USDC gateway deployed: ', l1UsdcGateway.address) const l2UsdcGateway = await _deployChildChainUsdcGateway( deployerL2, proxyAdminL2 ) - console.log('L2 USDC gateway address: ', l2UsdcGateway.address) + console.log('L2 USDC gateway deployed: ', l2UsdcGateway.address) const l1Router = process.env['L1_ROUTER'] as string const l2Router = process.env['L2_ROUTER'] as string @@ -257,17 +263,20 @@ async function _deployUsdcProxy( async function _deployParentChainUsdcGateway( deployerL1: Wallet, - proxyAdmin: ProxyAdmin -): Promise { - const l1USDCCustomGatewayFactory = await new L1USDCGateway__factory( - deployerL1 - ).deploy() - const l1USDCCustomGatewayLogic = await l1USDCCustomGatewayFactory.deployed() + proxyAdmin: ProxyAdmin, + isFeeToken: boolean +): Promise { + const l1UsdcGatewayFactory = isFeeToken + ? await new L1OrbitUSDCGateway__factory(deployerL1).deploy() + : await new L1USDCGateway__factory(deployerL1).deploy() + const l1UsdcGatewayLogic = await l1UsdcGatewayFactory.deployed() const tupFactory = await new TransparentUpgradeableProxy__factory( deployerL1 - ).deploy(l1USDCCustomGatewayLogic.address, proxyAdmin.address, '0x') + ).deploy(l1UsdcGatewayLogic.address, proxyAdmin.address, '0x') const tup = await tupFactory.deployed() - return L1USDCGateway__factory.connect(tup.address, deployerL1) + return isFeeToken + ? L1OrbitUSDCGateway__factory.connect(tup.address, deployerL1) + : L1USDCGateway__factory.connect(tup.address, deployerL1) } async function _deployChildChainUsdcGateway( From fe29d9f964df88c043fdc242b746724c0d93a82f Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Wed, 31 Jul 2024 09:32:59 +0200 Subject: [PATCH 18/32] Make ROLLUP_OWNER_KEY optional --- scripts/usdc-bridge-deployment/deployUsdcBridge.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index c59ae6d68e..27a6e8b687 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -413,7 +413,7 @@ async function _registerGateway( ] ) - if (ownerIsMultisig) { + if (ownerIsMultisig || !process.env['ROLLUP_OWNER_KEY']) { // prepare multisig transaction const upgExecutorData = upgradeExecutor.interface.encodeFunctionData( 'executeCall', @@ -625,7 +625,6 @@ function _checkEnvVars() { 'L2_ROUTER', 'INBOX', 'L1_USDC', - 'ROLLUP_OWNER_KEY', ] for (const envVar of requiredEnvVars) { From 6807d8a0afb11e7b5b6aa4c656ccac52d49e0e37 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Wed, 31 Jul 2024 09:45:00 +0200 Subject: [PATCH 19/32] Set minter role to L2 gateway --- .../deployUsdcBridge.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index 27a6e8b687..3dc6c9abd5 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -125,6 +125,9 @@ async function main() { } else { console.log('Usdc gateway registered') } + + _addMinterRoleToL2Gateway(l2UsdcGateway, deployerL2, bridgedUsdc) + console.log('Minter role with max allowance added to L2 gateway') } async function _loadWallets(): Promise<{ @@ -467,6 +470,24 @@ async function _registerGateway( } } +/** + * Master minter (this script set it to deployer) adds minter role to L2 gateway + * with max allowance. + */ +async function _addMinterRoleToL2Gateway( + l2UsdcGateway: L2USDCGateway, + masterMinter: Wallet, + bridgedUsdc: string +) { + const l2UsdcFiatToken = IFiatToken__factory.connect(bridgedUsdc, masterMinter) + await ( + await l2UsdcFiatToken.configureMinter( + l2UsdcGateway.address, + ethers.constants.MaxUint256 + ) + ).wait() +} + /** * Check if owner is UpgardeExecutor by polling ADMIN_ROLE() and EXECUTOR_ROLE() */ From 5531ae3516df4b1b33db1dae1240dcee6262ec7f Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Wed, 31 Jul 2024 10:03:55 +0200 Subject: [PATCH 20/32] Refactor --- .../deployUsdcBridge.ts | 50 ++++++++----------- scripts/usdc-bridge-deployment/env.example | 4 +- 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index 3dc6c9abd5..7b6eff3440 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -74,13 +74,10 @@ async function main() { const bridgedUsdc = await _deployBridgedUsdc(deployerL2, proxyAdminL2) console.log('Bridged (L2) USDC deployed: ', bridgedUsdc) - const isFeeToken = - (await _getFeeToken(inbox, deployerL1.provider)) != - ethers.constants.AddressZero const l1UsdcGateway = await _deployParentChainUsdcGateway( deployerL1, proxyAdminL1, - isFeeToken + inbox ) console.log('L1 USDC gateway deployed: ', l1UsdcGateway.address) @@ -90,34 +87,23 @@ async function main() { ) console.log('L2 USDC gateway deployed: ', l2UsdcGateway.address) - const l1Router = process.env['L1_ROUTER'] as string - const l2Router = process.env['L2_ROUTER'] as string - const l1Usdc = process.env['L1_USDC'] as string await _initializeGateways( l1UsdcGateway, l2UsdcGateway, - l1Router, - l2Router, inbox, - l1Usdc, bridgedUsdc, deployerL1, deployerL2 ) console.log('Usdc gateways initialized') - const ownerIsMultisig = process.env['OWNER_IS_MULTISIG'] === 'true' await _registerGateway( deployerL1.provider, deployerL2.provider, inbox, - l1Router, - l2Router, - l1Usdc, - l1UsdcGateway.address, - ownerIsMultisig + l1UsdcGateway.address ) - if (ownerIsMultisig) { + if (!process.env['ROLLUP_OWNER_KEY']) { console.log( 'Multisig transaction to register USDC gateway prepared and stored in', REGISTRATION_TX_FILE @@ -267,8 +253,12 @@ async function _deployUsdcProxy( async function _deployParentChainUsdcGateway( deployerL1: Wallet, proxyAdmin: ProxyAdmin, - isFeeToken: boolean + inboxAddress: string ): Promise { + const isFeeToken = + (await _getFeeToken(inboxAddress, deployerL1.provider)) != + ethers.constants.AddressZero + const l1UsdcGatewayFactory = isFeeToken ? await new L1OrbitUSDCGateway__factory(deployerL1).deploy() : await new L1USDCGateway__factory(deployerL1).deploy() @@ -301,16 +291,17 @@ async function _deployChildChainUsdcGateway( * Initialize gateways */ async function _initializeGateways( - l1UsdcGateway: L1USDCGateway, + l1UsdcGateway: L1USDCGateway | L1OrbitUSDCGateway, l2UsdcGateway: L2USDCGateway, - l1Router: string, - l2Router: string, inbox: string, - l1Usdc: string, l2Usdc: string, deployerL1: Wallet, deployerL2: Wallet ) { + const l1Router = process.env['L1_ROUTER'] as string + const l2Router = process.env['L2_ROUTER'] as string + const l1Usdc = process.env['L1_USDC'] as string + /// initialize L1 gateway const _l2CounterPart = l2UsdcGateway.address const _owner = deployerL1.address @@ -338,21 +329,22 @@ async function _initializeGateways( } /** - * Set token to gateway mapping in the routers + * Do the gateway registration if rollup owner key is provided. + * Otherwise prepare the TX payload and store it in a file. */ async function _registerGateway( parentProvider: Provider, childProvider: Provider, inbox: string, - l1RouterAddress: string, - l2RouterAddress: string, - l1UsdcAddress: string, - l1UsdcGatewayAddress: string, - ownerIsMultisig: boolean + l1UsdcGatewayAddress: string ) { const isFeeToken = (await _getFeeToken(inbox, parentProvider)) != ethers.constants.AddressZero + const l1RouterAddress = process.env['L1_ROUTER'] as string + const l2RouterAddress = process.env['L2_ROUTER'] as string + const l1UsdcAddress = process.env['L1_USDC'] as string + const l1Router = isFeeToken ? L1OrbitGatewayRouter__factory.connect(l1RouterAddress, parentProvider) : L1GatewayRouter__factory.connect(l1RouterAddress, parentProvider) @@ -416,7 +408,7 @@ async function _registerGateway( ] ) - if (ownerIsMultisig || !process.env['ROLLUP_OWNER_KEY']) { + if (!process.env['ROLLUP_OWNER_KEY']) { // prepare multisig transaction const upgExecutorData = upgradeExecutor.interface.encodeFunctionData( 'executeCall', diff --git a/scripts/usdc-bridge-deployment/env.example b/scripts/usdc-bridge-deployment/env.example index 5240f13130..c6eefe9805 100644 --- a/scripts/usdc-bridge-deployment/env.example +++ b/scripts/usdc-bridge-deployment/env.example @@ -6,7 +6,5 @@ L1_ROUTER= L2_ROUTER= INBOX= L1_USDC= -## if OWNER_IS_MULTISIG == true, then script will prepare multisig TX and store it in file -OWNER_IS_MULTISIG= -## if OWNER_IS_MULTISIG is not true, then script will use this key to perform registration +## OPTIONAL arg. If set, script will register the gateway, otherwise it will store TX payload in a file ROLLUP_OWNER_KEY= \ No newline at end of file From 4cebaf5fcd957cec002521ff9969d81a86a10691 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Wed, 31 Jul 2024 10:40:42 +0200 Subject: [PATCH 21/32] Check initialization --- .../deployUsdcBridge.ts | 62 +++++++++++++++++-- 1 file changed, 56 insertions(+), 6 deletions(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index 7b6eff3440..ce8c229ba3 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -159,9 +159,10 @@ async function _deployBridgedUsdc( const masterMinterL2 = deployerL2Wallet const pauserL2 = deployerL2Wallet const blacklisterL2 = deployerL2Wallet + const lostAndFound = deployerL2Wallet await ( await l2UsdcFiatToken.initialize( - 'USDC token', + 'USDC', 'USDC.e', 'USD', 6, @@ -172,17 +173,31 @@ async function _deployBridgedUsdc( ) ).wait() await (await l2UsdcFiatToken.initializeV2('USDC')).wait() - await ( - await l2UsdcFiatToken.initializeV2_1(ethers.Wallet.createRandom().address) - ).wait() + await (await l2UsdcFiatToken.initializeV2_1(lostAndFound.address)).wait() await (await l2UsdcFiatToken.initializeV2_2([], 'USDC.e')).wait() + /// verify initialization + if ( + (await l2UsdcFiatToken.name()) != 'USDC' || + (await l2UsdcFiatToken.symbol()) != 'USDC.e' || + (await l2UsdcFiatToken.currency()) != 'USD' || + (await l2UsdcFiatToken.decimals()) != 6 || + (await l2UsdcFiatToken.masterMinter()) != masterMinterL2.address || + (await l2UsdcFiatToken.pauser()) != pauserL2.address || + (await l2UsdcFiatToken.blacklister()) != blacklisterL2.address || + (await l2UsdcFiatToken.owner()) != deployerL2Wallet.address + ) { + throw new Error( + 'Bridged USDC initialization was not successful, might have been frontrun' + ) + } + /// init usdc logic to dummy values const l2UsdcLogicInit = IFiatToken__factory.connect( l2UsdcLogic.address, deployerL2Wallet ) - const DEAD = '0x000000000000000000000000000000000000dead' + const DEAD = '0x000000000000000000000000000000000000dEaD' await ( await l2UsdcLogicInit.initialize('', '', '', 0, DEAD, DEAD, DEAD, DEAD) ).wait() @@ -190,10 +205,25 @@ async function _deployBridgedUsdc( await (await l2UsdcLogicInit.initializeV2_1(DEAD)).wait() await (await l2UsdcLogicInit.initializeV2_2([], '')).wait() + /// verify logic initialization + if ( + (await l2UsdcLogicInit.name()) != '' || + (await l2UsdcLogicInit.symbol()) != '' || + (await l2UsdcLogicInit.currency()) != '' || + (await l2UsdcLogicInit.decimals()) != 0 || + (await l2UsdcLogicInit.masterMinter()) != DEAD || + (await l2UsdcLogicInit.pauser()) != DEAD || + (await l2UsdcLogicInit.blacklister()) != DEAD || + (await l2UsdcLogicInit.owner()) != DEAD + ) { + throw new Error('Bridged USDC logic initialization was not successful') + } + const l2Usdc = IERC20__factory.connect( l2UsdcFiatToken.address, deployerL2Wallet ) + return l2Usdc.address } @@ -325,7 +355,27 @@ async function _initializeGateways( ) ).wait() - ///// init logic + ///// verify initialization + if ( + (await l1UsdcGateway.router()) != l1Router || + (await l1UsdcGateway.inbox()) != inbox || + (await l1UsdcGateway.l1USDC()) != l1Usdc || + (await l1UsdcGateway.l2USDC()) != l2Usdc || + (await l1UsdcGateway.owner()) != _owner || + (await l1UsdcGateway.counterpartGateway()) != _l2CounterPart + ) { + throw new Error('L1 USDC gateway initialization failed') + } + + if ( + (await l2UsdcGateway.counterpartGateway()) != _l1Counterpart || + (await l2UsdcGateway.router()) != l2Router || + (await l2UsdcGateway.l1USDC()) != l1Usdc || + (await l2UsdcGateway.l2USDC()) != l2Usdc || + (await l2UsdcGateway.owner()) != ownerL2 + ) { + throw new Error('L2 USDC gateway initialization failed') + } } /** From a286f23698838f1d87f5c546358ac8360336bc0e Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Wed, 31 Jul 2024 11:09:17 +0200 Subject: [PATCH 22/32] Add yarn action --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 89de7af220..41041b1136 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "test:tokenbridge:deployment": "hardhat test test-e2e/tokenBridgeDeploymentTest.ts", "test:creation-code": "hardhat test test-e2e/creationCodeTest.ts", "blockscout:verify": "hardhat run ./scripts/orbitVerifyOnBlockscout.ts", + "deploy:usdc-token-bridge": "hardhat run scripts/usdc-bridge-deployment/deployUsdcBridge.ts", "typechain": "hardhat typechain", "deploy:tokenbridge": "hardhat run scripts/deploy_token_bridge_l1.ts --network mainnet", "gen:uml": "sol2uml ./contracts/tokenbridge/arbitrum,./contracts/tokenbridge/ethereum,./contracts/tokenbridge/libraries -o ./gatewayUML.svg", From 01b5a42cb88e0496ee49b0e5eda0255e42b8eb19 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Wed, 31 Jul 2024 11:16:58 +0200 Subject: [PATCH 23/32] Add readme for deployment --- scripts/usdc-bridge-deployment/README.md | 54 +++++++++++++++++++ .../deployUsdcBridge.ts | 11 ++-- 2 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 scripts/usdc-bridge-deployment/README.md diff --git a/scripts/usdc-bridge-deployment/README.md b/scripts/usdc-bridge-deployment/README.md new file mode 100644 index 0000000000..e6438e569e --- /dev/null +++ b/scripts/usdc-bridge-deployment/README.md @@ -0,0 +1,54 @@ +# How to deploy Usdc bridge? + +## Background +Circle’s Bridged USDC Standard is a specification and process for deploying a bridged form of USDC on EVM blockchains with optionality for Circle to seamlessly upgrade to native issuance in the future. +This doc describes how to deploy USDC bridge compatible with both Arbitrum's token bridge and Circle’s Bridged USDC Standard. + +## Assumptions +It is assumed there is already USDC token deployed and used on the parent chain. If not, follow the instructions in the Circle's `stablecoin-evm` repo to deploy one. + +Also, it is assumed the standard Orbit chain ownership system is used, ie. UpgradeExecutor is the owner of the ownable contracts and there is an EOA or multisig which has executor role on the UpgradeExecutor. + +Note: throughout the docs and code, terms `L1` and `L2` are used interchangeably with `parent chain` and `child chain`. They have the same meaning, ie. if an Orbit chain is deployed on top of ArbitrumOne then ArbitrumOne is `L1`/`parent chain`, while Orbit is `L2`/`child chain` + +## Deployment steps +Checkout target code, install dependencies and build +``` +cd token-bridge-contracts +yarn install +yarn build +``` + +Populate .env based on `env.example` in this directory +``` +PARENT_RPC= +PARENT_DEPLOYER_KEY= +CHILD_RPC= +CHILD_DEPLOYER_KEY= +L1_ROUTER= +L2_ROUTER= +INBOX= +L1_USDC= +## OPTIONAL arg. If set, script will register the gateway, otherwise it will store TX payload in a file +ROLLUP_OWNER_KEY= +``` + +Run the script +``` +yarn deploy:usdc-token-bridge +``` + +Script will do the following: +- load deployer wallets for L1 and L2 +- register L1 and L2 networks in SDK +- deploy new L1 and L2 proxy admins +- deploy bridged (L2) USDC using the Circle's implementation +- init L2 USDC +- deploy L1 USDC gateway +- deploy L2 USDC gateway +- init both gateways +- if `ROLLUP_OWNER_KEY` is provided, register the gateway in the router through the UpgradeExecutor +- if `ROLLUP_OWNER_KEY` is not provided, prepare calldata and store it in `registerUsdcGatewayTx.json` file +- set minter role to L2 USDC gateway with max allowance + +Now new USDC gateways can be used to deposit/withdraw USDC. And everything is in place to support transtition to native USDC issuance, in case Circle and Orbit chain owner agree to it. \ No newline at end of file diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index ce8c229ba3..915eac8ea6 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -74,17 +74,14 @@ async function main() { const bridgedUsdc = await _deployBridgedUsdc(deployerL2, proxyAdminL2) console.log('Bridged (L2) USDC deployed: ', bridgedUsdc) - const l1UsdcGateway = await _deployParentChainUsdcGateway( + const l1UsdcGateway = await _deployL1UsdcGateway( deployerL1, proxyAdminL1, inbox ) console.log('L1 USDC gateway deployed: ', l1UsdcGateway.address) - const l2UsdcGateway = await _deployChildChainUsdcGateway( - deployerL2, - proxyAdminL2 - ) + const l2UsdcGateway = await _deployL2UsdcGateway(deployerL2, proxyAdminL2) console.log('L2 USDC gateway deployed: ', l2UsdcGateway.address) await _initializeGateways( @@ -280,7 +277,7 @@ async function _deployUsdcProxy( return usdcProxy.address } -async function _deployParentChainUsdcGateway( +async function _deployL1UsdcGateway( deployerL1: Wallet, proxyAdmin: ProxyAdmin, inboxAddress: string @@ -302,7 +299,7 @@ async function _deployParentChainUsdcGateway( : L1USDCGateway__factory.connect(tup.address, deployerL1) } -async function _deployChildChainUsdcGateway( +async function _deployL2UsdcGateway( deployerL2: Wallet, proxyAdmin: ProxyAdmin ): Promise { From 28c0ab90891aa07bdb9bf2a86750dfb5c8876ef8 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Wed, 31 Jul 2024 13:08:19 +0200 Subject: [PATCH 24/32] Deploy master minter --- scripts/usdc-bridge-deployment/deployUsdcBridge.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index 915eac8ea6..ed25c0c900 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -35,6 +35,10 @@ import { abi as UsdcProxyAbi, bytecode as UsdcProxyBytecode, } from '@offchainlabs/stablecoin-evm/artifacts/hardhat/contracts/v1/FiatTokenProxy.sol/FiatTokenProxy.json' +import { + abi as MasterMinterAbi, + bytecode as MasterMinterBytecode, +} from '@offchainlabs/stablecoin-evm/artifacts/hardhat/contracts/minting/MasterMinter.sol/MasterMinter.json' import { addCustomNetwork, L1Network, @@ -148,12 +152,20 @@ async function _deployBridgedUsdc( proxyAdminL2.address ) + /// deploy master minter + const masterMinterL2Fac = new ethers.ContractFactory( + MasterMinterAbi, + MasterMinterBytecode, + deployerL2Wallet + ) + const masterMinterL2 = await masterMinterL2Fac.deploy(l2UsdcProxyAddress) + /// init usdc proxy const l2UsdcFiatToken = IFiatToken__factory.connect( l2UsdcProxyAddress, deployerL2Wallet ) - const masterMinterL2 = deployerL2Wallet + const pauserL2 = deployerL2Wallet const blacklisterL2 = deployerL2Wallet const lostAndFound = deployerL2Wallet From dacfae82292303007278058a8374cf46e2c3e164 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Wed, 31 Jul 2024 13:50:05 +0200 Subject: [PATCH 25/32] Use MasterMinter contract --- .../deployUsdcBridge.ts | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index ed25c0c900..eb86afedfd 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -1,4 +1,4 @@ -import { BigNumber, ContractTransaction, Wallet } from 'ethers' +import { BigNumber, Contract, ContractTransaction, Wallet } from 'ethers' import { ethers } from 'hardhat' import { IBridge__factory, @@ -75,8 +75,11 @@ async function main() { const proxyAdminL2 = await _deployProxyAdmin(deployerL2) console.log('L2 ProxyAdmin deployed: ', proxyAdminL2.address) - const bridgedUsdc = await _deployBridgedUsdc(deployerL2, proxyAdminL2) - console.log('Bridged (L2) USDC deployed: ', bridgedUsdc) + const { l2Usdc, masterMinter } = await _deployBridgedUsdc( + deployerL2, + proxyAdminL2 + ) + console.log('Bridged (L2) USDC deployed: ', l2Usdc.address) const l1UsdcGateway = await _deployL1UsdcGateway( deployerL1, @@ -92,7 +95,7 @@ async function main() { l1UsdcGateway, l2UsdcGateway, inbox, - bridgedUsdc, + l2Usdc.address, deployerL1, deployerL2 ) @@ -113,7 +116,7 @@ async function main() { console.log('Usdc gateway registered') } - _addMinterRoleToL2Gateway(l2UsdcGateway, deployerL2, bridgedUsdc) + await _addMinterRoleToL2Gateway(l2UsdcGateway, deployerL2, masterMinter) console.log('Minter role with max allowance added to L2 gateway') } @@ -143,7 +146,7 @@ async function _deployProxyAdmin(deployer: Wallet): Promise { async function _deployBridgedUsdc( deployerL2Wallet: Wallet, proxyAdminL2: ProxyAdmin -): Promise { +) { /// create l2 usdc behind proxy const l2UsdcLogic = await _deployUsdcLogic(deployerL2Wallet) const l2UsdcProxyAddress = await _deployUsdcProxy( @@ -158,7 +161,7 @@ async function _deployBridgedUsdc( MasterMinterBytecode, deployerL2Wallet ) - const masterMinterL2 = await masterMinterL2Fac.deploy(l2UsdcProxyAddress) + const masterMinter = await masterMinterL2Fac.deploy(l2UsdcProxyAddress) /// init usdc proxy const l2UsdcFiatToken = IFiatToken__factory.connect( @@ -175,7 +178,7 @@ async function _deployBridgedUsdc( 'USDC.e', 'USD', 6, - masterMinterL2.address, + masterMinter.address, pauserL2.address, blacklisterL2.address, deployerL2Wallet.address @@ -191,7 +194,7 @@ async function _deployBridgedUsdc( (await l2UsdcFiatToken.symbol()) != 'USDC.e' || (await l2UsdcFiatToken.currency()) != 'USD' || (await l2UsdcFiatToken.decimals()) != 6 || - (await l2UsdcFiatToken.masterMinter()) != masterMinterL2.address || + (await l2UsdcFiatToken.masterMinter()) != masterMinter.address || (await l2UsdcFiatToken.pauser()) != pauserL2.address || (await l2UsdcFiatToken.blacklister()) != blacklisterL2.address || (await l2UsdcFiatToken.owner()) != deployerL2Wallet.address @@ -233,7 +236,7 @@ async function _deployBridgedUsdc( deployerL2Wallet ) - return l2Usdc.address + return { l2Usdc, masterMinter } } async function _deployUsdcLogic(deployer: Wallet) { @@ -527,16 +530,19 @@ async function _registerGateway( */ async function _addMinterRoleToL2Gateway( l2UsdcGateway: L2USDCGateway, - masterMinter: Wallet, - bridgedUsdc: string + masterMinterOwner: Wallet, + masterMinter: Contract ) { - const l2UsdcFiatToken = IFiatToken__factory.connect(bridgedUsdc, masterMinter) await ( - await l2UsdcFiatToken.configureMinter( - l2UsdcGateway.address, - ethers.constants.MaxUint256 + await masterMinter['configureController(address,address)']( + masterMinterOwner.address, + l2UsdcGateway.address ) ).wait() + + await ( + await masterMinter['configureMinter(uint256)'](ethers.constants.MaxUint256) + ).wait() } /** From cf9b51df708b2dc26d1286ca73d49f81b57b734a Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Wed, 31 Jul 2024 14:18:32 +0200 Subject: [PATCH 26/32] Update readme with usdc upgrade procedure --- scripts/usdc-bridge-deployment/README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/scripts/usdc-bridge-deployment/README.md b/scripts/usdc-bridge-deployment/README.md index e6438e569e..9991b73121 100644 --- a/scripts/usdc-bridge-deployment/README.md +++ b/scripts/usdc-bridge-deployment/README.md @@ -51,4 +51,22 @@ Script will do the following: - if `ROLLUP_OWNER_KEY` is not provided, prepare calldata and store it in `registerUsdcGatewayTx.json` file - set minter role to L2 USDC gateway with max allowance -Now new USDC gateways can be used to deposit/withdraw USDC. And everything is in place to support transtition to native USDC issuance, in case Circle and Orbit chain owner agree to it. \ No newline at end of file +Now new USDC gateways can be used to deposit/withdraw USDC. And everything is in place to support transtition to native USDC issuance, in case Circle and Orbit chain owner agree to it. + +## Transition to native USDC +Once transition to native USDC is agreed on, following steps are required: +- L1 gateway owner pauses deposits on parent chain by calling `pauseDeposits()` +- L2 gateway owner pauses withdrawals on child chain by calling `pauseWithdrawals()` +- master minter removes the minter role from the child chain gateway + - there should be no in-flight deposits when minter role is revoked. If there are any, they should be executed (can be done by anyone by claiming the failed retryable ticket which does the USDC depositing) + - if minter role is revoked before in-flight deposits are claimed, those funds can’t be minted. One option is to leave the gateway’s minter role, but decrease the allowance to match the total amount of unclaimed deposits +- L1 gateway owner sets Circle's account as burner on the parent chain gateway using `setBurner(address)` +- L1 gateway owner reads the total supply of USDC on the child chain, and then invokes `setBurnAmount(uint256)` on the parent child gateway where the amount matches the total supply + - in case there are unclaimed deposits which are claimable, their total amount should be added to the supply as those tokens shall eventually be minted by child chain gateway +- USDC masterMinter gives minter role with 0 allowance to L1 gateway, so the burn can be executed +- on the child chain, L2 gateway owner calls the `setUsdcOwnershipTransferrer(address)` to set the account (provided and controlled by Circle) which will be able to transfer the bridged USDC ownership and proxy admin +- if not already owned by gateway, L2 USDC owner transfers ownership to gateway, and proxy admin transfers admin rights to gateway +- Circle uses `usdcOwnershipTransferrer` account to trigger `transferUSDCRoles(address)` which will set caller as USDC proxy admin and will transfer USDC ownership to the provided address +- Circle calls `burnLockedUSDC()` on the L1 gateway using `burner` account to burn the `burnAmount` of USDC + - remaining USDC will be cleared off when remaining in-flight USDC withdrawals are executed, if any + - L1 gateway owner is trusted to not frontrun this TX to modify the burning amount \ No newline at end of file From a3a8418cceb96a99f1aa655323c4843dd951264f Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Wed, 31 Jul 2024 15:22:20 +0200 Subject: [PATCH 27/32] Add comment --- scripts/usdc-bridge-deployment/deployUsdcBridge.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index eb86afedfd..9ea0d9d0b8 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -57,6 +57,20 @@ const REGISTRATION_TX_FILE = 'registerUsdcGatewayTx.json' main().then(() => console.log('Done.')) +/** + * USDC bridge deployment script. Script will do the following: + * - load deployer wallets for L1 and L2 + * - register L1 and L2 networks in SDK + * - deploy new L1 and L2 proxy admins + * - deploy bridged (L2) USDC using the Circle's implementation + * - init L2 USDC + * - deploy L1 USDC gateway + * - deploy L2 USDC gateway + * - init both gateways + * - if `ROLLUP_OWNER_KEY` is provided, register the gateway in the router through the UpgradeExecutor + * - if `ROLLUP_OWNER_KEY` is not provided, prepare calldata and store it in `registerUsdcGatewayTx.json` file + * - set minter role to L2 USDC gateway with max allowance + */ async function main() { console.log('Starting USDC bridge deployment') From d7e9ed4bd4a78104fe311faecd7773902d1d07f3 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Wed, 31 Jul 2024 16:17:27 +0200 Subject: [PATCH 28/32] Add fee transfer logic to list of TXs stored into a file --- .../deployUsdcBridge.ts | 38 +++++++++++++++++-- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index 9ea0d9d0b8..41e4a6f0b1 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -485,7 +485,37 @@ async function _registerGateway( ) if (!process.env['ROLLUP_OWNER_KEY']) { - // prepare multisig transaction + // prepare multisig transaction(s) + + const txs = [] + if (isFeeToken) { + // prepare TX to transfer fee amount to upgrade executor + const feeTokenContract = IERC20__factory.connect( + await _getFeeToken(inbox, parentProvider), + parentProvider + ) + const feeTransferData = feeTokenContract.interface.encodeFunctionData( + 'transfer', + [upgradeExecutor.address, totalFee] + ) + txs.push({ + to: feeTokenContract.address, + value: BigNumber.from(0).toString(), + data: feeTransferData, + }) + + // prepare TX to approve router to spend the fee token + const approveData = feeTokenContract.interface.encodeFunctionData( + 'approve', + [l1RouterAddress, totalFee] + ) + txs.push({ + to: upgradeExecutor.address, + value: BigNumber.from(0).toString(), + data: approveData, + }) + } + const upgExecutorData = upgradeExecutor.interface.encodeFunctionData( 'executeCall', [l1Router.address, registrationCalldata] @@ -493,12 +523,12 @@ async function _registerGateway( const to = upgradeExecutor.address // store the multisig transaction to file - const multisigTx = { + txs.push({ to, value: isFeeToken ? BigNumber.from(0).toString() : totalFee.toString(), data: upgExecutorData, - } - fs.writeFileSync(REGISTRATION_TX_FILE, JSON.stringify(multisigTx)) + }) + fs.writeFileSync(REGISTRATION_TX_FILE, JSON.stringify(txs)) } else { // load rollup owner (account with executor rights on the upgrade executor) const rollupOwnerKey = process.env['ROLLUP_OWNER_KEY'] as string From 49e86a959efc9547af7cd7ca93f513c387a79039 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Wed, 31 Jul 2024 16:51:21 +0200 Subject: [PATCH 29/32] Do scaling in case of non-18 decimals fee token --- .../deployUsdcBridge.ts | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index 41e4a6f0b1..68fb06e666 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -1,6 +1,7 @@ import { BigNumber, Contract, ContractTransaction, Wallet } from 'ethers' import { ethers } from 'hardhat' import { + ERC20__factory, IBridge__factory, IERC20__factory, IERC20Bridge__factory, @@ -459,7 +460,14 @@ async function _registerGateway( const maxGas = retryableParams.gasLimit const gasPriceBid = retryableParams.maxFeePerGas.mul(3) let maxSubmissionCost = retryableParams.maxSubmissionCost - const totalFee = maxGas.mul(gasPriceBid).add(maxSubmissionCost) + let totalFee = maxGas.mul(gasPriceBid).add(maxSubmissionCost) + if (isFeeToken) { + totalFee = await _getPrescaledAmount( + await _getFeeToken(inbox, parentProvider), + parentProvider, + totalFee + ) + } const registrationCalldata = isFeeToken ? L1OrbitGatewayRouter__factory.createInterface().encodeFunctionData( @@ -755,3 +763,27 @@ function _checkEnvVars() { } } } + +async function _getPrescaledAmount( + nativeTokenAddress: string, + provider: Provider, + amount: BigNumber +): Promise { + const nativeToken = ERC20__factory.connect(nativeTokenAddress, provider) + const decimals = BigNumber.from(await nativeToken.decimals()) + if (decimals.lt(BigNumber.from(18))) { + const scalingFactor = BigNumber.from(10).pow( + BigNumber.from(18).sub(decimals) + ) + let prescaledAmount = amount.div(scalingFactor) + // round up if needed + if (prescaledAmount.mul(scalingFactor).lt(amount)) { + prescaledAmount = prescaledAmount.add(BigNumber.from(1)) + } + return prescaledAmount + } else if (decimals.gt(BigNumber.from(18))) { + return amount.mul(BigNumber.from(10).pow(decimals.sub(BigNumber.from(18)))) + } + + return amount +} From 39788ede6c6cfe3d9d2033125138d7989974d797 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Thu, 1 Aug 2024 15:01:07 +0200 Subject: [PATCH 30/32] Add more docs --- .../arbitrum/gateway/L2USDCGateway.sol | 3 ++ .../ethereum/gateway/L1USDCGateway.sol | 3 ++ scripts/usdc-bridge-deployment/README.md | 30 +++++++++++++------ 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol b/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol index 03cd53ca7d..4577940c3b 100644 --- a/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol +++ b/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol @@ -22,6 +22,9 @@ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; * - withdrawals can be paused by the owner * - owner can set an "transferrer" account which will be able to transfer USDC ownership * - transferrer can transfer USDC owner and proxyAdmin + * + * NOTE: before withdrawing funds, make sure that recipient address is not blacklisted on the parent chain. + * Also, make sure that USDC token itself is not paused. Otherwise funds might get stuck. */ contract L2USDCGateway is L2ArbitrumGateway { using SafeERC20 for IERC20; diff --git a/contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol b/contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol index a5ca0c6419..edc1dd0e19 100644 --- a/contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol +++ b/contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol @@ -29,6 +29,9 @@ import {IFiatToken, IFiatTokenProxy} from "../../libraries/IFiatToken.sol"; * * This contract is to be used on chains where ETH is the native token. If chain is using * custom fee token then use L1OrbitUSDCGateway instead. + * + * NOTE: before depositing funds, make sure that recipient address is not blacklisted on the child chain. + * Also, make sure that USDC token itself is not paused. Otherwise funds might get stuck. */ contract L1USDCGateway is L1ArbitrumExtendedGateway { address public l1USDC; diff --git a/scripts/usdc-bridge-deployment/README.md b/scripts/usdc-bridge-deployment/README.md index 9991b73121..1384b66a3d 100644 --- a/scripts/usdc-bridge-deployment/README.md +++ b/scripts/usdc-bridge-deployment/README.md @@ -1,18 +1,25 @@ -# How to deploy Usdc bridge? +# Bridged USDC standard implementation for Orbit chains ## Background -Circle’s Bridged USDC Standard is a specification and process for deploying a bridged form of USDC on EVM blockchains with optionality for Circle to seamlessly upgrade to native issuance in the future. -This doc describes how to deploy USDC bridge compatible with both Arbitrum's token bridge and Circle’s Bridged USDC Standard. + +Circle’s Bridged USDC Standard is a specification and process for deploying a bridged form of USDC on EVM blockchains with optionality for Circle to seamlessly upgrade to native issuance in the future. + +We provide custom USDC gateway implementation (for parent and child chain) that follows Bridged USDC Standard. These contracts can be used by new Orbit chains. This solution will NOT be used in existing Arbitrum chains. On parent chain contract `L1USDCGateway` is used in case child chain uses ETH as native currency, or `L1OrbitUSDCGateway` in case child chain uses custom fee token. On child chain `L2USDCGateway` is used. For the USDC token contracts, Circle's referent implementation is used. + +This doc describes how to deploy USDC bridge compatible with both Arbitrum's token bridge and Circle’s Bridged USDC Standard.Also steps for transition to native USDC issuance are provided. ## Assumptions -It is assumed there is already USDC token deployed and used on the parent chain. If not, follow the instructions in the Circle's `stablecoin-evm` repo to deploy one. + +It is assumed there is already USDC token deployed and used on the parent chain. If not, follow the instructions in the Circle's `stablecoin-evm` repo to deploy one. Also, it is assumed the standard Orbit chain ownership system is used, ie. UpgradeExecutor is the owner of the ownable contracts and there is an EOA or multisig which has executor role on the UpgradeExecutor. Note: throughout the docs and code, terms `L1` and `L2` are used interchangeably with `parent chain` and `child chain`. They have the same meaning, ie. if an Orbit chain is deployed on top of ArbitrumOne then ArbitrumOne is `L1`/`parent chain`, while Orbit is `L2`/`child chain` ## Deployment steps + Checkout target code, install dependencies and build + ``` cd token-bridge-contracts yarn install @@ -20,6 +27,7 @@ yarn build ``` Populate .env based on `env.example` in this directory + ``` PARENT_RPC= PARENT_DEPLOYER_KEY= @@ -34,11 +42,13 @@ ROLLUP_OWNER_KEY= ``` Run the script + ``` yarn deploy:usdc-token-bridge ``` Script will do the following: + - load deployer wallets for L1 and L2 - register L1 and L2 networks in SDK - deploy new L1 and L2 proxy admins @@ -54,19 +64,21 @@ Script will do the following: Now new USDC gateways can be used to deposit/withdraw USDC. And everything is in place to support transtition to native USDC issuance, in case Circle and Orbit chain owner agree to it. ## Transition to native USDC + Once transition to native USDC is agreed on, following steps are required: + - L1 gateway owner pauses deposits on parent chain by calling `pauseDeposits()` - L2 gateway owner pauses withdrawals on child chain by calling `pauseWithdrawals()` - master minter removes the minter role from the child chain gateway - there should be no in-flight deposits when minter role is revoked. If there are any, they should be executed (can be done by anyone by claiming the failed retryable ticket which does the USDC depositing) - - if minter role is revoked before in-flight deposits are claimed, those funds can’t be minted. One option is to leave the gateway’s minter role, but decrease the allowance to match the total amount of unclaimed deposits -- L1 gateway owner sets Circle's account as burner on the parent chain gateway using `setBurner(address)` + - if minter role is revoked before in-flight deposits are claimed, those funds can’t be minted. One option is to leave the gateway’s minter role, but decrease the allowance to match the total amount of unclaimed deposits +- L1 gateway owner sets Circle's account as burner on the parent chain gateway using `setBurner(address)` - L1 gateway owner reads the total supply of USDC on the child chain, and then invokes `setBurnAmount(uint256)` on the parent child gateway where the amount matches the total supply - - in case there are unclaimed deposits which are claimable, their total amount should be added to the supply as those tokens shall eventually be minted by child chain gateway -- USDC masterMinter gives minter role with 0 allowance to L1 gateway, so the burn can be executed + - in case there are unclaimed deposits which are claimable (ie. destination is not blacklisted), their total amount should be added to the supply as those tokens shall eventually be minted by child chain gateway +- USDC masterMinter gives minter role with 0 allowance to L1 gateway, so the burn can be executed - on the child chain, L2 gateway owner calls the `setUsdcOwnershipTransferrer(address)` to set the account (provided and controlled by Circle) which will be able to transfer the bridged USDC ownership and proxy admin - if not already owned by gateway, L2 USDC owner transfers ownership to gateway, and proxy admin transfers admin rights to gateway - Circle uses `usdcOwnershipTransferrer` account to trigger `transferUSDCRoles(address)` which will set caller as USDC proxy admin and will transfer USDC ownership to the provided address - Circle calls `burnLockedUSDC()` on the L1 gateway using `burner` account to burn the `burnAmount` of USDC - remaining USDC will be cleared off when remaining in-flight USDC withdrawals are executed, if any - - L1 gateway owner is trusted to not frontrun this TX to modify the burning amount \ No newline at end of file + - L1 gateway owner is trusted to not frontrun this TX to modify the burning amount From a03a374c84974b01679475d080c134da1a6bbca1 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Thu, 1 Aug 2024 15:07:21 +0200 Subject: [PATCH 31/32] Update slither db --- slither.db.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither.db.json b/slither.db.json index 0a6b418aba..fcc5fc610b 100644 --- a/slither.db.json +++ b/slither.db.json @@ -1 +1 @@ -[{"elements": [{"type": "function", "name": "outboundEscrowTransfer", "source_mapping": {"start": 11053, "length": 592, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "is_dependency": false, "lines": [293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1ArbitrumGateway", "source_mapping": {"start": 1279, "length": 14336, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "is_dependency": false, "lines": [36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404], "starting_column": 1, "ending_column": 2}}, "signature": "outboundEscrowTransfer(address,address,uint256)"}}, {"type": "node", "name": "IERC20(_l1Token).safeTransferFrom(_from,address(this),_amount)", "source_mapping": {"start": 11459, "length": 64, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "is_dependency": false, "lines": [301], "starting_column": 9, "ending_column": 73}, "type_specific_fields": {"parent": {"type": "function", "name": "outboundEscrowTransfer", "source_mapping": {"start": 11053, "length": 592, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "is_dependency": false, "lines": [293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1ArbitrumGateway", "source_mapping": {"start": 1279, "length": 14336, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "is_dependency": false, "lines": [36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404], "starting_column": 1, "ending_column": 2}}, "signature": "outboundEscrowTransfer(address,address,uint256)"}}}}], "description": "L1ArbitrumGateway.outboundEscrowTransfer(address,address,uint256) (contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol#293-304) uses arbitrary from in transferFrom: IERC20(_l1Token).safeTransferFrom(_from,address(this),_amount) (contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol#301)\n", "markdown": "[L1ArbitrumGateway.outboundEscrowTransfer(address,address,uint256)](contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol#L293-L304) uses arbitrary from in transferFrom: [IERC20(_l1Token).safeTransferFrom(_from,address(this),_amount)](contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol#L301)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol#L293-L304", "id": "7f2693a46b04c9b469a640c442acfb2aaa3e814506fef81efed08031db2d23bd", "check": "arbitrary-send-erc20", "impact": "High", "confidence": "High"}, {"elements": [{"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 2818, "length": 266, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "is_dependency": false, "lines": [80, 81, 82, 83, 84, 85, 86, 87], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2WethGateway", "source_mapping": {"start": 864, "length": 2787, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "is_dependency": false, "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}, {"type": "node", "name": "IWETH9(_l2TokenAddress).deposit{value: _amount}()", "source_mapping": {"start": 2964, "length": 51, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "is_dependency": false, "lines": [85], "starting_column": 9, "ending_column": 60}, "type_specific_fields": {"parent": {"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 2818, "length": 266, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "is_dependency": false, "lines": [80, 81, 82, 83, 84, 85, 86, 87], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2WethGateway", "source_mapping": {"start": 864, "length": 2787, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "is_dependency": false, "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}}}], "description": "L2WethGateway.inboundEscrowTransfer(address,address,uint256) (contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol#80-87) sends eth to arbitrary user\n\tDangerous calls:\n\t- IWETH9(_l2TokenAddress).deposit{value: _amount}() (contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol#85)\n", "markdown": "[L2WethGateway.inboundEscrowTransfer(address,address,uint256)](contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol#L80-L87) sends eth to arbitrary user\n\tDangerous calls:\n\t- [IWETH9(_l2TokenAddress).deposit{value: _amount}()](contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol#L85)\n", "first_markdown_element": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol#L80-L87", "id": "e2c734fd5c5ec43d4faaa9a093395e2556c3b429c34215a26107de1a4271f405", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_sendRetryableToCreateContracts", "source_mapping": {"start": 16693, "length": 689, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableToCreateContracts(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,L2DeploymentAddresses,address,address)"}}, {"type": "node", "name": "retryableSender.sendRetryable{value: 0}(retryableParams,l2TemplateAddress,l1Deployment,l2Deployment.standardGateway,l2RollupOwner,msg.sender,upgradeExecutor)", "source_mapping": {"start": 17027, "length": 348, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "_sendRetryableToCreateContracts", "source_mapping": {"start": 16693, "length": 689, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableToCreateContracts(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,L2DeploymentAddresses,address,address)"}}}}, {"type": "node", "name": "retryableSender.sendRetryable{value: address(this).balance}(retryableParams,l2TemplateAddress,l1Deployment,l2Deployment.standardGateway,l2RollupOwner,msg.sender,upgradeExecutor)", "source_mapping": {"start": 17027, "length": 348, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "_sendRetryableToCreateContracts", "source_mapping": {"start": 16693, "length": 689, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableToCreateContracts(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,L2DeploymentAddresses,address,address)"}}}}], "description": "L1AtomicTokenBridgeCreator._sendRetryableToCreateContracts(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,L2DeploymentAddresses,address,address) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#400-419) sends eth to arbitrary user\n\tDangerous calls:\n\t- retryableSender.sendRetryable{value: 0}(retryableParams,l2TemplateAddress,l1Deployment,l2Deployment.standardGateway,l2RollupOwner,msg.sender,upgradeExecutor) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#408-418)\n\t- retryableSender.sendRetryable{value: address(this).balance}(retryableParams,l2TemplateAddress,l1Deployment,l2Deployment.standardGateway,l2RollupOwner,msg.sender,upgradeExecutor) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#408-418)\n", "markdown": "[L1AtomicTokenBridgeCreator._sendRetryableToCreateContracts(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,L2DeploymentAddresses,address,address)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L400-L419) sends eth to arbitrary user\n\tDangerous calls:\n\t- [retryableSender.sendRetryable{value: 0}(retryableParams,l2TemplateAddress,l1Deployment,l2Deployment.standardGateway,l2RollupOwner,msg.sender,upgradeExecutor)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L408-L418)\n\t- [retryableSender.sendRetryable{value: address(this).balance}(retryableParams,l2TemplateAddress,l1Deployment,l2Deployment.standardGateway,l2RollupOwner,msg.sender,upgradeExecutor)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L408-L418)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L400-L419", "id": "84a1b3de438b5383716ee1c6461a8a33564d9e9909292e29f6920c3dde7db801", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deployL2Factory", "source_mapping": {"start": 18302, "length": 1541, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_deployL2Factory(address,uint256,address)"}}, {"type": "node", "name": "IInbox(inbox).createRetryableTicket{value: retryableFee_scope_0}(address(0),0,maxSubmissionCost,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,deploymentData)", "source_mapping": {"start": 19509, "length": 317, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [474, 475, 476, 477, 478, 479, 480, 481, 482, 483], "starting_column": 13, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployL2Factory", "source_mapping": {"start": 18302, "length": 1541, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_deployL2Factory(address,uint256,address)"}}}}], "description": "L1AtomicTokenBridgeCreator._deployL2Factory(address,uint256,address) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#447-485) sends eth to arbitrary user\n\tDangerous calls:\n\t- IInbox(inbox).createRetryableTicket{value: retryableFee_scope_0}(address(0),0,maxSubmissionCost,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,deploymentData) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#474-483)\n", "markdown": "[L1AtomicTokenBridgeCreator._deployL2Factory(address,uint256,address)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L447-L485) sends eth to arbitrary user\n\tDangerous calls:\n\t- [IInbox(inbox).createRetryableTicket{value: retryableFee_scope_0}(address(0),0,maxSubmissionCost,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,deploymentData)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L474-L483)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L447-L485", "id": "99184e5a886f6131fdcb8318889a0655a41bf41eb6069c01f0099a0212556371", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_sendRetryableUsingEth", "source_mapping": {"start": 3140, "length": 1810, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableUsingEth(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,address,address,address,address)"}}, {"type": "node", "name": "(success,None) = deployer.call{value: address(this).balance}()", "source_mapping": {"start": 4804, "length": 65, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [118], "starting_column": 9, "ending_column": 74}, "type_specific_fields": {"parent": {"type": "function", "name": "_sendRetryableUsingEth", "source_mapping": {"start": 3140, "length": 1810, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableUsingEth(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,address,address,address,address)"}}}}], "description": "L1TokenBridgeRetryableSender._sendRetryableUsingEth(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,address,address,address,address) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#77-120) sends eth to arbitrary user\n\tDangerous calls:\n\t- (success,None) = deployer.call{value: address(this).balance}() (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#118)\n", "markdown": "[L1TokenBridgeRetryableSender._sendRetryableUsingEth(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,address,address,address,address)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L77-L120) sends eth to arbitrary user\n\tDangerous calls:\n\t- [(success,None) = deployer.call{value: address(this).balance}()](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L118)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L77-L120", "id": "04b7713760c9cd5b98aaa53a7e551c516febef4ad6844a984d8a91a36843bb5e", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_createRetryableUsingEth", "source_mapping": {"start": 6082, "length": 557, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_createRetryableUsingEth(RetryableParams,uint256,uint256,bytes)"}}, {"type": "node", "name": "IInbox(retryableParams.inbox).createRetryableTicket{value: value}(retryableParams.target,0,maxSubmissionCost,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,data)", "source_mapping": {"start": 6276, "length": 356, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [162, 163, 164, 165, 166, 167, 168, 169, 170, 171], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "_createRetryableUsingEth", "source_mapping": {"start": 6082, "length": 557, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_createRetryableUsingEth(RetryableParams,uint256,uint256,bytes)"}}}}], "description": "L1TokenBridgeRetryableSender._createRetryableUsingEth(RetryableParams,uint256,uint256,bytes) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#156-172) sends eth to arbitrary user\n\tDangerous calls:\n\t- IInbox(retryableParams.inbox).createRetryableTicket{value: value}(retryableParams.target,0,maxSubmissionCost,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,data) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#162-171)\n", "markdown": "[L1TokenBridgeRetryableSender._createRetryableUsingEth(RetryableParams,uint256,uint256,bytes)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L156-L172) sends eth to arbitrary user\n\tDangerous calls:\n\t- [IInbox(retryableParams.inbox).createRetryableTicket{value: value}(retryableParams.target,0,maxSubmissionCost,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,data)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L162-L171)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L156-L172", "id": "a7688c5005162ad9a035feab8e6c4c7161c854dec1f75d2422d647ef3ad2bfa7", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 2941, "length": 245, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "is_dependency": false, "lines": [88, 89, 90, 91, 92, 93, 94, 95], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1WethGateway", "source_mapping": {"start": 965, "length": 3233, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "is_dependency": false, "lines": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}, {"type": "node", "name": "IWETH9(_l1Token).deposit{value: _amount}()", "source_mapping": {"start": 3080, "length": 44, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "is_dependency": false, "lines": [93], "starting_column": 9, "ending_column": 53}, "type_specific_fields": {"parent": {"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 2941, "length": 245, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "is_dependency": false, "lines": [88, 89, 90, 91, 92, 93, 94, 95], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1WethGateway", "source_mapping": {"start": 965, "length": 3233, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "is_dependency": false, "lines": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}}}], "description": "L1WethGateway.inboundEscrowTransfer(address,address,uint256) (contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol#88-95) sends eth to arbitrary user\n\tDangerous calls:\n\t- IWETH9(_l1Token).deposit{value: _amount}() (contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol#93)\n", "markdown": "[L1WethGateway.inboundEscrowTransfer(address,address,uint256)](contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol#L88-L95) sends eth to arbitrary user\n\tDangerous calls:\n\t- [IWETH9(_l1Token).deposit{value: _amount}()](contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol#L93)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol#L88-L95", "id": "aefde4912f3446b807349549a2c0405d67afd0d48c7f40e4f14c642fc6454318", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "redirectedExits", "source_mapping": {"start": 1128, "length": 51, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "is_dependency": false, "lines": [42], "starting_column": 5, "ending_column": 56}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1ArbitrumExtendedGateway", "source_mapping": {"start": 927, "length": 4270, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "is_dependency": false, "lines": [33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "getExternalCall", "source_mapping": {"start": 3628, "length": 925, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "is_dependency": false, "lines": [103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1ArbitrumExtendedGateway", "source_mapping": {"start": 927, "length": 4270, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "is_dependency": false, "lines": [33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140], "starting_column": 1, "ending_column": 2}}, "signature": "getExternalCall(uint256,address,bytes)"}}], "description": "L1ArbitrumExtendedGateway.redirectedExits (contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol#42) is never initialized. It is used in:\n\t- L1ArbitrumExtendedGateway.getExternalCall(uint256,address,bytes) (contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol#103-120)\n", "markdown": "[L1ArbitrumExtendedGateway.redirectedExits](contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol#L42) is never initialized. It is used in:\n\t- [L1ArbitrumExtendedGateway.getExternalCall(uint256,address,bytes)](contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol#L103-L120)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol#L42", "id": "e5aa1893c702d02a90473a1c603e113adcc2f5f0696cde71aac9ae09574067bf", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "function", "name": "_getScaledAmount", "source_mapping": {"start": 24831, "length": 559, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_getScaledAmount(address,uint256)"}}, {"type": "node", "name": "scaledAmount = amount / (10 ** (18 - decimals))", "source_mapping": {"start": 25086, "length": 55, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [610], "starting_column": 13, "ending_column": 68}, "type_specific_fields": {"parent": {"type": "function", "name": "_getScaledAmount", "source_mapping": {"start": 24831, "length": 559, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_getScaledAmount(address,uint256)"}}}}, {"type": "node", "name": "scaledAmount * (10 ** (18 - decimals)) < amount", "source_mapping": {"start": 25196, "length": 47, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [612], "starting_column": 17, "ending_column": 64}, "type_specific_fields": {"parent": {"type": "function", "name": "_getScaledAmount", "source_mapping": {"start": 24831, "length": 559, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_getScaledAmount(address,uint256)"}}}}], "description": "L1AtomicTokenBridgeCreator._getScaledAmount(address,uint256) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#604-618) performs a multiplication on the result of a division:\n\t- scaledAmount = amount / (10 ** (18 - decimals)) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#610)\n\t- scaledAmount * (10 ** (18 - decimals)) < amount (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#612)\n", "markdown": "[L1AtomicTokenBridgeCreator._getScaledAmount(address,uint256)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L604-L618) performs a multiplication on the result of a division:\n\t- [scaledAmount = amount / (10 ** (18 - decimals))](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L610)\n\t- [scaledAmount * (10 ** (18 - decimals)) < amount](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L612)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L604-L618", "id": "a2bb622fdc1256a6305ef07732ea9e8f22f715757cc69e14e9979282ee2123ef", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "node", "name": "_deployL2Factory(inbox,gasPriceBid,feeToken)", "source_mapping": {"start": 14562, "length": 46, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [342], "starting_column": 9, "ending_column": 55}, "type_specific_fields": {"parent": {"type": "function", "name": "createTokenBridge", "source_mapping": {"start": 8217, "length": 8470, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "createTokenBridge(address,address,uint256,uint256)"}}}}, {"type": "node", "name": "_deployL2Factory(inbox,gasPriceBid,feeToken)", "source_mapping": {"start": 14562, "length": 46, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [342], "starting_column": 9, "ending_column": 55}, "type_specific_fields": {"parent": {"type": "function", "name": "createTokenBridge", "source_mapping": {"start": 8217, "length": 8470, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "createTokenBridge(address,address,uint256,uint256)"}}}}], "description": "Multiple retryable tickets created in the same function:\n\t -_deployL2Factory(inbox,gasPriceBid,feeToken) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#342)\n\t -_deployL2Factory(inbox,gasPriceBid,feeToken) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#342)\n", "markdown": "Multiple retryable tickets created in the same function:\n\t -[_deployL2Factory(inbox,gasPriceBid,feeToken)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L342)\n\t -[_deployL2Factory(inbox,gasPriceBid,feeToken)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L342)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L342", "id": "a529625c2877a63d7b2dbe920fcdb59daa32aacb3dbb402906376a5e3ddba6e7", "check": "out-of-order-retryable", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "node", "name": "_createRetryableUsingEth(retryableParams,maxSubmissionCost,retryableValue,data)", "source_mapping": {"start": 4512, "length": 82, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [113], "starting_column": 9, "ending_column": 91}, "type_specific_fields": {"parent": {"type": "function", "name": "_sendRetryableUsingEth", "source_mapping": {"start": 3140, "length": 1810, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableUsingEth(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,address,address,address,address)"}}}}, {"type": "node", "name": "_createRetryableUsingEth(retryableParams,maxSubmissionCost,retryableValue,data)", "source_mapping": {"start": 4512, "length": 82, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [113], "starting_column": 9, "ending_column": 91}, "type_specific_fields": {"parent": {"type": "function", "name": "_sendRetryableUsingEth", "source_mapping": {"start": 3140, "length": 1810, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableUsingEth(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,address,address,address,address)"}}}}], "description": "Multiple retryable tickets created in the same function:\n\t -_createRetryableUsingEth(retryableParams,maxSubmissionCost,retryableValue,data) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#113)\n\t -_createRetryableUsingEth(retryableParams,maxSubmissionCost,retryableValue,data) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#113)\n", "markdown": "Multiple retryable tickets created in the same function:\n\t -[_createRetryableUsingEth(retryableParams,maxSubmissionCost,retryableValue,data)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L113)\n\t -[_createRetryableUsingEth(retryableParams,maxSubmissionCost,retryableValue,data)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L113)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L113", "id": "17648cf433b86bf06bcab3f179d37fe19e73adff495e0e9485ce4b5d2d22a91b", "check": "out-of-order-retryable", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "l1Deployment", "source_mapping": {"start": 9529, "length": 41, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [223], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "createTokenBridge", "source_mapping": {"start": 8217, "length": 8470, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "createTokenBridge(address,address,uint256,uint256)"}}}}], "description": "L1AtomicTokenBridgeCreator.createTokenBridge(address,address,uint256,uint256).l1Deployment (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#223) is a local variable never initialized\n", "markdown": "[L1AtomicTokenBridgeCreator.createTokenBridge(address,address,uint256,uint256).l1Deployment](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L223) is a local variable never initialized\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L223", "id": "83541fa7c678a7dc42b6a8c5709120d6d76a9a51c8ccf8c6cf6e984776341180", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "l2Deployment", "source_mapping": {"start": 9580, "length": 41, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [224], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "createTokenBridge", "source_mapping": {"start": 8217, "length": 8470, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "createTokenBridge(address,address,uint256,uint256)"}}}}], "description": "L1AtomicTokenBridgeCreator.createTokenBridge(address,address,uint256,uint256).l2Deployment (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#224) is a local variable never initialized\n", "markdown": "[L1AtomicTokenBridgeCreator.createTokenBridge(address,address,uint256,uint256).l2Deployment](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L224) is a local variable never initialized\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L224", "id": "9bfb8ca665ae98867b761c889e2c325d50e1cb30307188f74f012df830627e2b", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "l2NewDefaultGateway", "source_mapping": {"start": 2756, "length": 27, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "is_dependency": false, "lines": [92], "starting_column": 9, "ending_column": 36}, "type_specific_fields": {"parent": {"type": "function", "name": "_setDefaultGateway", "source_mapping": {"start": 2425, "length": 1071, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "is_dependency": false, "lines": [81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1GatewayRouter", "source_mapping": {"start": 1254, "length": 11109, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "is_dependency": false, "lines": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354], "starting_column": 1, "ending_column": 2}}, "signature": "_setDefaultGateway(address,uint256,uint256,uint256,uint256)"}}}}], "description": "L1GatewayRouter._setDefaultGateway(address,uint256,uint256,uint256,uint256).l2NewDefaultGateway (contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol#92) is a local variable never initialized\n", "markdown": "[L1GatewayRouter._setDefaultGateway(address,uint256,uint256,uint256,uint256).l2NewDefaultGateway](contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol#L92) is a local variable never initialized\n", "first_markdown_element": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol#L92", "id": "8557712f770f31a8c2dbfa8451859919fe91c55860d5c13d31210fc167b6085e", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "deployL2Contracts", "source_mapping": {"start": 1836, "length": 2106, "filename_relative": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_short": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "is_dependency": false, "lines": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2AtomicTokenBridgeFactory", "source_mapping": {"start": 1325, "length": 10350, "filename_relative": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_short": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "is_dependency": false, "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284], "starting_column": 1, "ending_column": 2}}, "signature": "deployL2Contracts(L2RuntimeCode,address,address,address,address,address,address,address,address)"}}, {"type": "node", "name": "Create2.deploy(0,_getL2Salt(OrbitSalts.L2_MULTICALL),CreationCodeHelper.getCreationCodeFor(l2Code.multicall))", "source_mapping": {"start": 3658, "length": 157, "filename_relative": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_short": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "is_dependency": false, "lines": [78, 79, 80, 81, 82], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "deployL2Contracts", "source_mapping": {"start": 1836, "length": 2106, "filename_relative": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_short": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "is_dependency": false, "lines": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2AtomicTokenBridgeFactory", "source_mapping": {"start": 1325, "length": 10350, "filename_relative": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_short": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "is_dependency": false, "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284], "starting_column": 1, "ending_column": 2}}, "signature": "deployL2Contracts(L2RuntimeCode,address,address,address,address,address,address,address,address)"}}}}], "description": "L2AtomicTokenBridgeFactory.deployL2Contracts(L2RuntimeCode,address,address,address,address,address,address,address,address) (contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol#35-86) ignores return value by Create2.deploy(0,_getL2Salt(OrbitSalts.L2_MULTICALL),CreationCodeHelper.getCreationCodeFor(l2Code.multicall)) (contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol#78-82)\n", "markdown": "[L2AtomicTokenBridgeFactory.deployL2Contracts(L2RuntimeCode,address,address,address,address,address,address,address,address)](contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol#L35-L86) ignores return value by [Create2.deploy(0,_getL2Salt(OrbitSalts.L2_MULTICALL),CreationCodeHelper.getCreationCodeFor(l2Code.multicall))](contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol#L78-L82)\n", "first_markdown_element": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol#L35-L86", "id": "2956ed76e7f9c4953ba1242f2735d68b34ea04746ec3353fe026ad5948aa4de9", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 5924, "length": 181, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [165, 166, 167, 168, 169, 170], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2USDCGateway", "source_mapping": {"start": 1364, "length": 6252, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}, {"type": "node", "name": "IFiatToken(_l2Address).mint(_dest,_amount)", "source_mapping": {"start": 6055, "length": 43, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [169], "starting_column": 9, "ending_column": 52}, "type_specific_fields": {"parent": {"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 5924, "length": 181, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [165, 166, 167, 168, 169, 170], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2USDCGateway", "source_mapping": {"start": 1364, "length": 6252, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}}}], "description": "L2USDCGateway.inboundEscrowTransfer(address,address,uint256) (contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#165-170) ignores return value by IFiatToken(_l2Address).mint(_dest,_amount) (contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#169)\n", "markdown": "[L2USDCGateway.inboundEscrowTransfer(address,address,uint256)](contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#L165-L170) ignores return value by [IFiatToken(_l2Address).mint(_dest,_amount)](contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#L169)\n", "first_markdown_element": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#L165-L170", "id": "b25f84626d48e5778e53022dd8067ab3aac7279a96c02a6e6d0569fc0cd1cc8a", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deployL2Factory", "source_mapping": {"start": 18302, "length": 1541, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_deployL2Factory(address,uint256,address)"}}, {"type": "node", "name": "IERC20Inbox(inbox).createRetryableTicket(address(0),0,0,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,scaledRetryableFee,deploymentData)", "source_mapping": {"start": 18926, "length": 321, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468], "starting_column": 13, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployL2Factory", "source_mapping": {"start": 18302, "length": 1541, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_deployL2Factory(address,uint256,address)"}}}}], "description": "L1AtomicTokenBridgeCreator._deployL2Factory(address,uint256,address) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#447-485) ignores return value by IERC20Inbox(inbox).createRetryableTicket(address(0),0,0,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,scaledRetryableFee,deploymentData) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#458-468)\n", "markdown": "[L1AtomicTokenBridgeCreator._deployL2Factory(address,uint256,address)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L447-L485) ignores return value by [IERC20Inbox(inbox).createRetryableTicket(address(0),0,0,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,scaledRetryableFee,deploymentData)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L458-L468)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L447-L485", "id": "dc6f44871a7669ec4f8efc4b8484c6188fb3d717556f325671cf5d2fde4a1b09", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deployL2Factory", "source_mapping": {"start": 18302, "length": 1541, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_deployL2Factory(address,uint256,address)"}}, {"type": "node", "name": "IInbox(inbox).createRetryableTicket{value: retryableFee_scope_0}(address(0),0,maxSubmissionCost,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,deploymentData)", "source_mapping": {"start": 19509, "length": 317, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [474, 475, 476, 477, 478, 479, 480, 481, 482, 483], "starting_column": 13, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployL2Factory", "source_mapping": {"start": 18302, "length": 1541, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_deployL2Factory(address,uint256,address)"}}}}], "description": "L1AtomicTokenBridgeCreator._deployL2Factory(address,uint256,address) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#447-485) ignores return value by IInbox(inbox).createRetryableTicket{value: retryableFee_scope_0}(address(0),0,maxSubmissionCost,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,deploymentData) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#474-483)\n", "markdown": "[L1AtomicTokenBridgeCreator._deployL2Factory(address,uint256,address)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L447-L485) ignores return value by [IInbox(inbox).createRetryableTicket{value: retryableFee_scope_0}(address(0),0,maxSubmissionCost,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,deploymentData)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L474-L483)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L447-L485", "id": "e020b241fb03d0676863525627c28d172830b0205edf229997b005753861a0e9", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_createRetryableUsingEth", "source_mapping": {"start": 6082, "length": 557, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_createRetryableUsingEth(RetryableParams,uint256,uint256,bytes)"}}, {"type": "node", "name": "IInbox(retryableParams.inbox).createRetryableTicket{value: value}(retryableParams.target,0,maxSubmissionCost,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,data)", "source_mapping": {"start": 6276, "length": 356, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [162, 163, 164, 165, 166, 167, 168, 169, 170, 171], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "_createRetryableUsingEth", "source_mapping": {"start": 6082, "length": 557, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_createRetryableUsingEth(RetryableParams,uint256,uint256,bytes)"}}}}], "description": "L1TokenBridgeRetryableSender._createRetryableUsingEth(RetryableParams,uint256,uint256,bytes) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#156-172) ignores return value by IInbox(retryableParams.inbox).createRetryableTicket{value: value}(retryableParams.target,0,maxSubmissionCost,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,data) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#162-171)\n", "markdown": "[L1TokenBridgeRetryableSender._createRetryableUsingEth(RetryableParams,uint256,uint256,bytes)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L156-L172) ignores return value by [IInbox(retryableParams.inbox).createRetryableTicket{value: value}(retryableParams.target,0,maxSubmissionCost,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,data)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L162-L171)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L156-L172", "id": "f3fce683bbb88d3bc3deac571c8226af666c3cd0ba19d493a68e53fcf76039c3", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_createRetryableUsingFeeToken", "source_mapping": {"start": 6645, "length": 531, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_createRetryableUsingFeeToken(RetryableParams,bytes)"}}, {"type": "node", "name": "IERC20Inbox(retryableParams.inbox).createRetryableTicket(retryableParams.target,0,0,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,retryableParams.feeTokenTotalFeeAmount,data)", "source_mapping": {"start": 6786, "length": 383, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "_createRetryableUsingFeeToken", "source_mapping": {"start": 6645, "length": 531, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_createRetryableUsingFeeToken(RetryableParams,bytes)"}}}}], "description": "L1TokenBridgeRetryableSender._createRetryableUsingFeeToken(RetryableParams,bytes) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#174-189) ignores return value by IERC20Inbox(retryableParams.inbox).createRetryableTicket(retryableParams.target,0,0,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,retryableParams.feeTokenTotalFeeAmount,data) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#178-188)\n", "markdown": "[L1TokenBridgeRetryableSender._createRetryableUsingFeeToken(RetryableParams,bytes)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L174-L189) ignores return value by [IERC20Inbox(retryableParams.inbox).createRetryableTicket(retryableParams.target,0,0,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,retryableParams.feeTokenTotalFeeAmount,data)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L178-L188)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L174-L189", "id": "b1f97e28632bc95bd065ae9a26c8acbdfd7cdd6155fe5910bf1567df8d76fe31", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}] \ No newline at end of file +[{"elements": [{"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 6147, "length": 181, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [168, 169, 170, 171, 172, 173], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2USDCGateway", "source_mapping": {"start": 1587, "length": 6252, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}, {"type": "node", "name": "IFiatToken(_l2Address).mint(_dest,_amount)", "source_mapping": {"start": 6278, "length": 43, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [172], "starting_column": 9, "ending_column": 52}, "type_specific_fields": {"parent": {"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 6147, "length": 181, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [168, 169, 170, 171, 172, 173], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2USDCGateway", "source_mapping": {"start": 1587, "length": 6252, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}}}], "description": "L2USDCGateway.inboundEscrowTransfer(address,address,uint256) (contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#168-173) ignores return value by IFiatToken(_l2Address).mint(_dest,_amount) (contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#172)\n", "markdown": "[L2USDCGateway.inboundEscrowTransfer(address,address,uint256)](contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#L168-L173) ignores return value by [IFiatToken(_l2Address).mint(_dest,_amount)](contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#L172)\n", "first_markdown_element": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#L168-L173", "id": "e66b5e9367f98175ecac6f63c52b8f9b4423b5805d002f29ebaa548c0e806714", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "perform", "source_mapping": {"start": 169, "length": 755, "filename_relative": "contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "filename_short": "contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "is_dependency": false, "lines": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RegisterUsdcGatewayAction", "source_mapping": {"start": 128, "length": 798, "filename_relative": "contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "filename_short": "contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "is_dependency": false, "lines": [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28], "starting_column": 1, "ending_column": 2}}, "signature": "perform(uint256,uint256,uint256)"}}, {"type": "node", "name": "L1GatewayRouter(router).setGateways{value: msg.value}(_token,_gateway,_maxGas,_gasPriceBid,_maxSubmissionCost)", "source_mapping": {"start": 635, "length": 136, "filename_relative": "contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "filename_short": "contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "is_dependency": false, "lines": [19, 20, 21], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "perform", "source_mapping": {"start": 169, "length": 755, "filename_relative": "contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "filename_short": "contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "is_dependency": false, "lines": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "RegisterUsdcGatewayAction", "source_mapping": {"start": 128, "length": 798, "filename_relative": "contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "filename_short": "contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol", "is_dependency": false, "lines": [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28], "starting_column": 1, "ending_column": 2}}, "signature": "perform(uint256,uint256,uint256)"}}}}], "description": "RegisterUsdcGatewayAction.perform(uint256,uint256,uint256) (contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol#7-27) ignores return value by L1GatewayRouter(router).setGateways{value: msg.value}(_token,_gateway,_maxGas,_gasPriceBid,_maxSubmissionCost) (contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol#19-21)\n", "markdown": "[RegisterUsdcGatewayAction.perform(uint256,uint256,uint256)](contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol#L7-L27) ignores return value by [L1GatewayRouter(router).setGateways{value: msg.value}(_token,_gateway,_maxGas,_gasPriceBid,_maxSubmissionCost)](contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol#L19-L21)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/RegisterUsdcGatewayAction.sol#L7-L27", "id": "cd44d30bd7ed46324a309977cb28ba80e6e75b94c03df10c5c8f5a74437d0f7c", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "outboundEscrowTransfer", "source_mapping": {"start": 11053, "length": 592, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "is_dependency": false, "lines": [293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1ArbitrumGateway", "source_mapping": {"start": 1279, "length": 14336, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "is_dependency": false, "lines": [36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404], "starting_column": 1, "ending_column": 2}}, "signature": "outboundEscrowTransfer(address,address,uint256)"}}, {"type": "node", "name": "IERC20(_l1Token).safeTransferFrom(_from,address(this),_amount)", "source_mapping": {"start": 11459, "length": 64, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "is_dependency": false, "lines": [301], "starting_column": 9, "ending_column": 73}, "type_specific_fields": {"parent": {"type": "function", "name": "outboundEscrowTransfer", "source_mapping": {"start": 11053, "length": 592, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "is_dependency": false, "lines": [293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1ArbitrumGateway", "source_mapping": {"start": 1279, "length": 14336, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol", "is_dependency": false, "lines": [36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404], "starting_column": 1, "ending_column": 2}}, "signature": "outboundEscrowTransfer(address,address,uint256)"}}}}], "description": "L1ArbitrumGateway.outboundEscrowTransfer(address,address,uint256) (contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol#293-304) uses arbitrary from in transferFrom: IERC20(_l1Token).safeTransferFrom(_from,address(this),_amount) (contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol#301)\n", "markdown": "[L1ArbitrumGateway.outboundEscrowTransfer(address,address,uint256)](contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol#L293-L304) uses arbitrary from in transferFrom: [IERC20(_l1Token).safeTransferFrom(_from,address(this),_amount)](contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol#L301)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumGateway.sol#L293-L304", "id": "7f2693a46b04c9b469a640c442acfb2aaa3e814506fef81efed08031db2d23bd", "check": "arbitrary-send-erc20", "impact": "High", "confidence": "High"}, {"elements": [{"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 2818, "length": 266, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "is_dependency": false, "lines": [80, 81, 82, 83, 84, 85, 86, 87], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2WethGateway", "source_mapping": {"start": 864, "length": 2787, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "is_dependency": false, "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}, {"type": "node", "name": "IWETH9(_l2TokenAddress).deposit{value: _amount}()", "source_mapping": {"start": 2964, "length": 51, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "is_dependency": false, "lines": [85], "starting_column": 9, "ending_column": 60}, "type_specific_fields": {"parent": {"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 2818, "length": 266, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "is_dependency": false, "lines": [80, 81, 82, 83, 84, 85, 86, 87], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2WethGateway", "source_mapping": {"start": 864, "length": 2787, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol", "is_dependency": false, "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}}}], "description": "L2WethGateway.inboundEscrowTransfer(address,address,uint256) (contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol#80-87) sends eth to arbitrary user\n\tDangerous calls:\n\t- IWETH9(_l2TokenAddress).deposit{value: _amount}() (contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol#85)\n", "markdown": "[L2WethGateway.inboundEscrowTransfer(address,address,uint256)](contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol#L80-L87) sends eth to arbitrary user\n\tDangerous calls:\n\t- [IWETH9(_l2TokenAddress).deposit{value: _amount}()](contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol#L85)\n", "first_markdown_element": "contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol#L80-L87", "id": "e2c734fd5c5ec43d4faaa9a093395e2556c3b429c34215a26107de1a4271f405", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_sendRetryableToCreateContracts", "source_mapping": {"start": 16693, "length": 689, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableToCreateContracts(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,L2DeploymentAddresses,address,address)"}}, {"type": "node", "name": "retryableSender.sendRetryable{value: 0}(retryableParams,l2TemplateAddress,l1Deployment,l2Deployment.standardGateway,l2RollupOwner,msg.sender,upgradeExecutor)", "source_mapping": {"start": 17027, "length": 348, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "_sendRetryableToCreateContracts", "source_mapping": {"start": 16693, "length": 689, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableToCreateContracts(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,L2DeploymentAddresses,address,address)"}}}}, {"type": "node", "name": "retryableSender.sendRetryable{value: address(this).balance}(retryableParams,l2TemplateAddress,l1Deployment,l2Deployment.standardGateway,l2RollupOwner,msg.sender,upgradeExecutor)", "source_mapping": {"start": 17027, "length": 348, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "_sendRetryableToCreateContracts", "source_mapping": {"start": 16693, "length": 689, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableToCreateContracts(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,L2DeploymentAddresses,address,address)"}}}}], "description": "L1AtomicTokenBridgeCreator._sendRetryableToCreateContracts(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,L2DeploymentAddresses,address,address) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#400-419) sends eth to arbitrary user\n\tDangerous calls:\n\t- retryableSender.sendRetryable{value: 0}(retryableParams,l2TemplateAddress,l1Deployment,l2Deployment.standardGateway,l2RollupOwner,msg.sender,upgradeExecutor) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#408-418)\n\t- retryableSender.sendRetryable{value: address(this).balance}(retryableParams,l2TemplateAddress,l1Deployment,l2Deployment.standardGateway,l2RollupOwner,msg.sender,upgradeExecutor) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#408-418)\n", "markdown": "[L1AtomicTokenBridgeCreator._sendRetryableToCreateContracts(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,L2DeploymentAddresses,address,address)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L400-L419) sends eth to arbitrary user\n\tDangerous calls:\n\t- [retryableSender.sendRetryable{value: 0}(retryableParams,l2TemplateAddress,l1Deployment,l2Deployment.standardGateway,l2RollupOwner,msg.sender,upgradeExecutor)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L408-L418)\n\t- [retryableSender.sendRetryable{value: address(this).balance}(retryableParams,l2TemplateAddress,l1Deployment,l2Deployment.standardGateway,l2RollupOwner,msg.sender,upgradeExecutor)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L408-L418)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L400-L419", "id": "84a1b3de438b5383716ee1c6461a8a33564d9e9909292e29f6920c3dde7db801", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deployL2Factory", "source_mapping": {"start": 18302, "length": 1541, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_deployL2Factory(address,uint256,address)"}}, {"type": "node", "name": "IInbox(inbox).createRetryableTicket{value: retryableFee_scope_0}(address(0),0,maxSubmissionCost,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,deploymentData)", "source_mapping": {"start": 19509, "length": 317, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [474, 475, 476, 477, 478, 479, 480, 481, 482, 483], "starting_column": 13, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployL2Factory", "source_mapping": {"start": 18302, "length": 1541, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_deployL2Factory(address,uint256,address)"}}}}], "description": "L1AtomicTokenBridgeCreator._deployL2Factory(address,uint256,address) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#447-485) sends eth to arbitrary user\n\tDangerous calls:\n\t- IInbox(inbox).createRetryableTicket{value: retryableFee_scope_0}(address(0),0,maxSubmissionCost,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,deploymentData) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#474-483)\n", "markdown": "[L1AtomicTokenBridgeCreator._deployL2Factory(address,uint256,address)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L447-L485) sends eth to arbitrary user\n\tDangerous calls:\n\t- [IInbox(inbox).createRetryableTicket{value: retryableFee_scope_0}(address(0),0,maxSubmissionCost,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,deploymentData)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L474-L483)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L447-L485", "id": "99184e5a886f6131fdcb8318889a0655a41bf41eb6069c01f0099a0212556371", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_sendRetryableUsingEth", "source_mapping": {"start": 3140, "length": 1810, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableUsingEth(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,address,address,address,address)"}}, {"type": "node", "name": "(success,None) = deployer.call{value: address(this).balance}()", "source_mapping": {"start": 4804, "length": 65, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [118], "starting_column": 9, "ending_column": 74}, "type_specific_fields": {"parent": {"type": "function", "name": "_sendRetryableUsingEth", "source_mapping": {"start": 3140, "length": 1810, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableUsingEth(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,address,address,address,address)"}}}}], "description": "L1TokenBridgeRetryableSender._sendRetryableUsingEth(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,address,address,address,address) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#77-120) sends eth to arbitrary user\n\tDangerous calls:\n\t- (success,None) = deployer.call{value: address(this).balance}() (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#118)\n", "markdown": "[L1TokenBridgeRetryableSender._sendRetryableUsingEth(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,address,address,address,address)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L77-L120) sends eth to arbitrary user\n\tDangerous calls:\n\t- [(success,None) = deployer.call{value: address(this).balance}()](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L118)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L77-L120", "id": "04b7713760c9cd5b98aaa53a7e551c516febef4ad6844a984d8a91a36843bb5e", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_createRetryableUsingEth", "source_mapping": {"start": 6082, "length": 557, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_createRetryableUsingEth(RetryableParams,uint256,uint256,bytes)"}}, {"type": "node", "name": "IInbox(retryableParams.inbox).createRetryableTicket{value: value}(retryableParams.target,0,maxSubmissionCost,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,data)", "source_mapping": {"start": 6276, "length": 356, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [162, 163, 164, 165, 166, 167, 168, 169, 170, 171], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "_createRetryableUsingEth", "source_mapping": {"start": 6082, "length": 557, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_createRetryableUsingEth(RetryableParams,uint256,uint256,bytes)"}}}}], "description": "L1TokenBridgeRetryableSender._createRetryableUsingEth(RetryableParams,uint256,uint256,bytes) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#156-172) sends eth to arbitrary user\n\tDangerous calls:\n\t- IInbox(retryableParams.inbox).createRetryableTicket{value: value}(retryableParams.target,0,maxSubmissionCost,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,data) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#162-171)\n", "markdown": "[L1TokenBridgeRetryableSender._createRetryableUsingEth(RetryableParams,uint256,uint256,bytes)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L156-L172) sends eth to arbitrary user\n\tDangerous calls:\n\t- [IInbox(retryableParams.inbox).createRetryableTicket{value: value}(retryableParams.target,0,maxSubmissionCost,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,data)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L162-L171)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L156-L172", "id": "a7688c5005162ad9a035feab8e6c4c7161c854dec1f75d2422d647ef3ad2bfa7", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 2941, "length": 245, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "is_dependency": false, "lines": [88, 89, 90, 91, 92, 93, 94, 95], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1WethGateway", "source_mapping": {"start": 965, "length": 3233, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "is_dependency": false, "lines": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}, {"type": "node", "name": "IWETH9(_l1Token).deposit{value: _amount}()", "source_mapping": {"start": 3080, "length": 44, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "is_dependency": false, "lines": [93], "starting_column": 9, "ending_column": 53}, "type_specific_fields": {"parent": {"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 2941, "length": 245, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "is_dependency": false, "lines": [88, 89, 90, 91, 92, 93, 94, 95], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1WethGateway", "source_mapping": {"start": 965, "length": 3233, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol", "is_dependency": false, "lines": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}}}], "description": "L1WethGateway.inboundEscrowTransfer(address,address,uint256) (contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol#88-95) sends eth to arbitrary user\n\tDangerous calls:\n\t- IWETH9(_l1Token).deposit{value: _amount}() (contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol#93)\n", "markdown": "[L1WethGateway.inboundEscrowTransfer(address,address,uint256)](contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol#L88-L95) sends eth to arbitrary user\n\tDangerous calls:\n\t- [IWETH9(_l1Token).deposit{value: _amount}()](contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol#L93)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol#L88-L95", "id": "aefde4912f3446b807349549a2c0405d67afd0d48c7f40e4f14c642fc6454318", "check": "arbitrary-send-eth", "impact": "High", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "redirectedExits", "source_mapping": {"start": 1128, "length": 51, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "is_dependency": false, "lines": [42], "starting_column": 5, "ending_column": 56}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1ArbitrumExtendedGateway", "source_mapping": {"start": 927, "length": 4270, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "is_dependency": false, "lines": [33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140], "starting_column": 1, "ending_column": 2}}}}, {"type": "function", "name": "getExternalCall", "source_mapping": {"start": 3628, "length": 925, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "is_dependency": false, "lines": [103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1ArbitrumExtendedGateway", "source_mapping": {"start": 927, "length": 4270, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol", "is_dependency": false, "lines": [33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140], "starting_column": 1, "ending_column": 2}}, "signature": "getExternalCall(uint256,address,bytes)"}}], "description": "L1ArbitrumExtendedGateway.redirectedExits (contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol#42) is never initialized. It is used in:\n\t- L1ArbitrumExtendedGateway.getExternalCall(uint256,address,bytes) (contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol#103-120)\n", "markdown": "[L1ArbitrumExtendedGateway.redirectedExits](contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol#L42) is never initialized. It is used in:\n\t- [L1ArbitrumExtendedGateway.getExternalCall(uint256,address,bytes)](contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol#L103-L120)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/gateway/L1ArbitrumExtendedGateway.sol#L42", "id": "e5aa1893c702d02a90473a1c603e113adcc2f5f0696cde71aac9ae09574067bf", "check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"elements": [{"type": "function", "name": "_getScaledAmount", "source_mapping": {"start": 24831, "length": 559, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_getScaledAmount(address,uint256)"}}, {"type": "node", "name": "scaledAmount = amount / (10 ** (18 - decimals))", "source_mapping": {"start": 25086, "length": 55, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [610], "starting_column": 13, "ending_column": 68}, "type_specific_fields": {"parent": {"type": "function", "name": "_getScaledAmount", "source_mapping": {"start": 24831, "length": 559, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_getScaledAmount(address,uint256)"}}}}, {"type": "node", "name": "scaledAmount * (10 ** (18 - decimals)) < amount", "source_mapping": {"start": 25196, "length": 47, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [612], "starting_column": 17, "ending_column": 64}, "type_specific_fields": {"parent": {"type": "function", "name": "_getScaledAmount", "source_mapping": {"start": 24831, "length": 559, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_getScaledAmount(address,uint256)"}}}}], "description": "L1AtomicTokenBridgeCreator._getScaledAmount(address,uint256) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#604-618) performs a multiplication on the result of a division:\n\t- scaledAmount = amount / (10 ** (18 - decimals)) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#610)\n\t- scaledAmount * (10 ** (18 - decimals)) < amount (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#612)\n", "markdown": "[L1AtomicTokenBridgeCreator._getScaledAmount(address,uint256)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L604-L618) performs a multiplication on the result of a division:\n\t- [scaledAmount = amount / (10 ** (18 - decimals))](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L610)\n\t- [scaledAmount * (10 ** (18 - decimals)) < amount](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L612)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L604-L618", "id": "a2bb622fdc1256a6305ef07732ea9e8f22f715757cc69e14e9979282ee2123ef", "check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "node", "name": "_deployL2Factory(inbox,gasPriceBid,feeToken)", "source_mapping": {"start": 14562, "length": 46, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [342], "starting_column": 9, "ending_column": 55}, "type_specific_fields": {"parent": {"type": "function", "name": "createTokenBridge", "source_mapping": {"start": 8217, "length": 8470, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "createTokenBridge(address,address,uint256,uint256)"}}}}, {"type": "node", "name": "_deployL2Factory(inbox,gasPriceBid,feeToken)", "source_mapping": {"start": 14562, "length": 46, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [342], "starting_column": 9, "ending_column": 55}, "type_specific_fields": {"parent": {"type": "function", "name": "createTokenBridge", "source_mapping": {"start": 8217, "length": 8470, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "createTokenBridge(address,address,uint256,uint256)"}}}}], "description": "Multiple retryable tickets created in the same function:\n\t -_deployL2Factory(inbox,gasPriceBid,feeToken) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#342)\n\t -_deployL2Factory(inbox,gasPriceBid,feeToken) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#342)\n", "markdown": "Multiple retryable tickets created in the same function:\n\t -[_deployL2Factory(inbox,gasPriceBid,feeToken)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L342)\n\t -[_deployL2Factory(inbox,gasPriceBid,feeToken)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L342)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L342", "id": "a529625c2877a63d7b2dbe920fcdb59daa32aacb3dbb402906376a5e3ddba6e7", "check": "out-of-order-retryable", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "node", "name": "_createRetryableUsingEth(retryableParams,maxSubmissionCost,retryableValue,data)", "source_mapping": {"start": 4512, "length": 82, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [113], "starting_column": 9, "ending_column": 91}, "type_specific_fields": {"parent": {"type": "function", "name": "_sendRetryableUsingEth", "source_mapping": {"start": 3140, "length": 1810, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableUsingEth(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,address,address,address,address)"}}}}, {"type": "node", "name": "_createRetryableUsingEth(retryableParams,maxSubmissionCost,retryableValue,data)", "source_mapping": {"start": 4512, "length": 82, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [113], "starting_column": 9, "ending_column": 91}, "type_specific_fields": {"parent": {"type": "function", "name": "_sendRetryableUsingEth", "source_mapping": {"start": 3140, "length": 1810, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_sendRetryableUsingEth(RetryableParams,L2TemplateAddresses,L1DeploymentAddresses,address,address,address,address)"}}}}], "description": "Multiple retryable tickets created in the same function:\n\t -_createRetryableUsingEth(retryableParams,maxSubmissionCost,retryableValue,data) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#113)\n\t -_createRetryableUsingEth(retryableParams,maxSubmissionCost,retryableValue,data) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#113)\n", "markdown": "Multiple retryable tickets created in the same function:\n\t -[_createRetryableUsingEth(retryableParams,maxSubmissionCost,retryableValue,data)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L113)\n\t -[_createRetryableUsingEth(retryableParams,maxSubmissionCost,retryableValue,data)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L113)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L113", "id": "17648cf433b86bf06bcab3f179d37fe19e73adff495e0e9485ce4b5d2d22a91b", "check": "out-of-order-retryable", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "l1Deployment", "source_mapping": {"start": 9529, "length": 41, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [223], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "createTokenBridge", "source_mapping": {"start": 8217, "length": 8470, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "createTokenBridge(address,address,uint256,uint256)"}}}}], "description": "L1AtomicTokenBridgeCreator.createTokenBridge(address,address,uint256,uint256).l1Deployment (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#223) is a local variable never initialized\n", "markdown": "[L1AtomicTokenBridgeCreator.createTokenBridge(address,address,uint256,uint256).l1Deployment](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L223) is a local variable never initialized\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L223", "id": "83541fa7c678a7dc42b6a8c5709120d6d76a9a51c8ccf8c6cf6e984776341180", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "l2Deployment", "source_mapping": {"start": 9580, "length": 41, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [224], "starting_column": 9, "ending_column": 50}, "type_specific_fields": {"parent": {"type": "function", "name": "createTokenBridge", "source_mapping": {"start": 8217, "length": 8470, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "createTokenBridge(address,address,uint256,uint256)"}}}}], "description": "L1AtomicTokenBridgeCreator.createTokenBridge(address,address,uint256,uint256).l2Deployment (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#224) is a local variable never initialized\n", "markdown": "[L1AtomicTokenBridgeCreator.createTokenBridge(address,address,uint256,uint256).l2Deployment](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L224) is a local variable never initialized\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L224", "id": "9bfb8ca665ae98867b761c889e2c325d50e1cb30307188f74f012df830627e2b", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "variable", "name": "l2NewDefaultGateway", "source_mapping": {"start": 2756, "length": 27, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "is_dependency": false, "lines": [92], "starting_column": 9, "ending_column": 36}, "type_specific_fields": {"parent": {"type": "function", "name": "_setDefaultGateway", "source_mapping": {"start": 2425, "length": 1071, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "is_dependency": false, "lines": [81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1GatewayRouter", "source_mapping": {"start": 1254, "length": 11109, "filename_relative": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "filename_short": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol", "is_dependency": false, "lines": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354], "starting_column": 1, "ending_column": 2}}, "signature": "_setDefaultGateway(address,uint256,uint256,uint256,uint256)"}}}}], "description": "L1GatewayRouter._setDefaultGateway(address,uint256,uint256,uint256,uint256).l2NewDefaultGateway (contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol#92) is a local variable never initialized\n", "markdown": "[L1GatewayRouter._setDefaultGateway(address,uint256,uint256,uint256,uint256).l2NewDefaultGateway](contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol#L92) is a local variable never initialized\n", "first_markdown_element": "contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol#L92", "id": "8557712f770f31a8c2dbfa8451859919fe91c55860d5c13d31210fc167b6085e", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "deployL2Contracts", "source_mapping": {"start": 1836, "length": 2106, "filename_relative": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_short": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "is_dependency": false, "lines": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2AtomicTokenBridgeFactory", "source_mapping": {"start": 1325, "length": 10350, "filename_relative": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_short": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "is_dependency": false, "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284], "starting_column": 1, "ending_column": 2}}, "signature": "deployL2Contracts(L2RuntimeCode,address,address,address,address,address,address,address,address)"}}, {"type": "node", "name": "Create2.deploy(0,_getL2Salt(OrbitSalts.L2_MULTICALL),CreationCodeHelper.getCreationCodeFor(l2Code.multicall))", "source_mapping": {"start": 3658, "length": 157, "filename_relative": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_short": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "is_dependency": false, "lines": [78, 79, 80, 81, 82], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "deployL2Contracts", "source_mapping": {"start": 1836, "length": 2106, "filename_relative": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_short": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "is_dependency": false, "lines": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2AtomicTokenBridgeFactory", "source_mapping": {"start": 1325, "length": 10350, "filename_relative": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "filename_short": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol", "is_dependency": false, "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284], "starting_column": 1, "ending_column": 2}}, "signature": "deployL2Contracts(L2RuntimeCode,address,address,address,address,address,address,address,address)"}}}}], "description": "L2AtomicTokenBridgeFactory.deployL2Contracts(L2RuntimeCode,address,address,address,address,address,address,address,address) (contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol#35-86) ignores return value by Create2.deploy(0,_getL2Salt(OrbitSalts.L2_MULTICALL),CreationCodeHelper.getCreationCodeFor(l2Code.multicall)) (contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol#78-82)\n", "markdown": "[L2AtomicTokenBridgeFactory.deployL2Contracts(L2RuntimeCode,address,address,address,address,address,address,address,address)](contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol#L35-L86) ignores return value by [Create2.deploy(0,_getL2Salt(OrbitSalts.L2_MULTICALL),CreationCodeHelper.getCreationCodeFor(l2Code.multicall))](contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol#L78-L82)\n", "first_markdown_element": "contracts/tokenbridge/arbitrum/L2AtomicTokenBridgeFactory.sol#L35-L86", "id": "2956ed76e7f9c4953ba1242f2735d68b34ea04746ec3353fe026ad5948aa4de9", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 5924, "length": 181, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [165, 166, 167, 168, 169, 170], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2USDCGateway", "source_mapping": {"start": 1364, "length": 6252, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}, {"type": "node", "name": "IFiatToken(_l2Address).mint(_dest,_amount)", "source_mapping": {"start": 6055, "length": 43, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [169], "starting_column": 9, "ending_column": 52}, "type_specific_fields": {"parent": {"type": "function", "name": "inboundEscrowTransfer", "source_mapping": {"start": 5924, "length": 181, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [165, 166, 167, 168, 169, 170], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L2USDCGateway", "source_mapping": {"start": 1364, "length": 6252, "filename_relative": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "filename_short": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol", "is_dependency": false, "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213], "starting_column": 1, "ending_column": 2}}, "signature": "inboundEscrowTransfer(address,address,uint256)"}}}}], "description": "L2USDCGateway.inboundEscrowTransfer(address,address,uint256) (contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#165-170) ignores return value by IFiatToken(_l2Address).mint(_dest,_amount) (contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#169)\n", "markdown": "[L2USDCGateway.inboundEscrowTransfer(address,address,uint256)](contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#L165-L170) ignores return value by [IFiatToken(_l2Address).mint(_dest,_amount)](contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#L169)\n", "first_markdown_element": "contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol#L165-L170", "id": "b25f84626d48e5778e53022dd8067ab3aac7279a96c02a6e6d0569fc0cd1cc8a", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deployL2Factory", "source_mapping": {"start": 18302, "length": 1541, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_deployL2Factory(address,uint256,address)"}}, {"type": "node", "name": "IERC20Inbox(inbox).createRetryableTicket(address(0),0,0,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,scaledRetryableFee,deploymentData)", "source_mapping": {"start": 18926, "length": 321, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468], "starting_column": 13, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployL2Factory", "source_mapping": {"start": 18302, "length": 1541, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_deployL2Factory(address,uint256,address)"}}}}], "description": "L1AtomicTokenBridgeCreator._deployL2Factory(address,uint256,address) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#447-485) ignores return value by IERC20Inbox(inbox).createRetryableTicket(address(0),0,0,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,scaledRetryableFee,deploymentData) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#458-468)\n", "markdown": "[L1AtomicTokenBridgeCreator._deployL2Factory(address,uint256,address)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L447-L485) ignores return value by [IERC20Inbox(inbox).createRetryableTicket(address(0),0,0,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,scaledRetryableFee,deploymentData)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L458-L468)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L447-L485", "id": "dc6f44871a7669ec4f8efc4b8484c6188fb3d717556f325671cf5d2fde4a1b09", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_deployL2Factory", "source_mapping": {"start": 18302, "length": 1541, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_deployL2Factory(address,uint256,address)"}}, {"type": "node", "name": "IInbox(inbox).createRetryableTicket{value: retryableFee_scope_0}(address(0),0,maxSubmissionCost,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,deploymentData)", "source_mapping": {"start": 19509, "length": 317, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [474, 475, 476, 477, 478, 479, 480, 481, 482, 483], "starting_column": 13, "ending_column": 14}, "type_specific_fields": {"parent": {"type": "function", "name": "_deployL2Factory", "source_mapping": {"start": 18302, "length": 1541, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1AtomicTokenBridgeCreator", "source_mapping": {"start": 2114, "length": 23278, "filename_relative": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "filename_short": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol", "is_dependency": false, "lines": [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619], "starting_column": 1, "ending_column": 2}}, "signature": "_deployL2Factory(address,uint256,address)"}}}}], "description": "L1AtomicTokenBridgeCreator._deployL2Factory(address,uint256,address) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#447-485) ignores return value by IInbox(inbox).createRetryableTicket{value: retryableFee_scope_0}(address(0),0,maxSubmissionCost,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,deploymentData) (contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#474-483)\n", "markdown": "[L1AtomicTokenBridgeCreator._deployL2Factory(address,uint256,address)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L447-L485) ignores return value by [IInbox(inbox).createRetryableTicket{value: retryableFee_scope_0}(address(0),0,maxSubmissionCost,msg.sender,msg.sender,gasLimitForL2FactoryDeployment,gasPriceBid,deploymentData)](contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L474-L483)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol#L447-L485", "id": "e020b241fb03d0676863525627c28d172830b0205edf229997b005753861a0e9", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_createRetryableUsingEth", "source_mapping": {"start": 6082, "length": 557, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_createRetryableUsingEth(RetryableParams,uint256,uint256,bytes)"}}, {"type": "node", "name": "IInbox(retryableParams.inbox).createRetryableTicket{value: value}(retryableParams.target,0,maxSubmissionCost,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,data)", "source_mapping": {"start": 6276, "length": 356, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [162, 163, 164, 165, 166, 167, 168, 169, 170, 171], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "_createRetryableUsingEth", "source_mapping": {"start": 6082, "length": 557, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_createRetryableUsingEth(RetryableParams,uint256,uint256,bytes)"}}}}], "description": "L1TokenBridgeRetryableSender._createRetryableUsingEth(RetryableParams,uint256,uint256,bytes) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#156-172) ignores return value by IInbox(retryableParams.inbox).createRetryableTicket{value: value}(retryableParams.target,0,maxSubmissionCost,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,data) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#162-171)\n", "markdown": "[L1TokenBridgeRetryableSender._createRetryableUsingEth(RetryableParams,uint256,uint256,bytes)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L156-L172) ignores return value by [IInbox(retryableParams.inbox).createRetryableTicket{value: value}(retryableParams.target,0,maxSubmissionCost,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,data)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L162-L171)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L156-L172", "id": "f3fce683bbb88d3bc3deac571c8226af666c3cd0ba19d493a68e53fcf76039c3", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"elements": [{"type": "function", "name": "_createRetryableUsingFeeToken", "source_mapping": {"start": 6645, "length": 531, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_createRetryableUsingFeeToken(RetryableParams,bytes)"}}, {"type": "node", "name": "IERC20Inbox(retryableParams.inbox).createRetryableTicket(retryableParams.target,0,0,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,retryableParams.feeTokenTotalFeeAmount,data)", "source_mapping": {"start": 6786, "length": 383, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188], "starting_column": 9, "ending_column": 10}, "type_specific_fields": {"parent": {"type": "function", "name": "_createRetryableUsingFeeToken", "source_mapping": {"start": 6645, "length": 531, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189], "starting_column": 5, "ending_column": 6}, "type_specific_fields": {"parent": {"type": "contract", "name": "L1TokenBridgeRetryableSender", "source_mapping": {"start": 1397, "length": 5781, "filename_relative": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_absolute": "/Users/goran/repos/offchain/token-bridge-contracts/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "filename_short": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol", "is_dependency": false, "lines": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190], "starting_column": 1, "ending_column": 2}}, "signature": "_createRetryableUsingFeeToken(RetryableParams,bytes)"}}}}], "description": "L1TokenBridgeRetryableSender._createRetryableUsingFeeToken(RetryableParams,bytes) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#174-189) ignores return value by IERC20Inbox(retryableParams.inbox).createRetryableTicket(retryableParams.target,0,0,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,retryableParams.feeTokenTotalFeeAmount,data) (contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#178-188)\n", "markdown": "[L1TokenBridgeRetryableSender._createRetryableUsingFeeToken(RetryableParams,bytes)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L174-L189) ignores return value by [IERC20Inbox(retryableParams.inbox).createRetryableTicket(retryableParams.target,0,0,retryableParams.excessFeeRefundAddress,retryableParams.callValueRefundAddress,retryableParams.maxGas,retryableParams.gasPriceBid,retryableParams.feeTokenTotalFeeAmount,data)](contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L178-L188)\n", "first_markdown_element": "contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol#L174-L189", "id": "b1f97e28632bc95bd065ae9a26c8acbdfd7cdd6155fe5910bf1567df8d76fe31", "check": "unused-return", "impact": "Medium", "confidence": "Medium"}] \ No newline at end of file From 5065de4e9a73d4958dff8b432751f5c6c925edab Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Fri, 16 Aug 2024 08:32:33 +0200 Subject: [PATCH 32/32] Readme clarifications --- scripts/usdc-bridge-deployment/README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/usdc-bridge-deployment/README.md b/scripts/usdc-bridge-deployment/README.md index 1384b66a3d..bc0fc782aa 100644 --- a/scripts/usdc-bridge-deployment/README.md +++ b/scripts/usdc-bridge-deployment/README.md @@ -10,7 +10,7 @@ This doc describes how to deploy USDC bridge compatible with both Arbitrum's tok ## Assumptions -It is assumed there is already USDC token deployed and used on the parent chain. If not, follow the instructions in the Circle's `stablecoin-evm` repo to deploy one. +It is assumed there is already USDC token deployed and used on the parent chain. Also, it is assumed the standard Orbit chain ownership system is used, ie. UpgradeExecutor is the owner of the ownable contracts and there is an EOA or multisig which has executor role on the UpgradeExecutor. @@ -70,11 +70,9 @@ Once transition to native USDC is agreed on, following steps are required: - L1 gateway owner pauses deposits on parent chain by calling `pauseDeposits()` - L2 gateway owner pauses withdrawals on child chain by calling `pauseWithdrawals()` - master minter removes the minter role from the child chain gateway - - there should be no in-flight deposits when minter role is revoked. If there are any, they should be executed (can be done by anyone by claiming the failed retryable ticket which does the USDC depositing) - - if minter role is revoked before in-flight deposits are claimed, those funds can’t be minted. One option is to leave the gateway’s minter role, but decrease the allowance to match the total amount of unclaimed deposits + - NOTE: there should be no in-flight deposits when minter role is revoked. If there are any, they should be finalized first. That can be done by anyone by claiming the claimable failed retryable tickets which do the USDC depositing - L1 gateway owner sets Circle's account as burner on the parent chain gateway using `setBurner(address)` - L1 gateway owner reads the total supply of USDC on the child chain, and then invokes `setBurnAmount(uint256)` on the parent child gateway where the amount matches the total supply - - in case there are unclaimed deposits which are claimable (ie. destination is not blacklisted), their total amount should be added to the supply as those tokens shall eventually be minted by child chain gateway - USDC masterMinter gives minter role with 0 allowance to L1 gateway, so the burn can be executed - on the child chain, L2 gateway owner calls the `setUsdcOwnershipTransferrer(address)` to set the account (provided and controlled by Circle) which will be able to transfer the bridged USDC ownership and proxy admin - if not already owned by gateway, L2 USDC owner transfers ownership to gateway, and proxy admin transfers admin rights to gateway