1067 lines
34 KiB
JSON
1067 lines
34 KiB
JSON
{
|
|
"id": "0fd306775b04899bcce312ba7df8777d",
|
|
"_format": "hh-sol-build-info-1",
|
|
"solcVersion": "0.8.26",
|
|
"solcLongVersion": "0.8.26+commit.8a97fa7a",
|
|
"input": {
|
|
"language": "Solidity",
|
|
"sources": {
|
|
"contracts/bridges/bridge/vendor/AddressAliasHelper.sol": {
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\r\n\r\n/*\r\n * Copyright 2019-2021, Offchain Labs, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity ^0.8.0;\r\n\r\nlibrary AddressAliasHelper {\r\n uint160 constant offset = uint160(0x1111000000000000000000000000000000001111);\r\n\r\n /// @notice Utility function converts the address that submitted a tx\r\n /// to the inbox on L1 to the msg.sender viewed on L2\r\n /// @param l1Address the address in the L1 that triggered the tx to L2\r\n /// @return l2Address L2 address as viewed in msg.sender\r\n function applyL1ToL2Alias(address l1Address) internal pure returns (address l2Address) {\r\n unchecked {\r\n l2Address = address(uint160(l1Address) + offset);\r\n }\r\n }\r\n\r\n /// @notice Utility function that converts the msg.sender viewed on L2 to the\r\n /// address that submitted a tx to the inbox on L1\r\n /// @param l2Address L2 address as viewed in msg.sender\r\n /// @return l1Address the address in the L1 that triggered the tx to L2\r\n function undoL1ToL2Alias(address l2Address) internal pure returns (address l1Address) {\r\n unchecked {\r\n l1Address = address(uint160(l2Address) - offset);\r\n }\r\n }\r\n}\r\n"
|
|
}
|
|
},
|
|
"settings": {
|
|
"optimizer": {
|
|
"enabled": false,
|
|
"runs": 200
|
|
},
|
|
"outputSelection": {
|
|
"*": {
|
|
"": [
|
|
"ast"
|
|
],
|
|
"*": [
|
|
"abi",
|
|
"metadata",
|
|
"devdoc",
|
|
"userdoc",
|
|
"storageLayout",
|
|
"evm.legacyAssembly",
|
|
"evm.bytecode",
|
|
"evm.deployedBytecode",
|
|
"evm.methodIdentifiers",
|
|
"evm.gasEstimates",
|
|
"evm.assembly"
|
|
]
|
|
}
|
|
},
|
|
"remappings": []
|
|
}
|
|
},
|
|
"output": {
|
|
"contracts": {
|
|
"contracts/bridges/bridge/vendor/AddressAliasHelper.sol": {
|
|
"AddressAliasHelper": {
|
|
"abi": [],
|
|
"devdoc": {
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": " /* \"contracts/bridges/bridge/vendor/AddressAliasHelper.sol\":694:1753 library AddressAliasHelper {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/bridges/bridge/vendor/AddressAliasHelper.sol\":694:1753 library AddressAliasHelper {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa2646970667358221220e50714285f1aa1f9675157799f646e94da77df522382c5420cfc203e62819ba564736f6c634300081a0033\n}\n",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220e50714285f1aa1f9675157799f646e94da77df522382c5420cfc203e62819ba564736f6c634300081a0033",
|
|
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xE5 SMOD EQ 0x28 PUSH0 BYTE LOG1 0xF9 PUSH8 0x5157799F646E94DA PUSH24 0xDF522382C5420CFC203E62819BA564736F6C634300081A00 CALLER ",
|
|
"sourceMap": "694:1059:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220e50714285f1aa1f9675157799f646e94da77df522382c5420cfc203e62819ba564736f6c634300081a0033",
|
|
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xE5 SMOD EQ 0x28 PUSH0 BYTE LOG1 0xF9 PUSH8 0x5157799F646E94DA PUSH24 0xDF522382C5420CFC203E62819BA564736F6C634300081A00 CALLER ",
|
|
"sourceMap": "694:1059:0:-:0;;;;;;;;"
|
|
},
|
|
"gasEstimates": {
|
|
"creation": {
|
|
"codeDepositCost": "17000",
|
|
"executionCost": "92",
|
|
"totalCost": "17092"
|
|
},
|
|
"internal": {
|
|
"applyL1ToL2Alias(address)": "infinite",
|
|
"undoL1ToL2Alias(address)": "infinite"
|
|
}
|
|
},
|
|
"legacyAssembly": {
|
|
".code": [
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH #[$]",
|
|
"source": 0,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH [$]",
|
|
"source": 0,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "B"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "DUP3",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "DUP3",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "DUP3",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "CODECOPY",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "DUP1",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "MLOAD",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "BYTE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "EQ",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH [tag]",
|
|
"source": 0,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "JUMPI",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "MSTORE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "4"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "MSTORE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "24"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "REVERT",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "tag",
|
|
"source": 0,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "JUMPDEST",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "ADDRESS",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "MSTORE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "DUP2",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "MSTORE8",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "DUP3",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "DUP2",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "RETURN",
|
|
"source": 0
|
|
}
|
|
],
|
|
".data": {
|
|
"0": {
|
|
".auxdata": "a2646970667358221220e50714285f1aa1f9675157799f646e94da77df522382c5420cfc203e62819ba564736f6c634300081a0033",
|
|
".code": [
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSHDEPLOYADDRESS",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "ADDRESS",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "EQ",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "80"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "40"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "MSTORE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "DUP1",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 694,
|
|
"end": 1753,
|
|
"name": "REVERT",
|
|
"source": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"sourceList": [
|
|
"contracts/bridges/bridge/vendor/AddressAliasHelper.sol",
|
|
"#utility.yul"
|
|
]
|
|
},
|
|
"methodIdentifiers": {}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridges/bridge/vendor/AddressAliasHelper.sol\":\"AddressAliasHelper\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/bridges/bridge/vendor/AddressAliasHelper.sol\":{\"keccak256\":\"0x416da45a499ff73a4b166337dacb94228d037d36a3252e05a0896af324a56a23\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://1876bc397ad24f7ae4162ba76d0b86ca6809e46b3630f1757e70e7f2d7a43e73\",\"dweb:/ipfs/QmPZ88VAAAmKiRcesawhuZJQXBVYQTi9Ay7xYDv2YPPw2Y\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"sources": {
|
|
"contracts/bridges/bridge/vendor/AddressAliasHelper.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/bridges/bridge/vendor/AddressAliasHelper.sol",
|
|
"exportedSymbols": {
|
|
"AddressAliasHelper": [
|
|
52
|
|
]
|
|
},
|
|
"id": 53,
|
|
"license": "Apache-2.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "667:23:0"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "AddressAliasHelper",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"fullyImplemented": true,
|
|
"id": 52,
|
|
"linearizedBaseContracts": [
|
|
52
|
|
],
|
|
"name": "AddressAliasHelper",
|
|
"nameLocation": "702:18:0",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": true,
|
|
"id": 7,
|
|
"mutability": "constant",
|
|
"name": "offset",
|
|
"nameLocation": "745:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 52,
|
|
"src": "728:77:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
},
|
|
"typeName": {
|
|
"id": 2,
|
|
"name": "uint160",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "728:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
}
|
|
},
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"hexValue": "307831313131303030303030303030303030303030303030303030303030303030303030303031313131",
|
|
"id": 5,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "762:42:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"value": "0x1111000000000000000000000000000000001111"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 4,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "754:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint160_$",
|
|
"typeString": "type(uint160)"
|
|
},
|
|
"typeName": {
|
|
"id": 3,
|
|
"name": "uint160",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "754:7:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 6,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "754:51:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 28,
|
|
"nodeType": "Block",
|
|
"src": "1173:103:0",
|
|
"statements": [
|
|
{
|
|
"id": 27,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "1184:85:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 25,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 15,
|
|
"name": "l2Address",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13,
|
|
"src": "1209:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
},
|
|
"id": 23,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 20,
|
|
"name": "l1Address",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10,
|
|
"src": "1237:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 19,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1229:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint160_$",
|
|
"typeString": "type(uint160)"
|
|
},
|
|
"typeName": {
|
|
"id": 18,
|
|
"name": "uint160",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1229:7:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 21,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1229:18:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"id": 22,
|
|
"name": "offset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1250:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
}
|
|
},
|
|
"src": "1229:27:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
}
|
|
],
|
|
"id": 17,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1221:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 16,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1221:7:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 24,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1221:36:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1209:48:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 26,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1209:48:0"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 8,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "814:266:0",
|
|
"text": "@notice Utility function converts the address that submitted a tx\n to the inbox on L1 to the msg.sender viewed on L2\n @param l1Address the address in the L1 that triggered the tx to L2\n @return l2Address L2 address as viewed in msg.sender"
|
|
},
|
|
"id": 29,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "applyL1ToL2Alias",
|
|
"nameLocation": "1095:16:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 11,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 10,
|
|
"mutability": "mutable",
|
|
"name": "l1Address",
|
|
"nameLocation": "1120:9:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 29,
|
|
"src": "1112:17:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 9,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1112:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1111:19:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 14,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13,
|
|
"mutability": "mutable",
|
|
"name": "l2Address",
|
|
"nameLocation": "1162:9:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 29,
|
|
"src": "1154:17:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 12,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1154:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1153:19:0"
|
|
},
|
|
"scope": 52,
|
|
"src": "1086:190:0",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 50,
|
|
"nodeType": "Block",
|
|
"src": "1647:103:0",
|
|
"statements": [
|
|
{
|
|
"id": 49,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "1658:85:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 47,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 37,
|
|
"name": "l1Address",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 35,
|
|
"src": "1683:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
},
|
|
"id": 45,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 42,
|
|
"name": "l2Address",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 32,
|
|
"src": "1711:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 41,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1703:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint160_$",
|
|
"typeString": "type(uint160)"
|
|
},
|
|
"typeName": {
|
|
"id": 40,
|
|
"name": "uint160",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1703:7:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 43,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1703:18:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"id": 44,
|
|
"name": "offset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1724:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
}
|
|
},
|
|
"src": "1703:27:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
}
|
|
],
|
|
"id": 39,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1695:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 38,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1695:7:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 46,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1695:36:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1683:48:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 48,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1683:48:0"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 30,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1284:271:0",
|
|
"text": "@notice Utility function that converts the msg.sender viewed on L2 to the\n address that submitted a tx to the inbox on L1\n @param l2Address L2 address as viewed in msg.sender\n @return l1Address the address in the L1 that triggered the tx to L2"
|
|
},
|
|
"id": 51,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "undoL1ToL2Alias",
|
|
"nameLocation": "1570:15:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 33,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 32,
|
|
"mutability": "mutable",
|
|
"name": "l2Address",
|
|
"nameLocation": "1594:9:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 51,
|
|
"src": "1586:17:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 31,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1586:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1585:19:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 36,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 35,
|
|
"mutability": "mutable",
|
|
"name": "l1Address",
|
|
"nameLocation": "1636:9:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 51,
|
|
"src": "1628:17:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 34,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1628:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1627:19:0"
|
|
},
|
|
"scope": 52,
|
|
"src": "1561:189:0",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 53,
|
|
"src": "694:1059:0",
|
|
"usedErrors": [],
|
|
"usedEvents": []
|
|
}
|
|
],
|
|
"src": "667:1088:0"
|
|
},
|
|
"id": 0
|
|
}
|
|
}
|
|
}
|
|
} |