oyster/packages/bridge/contracts/WETH.json

32100 lines
1.4 MiB

{
"contractName": "WETH",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "deposit",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol\":\"WETH\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol\":{\"keccak256\":\"0x4a28e69afc4c1c1aee48c7b497f9b8452b295ddcf4bbf453d594a1467016d5f2\",\"license\":\"Unlicense\",\"urls\":[\"bzz-raw://279e22c43f79567e9f7842cfca8ad2329bbbad2eac30413b620796d51f308719\",\"dweb:/ipfs/QmbdRLJYoKJxDbDLeverNMHsNFEcxnohAA713UFLjLm3Jy\"]},\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol\":{\"keccak256\":\"0xdbd8e88a0a6cb69b6edc83c34d3c51a67560cb0a88d52e908c6d391435242999\",\"license\":\"Apache 2\",\"urls\":[\"bzz-raw://630e2d852c4e534cff7d1beb00c3fc165a73d6e3a7ee394c5850cbf4047b0a32\",\"dweb:/ipfs/QmUe3mc6HwXCoL1Q6NACA4kMb6mavMKdZxDqVYG2jycoTh\"]},\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol\":{\"keccak256\":\"0x1aca747b823c4d8492ae379cfd9495e8ff19726302d943da56b2bb71aebecc73\",\"license\":\"Apache 2\",\"urls\":[\"bzz-raw://716c755b41c76deb60297664878f07e0972867918fde13c20c196263d3daa554\",\"dweb:/ipfs/QmbrxvDYfcgSjBBnDdXyZJcwd8pYyyrQhYqY5h6DaxWKcy\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x9486045e189facd2e868ece35249872598ef03f1087fb6fa4d1161842daa2287\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://77c3a04ef8453788b14b1ebbc24dd3f0a18ceb2615cd156aac949a611e552af8\",\"dweb:/ipfs/QmcmqWGguRM3iLuF57tcyrN3F6EA63kzeNkDfQuteBnurr\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://991b44ff44e0496e8554a90f4c0512c28faed45104d40430019f3c67ea67740e\",\"dweb:/ipfs/Qmc3nRapVbcctELoZS5qe17zLkFB3bETBfwzCTMF1CSuGE\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3a849c2d95e85463909e5b5c920b13e7a11216ca14127085e16d22b9379d52a\",\"dweb:/ipfs/QmUg3CZDbCCcQdroEpexBy5ZFd5vD1UWijWQq9qHZjtJNQ\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://256c8c8af5eb072bc473226ab2b2187149b8fc04f5f4a4820db22527f5ce8e3c\",\"dweb:/ipfs/QmRvi5BhnL7Rxf85KrJhwM6RRhukm4tzoctRdgQEheNyiN\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b95e56c1640d0ef789fc5c16269e141e992f6c8ac97cc6d377bd3825e9cab182\",\"dweb:/ipfs/QmVzaxJZY51EhagrcNnkxoU6Uq17RhATe7aHvtkC6wUkgK\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"immutableReferences": {},
"sourceMap": "",
"deployedSourceMap": "",
"source": "// contracts/Wormhole.sol\n// SPDX-License-Identifier: Apache 2\n\npragma solidity ^0.6.0;\npragma experimental ABIEncoderV2;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\nimport \"./BytesLib.sol\";\nimport \"./WrappedAsset.sol\";\n\ncontract Wormhole is ReentrancyGuard {\n using SafeERC20 for IERC20;\n using BytesLib for bytes;\n using SafeMath for uint256;\n\n uint64 constant MAX_UINT64 = 18_446_744_073_709_551_615;\n\n // Address of the Wrapped asset template\n address public wrappedAssetMaster;\n\n // Chain ID of Ethereum\n uint8 CHAIN_ID = 2;\n\n // Address of the official WETH contract\n address constant WETHAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n\n struct GuardianSet {\n address[] keys;\n uint32 expiration_time;\n }\n\n event LogGuardianSetChanged(\n uint32 oldGuardianIndex,\n uint32 newGuardianIndex\n );\n\n event LogTokensLocked(\n uint8 target_chain,\n uint8 token_chain,\n uint8 token_decimals,\n bytes32 indexed token,\n bytes32 indexed sender,\n bytes32 recipient,\n uint256 amount,\n uint32 nonce\n );\n\n struct ParsedVAA {\n uint8 version;\n bytes32 hash;\n uint32 guardian_set_index;\n uint32 timestamp;\n uint8 action;\n bytes payload;\n }\n\n // Mapping of guardian_set_index => guardian set\n mapping(uint32 => GuardianSet) public guardian_sets;\n // Current active guardian set\n uint32 public guardian_set_index;\n\n // Period for which a guardian set stays active after it has been replaced\n uint32 public guardian_set_expirity;\n\n // Mapping of already consumedVAAs\n mapping(bytes32 => bool) public consumedVAAs;\n\n // Mapping of wrapped asset ERC20 contracts\n mapping(bytes32 => address) public wrappedAssets;\n mapping(address => bool) public isWrappedAsset;\n\n constructor(GuardianSet memory initial_guardian_set, address wrapped_asset_master, uint32 _guardian_set_expirity) public {\n guardian_sets[0] = initial_guardian_set;\n // Explicitly set for doc purposes\n guardian_set_index = 0;\n guardian_set_expirity = _guardian_set_expirity;\n\n wrappedAssetMaster = wrapped_asset_master;\n }\n\n function getGuardianSet(uint32 idx) view public returns (GuardianSet memory gs) {\n return guardian_sets[idx];\n }\n\n function submitVAA(\n bytes calldata vaa\n ) public nonReentrant {\n ParsedVAA memory parsed_vaa = parseAndVerifyVAA(vaa);\n // Process VAA\n if (parsed_vaa.action == 0x01) {\n require(parsed_vaa.guardian_set_index == guardian_set_index, \"only the current guardian set can change the guardian set\");\n vaaUpdateGuardianSet(parsed_vaa.payload);\n } else if (parsed_vaa.action == 0x10) {\n vaaTransfer(parsed_vaa.payload);\n } else {\n revert(\"invalid VAA action\");\n }\n\n // Set the VAA as consumed\n consumedVAAs[parsed_vaa.hash] = true;\n }\n\n // parseAndVerifyVAA parses raw VAA data into a struct and verifies whether it contains sufficient signatures of an\n // active guardian set i.e. is valid according to Wormhole consensus rules.\n function parseAndVerifyVAA(bytes calldata vaa) public view returns (ParsedVAA memory parsed_vaa) {\n parsed_vaa.version = vaa.toUint8(0);\n require(parsed_vaa.version == 1, \"VAA version incompatible\");\n\n // Load 4 bytes starting from index 1\n parsed_vaa.guardian_set_index = vaa.toUint32(1);\n\n uint256 len_signers = vaa.toUint8(5);\n uint offset = 6 + 66 * len_signers;\n\n // Load 4 bytes timestamp\n parsed_vaa.timestamp = vaa.toUint32(offset);\n\n // Hash the body\n parsed_vaa.hash = keccak256(vaa.slice(offset, vaa.length - offset));\n require(!consumedVAAs[parsed_vaa.hash], \"VAA was already executed\");\n\n GuardianSet memory guardian_set = guardian_sets[parsed_vaa.guardian_set_index];\n require(guardian_set.keys.length > 0, \"invalid guardian set\");\n require(guardian_set.expiration_time == 0 || guardian_set.expiration_time > block.timestamp, \"guardian set has expired\");\n // We're using a fixed point number transformation with 1 decimal to deal with rounding.\n require(((guardian_set.keys.length * 10 / 3) * 2) / 10 + 1 <= len_signers, \"no quorum\");\n\n int16 last_index = - 1;\n for (uint i = 0; i < len_signers; i++) {\n uint8 index = vaa.toUint8(6 + i * 66);\n require(index > last_index, \"signature indices must be ascending\");\n last_index = int16(index);\n\n bytes32 r = vaa.toBytes32(7 + i * 66);\n bytes32 s = vaa.toBytes32(39 + i * 66);\n uint8 v = vaa.toUint8(71 + i * 66);\n v += 27;\n require(ecrecover(parsed_vaa.hash, v, r, s) == guardian_set.keys[index], \"VAA signature invalid\");\n }\n\n parsed_vaa.action = vaa.toUint8(offset + 4);\n parsed_vaa.payload = vaa.slice(offset + 5, vaa.length - (offset + 5));\n }\n\n function vaaUpdateGuardianSet(bytes memory data) private {\n uint32 new_guardian_set_index = data.toUint32(0);\n require(new_guardian_set_index == guardian_set_index + 1, \"index must increase in steps of 1\");\n uint8 len = data.toUint8(4);\n\n address[] memory new_guardians = new address[](len);\n for (uint i = 0; i < len; i++) {\n address addr = data.toAddress(5 + i * 20);\n new_guardians[i] = addr;\n }\n\n uint32 old_guardian_set_index = guardian_set_index;\n guardian_set_index = new_guardian_set_index;\n\n GuardianSet memory new_guardian_set = GuardianSet(new_guardians, 0);\n guardian_sets[guardian_set_index] = new_guardian_set;\n guardian_sets[old_guardian_set_index].expiration_time = uint32(block.timestamp) + guardian_set_expirity;\n\n emit LogGuardianSetChanged(old_guardian_set_index, guardian_set_index);\n }\n\n function vaaTransfer(bytes memory data) private {\n //uint32 nonce = data.toUint64(0);\n uint8 source_chain = data.toUint8(4);\n\n uint8 target_chain = data.toUint8(5);\n //bytes32 source_address = data.toBytes32(6);\n //bytes32 target_address = data.toBytes32(38);\n address target_address = data.toAddress(38 + 12);\n\n uint8 token_chain = data.toUint8(70);\n //bytes32 token_address = data.toBytes32(71);\n uint256 amount = data.toUint256(104);\n\n require(source_chain != target_chain, \"same chain transfers are not supported\");\n require(target_chain == CHAIN_ID, \"transfer must be incoming\");\n\n if (token_chain != CHAIN_ID) {\n bytes32 token_address = data.toBytes32(71);\n bytes32 asset_id = keccak256(abi.encodePacked(token_chain, token_address));\n\n // if yes: mint to address\n // if no: create and mint\n address wrapped_asset = wrappedAssets[asset_id];\n if (wrapped_asset == address(0)) {\n uint8 asset_decimals = data.toUint8(103);\n wrapped_asset = deployWrappedAsset(asset_id, token_chain, token_address, asset_decimals);\n }\n\n WrappedAsset(wrapped_asset).mint(target_address, amount);\n } else {\n address token_address = data.toAddress(71 + 12);\n\n uint8 decimals = ERC20(token_address).decimals();\n\n // Readjust decimals if they've previously been truncated\n if (decimals > 9) {\n amount = amount.mul(10 ** uint256(decimals - 9));\n }\n IERC20(token_address).safeTransfer(target_address, amount);\n }\n }\n\n function deployWrappedAsset(bytes32 seed, uint8 token_chain, bytes32 token_address, uint8 decimals) private returns (address asset){\n // Taken from https://github.com/OpenZeppelin/openzeppelin-sdk/blob/master/packages/lib/contracts/upgradeability/ProxyFactory.sol\n // Licensed under MIT\n bytes20 targetBytes = bytes20(wrappedAssetMaster);\n assembly {\n let clone := mload(0x40)\n mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(clone, 0x14), targetBytes)\n mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n asset := create2(0, clone, 0x37, seed)\n }\n\n // Call initializer\n WrappedAsset(asset).initialize(token_chain, token_address, decimals);\n\n // Store address\n wrappedAssets[seed] = asset;\n isWrappedAsset[asset] = true;\n }\n\n function lockAssets(\n address asset,\n uint256 amount,\n bytes32 recipient,\n uint8 target_chain,\n uint32 nonce,\n bool refund_dust\n ) public nonReentrant {\n require(target_chain != CHAIN_ID, \"must not transfer to the same chain\");\n\n uint8 asset_chain = CHAIN_ID;\n bytes32 asset_address;\n uint8 decimals = ERC20(asset).decimals();\n\n if (isWrappedAsset[asset]) {\n WrappedAsset(asset).burn(msg.sender, amount);\n asset_chain = WrappedAsset(asset).assetChain();\n asset_address = WrappedAsset(asset).assetAddress();\n } else {\n uint256 balanceBefore = IERC20(asset).balanceOf(address(this));\n IERC20(asset).safeTransferFrom(msg.sender, address(this), amount);\n uint256 balanceAfter = IERC20(asset).balanceOf(address(this));\n\n // The amount that was transferred in is the delta between balance before and after the transfer.\n // This is to properly handle tokens that charge a fee on transfer.\n amount = balanceAfter.sub(balanceBefore);\n\n // Decimal adjust amount - we keep the dust\n if (decimals > 9) {\n uint256 original_amount = amount;\n amount = amount.div(10 ** uint256(decimals - 9));\n\n if (refund_dust) {\n IERC20(asset).safeTransfer(msg.sender, original_amount.mod(10 ** uint256(decimals - 9)));\n }\n\n decimals = 9;\n }\n\n require(balanceAfter.div(10 ** uint256(ERC20(asset).decimals() - 9)) <= MAX_UINT64, \"bridge balance would exceed maximum\");\n\n asset_address = bytes32(uint256(asset));\n }\n\n // Check here after truncation\n require(amount != 0, \"truncated amount must not be 0\");\n\n emit LogTokensLocked(target_chain, asset_chain, decimals, asset_address, bytes32(uint256(msg.sender)), recipient, amount, nonce);\n }\n\n function lockETH(\n bytes32 recipient,\n uint8 target_chain,\n uint32 nonce\n ) public payable nonReentrant {\n require(target_chain != CHAIN_ID, \"must not transfer to the same chain\");\n\n uint256 remainder = msg.value.mod(10 ** 9);\n uint256 transfer_amount = msg.value.div(10 ** 9);\n require(transfer_amount != 0, \"truncated amount must not be 0\");\n\n // Transfer back remainder\n msg.sender.transfer(remainder);\n\n // Wrap tx value in WETH\n WETH(WETHAddress).deposit{value : msg.value - remainder}();\n\n // Log deposit of WETH\n emit LogTokensLocked(target_chain, CHAIN_ID, 9, bytes32(uint256(WETHAddress)), bytes32(uint256(msg.sender)), recipient, transfer_amount, nonce);\n }\n\n fallback() external payable {revert(\"please use lockETH to transfer ETH to Solana\");}\n\n receive() external payable {revert(\"please use lockETH to transfer ETH to Solana\");}\n}\n\n\ninterface WETH is IERC20 {\n function deposit() external payable;\n\n function withdraw(uint256 amount) external;\n}\n",
"sourcePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol",
"ast": {
"absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol",
"exportedSymbols": {
"WETH": [1431],
"Wormhole": [1420]
},
"id": 1432,
"license": "Apache 2",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 335,
"literals": ["solidity", "^", "0.6", ".0"],
"nodeType": "PragmaDirective",
"src": "64:23:1"
},
{
"id": 336,
"literals": ["experimental", "ABIEncoderV2"],
"nodeType": "PragmaDirective",
"src": "88:33:1"
},
{
"absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
"id": 337,
"nodeType": "ImportDirective",
"scope": 1432,
"sourceUnit": 3009,
"src": "123:55:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"id": 338,
"nodeType": "ImportDirective",
"scope": 1432,
"sourceUnit": 3087,
"src": "179:56:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
"id": 339,
"nodeType": "ImportDirective",
"scope": 1432,
"sourceUnit": 3300,
"src": "236:59:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
"file": "@openzeppelin/contracts/math/SafeMath.sol",
"id": 340,
"nodeType": "ImportDirective",
"scope": 1432,
"sourceUnit": 2506,
"src": "296:51:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol",
"file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol",
"id": 341,
"nodeType": "ImportDirective",
"scope": 1432,
"sourceUnit": 3659,
"src": "348:59:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol",
"file": "./BytesLib.sol",
"id": 342,
"nodeType": "ImportDirective",
"scope": 1432,
"sourceUnit": 334,
"src": "408:24:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol",
"file": "./WrappedAsset.sol",
"id": 343,
"nodeType": "ImportDirective",
"scope": 1432,
"sourceUnit": 2148,
"src": "433:28:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 344,
"name": "ReentrancyGuard",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3658,
"src": "484:15:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ReentrancyGuard_$3658",
"typeString": "contract ReentrancyGuard"
}
},
"id": 345,
"nodeType": "InheritanceSpecifier",
"src": "484:15:1"
}
],
"contractDependencies": [3658],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1420,
"linearizedBaseContracts": [1420, 3658],
"name": "Wormhole",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 348,
"libraryName": {
"contractScope": null,
"id": 346,
"name": "SafeERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3299,
"src": "512:9:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeERC20_$3299",
"typeString": "library SafeERC20"
}
},
"nodeType": "UsingForDirective",
"src": "506:27:1",
"typeName": {
"contractScope": null,
"id": 347,
"name": "IERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3086,
"src": "526:6:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3086",
"typeString": "contract IERC20"
}
}
},
{
"id": 351,
"libraryName": {
"contractScope": null,
"id": 349,
"name": "BytesLib",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 333,
"src": "544:8:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BytesLib_$333",
"typeString": "library BytesLib"
}
},
"nodeType": "UsingForDirective",
"src": "538:25:1",
"typeName": {
"id": 350,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "557:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
}
},
{
"id": 354,
"libraryName": {
"contractScope": null,
"id": 352,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2505,
"src": "574:8:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$2505",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "568:27:1",
"typeName": {
"id": 353,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "587:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": true,
"id": 357,
"mutability": "constant",
"name": "MAX_UINT64",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1420,
"src": "601:55:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 355,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "601:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"value": {
"argumentTypes": null,
"hexValue": "31385f3434365f3734345f3037335f3730395f3535315f363135",
"id": 356,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "630:26:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_18446744073709551615_by_1",
"typeString": "int_const 18446744073709551615"
},
"value": "18_446_744_073_709_551_615"
},
"visibility": "internal"
},
{
"constant": false,
"functionSelector": "99da1d3c",
"id": 359,
"mutability": "mutable",
"name": "wrappedAssetMaster",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1420,
"src": "708:33:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 358,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "708:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 362,
"mutability": "mutable",
"name": "CHAIN_ID",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1420,
"src": "776:18:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 360,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "776:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": {
"argumentTypes": null,
"hexValue": "32",
"id": 361,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "793:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"visibility": "internal"
},
{
"constant": true,
"id": 365,
"mutability": "constant",
"name": "WETHAddress",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1420,
"src": "846:73:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 363,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "846:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": {
"argumentTypes": null,
"hexValue": "307843303261614133396232323346453844304130653543344632376541443930383343373536436332",
"id": 364,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "877:42:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"value": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
},
"visibility": "internal"
},
{
"canonicalName": "Wormhole.GuardianSet",
"id": 371,
"members": [
{
"constant": false,
"id": 368,
"mutability": "mutable",
"name": "keys",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 371,
"src": "955:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 366,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "955:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 367,
"length": null,
"nodeType": "ArrayTypeName",
"src": "955:9:1",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 370,
"mutability": "mutable",
"name": "expiration_time",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 371,
"src": "979:22:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 369,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "979:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "GuardianSet",
"nodeType": "StructDefinition",
"scope": 1420,
"src": "926:82:1",
"visibility": "public"
},
{
"anonymous": false,
"documentation": null,
"id": 377,
"name": "LogGuardianSetChanged",
"nodeType": "EventDefinition",
"parameters": {
"id": 376,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 373,
"indexed": false,
"mutability": "mutable",
"name": "oldGuardianIndex",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 377,
"src": "1051:23:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 372,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "1051:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 375,
"indexed": false,
"mutability": "mutable",
"name": "newGuardianIndex",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 377,
"src": "1084:23:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 374,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "1084:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1041:72:1"
},
"src": "1014:100:1"
},
{
"anonymous": false,
"documentation": null,
"id": 395,
"name": "LogTokensLocked",
"nodeType": "EventDefinition",
"parameters": {
"id": 394,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 379,
"indexed": false,
"mutability": "mutable",
"name": "target_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 395,
"src": "1151:18:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 378,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1151:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 381,
"indexed": false,
"mutability": "mutable",
"name": "token_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 395,
"src": "1179:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 380,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1179:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 383,
"indexed": false,
"mutability": "mutable",
"name": "token_decimals",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 395,
"src": "1206:20:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 382,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1206:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 385,
"indexed": true,
"mutability": "mutable",
"name": "token",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 395,
"src": "1236:21:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 384,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1236:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 387,
"indexed": true,
"mutability": "mutable",
"name": "sender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 395,
"src": "1267:22:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 386,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1267:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 389,
"indexed": false,
"mutability": "mutable",
"name": "recipient",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 395,
"src": "1299:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 388,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1299:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 391,
"indexed": false,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 395,
"src": "1326:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 390,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1326:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 393,
"indexed": false,
"mutability": "mutable",
"name": "nonce",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 395,
"src": "1350:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 392,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "1350:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1141:227:1"
},
"src": "1120:249:1"
},
{
"canonicalName": "Wormhole.ParsedVAA",
"id": 408,
"members": [
{
"constant": false,
"id": 397,
"mutability": "mutable",
"name": "version",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 408,
"src": "1402:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 396,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1402:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 399,
"mutability": "mutable",
"name": "hash",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 408,
"src": "1425:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 398,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1425:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 401,
"mutability": "mutable",
"name": "guardian_set_index",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 408,
"src": "1447:25:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 400,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "1447:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 403,
"mutability": "mutable",
"name": "timestamp",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 408,
"src": "1482:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 402,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "1482:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 405,
"mutability": "mutable",
"name": "action",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 408,
"src": "1508:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 404,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1508:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 407,
"mutability": "mutable",
"name": "payload",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 408,
"src": "1530:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 406,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1530:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "ParsedVAA",
"nodeType": "StructDefinition",
"scope": 1420,
"src": "1375:175:1",
"visibility": "public"
},
{
"constant": false,
"functionSelector": "42b0aefa",
"id": 412,
"mutability": "mutable",
"name": "guardian_sets",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1420,
"src": "1609:51:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet)"
},
"typeName": {
"id": 411,
"keyType": {
"id": 409,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "1617:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Mapping",
"src": "1609:30:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet)"
},
"valueType": {
"contractScope": null,
"id": 410,
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 371,
"src": "1627:11:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "822d82b3",
"id": 414,
"mutability": "mutable",
"name": "guardian_set_index",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1420,
"src": "1701:32:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 413,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "1701:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "4db47840",
"id": 416,
"mutability": "mutable",
"name": "guardian_set_expirity",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1420,
"src": "1819:35:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 415,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "1819:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "a31fe409",
"id": 420,
"mutability": "mutable",
"name": "consumedVAAs",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1420,
"src": "1900:44:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"typeName": {
"id": 419,
"keyType": {
"id": 417,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1908:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "1900:24:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"valueType": {
"id": 418,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1919:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "b6694c2a",
"id": 424,
"mutability": "mutable",
"name": "wrappedAssets",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1420,
"src": "1999:48:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
},
"typeName": {
"id": 423,
"keyType": {
"id": 421,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "2007:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "1999:27:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
},
"valueType": {
"id": 422,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2018:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "1a2be4da",
"id": 428,
"mutability": "mutable",
"name": "isWrappedAsset",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1420,
"src": "2053:46:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
"id": 427,
"keyType": {
"id": 425,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2061:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "2053:24:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 426,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2072:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 455,
"nodeType": "Block",
"src": "2227:239:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 441,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 437,
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 412,
"src": "2237:13:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
"id": 439,
"indexExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 438,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2251:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2237:16:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 440,
"name": "initial_guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 430,
"src": "2256:20:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
"src": "2237:39:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
"id": 442,
"nodeType": "ExpressionStatement",
"src": "2237:39:1"
},
{
"expression": {
"argumentTypes": null,
"id": 445,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 443,
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 414,
"src": "2329:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
"id": 444,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2350:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2329:22:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"id": 446,
"nodeType": "ExpressionStatement",
"src": "2329:22:1"
},
{
"expression": {
"argumentTypes": null,
"id": 449,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 447,
"name": "guardian_set_expirity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 416,
"src": "2361:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 448,
"name": "_guardian_set_expirity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 434,
"src": "2385:22:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "2361:46:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"id": 450,
"nodeType": "ExpressionStatement",
"src": "2361:46:1"
},
{
"expression": {
"argumentTypes": null,
"id": 453,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 451,
"name": "wrappedAssetMaster",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 359,
"src": "2418:18:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 452,
"name": "wrapped_asset_master",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 432,
"src": "2439:20:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2418:41:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 454,
"nodeType": "ExpressionStatement",
"src": "2418:41:1"
}
]
},
"documentation": null,
"id": 456,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 435,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 430,
"mutability": "mutable",
"name": "initial_guardian_set",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 456,
"src": "2118:39:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
"id": 429,
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 371,
"src": "2118:11:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 432,
"mutability": "mutable",
"name": "wrapped_asset_master",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 456,
"src": "2159:28:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 431,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2159:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 434,
"mutability": "mutable",
"name": "_guardian_set_expirity",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 456,
"src": "2189:29:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 433,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "2189:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2117:102:1"
},
"returnParameters": {
"id": 436,
"nodeType": "ParameterList",
"parameters": [],
"src": "2227:0:1"
},
"scope": 1420,
"src": "2106:360:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 467,
"nodeType": "Block",
"src": "2552:42:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 463,
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 412,
"src": "2569:13:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
"id": 465,
"indexExpression": {
"argumentTypes": null,
"id": 464,
"name": "idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 458,
"src": "2583:3:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2569:18:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
"functionReturnParameters": 462,
"id": 466,
"nodeType": "Return",
"src": "2562:25:1"
}
]
},
"documentation": null,
"functionSelector": "f951975a",
"id": 468,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getGuardianSet",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 459,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 458,
"mutability": "mutable",
"name": "idx",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 468,
"src": "2496:10:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 457,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "2496:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2495:12:1"
},
"returnParameters": {
"id": 462,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 461,
"mutability": "mutable",
"name": "gs",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 468,
"src": "2529:21:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
"id": 460,
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 371,
"src": "2529:11:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2528:23:1"
},
"scope": 1420,
"src": "2472:122:1",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 523,
"nodeType": "Block",
"src": "2673:566:1",
"statements": [
{
"assignments": [476],
"declarations": [
{
"constant": false,
"id": 476,
"mutability": "mutable",
"name": "parsed_vaa",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 523,
"src": "2683:27:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA"
},
"typeName": {
"contractScope": null,
"id": 475,
"name": "ParsedVAA",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 408,
"src": "2683:9:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_storage_ptr",
"typeString": "struct Wormhole.ParsedVAA"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 480,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 478,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 470,
"src": "2731:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
],
"id": 477,
"name": "parseAndVerifyVAA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 781,
"src": "2713:17:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes_calldata_ptr_$returns$_t_struct$_ParsedVAA_$408_memory_ptr_$",
"typeString": "function (bytes calldata) view returns (struct Wormhole.ParsedVAA memory)"
}
},
"id": 479,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2713:22:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2683:52:1"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 484,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 481,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
"src": "2772:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 482,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "action",
"nodeType": "MemberAccess",
"referencedDeclaration": 405,
"src": "2772:17:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30783031",
"id": 483,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2793:4:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "0x01"
},
"src": "2772:25:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 502,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 499,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
"src": "3009:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 500,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "action",
"nodeType": "MemberAccess",
"referencedDeclaration": 405,
"src": "3009:17:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30783130",
"id": 501,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3030:4:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "0x10"
},
"src": "3009:25:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 513,
"nodeType": "Block",
"src": "3098:53:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "696e76616c69642056414120616374696f6e",
"id": 510,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3119:20:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_27b2ea60c72d322d8c69062a768962688555c44551176a8b0389f506128d4a66",
"typeString": "literal_string \"invalid VAA action\""
},
"value": "invalid VAA action"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_27b2ea60c72d322d8c69062a768962688555c44551176a8b0389f506128d4a66",
"typeString": "literal_string \"invalid VAA action\""
}
],
"id": 509,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [-19, -19],
"referencedDeclaration": -19,
"src": "3112:6:1",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
"id": 511,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3112:28:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 512,
"nodeType": "ExpressionStatement",
"src": "3112:28:1"
}
]
},
"id": 514,
"nodeType": "IfStatement",
"src": "3005:146:1",
"trueBody": {
"id": 508,
"nodeType": "Block",
"src": "3036:56:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 504,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
"src": "3062:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 505,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "payload",
"nodeType": "MemberAccess",
"referencedDeclaration": 407,
"src": "3062:18:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 503,
"name": "vaaTransfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1051,
"src": "3050:11:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (bytes memory)"
}
},
"id": 506,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3050:31:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 507,
"nodeType": "ExpressionStatement",
"src": "3050:31:1"
}
]
}
},
"id": 515,
"nodeType": "IfStatement",
"src": "2768:383:1",
"trueBody": {
"id": 498,
"nodeType": "Block",
"src": "2799:200:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 489,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 486,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
"src": "2821:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 487,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "guardian_set_index",
"nodeType": "MemberAccess",
"referencedDeclaration": 401,
"src": "2821:29:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 488,
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 414,
"src": "2854:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "2821:51:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6f6e6c79207468652063757272656e7420677561726469616e207365742063616e206368616e67652074686520677561726469616e20736574",
"id": 490,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2874:59:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_57f82f54015302e10ddc5f5b0f8eebea6891c2be815aa07f38e9301457bc8c6a",
"typeString": "literal_string \"only the current guardian set can change the guardian set\""
},
"value": "only the current guardian set can change the guardian set"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_57f82f54015302e10ddc5f5b0f8eebea6891c2be815aa07f38e9301457bc8c6a",
"typeString": "literal_string \"only the current guardian set can change the guardian set\""
}
],
"id": 485,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "2813:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 491,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2813:121:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 492,
"nodeType": "ExpressionStatement",
"src": "2813:121:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 494,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
"src": "2969:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 495,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "payload",
"nodeType": "MemberAccess",
"referencedDeclaration": 407,
"src": "2969:18:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 493,
"name": "vaaUpdateGuardianSet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 889,
"src": "2948:20:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (bytes memory)"
}
},
"id": 496,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2948:40:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 497,
"nodeType": "ExpressionStatement",
"src": "2948:40:1"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 521,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 516,
"name": "consumedVAAs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 420,
"src": "3196:12:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
"id": 519,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 517,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
"src": "3209:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 518,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "hash",
"nodeType": "MemberAccess",
"referencedDeclaration": 399,
"src": "3209:15:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3196:29:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 520,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3228:4:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "3196:36:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 522,
"nodeType": "ExpressionStatement",
"src": "3196:36:1"
}
]
},
"documentation": null,
"functionSelector": "3bc0aee6",
"id": 524,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 473,
"modifierName": {
"argumentTypes": null,
"id": 472,
"name": "nonReentrant",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3657,
"src": "2660:12:1",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "2660:12:1"
}
],
"name": "submitVAA",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 471,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 470,
"mutability": "mutable",
"name": "vaa",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 524,
"src": "2628:18:1",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 469,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2628:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2618:34:1"
},
"returnParameters": {
"id": 474,
"nodeType": "ParameterList",
"parameters": [],
"src": "2673:0:1"
},
"scope": 1420,
"src": "2600:639:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 780,
"nodeType": "Block",
"src": "3542:1748:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 538,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 531,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 529,
"src": "3552:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 533,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "version",
"nodeType": "MemberAccess",
"referencedDeclaration": 397,
"src": "3552:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 536,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3585:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"expression": {
"argumentTypes": null,
"id": 534,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 526,
"src": "3573:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 535,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
"src": "3573:11:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint8)"
}
},
"id": 537,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3573:14:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "3552:35:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 539,
"nodeType": "ExpressionStatement",
"src": "3552:35:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 544,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 541,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 529,
"src": "3605:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 542,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "version",
"nodeType": "MemberAccess",
"referencedDeclaration": 397,
"src": "3605:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 543,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3627:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "3605:23:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5641412076657273696f6e20696e636f6d70617469626c65",
"id": 545,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3630:26:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6f94df49f756ee0c4605e9c5793f0e851f28a084ddaba07c34c32ea93810236a",
"typeString": "literal_string \"VAA version incompatible\""
},
"value": "VAA version incompatible"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_6f94df49f756ee0c4605e9c5793f0e851f28a084ddaba07c34c32ea93810236a",
"typeString": "literal_string \"VAA version incompatible\""
}
],
"id": 540,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "3597:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3597:60:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 547,
"nodeType": "ExpressionStatement",
"src": "3597:60:1"
},
{
"expression": {
"argumentTypes": null,
"id": 555,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 548,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 529,
"src": "3714:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 550,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "guardian_set_index",
"nodeType": "MemberAccess",
"referencedDeclaration": 401,
"src": "3714:29:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 553,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3759:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"expression": {
"argumentTypes": null,
"id": 551,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 526,
"src": "3746:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 552,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint32",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
"src": "3746:12:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint32)"
}
},
"id": 554,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3746:15:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "3714:47:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"id": 556,
"nodeType": "ExpressionStatement",
"src": "3714:47:1"
},
{
"assignments": [558],
"declarations": [
{
"constant": false,
"id": 558,
"mutability": "mutable",
"name": "len_signers",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 780,
"src": "3772:19:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 557,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3772:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 563,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "35",
"id": 561,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3806:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
},
"value": "5"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
}
],
"expression": {
"argumentTypes": null,
"id": 559,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 526,
"src": "3794:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 560,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
"src": "3794:11:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint8)"
}
},
"id": 562,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3794:14:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3772:36:1"
},
{
"assignments": [565],
"declarations": [
{
"constant": false,
"id": 565,
"mutability": "mutable",
"name": "offset",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 780,
"src": "3818:11:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 564,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3818:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 571,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 570,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "36",
"id": 566,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3832:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_6_by_1",
"typeString": "int_const 6"
},
"value": "6"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 569,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3636",
"id": 567,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3836:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_66_by_1",
"typeString": "int_const 66"
},
"value": "66"
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"id": 568,
"name": "len_signers",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 558,
"src": "3841:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3836:16:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3832:20:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3818:34:1"
},
{
"expression": {
"argumentTypes": null,
"id": 579,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 572,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 529,
"src": "3897:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 574,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": 403,
"src": "3897:20:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 577,
"name": "offset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 565,
"src": "3933:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 575,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 526,
"src": "3920:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 576,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint32",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
"src": "3920:12:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint32)"
}
},
"id": 578,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3920:20:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "3897:43:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"id": 580,
"nodeType": "ExpressionStatement",
"src": "3897:43:1"
},
{
"expression": {
"argumentTypes": null,
"id": 594,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 581,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 529,
"src": "3976:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 583,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "hash",
"nodeType": "MemberAccess",
"referencedDeclaration": 399,
"src": "3976:15:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 587,
"name": "offset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 565,
"src": "4014:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 591,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 588,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 526,
"src": "4022:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 589,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "4022:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 590,
"name": "offset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 565,
"src": "4035:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4022:19:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 585,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 526,
"src": "4004:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 586,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "slice",
"nodeType": "MemberAccess",
"referencedDeclaration": 55,
"src": "4004:9:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
}
},
"id": 592,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4004:38:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 584,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "3994:9:1",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 593,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3994:49:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "3976:67:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 595,
"nodeType": "ExpressionStatement",
"src": "3976:67:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 601,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "4061:30:1",
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 597,
"name": "consumedVAAs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 420,
"src": "4062:12:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
"id": 600,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 598,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 529,
"src": "4075:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 599,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "hash",
"nodeType": "MemberAccess",
"referencedDeclaration": 399,
"src": "4075:15:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "4062:29:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5641412077617320616c7265616479206578656375746564",
"id": 602,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4093:26:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_2c9f12104d534b328038b37a96c0a685f6c00604447c9f6b300f1a21a9a56028",
"typeString": "literal_string \"VAA was already executed\""
},
"value": "VAA was already executed"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_2c9f12104d534b328038b37a96c0a685f6c00604447c9f6b300f1a21a9a56028",
"typeString": "literal_string \"VAA was already executed\""
}
],
"id": 596,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "4053:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 603,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4053:67:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 604,
"nodeType": "ExpressionStatement",
"src": "4053:67:1"
},
{
"assignments": [606],
"declarations": [
{
"constant": false,
"id": 606,
"mutability": "mutable",
"name": "guardian_set",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 780,
"src": "4131:31:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
"id": 605,
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 371,
"src": "4131:11:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 611,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 607,
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 412,
"src": "4165:13:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
"id": 610,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 608,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 529,
"src": "4179:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 609,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "guardian_set_index",
"nodeType": "MemberAccess",
"referencedDeclaration": 401,
"src": "4179:29:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "4165:44:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4131:78:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 617,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 613,
"name": "guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 606,
"src": "4227:12:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
"id": 614,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "keys",
"nodeType": "MemberAccess",
"referencedDeclaration": 368,
"src": "4227:17:1",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 615,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "4227:24:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 616,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4254:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4227:28:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e76616c696420677561726469616e20736574",
"id": 618,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4257:22:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ef4d0f2354b2279f26c4ba4477a0c338dcdd31fbb9caa6ef52ec7856b55556f3",
"typeString": "literal_string \"invalid guardian set\""
},
"value": "invalid guardian set"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_ef4d0f2354b2279f26c4ba4477a0c338dcdd31fbb9caa6ef52ec7856b55556f3",
"typeString": "literal_string \"invalid guardian set\""
}
],
"id": 612,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "4219:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 619,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4219:61:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 620,
"nodeType": "ExpressionStatement",
"src": "4219:61:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 631,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 625,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 622,
"name": "guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 606,
"src": "4298:12:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
"id": 623,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "expiration_time",
"nodeType": "MemberAccess",
"referencedDeclaration": 370,
"src": "4298:28:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 624,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4330:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4298:33:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 630,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 626,
"name": "guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 606,
"src": "4335:12:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
"id": 627,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "expiration_time",
"nodeType": "MemberAccess",
"referencedDeclaration": 370,
"src": "4335:28:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 628,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
"src": "4366:5:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 629,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "4366:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4335:46:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "4298:83:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "677561726469616e20736574206861732065787069726564",
"id": 632,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4383:26:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cbe80c778d9be5c7f6d0de415ae854de0cf9a58da1d3e65a9d672ad42a10aaf1",
"typeString": "literal_string \"guardian set has expired\""
},
"value": "guardian set has expired"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_cbe80c778d9be5c7f6d0de415ae854de0cf9a58da1d3e65a9d672ad42a10aaf1",
"typeString": "literal_string \"guardian set has expired\""
}
],
"id": 621,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "4290:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 633,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4290:120:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 634,
"nodeType": "ExpressionStatement",
"src": "4290:120:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 652,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 650,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 648,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 645,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 642,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 640,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 636,
"name": "guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 606,
"src": "4527:12:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
"id": 637,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "keys",
"nodeType": "MemberAccess",
"referencedDeclaration": 368,
"src": "4527:17:1",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 638,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "4527:24:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3130",
"id": 639,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4554:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "4527:29:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"hexValue": "33",
"id": 641,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4559:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_3_by_1",
"typeString": "int_const 3"
},
"value": "3"
},
"src": "4527:33:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 643,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "4526:35:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 644,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4564:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "4526:39:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 646,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "4525:41:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3130",
"id": 647,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4569:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "4525:46:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 649,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4574:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "4525:50:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 651,
"name": "len_signers",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 558,
"src": "4579:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4525:65:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6e6f2071756f72756d",
"id": 653,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4592:11:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b18d2210a58b70fe2b7fd0e0f29d90614b1c4f3f5d8dbb518559998f90306fcb",
"typeString": "literal_string \"no quorum\""
},
"value": "no quorum"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b18d2210a58b70fe2b7fd0e0f29d90614b1c4f3f5d8dbb518559998f90306fcb",
"typeString": "literal_string \"no quorum\""
}
],
"id": 635,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "4517:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 654,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4517:87:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 655,
"nodeType": "ExpressionStatement",
"src": "4517:87:1"
},
{
"assignments": [657],
"declarations": [
{
"constant": false,
"id": 657,
"mutability": "mutable",
"name": "last_index",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 780,
"src": "4615:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int16",
"typeString": "int16"
},
"typeName": {
"id": 656,
"name": "int16",
"nodeType": "ElementaryTypeName",
"src": "4615:5:1",
"typeDescriptions": {
"typeIdentifier": "t_int16",
"typeString": "int16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 660,
"initialValue": {
"argumentTypes": null,
"id": 659,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "-",
"prefix": true,
"src": "4634:3:1",
"subExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 658,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4636:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"typeDescriptions": {
"typeIdentifier": "t_rational_minus_1_by_1",
"typeString": "int_const -1"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4615:22:1"
},
{
"body": {
"id": 749,
"nodeType": "Block",
"src": "4686:465:1",
"statements": [
{
"assignments": [672],
"declarations": [
{
"constant": false,
"id": 672,
"mutability": "mutable",
"name": "index",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 749,
"src": "4700:11:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 671,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "4700:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 681,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 679,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "36",
"id": 675,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4726:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_6_by_1",
"typeString": "int_const 6"
},
"value": "6"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 678,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 676,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 662,
"src": "4730:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3636",
"id": 677,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4734:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_66_by_1",
"typeString": "int_const 66"
},
"value": "66"
},
"src": "4730:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4726:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 673,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 526,
"src": "4714:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 674,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
"src": "4714:11:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint8)"
}
},
"id": 680,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4714:23:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4700:37:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_int16",
"typeString": "int16"
},
"id": 685,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 683,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 672,
"src": "4759:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"id": 684,
"name": "last_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 657,
"src": "4767:10:1",
"typeDescriptions": {
"typeIdentifier": "t_int16",
"typeString": "int16"
}
},
"src": "4759:18:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "7369676e617475726520696e6469636573206d75737420626520617363656e64696e67",
"id": 686,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4779:37:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_de9ff8e5647eeed7691d313f96ed0065761ad2da429d76b3b7868b564890def8",
"typeString": "literal_string \"signature indices must be ascending\""
},
"value": "signature indices must be ascending"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_de9ff8e5647eeed7691d313f96ed0065761ad2da429d76b3b7868b564890def8",
"typeString": "literal_string \"signature indices must be ascending\""
}
],
"id": 682,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "4751:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 687,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4751:66:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 688,
"nodeType": "ExpressionStatement",
"src": "4751:66:1"
},
{
"expression": {
"argumentTypes": null,
"id": 694,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 689,
"name": "last_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 657,
"src": "4831:10:1",
"typeDescriptions": {
"typeIdentifier": "t_int16",
"typeString": "int16"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 692,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 672,
"src": "4850:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 691,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4844:5:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int16_$",
"typeString": "type(int16)"
},
"typeName": {
"id": 690,
"name": "int16",
"nodeType": "ElementaryTypeName",
"src": "4844:5:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 693,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4844:12:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int16",
"typeString": "int16"
}
},
"src": "4831:25:1",
"typeDescriptions": {
"typeIdentifier": "t_int16",
"typeString": "int16"
}
},
"id": 695,
"nodeType": "ExpressionStatement",
"src": "4831:25:1"
},
{
"assignments": [697],
"declarations": [
{
"constant": false,
"id": 697,
"mutability": "mutable",
"name": "r",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 749,
"src": "4871:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 696,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "4871:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 706,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 704,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "37",
"id": 700,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4897:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_7_by_1",
"typeString": "int_const 7"
},
"value": "7"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 703,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 701,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 662,
"src": "4901:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3636",
"id": 702,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4905:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_66_by_1",
"typeString": "int_const 66"
},
"value": "66"
},
"src": "4901:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4897:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 698,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 526,
"src": "4883:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 699,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toBytes32",
"nodeType": "MemberAccess",
"referencedDeclaration": 298,
"src": "4883:13:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (bytes32)"
}
},
"id": 705,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4883:25:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4871:37:1"
},
{
"assignments": [708],
"declarations": [
{
"constant": false,
"id": 708,
"mutability": "mutable",
"name": "s",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 749,
"src": "4922:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 707,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "4922:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 717,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 715,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3339",
"id": 711,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4948:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_39_by_1",
"typeString": "int_const 39"
},
"value": "39"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 714,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 712,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 662,
"src": "4953:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3636",
"id": 713,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4957:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_66_by_1",
"typeString": "int_const 66"
},
"value": "66"
},
"src": "4953:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4948:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 709,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 526,
"src": "4934:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 710,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toBytes32",
"nodeType": "MemberAccess",
"referencedDeclaration": 298,
"src": "4934:13:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (bytes32)"
}
},
"id": 716,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4934:26:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4922:38:1"
},
{
"assignments": [719],
"declarations": [
{
"constant": false,
"id": 719,
"mutability": "mutable",
"name": "v",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 749,
"src": "4974:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 718,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "4974:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 728,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 726,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3731",
"id": 722,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4996:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_71_by_1",
"typeString": "int_const 71"
},
"value": "71"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 725,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 723,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 662,
"src": "5001:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3636",
"id": 724,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5005:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_66_by_1",
"typeString": "int_const 66"
},
"value": "66"
},
"src": "5001:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4996:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 720,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 526,
"src": "4984:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 721,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
"src": "4984:11:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint8)"
}
},
"id": 727,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4984:24:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4974:34:1"
},
{
"expression": {
"argumentTypes": null,
"id": 731,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 729,
"name": "v",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 719,
"src": "5022:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "3237",
"id": 730,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5027:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_27_by_1",
"typeString": "int_const 27"
},
"value": "27"
},
"src": "5022:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 732,
"nodeType": "ExpressionStatement",
"src": "5022:7:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 745,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 735,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 529,
"src": "5061:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 736,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "hash",
"nodeType": "MemberAccess",
"referencedDeclaration": 399,
"src": "5061:15:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 737,
"name": "v",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 719,
"src": "5078:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"id": 738,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 697,
"src": "5081:1:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 739,
"name": "s",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 708,
"src": "5084:1:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 734,
"name": "ecrecover",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -6,
"src": "5051:9:1",
"typeDescriptions": {
"typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)"
}
},
"id": 740,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5051:35:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 741,
"name": "guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 606,
"src": "5090:12:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
"id": 742,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "keys",
"nodeType": "MemberAccess",
"referencedDeclaration": 368,
"src": "5090:17:1",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 744,
"indexExpression": {
"argumentTypes": null,
"id": 743,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 672,
"src": "5108:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "5090:24:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "5051:63:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "564141207369676e617475726520696e76616c6964",
"id": 746,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5116:23:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_862afa71aa5d7cd3e53f61178438850df5cce8f1009ff0681521493b85052621",
"typeString": "literal_string \"VAA signature invalid\""
},
"value": "VAA signature invalid"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_862afa71aa5d7cd3e53f61178438850df5cce8f1009ff0681521493b85052621",
"typeString": "literal_string \"VAA signature invalid\""
}
],
"id": 733,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "5043:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 747,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5043:97:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 748,
"nodeType": "ExpressionStatement",
"src": "5043:97:1"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 667,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 665,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 662,
"src": "4664:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 666,
"name": "len_signers",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 558,
"src": "4668:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4664:15:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 750,
"initializationExpression": {
"assignments": [662],
"declarations": [
{
"constant": false,
"id": 662,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 750,
"src": "4652:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 661,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "4652:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 664,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 663,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4661:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "4652:10:1"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 669,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "4681:3:1",
"subExpression": {
"argumentTypes": null,
"id": 668,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 662,
"src": "4681:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 670,
"nodeType": "ExpressionStatement",
"src": "4681:3:1"
},
"nodeType": "ForStatement",
"src": "4647:504:1"
},
{
"expression": {
"argumentTypes": null,
"id": 760,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 751,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 529,
"src": "5161:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 753,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "action",
"nodeType": "MemberAccess",
"referencedDeclaration": 405,
"src": "5161:17:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 758,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 756,
"name": "offset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 565,
"src": "5193:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "34",
"id": 757,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5202:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "5193:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 754,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 526,
"src": "5181:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 755,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
"src": "5181:11:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint8)"
}
},
"id": 759,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5181:23:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "5161:43:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 761,
"nodeType": "ExpressionStatement",
"src": "5161:43:1"
},
{
"expression": {
"argumentTypes": null,
"id": 778,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 762,
"name": "parsed_vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 529,
"src": "5214:10:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA memory"
}
},
"id": 764,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "payload",
"nodeType": "MemberAccess",
"referencedDeclaration": 407,
"src": "5214:18:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 769,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 767,
"name": "offset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 565,
"src": "5245:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "35",
"id": 768,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5254:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
},
"value": "5"
},
"src": "5245:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 776,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 770,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 526,
"src": "5257:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 771,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "5257:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 774,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 772,
"name": "offset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 565,
"src": "5271:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "35",
"id": 773,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5280:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
},
"value": "5"
},
"src": "5271:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 775,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "5270:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5257:25:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 765,
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 526,
"src": "5235:3:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"id": 766,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "slice",
"nodeType": "MemberAccess",
"referencedDeclaration": 55,
"src": "5235:9:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
}
},
"id": 777,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5235:48:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"src": "5214:69:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 779,
"nodeType": "ExpressionStatement",
"src": "5214:69:1"
}
]
},
"documentation": null,
"functionSelector": "600b9aa6",
"id": 781,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "parseAndVerifyVAA",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 527,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 526,
"mutability": "mutable",
"name": "vaa",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 781,
"src": "3472:18:1",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 525,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "3472:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3471:20:1"
},
"returnParameters": {
"id": 530,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 529,
"mutability": "mutable",
"name": "parsed_vaa",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 781,
"src": "3513:27:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr",
"typeString": "struct Wormhole.ParsedVAA"
},
"typeName": {
"contractScope": null,
"id": 528,
"name": "ParsedVAA",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 408,
"src": "3513:9:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ParsedVAA_$408_storage_ptr",
"typeString": "struct Wormhole.ParsedVAA"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3512:29:1"
},
"scope": 1420,
"src": "3445:1845:1",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 888,
"nodeType": "Block",
"src": "5353:859:1",
"statements": [
{
"assignments": [787],
"declarations": [
{
"constant": false,
"id": 787,
"mutability": "mutable",
"name": "new_guardian_set_index",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 888,
"src": "5363:29:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 786,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "5363:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 792,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 790,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5409:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"expression": {
"argumentTypes": null,
"id": 788,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 783,
"src": "5395:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 789,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint32",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
"src": "5395:13:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint32)"
}
},
"id": 791,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5395:16:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "5363:48:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 798,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 794,
"name": "new_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 787,
"src": "5429:22:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 797,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 795,
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 414,
"src": "5455:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 796,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5476:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "5455:22:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "5429:48:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e646578206d75737420696e63726561736520696e207374657073206f662031",
"id": 799,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5479:35:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a9c35350c4790f34190b54478b12348e0cbd9c4c717b5d4a6ca5709d71c4f33d",
"typeString": "literal_string \"index must increase in steps of 1\""
},
"value": "index must increase in steps of 1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_a9c35350c4790f34190b54478b12348e0cbd9c4c717b5d4a6ca5709d71c4f33d",
"typeString": "literal_string \"index must increase in steps of 1\""
}
],
"id": 793,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "5421:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 800,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5421:94:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 801,
"nodeType": "ExpressionStatement",
"src": "5421:94:1"
},
{
"assignments": [803],
"declarations": [
{
"constant": false,
"id": 803,
"mutability": "mutable",
"name": "len",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 888,
"src": "5525:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 802,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "5525:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 808,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "34",
"id": 806,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5550:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
}
],
"expression": {
"argumentTypes": null,
"id": 804,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 783,
"src": "5537:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 805,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
"src": "5537:12:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint8)"
}
},
"id": 807,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5537:15:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "5525:27:1"
},
{
"assignments": [813],
"declarations": [
{
"constant": false,
"id": 813,
"mutability": "mutable",
"name": "new_guardians",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 888,
"src": "5563:30:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 811,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5563:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 812,
"length": null,
"nodeType": "ArrayTypeName",
"src": "5563:9:1",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 819,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 817,
"name": "len",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 803,
"src": "5610:3:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 816,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "5596:13:1",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$",
"typeString": "function (uint256) pure returns (address[] memory)"
},
"typeName": {
"baseType": {
"id": 814,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5600:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 815,
"length": null,
"nodeType": "ArrayTypeName",
"src": "5600:9:1",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
}
},
"id": 818,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5596:18:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "5563:51:1"
},
{
"body": {
"id": 847,
"nodeType": "Block",
"src": "5655:103:1",
"statements": [
{
"assignments": [831],
"declarations": [
{
"constant": false,
"id": 831,
"mutability": "mutable",
"name": "addr",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 847,
"src": "5669:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 830,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5669:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 840,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 838,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "35",
"id": 834,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5699:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
},
"value": "5"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 837,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 835,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 821,
"src": "5703:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3230",
"id": 836,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5707:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_20_by_1",
"typeString": "int_const 20"
},
"value": "20"
},
"src": "5703:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5699:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 832,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 783,
"src": "5684:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 833,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 82,
"src": "5684:14:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (address)"
}
},
"id": 839,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5684:26:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "5669:41:1"
},
{
"expression": {
"argumentTypes": null,
"id": 845,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 841,
"name": "new_guardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 813,
"src": "5724:13:1",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 843,
"indexExpression": {
"argumentTypes": null,
"id": 842,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 821,
"src": "5738:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "5724:16:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 844,
"name": "addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 831,
"src": "5743:4:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "5724:23:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 846,
"nodeType": "ExpressionStatement",
"src": "5724:23:1"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 826,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 824,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 821,
"src": "5641:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 825,
"name": "len",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 803,
"src": "5645:3:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "5641:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 848,
"initializationExpression": {
"assignments": [821],
"declarations": [
{
"constant": false,
"id": 821,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 848,
"src": "5629:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 820,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "5629:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 823,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 822,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5638:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "5629:10:1"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 828,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "5650:3:1",
"subExpression": {
"argumentTypes": null,
"id": 827,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 821,
"src": "5650:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 829,
"nodeType": "ExpressionStatement",
"src": "5650:3:1"
},
"nodeType": "ForStatement",
"src": "5624:134:1"
},
{
"assignments": [850],
"declarations": [
{
"constant": false,
"id": 850,
"mutability": "mutable",
"name": "old_guardian_set_index",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 888,
"src": "5768:29:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 849,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "5768:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 852,
"initialValue": {
"argumentTypes": null,
"id": 851,
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 414,
"src": "5800:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "5768:50:1"
},
{
"expression": {
"argumentTypes": null,
"id": 855,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 853,
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 414,
"src": "5828:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 854,
"name": "new_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 787,
"src": "5849:22:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "5828:43:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"id": 856,
"nodeType": "ExpressionStatement",
"src": "5828:43:1"
},
{
"assignments": [858],
"declarations": [
{
"constant": false,
"id": 858,
"mutability": "mutable",
"name": "new_guardian_set",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 888,
"src": "5882:35:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
"id": 857,
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 371,
"src": "5882:11:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 863,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 860,
"name": "new_guardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 813,
"src": "5932:13:1",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 861,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5947:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 859,
"name": "GuardianSet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 371,
"src": "5920:11:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_GuardianSet_$371_storage_ptr_$",
"typeString": "type(struct Wormhole.GuardianSet storage pointer)"
}
},
"id": 862,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "structConstructorCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5920:29:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "5882:67:1"
},
{
"expression": {
"argumentTypes": null,
"id": 868,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 864,
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 412,
"src": "5959:13:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
"id": 866,
"indexExpression": {
"argumentTypes": null,
"id": 865,
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 414,
"src": "5973:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "5959:33:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 867,
"name": "new_guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 858,
"src": "5995:16:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
"src": "5959:52:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
"id": 869,
"nodeType": "ExpressionStatement",
"src": "5959:52:1"
},
{
"expression": {
"argumentTypes": null,
"id": 881,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 870,
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 412,
"src": "6021:13:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
"id": 872,
"indexExpression": {
"argumentTypes": null,
"id": 871,
"name": "old_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 850,
"src": "6035:22:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "6021:37:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$371_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
"id": 873,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "expiration_time",
"nodeType": "MemberAccess",
"referencedDeclaration": 370,
"src": "6021:53:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 880,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 876,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
"src": "6084:5:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 877,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "6084:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 875,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "6077:6:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint32_$",
"typeString": "type(uint32)"
},
"typeName": {
"id": 874,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "6077:6:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 878,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6077:23:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 879,
"name": "guardian_set_expirity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 416,
"src": "6103:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "6077:47:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "6021:103:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"id": 882,
"nodeType": "ExpressionStatement",
"src": "6021:103:1"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 884,
"name": "old_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 850,
"src": "6162:22:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
{
"argumentTypes": null,
"id": 885,
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 414,
"src": "6186:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"id": 883,
"name": "LogGuardianSetChanged",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 377,
"src": "6140:21:1",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint32_$_t_uint32_$returns$__$",
"typeString": "function (uint32,uint32)"
}
},
"id": 886,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6140:65:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 887,
"nodeType": "EmitStatement",
"src": "6135:70:1"
}
]
},
"documentation": null,
"id": 889,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "vaaUpdateGuardianSet",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 784,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 783,
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 889,
"src": "5326:17:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 782,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "5326:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5325:19:1"
},
"returnParameters": {
"id": 785,
"nodeType": "ParameterList",
"parameters": [],
"src": "5353:0:1"
},
"scope": 1420,
"src": "5296:916:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 1050,
"nodeType": "Block",
"src": "6266:1644:1",
"statements": [
{
"assignments": [895],
"declarations": [
{
"constant": false,
"id": 895,
"mutability": "mutable",
"name": "source_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1050,
"src": "6319:18:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 894,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "6319:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 900,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "34",
"id": 898,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6353:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
}
],
"expression": {
"argumentTypes": null,
"id": 896,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 891,
"src": "6340:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 897,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
"src": "6340:12:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint8)"
}
},
"id": 899,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6340:15:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6319:36:1"
},
{
"assignments": [902],
"declarations": [
{
"constant": false,
"id": 902,
"mutability": "mutable",
"name": "target_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1050,
"src": "6366:18:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 901,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "6366:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 907,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "35",
"id": 905,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6400:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
},
"value": "5"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
}
],
"expression": {
"argumentTypes": null,
"id": 903,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 891,
"src": "6387:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 904,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
"src": "6387:12:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint8)"
}
},
"id": 906,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6387:15:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6366:36:1"
},
{
"assignments": [909],
"declarations": [
{
"constant": false,
"id": 909,
"mutability": "mutable",
"name": "target_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1050,
"src": "6521:22:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 908,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6521:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 916,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_50_by_1",
"typeString": "int_const 50"
},
"id": 914,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3338",
"id": 912,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6561:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_38_by_1",
"typeString": "int_const 38"
},
"value": "38"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3132",
"id": 913,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6566:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_12_by_1",
"typeString": "int_const 12"
},
"value": "12"
},
"src": "6561:7:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_50_by_1",
"typeString": "int_const 50"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_50_by_1",
"typeString": "int_const 50"
}
],
"expression": {
"argumentTypes": null,
"id": 910,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 891,
"src": "6546:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 911,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 82,
"src": "6546:14:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (address)"
}
},
"id": 915,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6546:23:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6521:48:1"
},
{
"assignments": [918],
"declarations": [
{
"constant": false,
"id": 918,
"mutability": "mutable",
"name": "token_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1050,
"src": "6580:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 917,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "6580:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 923,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3730",
"id": 921,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6613:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_70_by_1",
"typeString": "int_const 70"
},
"value": "70"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_70_by_1",
"typeString": "int_const 70"
}
],
"expression": {
"argumentTypes": null,
"id": 919,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 891,
"src": "6600:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 920,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
"src": "6600:12:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint8)"
}
},
"id": 922,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6600:16:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6580:36:1"
},
{
"assignments": [925],
"declarations": [
{
"constant": false,
"id": 925,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1050,
"src": "6680:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 924,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6680:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 930,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "313034",
"id": 928,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6712:3:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_104_by_1",
"typeString": "int_const 104"
},
"value": "104"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_104_by_1",
"typeString": "int_const 104"
}
],
"expression": {
"argumentTypes": null,
"id": 926,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 891,
"src": "6697:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 927,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint256",
"nodeType": "MemberAccess",
"referencedDeclaration": 271,
"src": "6697:14:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint256)"
}
},
"id": 929,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6697:19:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6680:36:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 934,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 932,
"name": "source_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 895,
"src": "6735:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"id": 933,
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 902,
"src": "6751:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "6735:28:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "73616d6520636861696e207472616e736665727320617265206e6f7420737570706f72746564",
"id": 935,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6765:40:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_e4bc00dc2f1f687d1ecd0a604d39e62ed5081a3cef70cb858e5f565f9bb7da23",
"typeString": "literal_string \"same chain transfers are not supported\""
},
"value": "same chain transfers are not supported"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_e4bc00dc2f1f687d1ecd0a604d39e62ed5081a3cef70cb858e5f565f9bb7da23",
"typeString": "literal_string \"same chain transfers are not supported\""
}
],
"id": 931,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "6727:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 936,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6727:79:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 937,
"nodeType": "ExpressionStatement",
"src": "6727:79:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 941,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 939,
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 902,
"src": "6824:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 940,
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 362,
"src": "6840:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "6824:24:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "7472616e73666572206d75737420626520696e636f6d696e67",
"id": 942,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6850:27:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cbd36b1271ec4677f9b6b0ce3c590e298ab53454b431f3898527107beeed1a5a",
"typeString": "literal_string \"transfer must be incoming\""
},
"value": "transfer must be incoming"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_cbd36b1271ec4677f9b6b0ce3c590e298ab53454b431f3898527107beeed1a5a",
"typeString": "literal_string \"transfer must be incoming\""
}
],
"id": 938,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "6816:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 943,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6816:62:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 944,
"nodeType": "ExpressionStatement",
"src": "6816:62:1"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 947,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 945,
"name": "token_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 918,
"src": "6893:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"id": 946,
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 362,
"src": "6908:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "6893:23:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 1048,
"nodeType": "Block",
"src": "7514:390:1",
"statements": [
{
"assignments": [1005],
"declarations": [
{
"constant": false,
"id": 1005,
"mutability": "mutable",
"name": "token_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1048,
"src": "7528:21:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1004,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7528:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1012,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_83_by_1",
"typeString": "int_const 83"
},
"id": 1010,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3731",
"id": 1008,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7567:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_71_by_1",
"typeString": "int_const 71"
},
"value": "71"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3132",
"id": 1009,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7572:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_12_by_1",
"typeString": "int_const 12"
},
"value": "12"
},
"src": "7567:7:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_83_by_1",
"typeString": "int_const 83"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_83_by_1",
"typeString": "int_const 83"
}
],
"expression": {
"argumentTypes": null,
"id": 1006,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 891,
"src": "7552:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 1007,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 82,
"src": "7552:14:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (address)"
}
},
"id": 1011,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7552:23:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7528:47:1"
},
{
"assignments": [1014],
"declarations": [
{
"constant": false,
"id": 1014,
"mutability": "mutable",
"name": "decimals",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1048,
"src": "7590:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1013,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "7590:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1020,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1016,
"name": "token_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1005,
"src": "7613:13:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1015,
"name": "ERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3008,
"src": "7607:5:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ERC20_$3008_$",
"typeString": "type(contract ERC20)"
}
},
"id": 1017,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7607:20:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20_$3008",
"typeString": "contract ERC20"
}
},
"id": 1018,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "decimals",
"nodeType": "MemberAccess",
"referencedDeclaration": 2584,
"src": "7607:29:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
"typeString": "function () view external returns (uint8)"
}
},
"id": 1019,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7607:31:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7590:48:1"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 1023,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1021,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1014,
"src": "7727:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "39",
"id": 1022,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7738:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_9_by_1",
"typeString": "int_const 9"
},
"value": "9"
},
"src": "7727:12:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1039,
"nodeType": "IfStatement",
"src": "7723:99:1",
"trueBody": {
"id": 1038,
"nodeType": "Block",
"src": "7741:81:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1036,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1024,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 925,
"src": "7759:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1034,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3130",
"id": 1027,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7779:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 1032,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1030,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1014,
"src": "7793:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"hexValue": "39",
"id": 1031,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7804:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_9_by_1",
"typeString": "int_const 9"
},
"value": "9"
},
"src": "7793:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 1029,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "7785:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 1028,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7785:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1033,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7785:21:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7779:27:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 1025,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 925,
"src": "7768:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1026,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mul",
"nodeType": "MemberAccess",
"referencedDeclaration": 2388,
"src": "7768:10:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 1035,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7768:39:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7759:48:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1037,
"nodeType": "ExpressionStatement",
"src": "7759:48:1"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1044,
"name": "target_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 909,
"src": "7870:14:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1045,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 925,
"src": "7886:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1041,
"name": "token_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1005,
"src": "7842:13:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1040,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3086,
"src": "7835:6:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$",
"typeString": "type(contract IERC20)"
}
},
"id": 1042,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7835:21:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3086",
"typeString": "contract IERC20"
}
},
"id": 1043,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "safeTransfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 3120,
"src": "7835:34:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3086_$",
"typeString": "function (contract IERC20,address,uint256)"
}
},
"id": 1046,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7835:58:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1047,
"nodeType": "ExpressionStatement",
"src": "7835:58:1"
}
]
},
"id": 1049,
"nodeType": "IfStatement",
"src": "6889:1015:1",
"trueBody": {
"id": 1003,
"nodeType": "Block",
"src": "6918:590:1",
"statements": [
{
"assignments": [949],
"declarations": [
{
"constant": false,
"id": 949,
"mutability": "mutable",
"name": "token_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1003,
"src": "6932:21:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 948,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "6932:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 954,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3731",
"id": 952,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6971:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_71_by_1",
"typeString": "int_const 71"
},
"value": "71"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_71_by_1",
"typeString": "int_const 71"
}
],
"expression": {
"argumentTypes": null,
"id": 950,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 891,
"src": "6956:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 951,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toBytes32",
"nodeType": "MemberAccess",
"referencedDeclaration": 298,
"src": "6956:14:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (bytes32)"
}
},
"id": 953,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6956:18:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6932:42:1"
},
{
"assignments": [956],
"declarations": [
{
"constant": false,
"id": 956,
"mutability": "mutable",
"name": "asset_id",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1003,
"src": "6988:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 955,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "6988:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 964,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 960,
"name": "token_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 918,
"src": "7034:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"id": 961,
"name": "token_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 949,
"src": "7047:13:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"argumentTypes": null,
"id": 958,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -1,
"src": "7017:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 959,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodePacked",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "7017:16:1",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
"typeString": "function () pure returns (bytes memory)"
}
},
"id": 962,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7017:44:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 957,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "7007:9:1",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 963,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7007:55:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6988:74:1"
},
{
"assignments": [966],
"declarations": [
{
"constant": false,
"id": 966,
"mutability": "mutable",
"name": "wrapped_asset",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1003,
"src": "7154:21:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 965,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7154:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 970,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 967,
"name": "wrappedAssets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 424,
"src": "7178:13:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
}
},
"id": 969,
"indexExpression": {
"argumentTypes": null,
"id": 968,
"name": "asset_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 956,
"src": "7192:8:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "7178:23:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7154:47:1"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 976,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 971,
"name": "wrapped_asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 966,
"src": "7219:13:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 974,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7244:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 973,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "7236:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 972,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7236:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 975,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7236:10:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "7219:27:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 994,
"nodeType": "IfStatement",
"src": "7215:212:1",
"trueBody": {
"id": 993,
"nodeType": "Block",
"src": "7248:179:1",
"statements": [
{
"assignments": [978],
"declarations": [
{
"constant": false,
"id": 978,
"mutability": "mutable",
"name": "asset_decimals",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 993,
"src": "7266:20:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 977,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "7266:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 983,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "313033",
"id": 981,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7302:3:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_103_by_1",
"typeString": "int_const 103"
},
"value": "103"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_103_by_1",
"typeString": "int_const 103"
}
],
"expression": {
"argumentTypes": null,
"id": 979,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 891,
"src": "7289:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 980,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
"src": "7289:12:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint8)"
}
},
"id": 982,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7289:17:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7266:40:1"
},
{
"expression": {
"argumentTypes": null,
"id": 991,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 984,
"name": "wrapped_asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 966,
"src": "7324:13:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 986,
"name": "asset_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 956,
"src": "7359:8:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 987,
"name": "token_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 918,
"src": "7369:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"id": 988,
"name": "token_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 949,
"src": "7382:13:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 989,
"name": "asset_decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 978,
"src": "7397:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 985,
"name": "deployWrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1094,
"src": "7340:18:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_uint8_$returns$_t_address_$",
"typeString": "function (bytes32,uint8,bytes32,uint8) returns (address)"
}
},
"id": 990,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7340:72:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "7324:88:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 992,
"nodeType": "ExpressionStatement",
"src": "7324:88:1"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 999,
"name": "target_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 909,
"src": "7474:14:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1000,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 925,
"src": "7490:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 996,
"name": "wrapped_asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 966,
"src": "7454:13:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 995,
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2147,
"src": "7441:12:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$",
"typeString": "type(contract WrappedAsset)"
}
},
"id": 997,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7441:27:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_WrappedAsset_$2147",
"typeString": "contract WrappedAsset"
}
},
"id": 998,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mint",
"nodeType": "MemberAccess",
"referencedDeclaration": 1511,
"src": "7441:32:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256) external"
}
},
"id": 1001,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7441:56:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1002,
"nodeType": "ExpressionStatement",
"src": "7441:56:1"
}
]
}
}
]
},
"documentation": null,
"id": 1051,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "vaaTransfer",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 892,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 891,
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1051,
"src": "6239:17:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 890,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "6239:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6238:19:1"
},
"returnParameters": {
"id": 893,
"nodeType": "ParameterList",
"parameters": [],
"src": "6266:0:1"
},
"scope": 1420,
"src": "6218:1692:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 1093,
"nodeType": "Block",
"src": "8047:808:1",
"statements": [
{
"assignments": [1065],
"declarations": [
{
"constant": false,
"id": 1065,
"mutability": "mutable",
"name": "targetBytes",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1093,
"src": "8225:19:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes20",
"typeString": "bytes20"
},
"typeName": {
"id": 1064,
"name": "bytes20",
"nodeType": "ElementaryTypeName",
"src": "8225:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes20",
"typeString": "bytes20"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1070,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1068,
"name": "wrappedAssetMaster",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 359,
"src": "8255:18:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1067,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "8247:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes20_$",
"typeString": "type(bytes20)"
},
"typeName": {
"id": 1066,
"name": "bytes20",
"nodeType": "ElementaryTypeName",
"src": "8247:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1069,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8247:27:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes20",
"typeString": "bytes20"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "8225:49:1"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "8293:348:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "8307:24:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "8326:4:1",
"type": "",
"value": "0x40"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "8320:5:1"
},
"nodeType": "YulFunctionCall",
"src": "8320:11:1"
},
"variables": [
{
"name": "clone",
"nodeType": "YulTypedName",
"src": "8311:5:1",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "clone",
"nodeType": "YulIdentifier",
"src": "8351:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "8358:66:1",
"type": "",
"value": "0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "8344:6:1"
},
"nodeType": "YulFunctionCall",
"src": "8344:81:1"
},
"nodeType": "YulExpressionStatement",
"src": "8344:81:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "clone",
"nodeType": "YulIdentifier",
"src": "8449:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "8456:4:1",
"type": "",
"value": "0x14"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "8445:3:1"
},
"nodeType": "YulFunctionCall",
"src": "8445:16:1"
},
{
"name": "targetBytes",
"nodeType": "YulIdentifier",
"src": "8463:11:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "8438:6:1"
},
"nodeType": "YulFunctionCall",
"src": "8438:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "8438:37:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "clone",
"nodeType": "YulIdentifier",
"src": "8499:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "8506:4:1",
"type": "",
"value": "0x28"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "8495:3:1"
},
"nodeType": "YulFunctionCall",
"src": "8495:16:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "8513:66:1",
"type": "",
"value": "0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "8488:6:1"
},
"nodeType": "YulFunctionCall",
"src": "8488:92:1"
},
"nodeType": "YulExpressionStatement",
"src": "8488:92:1"
},
{
"nodeType": "YulAssignment",
"src": "8593:38:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "8610:1:1",
"type": "",
"value": "0"
},
{
"name": "clone",
"nodeType": "YulIdentifier",
"src": "8613:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "8620:4:1",
"type": "",
"value": "0x37"
},
{
"name": "seed",
"nodeType": "YulIdentifier",
"src": "8626:4:1"
}
],
"functionName": {
"name": "create2",
"nodeType": "YulIdentifier",
"src": "8602:7:1"
},
"nodeType": "YulFunctionCall",
"src": "8602:29:1"
},
"variableNames": [
{
"name": "asset",
"nodeType": "YulIdentifier",
"src": "8593:5:1"
}
]
}
]
},
"evmVersion": "istanbul",
"externalReferences": [
{
"declaration": 1062,
"isOffset": false,
"isSlot": false,
"src": "8593:5:1",
"valueSize": 1
},
{
"declaration": 1053,
"isOffset": false,
"isSlot": false,
"src": "8626:4:1",
"valueSize": 1
},
{
"declaration": 1065,
"isOffset": false,
"isSlot": false,
"src": "8463:11:1",
"valueSize": 1
}
],
"id": 1071,
"nodeType": "InlineAssembly",
"src": "8284:357:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1076,
"name": "token_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1055,
"src": "8710:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"id": 1077,
"name": "token_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1057,
"src": "8723:13:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 1078,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1059,
"src": "8738:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1073,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1062,
"src": "8692:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1072,
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2147,
"src": "8679:12:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$",
"typeString": "type(contract WrappedAsset)"
}
},
"id": 1074,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8679:19:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_WrappedAsset_$2147",
"typeString": "contract WrappedAsset"
}
},
"id": 1075,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
"referencedDeclaration": 1490,
"src": "8679:30:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint8_$_t_bytes32_$_t_uint8_$returns$__$",
"typeString": "function (uint8,bytes32,uint8) external"
}
},
"id": 1079,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8679:68:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1080,
"nodeType": "ExpressionStatement",
"src": "8679:68:1"
},
{
"expression": {
"argumentTypes": null,
"id": 1085,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1081,
"name": "wrappedAssets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 424,
"src": "8783:13:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
}
},
"id": 1083,
"indexExpression": {
"argumentTypes": null,
"id": 1082,
"name": "seed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1053,
"src": "8797:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "8783:19:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1084,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1062,
"src": "8805:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "8783:27:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1086,
"nodeType": "ExpressionStatement",
"src": "8783:27:1"
},
{
"expression": {
"argumentTypes": null,
"id": 1091,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1087,
"name": "isWrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 428,
"src": "8820:14:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 1089,
"indexExpression": {
"argumentTypes": null,
"id": 1088,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1062,
"src": "8835:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "8820:21:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1090,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8844:4:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "8820:28:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1092,
"nodeType": "ExpressionStatement",
"src": "8820:28:1"
}
]
},
"documentation": null,
"id": 1094,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "deployWrappedAsset",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1060,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1053,
"mutability": "mutable",
"name": "seed",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1094,
"src": "7944:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 1052,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "7944:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1055,
"mutability": "mutable",
"name": "token_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1094,
"src": "7958:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1054,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "7958:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1057,
"mutability": "mutable",
"name": "token_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1094,
"src": "7977:21:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 1056,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "7977:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1059,
"mutability": "mutable",
"name": "decimals",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1094,
"src": "8000:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1058,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "8000:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7943:72:1"
},
"returnParameters": {
"id": 1063,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1062,
"mutability": "mutable",
"name": "asset",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1094,
"src": "8033:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1061,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "8033:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "8032:15:1"
},
"scope": 1420,
"src": "7916:939:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 1313,
"nodeType": "Block",
"src": "9057:1779:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 1114,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1112,
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1102,
"src": "9075:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"id": 1113,
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 362,
"src": "9091:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "9075:24:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6d757374206e6f74207472616e7366657220746f207468652073616d6520636861696e",
"id": 1115,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9101:37:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b",
"typeString": "literal_string \"must not transfer to the same chain\""
},
"value": "must not transfer to the same chain"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b",
"typeString": "literal_string \"must not transfer to the same chain\""
}
],
"id": 1111,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "9067:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1116,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9067:72:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1117,
"nodeType": "ExpressionStatement",
"src": "9067:72:1"
},
{
"assignments": [1119],
"declarations": [
{
"constant": false,
"id": 1119,
"mutability": "mutable",
"name": "asset_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1313,
"src": "9150:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1118,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "9150:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1121,
"initialValue": {
"argumentTypes": null,
"id": 1120,
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 362,
"src": "9170:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "9150:28:1"
},
{
"assignments": [1123],
"declarations": [
{
"constant": false,
"id": 1123,
"mutability": "mutable",
"name": "asset_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1313,
"src": "9188:21:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 1122,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "9188:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1124,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "9188:21:1"
},
{
"assignments": [1126],
"declarations": [
{
"constant": false,
"id": 1126,
"mutability": "mutable",
"name": "decimals",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1313,
"src": "9219:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1125,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "9219:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1132,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1128,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1096,
"src": "9242:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1127,
"name": "ERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3008,
"src": "9236:5:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ERC20_$3008_$",
"typeString": "type(contract ERC20)"
}
},
"id": 1129,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9236:12:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20_$3008",
"typeString": "contract ERC20"
}
},
"id": 1130,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "decimals",
"nodeType": "MemberAccess",
"referencedDeclaration": 2584,
"src": "9236:21:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
"typeString": "function () view external returns (uint8)"
}
},
"id": 1131,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9236:23:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "9219:40:1"
},
{
"condition": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1133,
"name": "isWrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 428,
"src": "9274:14:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 1135,
"indexExpression": {
"argumentTypes": null,
"id": 1134,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1096,
"src": "9289:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "9274:21:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 1286,
"nodeType": "Block",
"src": "9496:1091:1",
"statements": [
{
"assignments": [1163],
"declarations": [
{
"constant": false,
"id": 1163,
"mutability": "mutable",
"name": "balanceBefore",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1286,
"src": "9510:21:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1162,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "9510:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1173,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1170,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "9566:4:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Wormhole_$1420",
"typeString": "contract Wormhole"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Wormhole_$1420",
"typeString": "contract Wormhole"
}
],
"id": 1169,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9558:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 1168,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9558:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1171,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9558:13:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1165,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1096,
"src": "9541:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1164,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3086,
"src": "9534:6:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$",
"typeString": "type(contract IERC20)"
}
},
"id": 1166,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9534:13:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3086",
"typeString": "contract IERC20"
}
},
"id": 1167,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 3025,
"src": "9534:23:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 1172,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9534:38:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "9510:62:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1178,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "9617:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1179,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "9617:10:1",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1182,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "9637:4:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Wormhole_$1420",
"typeString": "contract Wormhole"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Wormhole_$1420",
"typeString": "contract Wormhole"
}
],
"id": 1181,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9629:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 1180,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9629:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1183,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9629:13:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 1184,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "9644:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1175,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1096,
"src": "9593:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1174,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3086,
"src": "9586:6:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$",
"typeString": "type(contract IERC20)"
}
},
"id": 1176,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9586:13:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3086",
"typeString": "contract IERC20"
}
},
"id": 1177,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "safeTransferFrom",
"nodeType": "MemberAccess",
"referencedDeclaration": 3145,
"src": "9586:30:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3086_$",
"typeString": "function (contract IERC20,address,address,uint256)"
}
},
"id": 1185,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9586:65:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1186,
"nodeType": "ExpressionStatement",
"src": "9586:65:1"
},
{
"assignments": [1188],
"declarations": [
{
"constant": false,
"id": 1188,
"mutability": "mutable",
"name": "balanceAfter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1286,
"src": "9665:20:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1187,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "9665:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1198,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1195,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "9720:4:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Wormhole_$1420",
"typeString": "contract Wormhole"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Wormhole_$1420",
"typeString": "contract Wormhole"
}
],
"id": 1194,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9712:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 1193,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9712:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1196,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9712:13:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1190,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1096,
"src": "9695:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1189,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3086,
"src": "9688:6:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$",
"typeString": "type(contract IERC20)"
}
},
"id": 1191,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9688:13:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3086",
"typeString": "contract IERC20"
}
},
"id": 1192,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 3025,
"src": "9688:23:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 1197,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9688:38:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "9665:61:1"
},
{
"expression": {
"argumentTypes": null,
"id": 1204,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1199,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "9931:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1202,
"name": "balanceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1163,
"src": "9957:13:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 1200,
"name": "balanceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1188,
"src": "9940:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1201,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 2354,
"src": "9940:16:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 1203,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9940:31:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "9931:40:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1205,
"nodeType": "ExpressionStatement",
"src": "9931:40:1"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 1208,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1206,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1126,
"src": "10046:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "39",
"id": 1207,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10057:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_9_by_1",
"typeString": "int_const 9"
},
"value": "9"
},
"src": "10046:12:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1254,
"nodeType": "IfStatement",
"src": "10042:344:1",
"trueBody": {
"id": 1253,
"nodeType": "Block",
"src": "10060:326:1",
"statements": [
{
"assignments": [1210],
"declarations": [
{
"constant": false,
"id": 1210,
"mutability": "mutable",
"name": "original_amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1253,
"src": "10078:23:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1209,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10078:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1212,
"initialValue": {
"argumentTypes": null,
"id": 1211,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "10104:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10078:32:1"
},
{
"expression": {
"argumentTypes": null,
"id": 1225,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1213,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "10128:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1223,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3130",
"id": 1216,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10148:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 1221,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1219,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1126,
"src": "10162:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"hexValue": "39",
"id": 1220,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10173:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_9_by_1",
"typeString": "int_const 9"
},
"value": "9"
},
"src": "10162:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 1218,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10154:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 1217,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10154:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1222,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10154:21:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10148:27:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 1214,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "10137:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1215,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 2410,
"src": "10137:10:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 1224,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10137:39:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10128:48:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1226,
"nodeType": "ExpressionStatement",
"src": "10128:48:1"
},
{
"condition": {
"argumentTypes": null,
"id": 1227,
"name": "refund_dust",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1106,
"src": "10199:11:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1248,
"nodeType": "IfStatement",
"src": "10195:146:1",
"trueBody": {
"id": 1247,
"nodeType": "Block",
"src": "10212:129:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1232,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "10261:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1233,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "10261:10:1",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1243,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3130",
"id": 1236,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10293:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 1241,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1239,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1126,
"src": "10307:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"hexValue": "39",
"id": 1240,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10318:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_9_by_1",
"typeString": "int_const 9"
},
"value": "9"
},
"src": "10307:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 1238,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10299:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 1237,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10299:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1242,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10299:21:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10293:27:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 1234,
"name": "original_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1210,
"src": "10273:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1235,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mod",
"nodeType": "MemberAccess",
"referencedDeclaration": 2432,
"src": "10273:19:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 1244,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10273:48:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1229,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1096,
"src": "10241:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1228,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3086,
"src": "10234:6:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$",
"typeString": "type(contract IERC20)"
}
},
"id": 1230,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10234:13:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3086",
"typeString": "contract IERC20"
}
},
"id": 1231,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "safeTransfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 3120,
"src": "10234:26:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3086_$",
"typeString": "function (contract IERC20,address,uint256)"
}
},
"id": 1245,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10234:88:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1246,
"nodeType": "ExpressionStatement",
"src": "10234:88:1"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 1251,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1249,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1126,
"src": "10359:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "39",
"id": 1250,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10370:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_9_by_1",
"typeString": "int_const 9"
},
"value": "9"
},
"src": "10359:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 1252,
"nodeType": "ExpressionStatement",
"src": "10359:12:1"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1272,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1269,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3130",
"id": 1258,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10425:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 1267,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1262,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1096,
"src": "10445:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1261,
"name": "ERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3008,
"src": "10439:5:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ERC20_$3008_$",
"typeString": "type(contract ERC20)"
}
},
"id": 1263,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10439:12:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20_$3008",
"typeString": "contract ERC20"
}
},
"id": 1264,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "decimals",
"nodeType": "MemberAccess",
"referencedDeclaration": 2584,
"src": "10439:21:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
"typeString": "function () view external returns (uint8)"
}
},
"id": 1265,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10439:23:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"hexValue": "39",
"id": 1266,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10465:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_9_by_1",
"typeString": "int_const 9"
},
"value": "9"
},
"src": "10439:27:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 1260,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10431:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 1259,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10431:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1268,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10431:36:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10425:42:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 1256,
"name": "balanceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1188,
"src": "10408:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1257,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 2410,
"src": "10408:16:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 1270,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10408:60:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 1271,
"name": "MAX_UINT64",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 357,
"src": "10472:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"src": "10408:74:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6272696467652062616c616e636520776f756c6420657863656564206d6178696d756d",
"id": 1273,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10484:37:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_173119466b5178b8ca47cb473e247f7a9a678958b1d751b4cef80e7a8162cdd4",
"typeString": "literal_string \"bridge balance would exceed maximum\""
},
"value": "bridge balance would exceed maximum"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_173119466b5178b8ca47cb473e247f7a9a678958b1d751b4cef80e7a8162cdd4",
"typeString": "literal_string \"bridge balance would exceed maximum\""
}
],
"id": 1255,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "10400:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1274,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10400:122:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1275,
"nodeType": "ExpressionStatement",
"src": "10400:122:1"
},
{
"expression": {
"argumentTypes": null,
"id": 1284,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1276,
"name": "asset_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1123,
"src": "10537:13:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1281,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1096,
"src": "10569:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1280,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10561:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 1279,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10561:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1282,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10561:14:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1278,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10553:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
"id": 1277,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "10553:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1283,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10553:23:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "10537:39:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 1285,
"nodeType": "ExpressionStatement",
"src": "10537:39:1"
}
]
},
"id": 1287,
"nodeType": "IfStatement",
"src": "9270:1317:1",
"trueBody": {
"id": 1161,
"nodeType": "Block",
"src": "9297:193:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1140,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "9336:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1141,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "9336:10:1",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 1142,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "9348:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1137,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1096,
"src": "9324:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1136,
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2147,
"src": "9311:12:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$",
"typeString": "type(contract WrappedAsset)"
}
},
"id": 1138,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9311:19:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_WrappedAsset_$2147",
"typeString": "contract WrappedAsset"
}
},
"id": 1139,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "burn",
"nodeType": "MemberAccess",
"referencedDeclaration": 1532,
"src": "9311:24:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256) external"
}
},
"id": 1143,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9311:44:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1144,
"nodeType": "ExpressionStatement",
"src": "9311:44:1"
},
{
"expression": {
"argumentTypes": null,
"id": 1151,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1145,
"name": "asset_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1119,
"src": "9369:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1147,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1096,
"src": "9396:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1146,
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2147,
"src": "9383:12:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$",
"typeString": "type(contract WrappedAsset)"
}
},
"id": 1148,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9383:19:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_WrappedAsset_$2147",
"typeString": "contract WrappedAsset"
}
},
"id": 1149,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "assetChain",
"nodeType": "MemberAccess",
"referencedDeclaration": 1443,
"src": "9383:30:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
"typeString": "function () view external returns (uint8)"
}
},
"id": 1150,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9383:32:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "9369:46:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 1152,
"nodeType": "ExpressionStatement",
"src": "9369:46:1"
},
{
"expression": {
"argumentTypes": null,
"id": 1159,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1153,
"name": "asset_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1123,
"src": "9429:13:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1155,
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1096,
"src": "9458:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1154,
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2147,
"src": "9445:12:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$",
"typeString": "type(contract WrappedAsset)"
}
},
"id": 1156,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9445:19:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_WrappedAsset_$2147",
"typeString": "contract WrappedAsset"
}
},
"id": 1157,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "assetAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 1445,
"src": "9445:32:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_bytes32_$",
"typeString": "function () view external returns (bytes32)"
}
},
"id": 1158,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9445:34:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "9429:50:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 1160,
"nodeType": "ExpressionStatement",
"src": "9429:50:1"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1291,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1289,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "10644:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1290,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10654:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "10644:11:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "7472756e636174656420616d6f756e74206d757374206e6f742062652030",
"id": 1292,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10657:32:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e",
"typeString": "literal_string \"truncated amount must not be 0\""
},
"value": "truncated amount must not be 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e",
"typeString": "literal_string \"truncated amount must not be 0\""
}
],
"id": 1288,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "10636:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1293,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10636:54:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1294,
"nodeType": "ExpressionStatement",
"src": "10636:54:1"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1296,
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1102,
"src": "10722:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"id": 1297,
"name": "asset_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1119,
"src": "10736:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"id": 1298,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1126,
"src": "10749:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"id": 1299,
"name": "asset_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1123,
"src": "10759:13:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1304,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "10790:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1305,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "10790:10:1",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 1303,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10782:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 1302,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10782:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1306,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10782:19:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1301,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10774:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
"id": 1300,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "10774:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1307,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10774:28:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 1308,
"name": "recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1100,
"src": "10804:9:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 1309,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1098,
"src": "10815:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1310,
"name": "nonce",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1104,
"src": "10823:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"id": 1295,
"name": "LogTokensLocked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 395,
"src": "10706:15:1",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint8_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint32_$returns$__$",
"typeString": "function (uint8,uint8,uint8,bytes32,bytes32,bytes32,uint256,uint32)"
}
},
"id": 1311,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10706:123:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1312,
"nodeType": "EmitStatement",
"src": "10701:128:1"
}
]
},
"documentation": null,
"functionSelector": "70713960",
"id": 1314,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1109,
"modifierName": {
"argumentTypes": null,
"id": 1108,
"name": "nonReentrant",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3657,
"src": "9044:12:1",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "9044:12:1"
}
],
"name": "lockAssets",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1107,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1096,
"mutability": "mutable",
"name": "asset",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1314,
"src": "8890:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1095,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "8890:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1098,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1314,
"src": "8913:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1097,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8913:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1100,
"mutability": "mutable",
"name": "recipient",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1314,
"src": "8937:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 1099,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "8937:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1102,
"mutability": "mutable",
"name": "target_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1314,
"src": "8964:18:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1101,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "8964:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1104,
"mutability": "mutable",
"name": "nonce",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1314,
"src": "8992:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 1103,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "8992:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1106,
"mutability": "mutable",
"name": "refund_dust",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1314,
"src": "9014:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1105,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "9014:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "8880:156:1"
},
"returnParameters": {
"id": 1110,
"nodeType": "ParameterList",
"parameters": [],
"src": "9057:0:1"
},
"scope": 1420,
"src": "8861:1975:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 1402,
"nodeType": "Block",
"src": "10970:636:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 1328,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1326,
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1318,
"src": "10988:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"id": 1327,
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 362,
"src": "11004:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "10988:24:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6d757374206e6f74207472616e7366657220746f207468652073616d6520636861696e",
"id": 1329,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11014:37:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b",
"typeString": "literal_string \"must not transfer to the same chain\""
},
"value": "must not transfer to the same chain"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b",
"typeString": "literal_string \"must not transfer to the same chain\""
}
],
"id": 1325,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "10980:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1330,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10980:72:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1331,
"nodeType": "ExpressionStatement",
"src": "10980:72:1"
},
{
"assignments": [1333],
"declarations": [
{
"constant": false,
"id": 1333,
"mutability": "mutable",
"name": "remainder",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1402,
"src": "11063:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1332,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11063:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1341,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_1000000000_by_1",
"typeString": "int_const 1000000000"
},
"id": 1339,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3130",
"id": 1337,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11097:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"argumentTypes": null,
"hexValue": "39",
"id": 1338,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11103:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_9_by_1",
"typeString": "int_const 9"
},
"value": "9"
},
"src": "11097:7:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1000000000_by_1",
"typeString": "int_const 1000000000"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1000000000_by_1",
"typeString": "int_const 1000000000"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1334,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "11083:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1335,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11083:9:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1336,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mod",
"nodeType": "MemberAccess",
"referencedDeclaration": 2432,
"src": "11083:13:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 1340,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11083:22:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11063:42:1"
},
{
"assignments": [1343],
"declarations": [
{
"constant": false,
"id": 1343,
"mutability": "mutable",
"name": "transfer_amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1402,
"src": "11115:23:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1342,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11115:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1351,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_1000000000_by_1",
"typeString": "int_const 1000000000"
},
"id": 1349,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3130",
"id": 1347,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11155:2:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"argumentTypes": null,
"hexValue": "39",
"id": 1348,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11161:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_9_by_1",
"typeString": "int_const 9"
},
"value": "9"
},
"src": "11155:7:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1000000000_by_1",
"typeString": "int_const 1000000000"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1000000000_by_1",
"typeString": "int_const 1000000000"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1344,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "11141:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1345,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11141:9:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1346,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 2410,
"src": "11141:13:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 1350,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11141:22:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11115:48:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1355,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1353,
"name": "transfer_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1343,
"src": "11181:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1354,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11200:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "11181:20:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "7472756e636174656420616d6f756e74206d757374206e6f742062652030",
"id": 1356,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11203:32:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e",
"typeString": "literal_string \"truncated amount must not be 0\""
},
"value": "truncated amount must not be 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e",
"typeString": "literal_string \"truncated amount must not be 0\""
}
],
"id": 1352,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "11173:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1357,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11173:63:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1358,
"nodeType": "ExpressionStatement",
"src": "11173:63:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1364,
"name": "remainder",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1333,
"src": "11302:9:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1359,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "11282:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1362,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11282:10:1",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"id": 1363,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11282:19:1",
"typeDescriptions": {
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 1365,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11282:30:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1366,
"nodeType": "ExpressionStatement",
"src": "11282:30:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1368,
"name": "WETHAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 365,
"src": "11361:11:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1367,
"name": "WETH",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1431,
"src": "11356:4:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_WETH_$1431_$",
"typeString": "type(contract WETH)"
}
},
"id": 1369,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11356:17:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_WETH_$1431",
"typeString": "contract WETH"
}
},
"id": 1370,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "deposit",
"nodeType": "MemberAccess",
"referencedDeclaration": 1425,
"src": "11356:25:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_payable$__$returns$__$",
"typeString": "function () payable external"
}
},
"id": 1375,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"names": ["value"],
"nodeType": "FunctionCallOptions",
"options": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1374,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1371,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "11390:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1372,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11390:9:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 1373,
"name": "remainder",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1333,
"src": "11402:9:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "11390:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"src": "11356:56:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_payable$__$returns$__$value",
"typeString": "function () payable external"
}
},
"id": 1376,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11356:58:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1377,
"nodeType": "ExpressionStatement",
"src": "11356:58:1"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1379,
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1318,
"src": "11477:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"id": 1380,
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 362,
"src": "11491:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"hexValue": "39",
"id": 1381,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11501:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_9_by_1",
"typeString": "int_const 9"
},
"value": "9"
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1386,
"name": "WETHAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 365,
"src": "11520:11:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1385,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "11512:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 1384,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11512:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1387,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11512:20:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1383,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "11504:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
"id": 1382,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "11504:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1388,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11504:29:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1393,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "11551:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1394,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11551:10:1",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 1392,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "11543:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 1391,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11543:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1395,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11543:19:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1390,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "11535:7:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
"id": 1389,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "11535:7:1",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 1396,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11535:28:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 1397,
"name": "recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1316,
"src": "11565:9:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 1398,
"name": "transfer_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1343,
"src": "11576:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1399,
"name": "nonce",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1320,
"src": "11593:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_rational_9_by_1",
"typeString": "int_const 9"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"id": 1378,
"name": "LogTokensLocked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 395,
"src": "11461:15:1",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint8_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint32_$returns$__$",
"typeString": "function (uint8,uint8,uint8,bytes32,bytes32,bytes32,uint256,uint32)"
}
},
"id": 1400,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11461:138:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1401,
"nodeType": "EmitStatement",
"src": "11456:143:1"
}
]
},
"documentation": null,
"functionSelector": "58d62e46",
"id": 1403,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1323,
"modifierName": {
"argumentTypes": null,
"id": 1322,
"name": "nonReentrant",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3657,
"src": "10957:12:1",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "10957:12:1"
}
],
"name": "lockETH",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1321,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1316,
"mutability": "mutable",
"name": "recipient",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1403,
"src": "10868:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 1315,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "10868:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1318,
"mutability": "mutable",
"name": "target_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1403,
"src": "10895:18:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1317,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "10895:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1320,
"mutability": "mutable",
"name": "nonce",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1403,
"src": "10923:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 1319,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "10923:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "10858:83:1"
},
"returnParameters": {
"id": 1324,
"nodeType": "ParameterList",
"parameters": [],
"src": "10970:0:1"
},
"scope": 1420,
"src": "10842:764:1",
"stateMutability": "payable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 1410,
"nodeType": "Block",
"src": "11640:57:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61",
"id": 1407,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11648:46:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2",
"typeString": "literal_string \"please use lockETH to transfer ETH to Solana\""
},
"value": "please use lockETH to transfer ETH to Solana"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2",
"typeString": "literal_string \"please use lockETH to transfer ETH to Solana\""
}
],
"id": 1406,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [-19, -19],
"referencedDeclaration": -19,
"src": "11641:6:1",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
"id": 1408,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11641:54:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1409,
"nodeType": "ExpressionStatement",
"src": "11641:54:1"
}
]
},
"documentation": null,
"id": 1411,
"implemented": true,
"kind": "fallback",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1404,
"nodeType": "ParameterList",
"parameters": [],
"src": "11620:2:1"
},
"returnParameters": {
"id": 1405,
"nodeType": "ParameterList",
"parameters": [],
"src": "11640:0:1"
},
"scope": 1420,
"src": "11612:85:1",
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
{
"body": {
"id": 1418,
"nodeType": "Block",
"src": "11730:57:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61",
"id": 1415,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11738:46:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2",
"typeString": "literal_string \"please use lockETH to transfer ETH to Solana\""
},
"value": "please use lockETH to transfer ETH to Solana"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2",
"typeString": "literal_string \"please use lockETH to transfer ETH to Solana\""
}
],
"id": 1414,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [-19, -19],
"referencedDeclaration": -19,
"src": "11731:6:1",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
"id": 1416,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11731:54:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1417,
"nodeType": "ExpressionStatement",
"src": "11731:54:1"
}
]
},
"documentation": null,
"id": 1419,
"implemented": true,
"kind": "receive",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1412,
"nodeType": "ParameterList",
"parameters": [],
"src": "11710:2:1"
},
"returnParameters": {
"id": 1413,
"nodeType": "ParameterList",
"parameters": [],
"src": "11730:0:1"
},
"scope": 1420,
"src": "11703:84:1",
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
}
],
"scope": 1432,
"src": "463:11326:1"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1421,
"name": "IERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3086,
"src": "11810:6:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3086",
"typeString": "contract IERC20"
}
},
"id": 1422,
"nodeType": "InheritanceSpecifier",
"src": "11810:6:1"
}
],
"contractDependencies": [3086],
"contractKind": "interface",
"documentation": null,
"fullyImplemented": false,
"id": 1431,
"linearizedBaseContracts": [1431, 3086],
"name": "WETH",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": null,
"functionSelector": "d0e30db0",
"id": 1425,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "deposit",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1423,
"nodeType": "ParameterList",
"parameters": [],
"src": "11839:2:1"
},
"returnParameters": {
"id": 1424,
"nodeType": "ParameterList",
"parameters": [],
"src": "11858:0:1"
},
"scope": 1431,
"src": "11823:36:1",
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"functionSelector": "2e1a7d4d",
"id": 1430,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "withdraw",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1428,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1427,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1430,
"src": "11883:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1426,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11883:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "11882:16:1"
},
"returnParameters": {
"id": 1429,
"nodeType": "ParameterList",
"parameters": [],
"src": "11907:0:1"
},
"scope": 1431,
"src": "11865:43:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 1432,
"src": "11792:118:1"
}
],
"src": "64:11847:1"
},
"legacyAST": {
"attributes": {
"absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol",
"exportedSymbols": {
"WETH": [1431],
"Wormhole": [1420]
},
"license": "Apache 2"
},
"children": [
{
"attributes": {
"literals": ["solidity", "^", "0.6", ".0"]
},
"id": 335,
"name": "PragmaDirective",
"src": "64:23:1"
},
{
"attributes": {
"literals": ["experimental", "ABIEncoderV2"]
},
"id": 336,
"name": "PragmaDirective",
"src": "88:33:1"
},
{
"attributes": {
"SourceUnit": 3009,
"absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
"scope": 1432,
"symbolAliases": [null],
"unitAlias": ""
},
"id": 337,
"name": "ImportDirective",
"src": "123:55:1"
},
{
"attributes": {
"SourceUnit": 3087,
"absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"scope": 1432,
"symbolAliases": [null],
"unitAlias": ""
},
"id": 338,
"name": "ImportDirective",
"src": "179:56:1"
},
{
"attributes": {
"SourceUnit": 3300,
"absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
"scope": 1432,
"symbolAliases": [null],
"unitAlias": ""
},
"id": 339,
"name": "ImportDirective",
"src": "236:59:1"
},
{
"attributes": {
"SourceUnit": 2506,
"absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
"file": "@openzeppelin/contracts/math/SafeMath.sol",
"scope": 1432,
"symbolAliases": [null],
"unitAlias": ""
},
"id": 340,
"name": "ImportDirective",
"src": "296:51:1"
},
{
"attributes": {
"SourceUnit": 3659,
"absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol",
"file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol",
"scope": 1432,
"symbolAliases": [null],
"unitAlias": ""
},
"id": 341,
"name": "ImportDirective",
"src": "348:59:1"
},
{
"attributes": {
"SourceUnit": 334,
"absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol",
"file": "./BytesLib.sol",
"scope": 1432,
"symbolAliases": [null],
"unitAlias": ""
},
"id": 342,
"name": "ImportDirective",
"src": "408:24:1"
},
{
"attributes": {
"SourceUnit": 2148,
"absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol",
"file": "./WrappedAsset.sol",
"scope": 1432,
"symbolAliases": [null],
"unitAlias": ""
},
"id": 343,
"name": "ImportDirective",
"src": "433:28:1"
},
{
"attributes": {
"abstract": false,
"contractDependencies": [3658],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"linearizedBaseContracts": [1420, 3658],
"name": "Wormhole",
"scope": 1432
},
"children": [
{
"attributes": {
"arguments": null
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "ReentrancyGuard",
"referencedDeclaration": 3658,
"type": "contract ReentrancyGuard"
},
"id": 344,
"name": "UserDefinedTypeName",
"src": "484:15:1"
}
],
"id": 345,
"name": "InheritanceSpecifier",
"src": "484:15:1"
},
{
"children": [
{
"attributes": {
"contractScope": null,
"name": "SafeERC20",
"referencedDeclaration": 3299,
"type": "library SafeERC20"
},
"id": 346,
"name": "UserDefinedTypeName",
"src": "512:9:1"
},
{
"attributes": {
"contractScope": null,
"name": "IERC20",
"referencedDeclaration": 3086,
"type": "contract IERC20"
},
"id": 347,
"name": "UserDefinedTypeName",
"src": "526:6:1"
}
],
"id": 348,
"name": "UsingForDirective",
"src": "506:27:1"
},
{
"children": [
{
"attributes": {
"contractScope": null,
"name": "BytesLib",
"referencedDeclaration": 333,
"type": "library BytesLib"
},
"id": 349,
"name": "UserDefinedTypeName",
"src": "544:8:1"
},
{
"attributes": {
"name": "bytes",
"type": "bytes"
},
"id": 350,
"name": "ElementaryTypeName",
"src": "557:5:1"
}
],
"id": 351,
"name": "UsingForDirective",
"src": "538:25:1"
},
{
"children": [
{
"attributes": {
"contractScope": null,
"name": "SafeMath",
"referencedDeclaration": 2505,
"type": "library SafeMath"
},
"id": 352,
"name": "UserDefinedTypeName",
"src": "574:8:1"
},
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 353,
"name": "ElementaryTypeName",
"src": "587:7:1"
}
],
"id": 354,
"name": "UsingForDirective",
"src": "568:27:1"
},
{
"attributes": {
"constant": true,
"mutability": "constant",
"name": "MAX_UINT64",
"overrides": null,
"scope": 1420,
"stateVariable": true,
"storageLocation": "default",
"type": "uint64",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint64",
"type": "uint64"
},
"id": 355,
"name": "ElementaryTypeName",
"src": "601:6:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "31385f3434365f3734345f3037335f3730395f3535315f363135",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 18446744073709551615",
"value": "18_446_744_073_709_551_615"
},
"id": 356,
"name": "Literal",
"src": "630:26:1"
}
],
"id": 357,
"name": "VariableDeclaration",
"src": "601:55:1"
},
{
"attributes": {
"constant": false,
"functionSelector": "99da1d3c",
"mutability": "mutable",
"name": "wrappedAssetMaster",
"overrides": null,
"scope": 1420,
"stateVariable": true,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 358,
"name": "ElementaryTypeName",
"src": "708:7:1"
}
],
"id": 359,
"name": "VariableDeclaration",
"src": "708:33:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "CHAIN_ID",
"overrides": null,
"scope": 1420,
"stateVariable": true,
"storageLocation": "default",
"type": "uint8",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 360,
"name": "ElementaryTypeName",
"src": "776:5:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "32",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 2",
"value": "2"
},
"id": 361,
"name": "Literal",
"src": "793:1:1"
}
],
"id": 362,
"name": "VariableDeclaration",
"src": "776:18:1"
},
{
"attributes": {
"constant": true,
"mutability": "constant",
"name": "WETHAddress",
"overrides": null,
"scope": 1420,
"stateVariable": true,
"storageLocation": "default",
"type": "address",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 363,
"name": "ElementaryTypeName",
"src": "846:7:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "307843303261614133396232323346453844304130653543344632376541443930383343373536436332",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "address payable",
"value": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
},
"id": 364,
"name": "Literal",
"src": "877:42:1"
}
],
"id": 365,
"name": "VariableDeclaration",
"src": "846:73:1"
},
{
"attributes": {
"canonicalName": "Wormhole.GuardianSet",
"name": "GuardianSet",
"scope": 1420,
"visibility": "public"
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "keys",
"overrides": null,
"scope": 371,
"stateVariable": false,
"storageLocation": "default",
"type": "address[]",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"length": null,
"type": "address[]"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 366,
"name": "ElementaryTypeName",
"src": "955:7:1"
}
],
"id": 367,
"name": "ArrayTypeName",
"src": "955:9:1"
}
],
"id": 368,
"name": "VariableDeclaration",
"src": "955:14:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "expiration_time",
"overrides": null,
"scope": 371,
"stateVariable": false,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 369,
"name": "ElementaryTypeName",
"src": "979:6:1"
}
],
"id": 370,
"name": "VariableDeclaration",
"src": "979:22:1"
}
],
"id": 371,
"name": "StructDefinition",
"src": "926:82:1"
},
{
"attributes": {
"anonymous": false,
"documentation": null,
"name": "LogGuardianSetChanged"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"indexed": false,
"mutability": "mutable",
"name": "oldGuardianIndex",
"overrides": null,
"scope": 377,
"stateVariable": false,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 372,
"name": "ElementaryTypeName",
"src": "1051:6:1"
}
],
"id": 373,
"name": "VariableDeclaration",
"src": "1051:23:1"
},
{
"attributes": {
"constant": false,
"indexed": false,
"mutability": "mutable",
"name": "newGuardianIndex",
"overrides": null,
"scope": 377,
"stateVariable": false,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 374,
"name": "ElementaryTypeName",
"src": "1084:6:1"
}
],
"id": 375,
"name": "VariableDeclaration",
"src": "1084:23:1"
}
],
"id": 376,
"name": "ParameterList",
"src": "1041:72:1"
}
],
"id": 377,
"name": "EventDefinition",
"src": "1014:100:1"
},
{
"attributes": {
"anonymous": false,
"documentation": null,
"name": "LogTokensLocked"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"indexed": false,
"mutability": "mutable",
"name": "target_chain",
"overrides": null,
"scope": 395,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 378,
"name": "ElementaryTypeName",
"src": "1151:5:1"
}
],
"id": 379,
"name": "VariableDeclaration",
"src": "1151:18:1"
},
{
"attributes": {
"constant": false,
"indexed": false,
"mutability": "mutable",
"name": "token_chain",
"overrides": null,
"scope": 395,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 380,
"name": "ElementaryTypeName",
"src": "1179:5:1"
}
],
"id": 381,
"name": "VariableDeclaration",
"src": "1179:17:1"
},
{
"attributes": {
"constant": false,
"indexed": false,
"mutability": "mutable",
"name": "token_decimals",
"overrides": null,
"scope": 395,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 382,
"name": "ElementaryTypeName",
"src": "1206:5:1"
}
],
"id": 383,
"name": "VariableDeclaration",
"src": "1206:20:1"
},
{
"attributes": {
"constant": false,
"indexed": true,
"mutability": "mutable",
"name": "token",
"overrides": null,
"scope": 395,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 384,
"name": "ElementaryTypeName",
"src": "1236:7:1"
}
],
"id": 385,
"name": "VariableDeclaration",
"src": "1236:21:1"
},
{
"attributes": {
"constant": false,
"indexed": true,
"mutability": "mutable",
"name": "sender",
"overrides": null,
"scope": 395,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 386,
"name": "ElementaryTypeName",
"src": "1267:7:1"
}
],
"id": 387,
"name": "VariableDeclaration",
"src": "1267:22:1"
},
{
"attributes": {
"constant": false,
"indexed": false,
"mutability": "mutable",
"name": "recipient",
"overrides": null,
"scope": 395,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 388,
"name": "ElementaryTypeName",
"src": "1299:7:1"
}
],
"id": 389,
"name": "VariableDeclaration",
"src": "1299:17:1"
},
{
"attributes": {
"constant": false,
"indexed": false,
"mutability": "mutable",
"name": "amount",
"overrides": null,
"scope": 395,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 390,
"name": "ElementaryTypeName",
"src": "1326:7:1"
}
],
"id": 391,
"name": "VariableDeclaration",
"src": "1326:14:1"
},
{
"attributes": {
"constant": false,
"indexed": false,
"mutability": "mutable",
"name": "nonce",
"overrides": null,
"scope": 395,
"stateVariable": false,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 392,
"name": "ElementaryTypeName",
"src": "1350:6:1"
}
],
"id": 393,
"name": "VariableDeclaration",
"src": "1350:12:1"
}
],
"id": 394,
"name": "ParameterList",
"src": "1141:227:1"
}
],
"id": 395,
"name": "EventDefinition",
"src": "1120:249:1"
},
{
"attributes": {
"canonicalName": "Wormhole.ParsedVAA",
"name": "ParsedVAA",
"scope": 1420,
"visibility": "public"
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "version",
"overrides": null,
"scope": 408,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 396,
"name": "ElementaryTypeName",
"src": "1402:5:1"
}
],
"id": 397,
"name": "VariableDeclaration",
"src": "1402:13:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "hash",
"overrides": null,
"scope": 408,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 398,
"name": "ElementaryTypeName",
"src": "1425:7:1"
}
],
"id": 399,
"name": "VariableDeclaration",
"src": "1425:12:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "guardian_set_index",
"overrides": null,
"scope": 408,
"stateVariable": false,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 400,
"name": "ElementaryTypeName",
"src": "1447:6:1"
}
],
"id": 401,
"name": "VariableDeclaration",
"src": "1447:25:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "timestamp",
"overrides": null,
"scope": 408,
"stateVariable": false,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 402,
"name": "ElementaryTypeName",
"src": "1482:6:1"
}
],
"id": 403,
"name": "VariableDeclaration",
"src": "1482:16:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "action",
"overrides": null,
"scope": 408,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 404,
"name": "ElementaryTypeName",
"src": "1508:5:1"
}
],
"id": 405,
"name": "VariableDeclaration",
"src": "1508:12:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "payload",
"overrides": null,
"scope": 408,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes"
},
"id": 406,
"name": "ElementaryTypeName",
"src": "1530:5:1"
}
],
"id": 407,
"name": "VariableDeclaration",
"src": "1530:13:1"
}
],
"id": 408,
"name": "StructDefinition",
"src": "1375:175:1"
},
{
"attributes": {
"constant": false,
"functionSelector": "42b0aefa",
"mutability": "mutable",
"name": "guardian_sets",
"overrides": null,
"scope": 1420,
"stateVariable": true,
"storageLocation": "default",
"type": "mapping(uint32 => struct Wormhole.GuardianSet)",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"type": "mapping(uint32 => struct Wormhole.GuardianSet)"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 409,
"name": "ElementaryTypeName",
"src": "1617:6:1"
},
{
"attributes": {
"contractScope": null,
"name": "GuardianSet",
"referencedDeclaration": 371,
"type": "struct Wormhole.GuardianSet"
},
"id": 410,
"name": "UserDefinedTypeName",
"src": "1627:11:1"
}
],
"id": 411,
"name": "Mapping",
"src": "1609:30:1"
}
],
"id": 412,
"name": "VariableDeclaration",
"src": "1609:51:1"
},
{
"attributes": {
"constant": false,
"functionSelector": "822d82b3",
"mutability": "mutable",
"name": "guardian_set_index",
"overrides": null,
"scope": 1420,
"stateVariable": true,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 413,
"name": "ElementaryTypeName",
"src": "1701:6:1"
}
],
"id": 414,
"name": "VariableDeclaration",
"src": "1701:32:1"
},
{
"attributes": {
"constant": false,
"functionSelector": "4db47840",
"mutability": "mutable",
"name": "guardian_set_expirity",
"overrides": null,
"scope": 1420,
"stateVariable": true,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 415,
"name": "ElementaryTypeName",
"src": "1819:6:1"
}
],
"id": 416,
"name": "VariableDeclaration",
"src": "1819:35:1"
},
{
"attributes": {
"constant": false,
"functionSelector": "a31fe409",
"mutability": "mutable",
"name": "consumedVAAs",
"overrides": null,
"scope": 1420,
"stateVariable": true,
"storageLocation": "default",
"type": "mapping(bytes32 => bool)",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"type": "mapping(bytes32 => bool)"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 417,
"name": "ElementaryTypeName",
"src": "1908:7:1"
},
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 418,
"name": "ElementaryTypeName",
"src": "1919:4:1"
}
],
"id": 419,
"name": "Mapping",
"src": "1900:24:1"
}
],
"id": 420,
"name": "VariableDeclaration",
"src": "1900:44:1"
},
{
"attributes": {
"constant": false,
"functionSelector": "b6694c2a",
"mutability": "mutable",
"name": "wrappedAssets",
"overrides": null,
"scope": 1420,
"stateVariable": true,
"storageLocation": "default",
"type": "mapping(bytes32 => address)",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"type": "mapping(bytes32 => address)"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 421,
"name": "ElementaryTypeName",
"src": "2007:7:1"
},
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 422,
"name": "ElementaryTypeName",
"src": "2018:7:1"
}
],
"id": 423,
"name": "Mapping",
"src": "1999:27:1"
}
],
"id": 424,
"name": "VariableDeclaration",
"src": "1999:48:1"
},
{
"attributes": {
"constant": false,
"functionSelector": "1a2be4da",
"mutability": "mutable",
"name": "isWrappedAsset",
"overrides": null,
"scope": 1420,
"stateVariable": true,
"storageLocation": "default",
"type": "mapping(address => bool)",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"type": "mapping(address => bool)"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 425,
"name": "ElementaryTypeName",
"src": "2061:7:1"
},
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 426,
"name": "ElementaryTypeName",
"src": "2072:4:1"
}
],
"id": 427,
"name": "Mapping",
"src": "2053:24:1"
}
],
"id": 428,
"name": "VariableDeclaration",
"src": "2053:46:1"
},
{
"attributes": {
"documentation": null,
"implemented": true,
"isConstructor": true,
"kind": "constructor",
"modifiers": [null],
"name": "",
"overrides": null,
"scope": 1420,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "initial_guardian_set",
"overrides": null,
"scope": 456,
"stateVariable": false,
"storageLocation": "memory",
"type": "struct Wormhole.GuardianSet",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "GuardianSet",
"referencedDeclaration": 371,
"type": "struct Wormhole.GuardianSet"
},
"id": 429,
"name": "UserDefinedTypeName",
"src": "2118:11:1"
}
],
"id": 430,
"name": "VariableDeclaration",
"src": "2118:39:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "wrapped_asset_master",
"overrides": null,
"scope": 456,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 431,
"name": "ElementaryTypeName",
"src": "2159:7:1"
}
],
"id": 432,
"name": "VariableDeclaration",
"src": "2159:28:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "_guardian_set_expirity",
"overrides": null,
"scope": 456,
"stateVariable": false,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 433,
"name": "ElementaryTypeName",
"src": "2189:6:1"
}
],
"id": 434,
"name": "VariableDeclaration",
"src": "2189:29:1"
}
],
"id": 435,
"name": "ParameterList",
"src": "2117:102:1"
},
{
"attributes": {
"parameters": [null]
},
"children": [],
"id": 436,
"name": "ParameterList",
"src": "2227:0:1"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "struct Wormhole.GuardianSet storage ref"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "struct Wormhole.GuardianSet storage ref"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 412,
"type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)",
"value": "guardian_sets"
},
"id": 437,
"name": "Identifier",
"src": "2237:13:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 438,
"name": "Literal",
"src": "2251:1:1"
}
],
"id": 439,
"name": "IndexAccess",
"src": "2237:16:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 430,
"type": "struct Wormhole.GuardianSet memory",
"value": "initial_guardian_set"
},
"id": 440,
"name": "Identifier",
"src": "2256:20:1"
}
],
"id": 441,
"name": "Assignment",
"src": "2237:39:1"
}
],
"id": 442,
"name": "ExpressionStatement",
"src": "2237:39:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 414,
"type": "uint32",
"value": "guardian_set_index"
},
"id": 443,
"name": "Identifier",
"src": "2329:18:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 444,
"name": "Literal",
"src": "2350:1:1"
}
],
"id": 445,
"name": "Assignment",
"src": "2329:22:1"
}
],
"id": 446,
"name": "ExpressionStatement",
"src": "2329:22:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 416,
"type": "uint32",
"value": "guardian_set_expirity"
},
"id": 447,
"name": "Identifier",
"src": "2361:21:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 434,
"type": "uint32",
"value": "_guardian_set_expirity"
},
"id": 448,
"name": "Identifier",
"src": "2385:22:1"
}
],
"id": 449,
"name": "Assignment",
"src": "2361:46:1"
}
],
"id": 450,
"name": "ExpressionStatement",
"src": "2361:46:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 359,
"type": "address",
"value": "wrappedAssetMaster"
},
"id": 451,
"name": "Identifier",
"src": "2418:18:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 432,
"type": "address",
"value": "wrapped_asset_master"
},
"id": 452,
"name": "Identifier",
"src": "2439:20:1"
}
],
"id": 453,
"name": "Assignment",
"src": "2418:41:1"
}
],
"id": 454,
"name": "ExpressionStatement",
"src": "2418:41:1"
}
],
"id": 455,
"name": "Block",
"src": "2227:239:1"
}
],
"id": 456,
"name": "FunctionDefinition",
"src": "2106:360:1"
},
{
"attributes": {
"documentation": null,
"functionSelector": "f951975a",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "getGuardianSet",
"overrides": null,
"scope": 1420,
"stateMutability": "view",
"virtual": false,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "idx",
"overrides": null,
"scope": 468,
"stateVariable": false,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 457,
"name": "ElementaryTypeName",
"src": "2496:6:1"
}
],
"id": 458,
"name": "VariableDeclaration",
"src": "2496:10:1"
}
],
"id": 459,
"name": "ParameterList",
"src": "2495:12:1"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "gs",
"overrides": null,
"scope": 468,
"stateVariable": false,
"storageLocation": "memory",
"type": "struct Wormhole.GuardianSet",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "GuardianSet",
"referencedDeclaration": 371,
"type": "struct Wormhole.GuardianSet"
},
"id": 460,
"name": "UserDefinedTypeName",
"src": "2529:11:1"
}
],
"id": 461,
"name": "VariableDeclaration",
"src": "2529:21:1"
}
],
"id": 462,
"name": "ParameterList",
"src": "2528:23:1"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 462
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "struct Wormhole.GuardianSet storage ref"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 412,
"type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)",
"value": "guardian_sets"
},
"id": 463,
"name": "Identifier",
"src": "2569:13:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 458,
"type": "uint32",
"value": "idx"
},
"id": 464,
"name": "Identifier",
"src": "2583:3:1"
}
],
"id": 465,
"name": "IndexAccess",
"src": "2569:18:1"
}
],
"id": 466,
"name": "Return",
"src": "2562:25:1"
}
],
"id": 467,
"name": "Block",
"src": "2552:42:1"
}
],
"id": 468,
"name": "FunctionDefinition",
"src": "2472:122:1"
},
{
"attributes": {
"documentation": null,
"functionSelector": "3bc0aee6",
"implemented": true,
"isConstructor": false,
"kind": "function",
"name": "submitVAA",
"overrides": null,
"scope": 1420,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "vaa",
"overrides": null,
"scope": 524,
"stateVariable": false,
"storageLocation": "calldata",
"type": "bytes",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes"
},
"id": 469,
"name": "ElementaryTypeName",
"src": "2628:5:1"
}
],
"id": 470,
"name": "VariableDeclaration",
"src": "2628:18:1"
}
],
"id": 471,
"name": "ParameterList",
"src": "2618:34:1"
},
{
"attributes": {
"parameters": [null]
},
"children": [],
"id": 474,
"name": "ParameterList",
"src": "2673:0:1"
},
{
"attributes": {
"arguments": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 3657,
"type": "modifier ()",
"value": "nonReentrant"
},
"id": 472,
"name": "Identifier",
"src": "2660:12:1"
}
],
"id": 473,
"name": "ModifierInvocation",
"src": "2660:12:1"
},
{
"children": [
{
"attributes": {
"assignments": [476]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "parsed_vaa",
"overrides": null,
"scope": 523,
"stateVariable": false,
"storageLocation": "memory",
"type": "struct Wormhole.ParsedVAA",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "ParsedVAA",
"referencedDeclaration": 408,
"type": "struct Wormhole.ParsedVAA"
},
"id": 475,
"name": "UserDefinedTypeName",
"src": "2683:9:1"
}
],
"id": 476,
"name": "VariableDeclaration",
"src": "2683:27:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "struct Wormhole.ParsedVAA memory",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 781,
"type": "function (bytes calldata) view returns (struct Wormhole.ParsedVAA memory)",
"value": "parseAndVerifyVAA"
},
"id": 477,
"name": "Identifier",
"src": "2713:17:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 470,
"type": "bytes calldata",
"value": "vaa"
},
"id": 478,
"name": "Identifier",
"src": "2731:3:1"
}
],
"id": 479,
"name": "FunctionCall",
"src": "2713:22:1"
}
],
"id": 480,
"name": "VariableDeclarationStatement",
"src": "2683:52:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "action",
"referencedDeclaration": 405,
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 476,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 481,
"name": "Identifier",
"src": "2772:10:1"
}
],
"id": 482,
"name": "MemberAccess",
"src": "2772:17:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30783031",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 1",
"value": "0x01"
},
"id": 483,
"name": "Literal",
"src": "2793:4:1"
}
],
"id": 484,
"name": "BinaryOperation",
"src": "2772:25:1"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_57f82f54015302e10ddc5f5b0f8eebea6891c2be815aa07f38e9301457bc8c6a",
"typeString": "literal_string \"only the current guardian set can change the guardian set\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 485,
"name": "Identifier",
"src": "2813:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "guardian_set_index",
"referencedDeclaration": 401,
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 476,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 486,
"name": "Identifier",
"src": "2821:10:1"
}
],
"id": 487,
"name": "MemberAccess",
"src": "2821:29:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 414,
"type": "uint32",
"value": "guardian_set_index"
},
"id": 488,
"name": "Identifier",
"src": "2854:18:1"
}
],
"id": 489,
"name": "BinaryOperation",
"src": "2821:51:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "6f6e6c79207468652063757272656e7420677561726469616e207365742063616e206368616e67652074686520677561726469616e20736574",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"only the current guardian set can change the guardian set\"",
"value": "only the current guardian set can change the guardian set"
},
"id": 490,
"name": "Literal",
"src": "2874:59:1"
}
],
"id": 491,
"name": "FunctionCall",
"src": "2813:121:1"
}
],
"id": 492,
"name": "ExpressionStatement",
"src": "2813:121:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 889,
"type": "function (bytes memory)",
"value": "vaaUpdateGuardianSet"
},
"id": 493,
"name": "Identifier",
"src": "2948:20:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "payload",
"referencedDeclaration": 407,
"type": "bytes memory"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 476,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 494,
"name": "Identifier",
"src": "2969:10:1"
}
],
"id": 495,
"name": "MemberAccess",
"src": "2969:18:1"
}
],
"id": 496,
"name": "FunctionCall",
"src": "2948:40:1"
}
],
"id": 497,
"name": "ExpressionStatement",
"src": "2948:40:1"
}
],
"id": 498,
"name": "Block",
"src": "2799:200:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "action",
"referencedDeclaration": 405,
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 476,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 499,
"name": "Identifier",
"src": "3009:10:1"
}
],
"id": 500,
"name": "MemberAccess",
"src": "3009:17:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30783130",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 16",
"value": "0x10"
},
"id": 501,
"name": "Literal",
"src": "3030:4:1"
}
],
"id": 502,
"name": "BinaryOperation",
"src": "3009:25:1"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 1051,
"type": "function (bytes memory)",
"value": "vaaTransfer"
},
"id": 503,
"name": "Identifier",
"src": "3050:11:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "payload",
"referencedDeclaration": 407,
"type": "bytes memory"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 476,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 504,
"name": "Identifier",
"src": "3062:10:1"
}
],
"id": 505,
"name": "MemberAccess",
"src": "3062:18:1"
}
],
"id": 506,
"name": "FunctionCall",
"src": "3050:31:1"
}
],
"id": 507,
"name": "ExpressionStatement",
"src": "3050:31:1"
}
],
"id": 508,
"name": "Block",
"src": "3036:56:1"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_27b2ea60c72d322d8c69062a768962688555c44551176a8b0389f506128d4a66",
"typeString": "literal_string \"invalid VAA action\""
}
],
"overloadedDeclarations": [-19, -19],
"referencedDeclaration": -19,
"type": "function (string memory) pure",
"value": "revert"
},
"id": 509,
"name": "Identifier",
"src": "3112:6:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "696e76616c69642056414120616374696f6e",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"invalid VAA action\"",
"value": "invalid VAA action"
},
"id": 510,
"name": "Literal",
"src": "3119:20:1"
}
],
"id": 511,
"name": "FunctionCall",
"src": "3112:28:1"
}
],
"id": 512,
"name": "ExpressionStatement",
"src": "3112:28:1"
}
],
"id": 513,
"name": "Block",
"src": "3098:53:1"
}
],
"id": 514,
"name": "IfStatement",
"src": "3005:146:1"
}
],
"id": 515,
"name": "IfStatement",
"src": "2768:383:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 420,
"type": "mapping(bytes32 => bool)",
"value": "consumedVAAs"
},
"id": 516,
"name": "Identifier",
"src": "3196:12:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "hash",
"referencedDeclaration": 399,
"type": "bytes32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 476,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 517,
"name": "Identifier",
"src": "3209:10:1"
}
],
"id": 518,
"name": "MemberAccess",
"src": "3209:15:1"
}
],
"id": 519,
"name": "IndexAccess",
"src": "3196:29:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "74727565",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "true"
},
"id": 520,
"name": "Literal",
"src": "3228:4:1"
}
],
"id": 521,
"name": "Assignment",
"src": "3196:36:1"
}
],
"id": 522,
"name": "ExpressionStatement",
"src": "3196:36:1"
}
],
"id": 523,
"name": "Block",
"src": "2673:566:1"
}
],
"id": 524,
"name": "FunctionDefinition",
"src": "2600:639:1"
},
{
"attributes": {
"documentation": null,
"functionSelector": "600b9aa6",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "parseAndVerifyVAA",
"overrides": null,
"scope": 1420,
"stateMutability": "view",
"virtual": false,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "vaa",
"overrides": null,
"scope": 781,
"stateVariable": false,
"storageLocation": "calldata",
"type": "bytes",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes"
},
"id": 525,
"name": "ElementaryTypeName",
"src": "3472:5:1"
}
],
"id": 526,
"name": "VariableDeclaration",
"src": "3472:18:1"
}
],
"id": 527,
"name": "ParameterList",
"src": "3471:20:1"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "parsed_vaa",
"overrides": null,
"scope": 781,
"stateVariable": false,
"storageLocation": "memory",
"type": "struct Wormhole.ParsedVAA",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "ParsedVAA",
"referencedDeclaration": 408,
"type": "struct Wormhole.ParsedVAA"
},
"id": 528,
"name": "UserDefinedTypeName",
"src": "3513:9:1"
}
],
"id": 529,
"name": "VariableDeclaration",
"src": "3513:27:1"
}
],
"id": 530,
"name": "ParameterList",
"src": "3512:29:1"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"member_name": "version",
"referencedDeclaration": 397,
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 529,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 531,
"name": "Identifier",
"src": "3552:10:1"
}
],
"id": 533,
"name": "MemberAccess",
"src": "3552:18:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint8",
"referencedDeclaration": 109,
"type": "function (bytes memory,uint256) pure returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 526,
"type": "bytes calldata",
"value": "vaa"
},
"id": 534,
"name": "Identifier",
"src": "3573:3:1"
}
],
"id": 535,
"name": "MemberAccess",
"src": "3573:11:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 536,
"name": "Literal",
"src": "3585:1:1"
}
],
"id": 537,
"name": "FunctionCall",
"src": "3573:14:1"
}
],
"id": 538,
"name": "Assignment",
"src": "3552:35:1"
}
],
"id": 539,
"name": "ExpressionStatement",
"src": "3552:35:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_6f94df49f756ee0c4605e9c5793f0e851f28a084ddaba07c34c32ea93810236a",
"typeString": "literal_string \"VAA version incompatible\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 540,
"name": "Identifier",
"src": "3597:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "version",
"referencedDeclaration": 397,
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 529,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 541,
"name": "Identifier",
"src": "3605:10:1"
}
],
"id": 542,
"name": "MemberAccess",
"src": "3605:18:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "31",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 1",
"value": "1"
},
"id": 543,
"name": "Literal",
"src": "3627:1:1"
}
],
"id": 544,
"name": "BinaryOperation",
"src": "3605:23:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "5641412076657273696f6e20696e636f6d70617469626c65",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"VAA version incompatible\"",
"value": "VAA version incompatible"
},
"id": 545,
"name": "Literal",
"src": "3630:26:1"
}
],
"id": 546,
"name": "FunctionCall",
"src": "3597:60:1"
}
],
"id": 547,
"name": "ExpressionStatement",
"src": "3597:60:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"member_name": "guardian_set_index",
"referencedDeclaration": 401,
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 529,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 548,
"name": "Identifier",
"src": "3714:10:1"
}
],
"id": 550,
"name": "MemberAccess",
"src": "3714:29:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint32",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint32",
"referencedDeclaration": 163,
"type": "function (bytes memory,uint256) pure returns (uint32)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 526,
"type": "bytes calldata",
"value": "vaa"
},
"id": 551,
"name": "Identifier",
"src": "3746:3:1"
}
],
"id": 552,
"name": "MemberAccess",
"src": "3746:12:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "31",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 1",
"value": "1"
},
"id": 553,
"name": "Literal",
"src": "3759:1:1"
}
],
"id": 554,
"name": "FunctionCall",
"src": "3746:15:1"
}
],
"id": 555,
"name": "Assignment",
"src": "3714:47:1"
}
],
"id": 556,
"name": "ExpressionStatement",
"src": "3714:47:1"
},
{
"attributes": {
"assignments": [558]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "len_signers",
"overrides": null,
"scope": 780,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 557,
"name": "ElementaryTypeName",
"src": "3772:7:1"
}
],
"id": 558,
"name": "VariableDeclaration",
"src": "3772:19:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint8",
"referencedDeclaration": 109,
"type": "function (bytes memory,uint256) pure returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 526,
"type": "bytes calldata",
"value": "vaa"
},
"id": 559,
"name": "Identifier",
"src": "3794:3:1"
}
],
"id": 560,
"name": "MemberAccess",
"src": "3794:11:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "35",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 5",
"value": "5"
},
"id": 561,
"name": "Literal",
"src": "3806:1:1"
}
],
"id": 562,
"name": "FunctionCall",
"src": "3794:14:1"
}
],
"id": 563,
"name": "VariableDeclarationStatement",
"src": "3772:36:1"
},
{
"attributes": {
"assignments": [565]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "offset",
"overrides": null,
"scope": 780,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 564,
"name": "ElementaryTypeName",
"src": "3818:4:1"
}
],
"id": 565,
"name": "VariableDeclaration",
"src": "3818:11:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "36",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 6",
"value": "6"
},
"id": 566,
"name": "Literal",
"src": "3832:1:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3636",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 66",
"value": "66"
},
"id": 567,
"name": "Literal",
"src": "3836:2:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 558,
"type": "uint256",
"value": "len_signers"
},
"id": 568,
"name": "Identifier",
"src": "3841:11:1"
}
],
"id": 569,
"name": "BinaryOperation",
"src": "3836:16:1"
}
],
"id": 570,
"name": "BinaryOperation",
"src": "3832:20:1"
}
],
"id": 571,
"name": "VariableDeclarationStatement",
"src": "3818:34:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"member_name": "timestamp",
"referencedDeclaration": 403,
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 529,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 572,
"name": "Identifier",
"src": "3897:10:1"
}
],
"id": 574,
"name": "MemberAccess",
"src": "3897:20:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint32",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint32",
"referencedDeclaration": 163,
"type": "function (bytes memory,uint256) pure returns (uint32)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 526,
"type": "bytes calldata",
"value": "vaa"
},
"id": 575,
"name": "Identifier",
"src": "3920:3:1"
}
],
"id": 576,
"name": "MemberAccess",
"src": "3920:12:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 565,
"type": "uint256",
"value": "offset"
},
"id": 577,
"name": "Identifier",
"src": "3933:6:1"
}
],
"id": 578,
"name": "FunctionCall",
"src": "3920:20:1"
}
],
"id": 579,
"name": "Assignment",
"src": "3897:43:1"
}
],
"id": 580,
"name": "ExpressionStatement",
"src": "3897:43:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "bytes32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"member_name": "hash",
"referencedDeclaration": 399,
"type": "bytes32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 529,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 581,
"name": "Identifier",
"src": "3976:10:1"
}
],
"id": 583,
"name": "MemberAccess",
"src": "3976:15:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes32",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": -8,
"type": "function (bytes memory) pure returns (bytes32)",
"value": "keccak256"
},
"id": 584,
"name": "Identifier",
"src": "3994:9:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes memory",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "slice",
"referencedDeclaration": 55,
"type": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 526,
"type": "bytes calldata",
"value": "vaa"
},
"id": 585,
"name": "Identifier",
"src": "4004:3:1"
}
],
"id": 586,
"name": "MemberAccess",
"src": "4004:9:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 565,
"type": "uint256",
"value": "offset"
},
"id": 587,
"name": "Identifier",
"src": "4014:6:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "length",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 526,
"type": "bytes calldata",
"value": "vaa"
},
"id": 588,
"name": "Identifier",
"src": "4022:3:1"
}
],
"id": 589,
"name": "MemberAccess",
"src": "4022:10:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 565,
"type": "uint256",
"value": "offset"
},
"id": 590,
"name": "Identifier",
"src": "4035:6:1"
}
],
"id": 591,
"name": "BinaryOperation",
"src": "4022:19:1"
}
],
"id": 592,
"name": "FunctionCall",
"src": "4004:38:1"
}
],
"id": 593,
"name": "FunctionCall",
"src": "3994:49:1"
}
],
"id": 594,
"name": "Assignment",
"src": "3976:67:1"
}
],
"id": 595,
"name": "ExpressionStatement",
"src": "3976:67:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_2c9f12104d534b328038b37a96c0a685f6c00604447c9f6b300f1a21a9a56028",
"typeString": "literal_string \"VAA was already executed\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 596,
"name": "Identifier",
"src": "4053:7:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "!",
"prefix": true,
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 420,
"type": "mapping(bytes32 => bool)",
"value": "consumedVAAs"
},
"id": 597,
"name": "Identifier",
"src": "4062:12:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "hash",
"referencedDeclaration": 399,
"type": "bytes32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 529,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 598,
"name": "Identifier",
"src": "4075:10:1"
}
],
"id": 599,
"name": "MemberAccess",
"src": "4075:15:1"
}
],
"id": 600,
"name": "IndexAccess",
"src": "4062:29:1"
}
],
"id": 601,
"name": "UnaryOperation",
"src": "4061:30:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "5641412077617320616c7265616479206578656375746564",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"VAA was already executed\"",
"value": "VAA was already executed"
},
"id": 602,
"name": "Literal",
"src": "4093:26:1"
}
],
"id": 603,
"name": "FunctionCall",
"src": "4053:67:1"
}
],
"id": 604,
"name": "ExpressionStatement",
"src": "4053:67:1"
},
{
"attributes": {
"assignments": [606]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "guardian_set",
"overrides": null,
"scope": 780,
"stateVariable": false,
"storageLocation": "memory",
"type": "struct Wormhole.GuardianSet",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "GuardianSet",
"referencedDeclaration": 371,
"type": "struct Wormhole.GuardianSet"
},
"id": 605,
"name": "UserDefinedTypeName",
"src": "4131:11:1"
}
],
"id": 606,
"name": "VariableDeclaration",
"src": "4131:31:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "struct Wormhole.GuardianSet storage ref"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 412,
"type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)",
"value": "guardian_sets"
},
"id": 607,
"name": "Identifier",
"src": "4165:13:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "guardian_set_index",
"referencedDeclaration": 401,
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 529,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 608,
"name": "Identifier",
"src": "4179:10:1"
}
],
"id": 609,
"name": "MemberAccess",
"src": "4179:29:1"
}
],
"id": 610,
"name": "IndexAccess",
"src": "4165:44:1"
}
],
"id": 611,
"name": "VariableDeclarationStatement",
"src": "4131:78:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_ef4d0f2354b2279f26c4ba4477a0c338dcdd31fbb9caa6ef52ec7856b55556f3",
"typeString": "literal_string \"invalid guardian set\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 612,
"name": "Identifier",
"src": "4219:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "length",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "keys",
"referencedDeclaration": 368,
"type": "address[] memory"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 606,
"type": "struct Wormhole.GuardianSet memory",
"value": "guardian_set"
},
"id": 613,
"name": "Identifier",
"src": "4227:12:1"
}
],
"id": 614,
"name": "MemberAccess",
"src": "4227:17:1"
}
],
"id": 615,
"name": "MemberAccess",
"src": "4227:24:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 616,
"name": "Literal",
"src": "4254:1:1"
}
],
"id": 617,
"name": "BinaryOperation",
"src": "4227:28:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "696e76616c696420677561726469616e20736574",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"invalid guardian set\"",
"value": "invalid guardian set"
},
"id": 618,
"name": "Literal",
"src": "4257:22:1"
}
],
"id": 619,
"name": "FunctionCall",
"src": "4219:61:1"
}
],
"id": 620,
"name": "ExpressionStatement",
"src": "4219:61:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_cbe80c778d9be5c7f6d0de415ae854de0cf9a58da1d3e65a9d672ad42a10aaf1",
"typeString": "literal_string \"guardian set has expired\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 621,
"name": "Identifier",
"src": "4290:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "||",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "expiration_time",
"referencedDeclaration": 370,
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 606,
"type": "struct Wormhole.GuardianSet memory",
"value": "guardian_set"
},
"id": 622,
"name": "Identifier",
"src": "4298:12:1"
}
],
"id": 623,
"name": "MemberAccess",
"src": "4298:28:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 624,
"name": "Literal",
"src": "4330:1:1"
}
],
"id": 625,
"name": "BinaryOperation",
"src": "4298:33:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "expiration_time",
"referencedDeclaration": 370,
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 606,
"type": "struct Wormhole.GuardianSet memory",
"value": "guardian_set"
},
"id": 626,
"name": "Identifier",
"src": "4335:12:1"
}
],
"id": 627,
"name": "MemberAccess",
"src": "4335:28:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "timestamp",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -4,
"type": "block",
"value": "block"
},
"id": 628,
"name": "Identifier",
"src": "4366:5:1"
}
],
"id": 629,
"name": "MemberAccess",
"src": "4366:15:1"
}
],
"id": 630,
"name": "BinaryOperation",
"src": "4335:46:1"
}
],
"id": 631,
"name": "BinaryOperation",
"src": "4298:83:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "677561726469616e20736574206861732065787069726564",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"guardian set has expired\"",
"value": "guardian set has expired"
},
"id": 632,
"name": "Literal",
"src": "4383:26:1"
}
],
"id": 633,
"name": "FunctionCall",
"src": "4290:120:1"
}
],
"id": 634,
"name": "ExpressionStatement",
"src": "4290:120:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b18d2210a58b70fe2b7fd0e0f29d90614b1c4f3f5d8dbb518559998f90306fcb",
"typeString": "literal_string \"no quorum\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 635,
"name": "Identifier",
"src": "4517:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "<=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "/",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "/",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "length",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "keys",
"referencedDeclaration": 368,
"type": "address[] memory"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 606,
"type": "struct Wormhole.GuardianSet memory",
"value": "guardian_set"
},
"id": 636,
"name": "Identifier",
"src": "4527:12:1"
}
],
"id": 637,
"name": "MemberAccess",
"src": "4527:17:1"
}
],
"id": 638,
"name": "MemberAccess",
"src": "4527:24:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3130",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 10",
"value": "10"
},
"id": 639,
"name": "Literal",
"src": "4554:2:1"
}
],
"id": 640,
"name": "BinaryOperation",
"src": "4527:29:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "33",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 3",
"value": "3"
},
"id": 641,
"name": "Literal",
"src": "4559:1:1"
}
],
"id": 642,
"name": "BinaryOperation",
"src": "4527:33:1"
}
],
"id": 643,
"name": "TupleExpression",
"src": "4526:35:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "32",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 2",
"value": "2"
},
"id": 644,
"name": "Literal",
"src": "4564:1:1"
}
],
"id": 645,
"name": "BinaryOperation",
"src": "4526:39:1"
}
],
"id": 646,
"name": "TupleExpression",
"src": "4525:41:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3130",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 10",
"value": "10"
},
"id": 647,
"name": "Literal",
"src": "4569:2:1"
}
],
"id": 648,
"name": "BinaryOperation",
"src": "4525:46:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "31",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 1",
"value": "1"
},
"id": 649,
"name": "Literal",
"src": "4574:1:1"
}
],
"id": 650,
"name": "BinaryOperation",
"src": "4525:50:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 558,
"type": "uint256",
"value": "len_signers"
},
"id": 651,
"name": "Identifier",
"src": "4579:11:1"
}
],
"id": 652,
"name": "BinaryOperation",
"src": "4525:65:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "6e6f2071756f72756d",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"no quorum\"",
"value": "no quorum"
},
"id": 653,
"name": "Literal",
"src": "4592:11:1"
}
],
"id": 654,
"name": "FunctionCall",
"src": "4517:87:1"
}
],
"id": 655,
"name": "ExpressionStatement",
"src": "4517:87:1"
},
{
"attributes": {
"assignments": [657]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "last_index",
"overrides": null,
"scope": 780,
"stateVariable": false,
"storageLocation": "default",
"type": "int16",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "int16",
"type": "int16"
},
"id": 656,
"name": "ElementaryTypeName",
"src": "4615:5:1"
}
],
"id": 657,
"name": "VariableDeclaration",
"src": "4615:16:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"operator": "-",
"prefix": true,
"type": "int_const -1"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "31",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 1",
"value": "1"
},
"id": 658,
"name": "Literal",
"src": "4636:1:1"
}
],
"id": 659,
"name": "UnaryOperation",
"src": "4634:3:1"
}
],
"id": 660,
"name": "VariableDeclarationStatement",
"src": "4615:22:1"
},
{
"children": [
{
"attributes": {
"assignments": [662]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "i",
"overrides": null,
"scope": 750,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 661,
"name": "ElementaryTypeName",
"src": "4652:4:1"
}
],
"id": 662,
"name": "VariableDeclaration",
"src": "4652:6:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 663,
"name": "Literal",
"src": "4661:1:1"
}
],
"id": 664,
"name": "VariableDeclarationStatement",
"src": "4652:10:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "<",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 662,
"type": "uint256",
"value": "i"
},
"id": 665,
"name": "Identifier",
"src": "4664:1:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 558,
"type": "uint256",
"value": "len_signers"
},
"id": 666,
"name": "Identifier",
"src": "4668:11:1"
}
],
"id": 667,
"name": "BinaryOperation",
"src": "4664:15:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "++",
"prefix": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 662,
"type": "uint256",
"value": "i"
},
"id": 668,
"name": "Identifier",
"src": "4681:1:1"
}
],
"id": 669,
"name": "UnaryOperation",
"src": "4681:3:1"
}
],
"id": 670,
"name": "ExpressionStatement",
"src": "4681:3:1"
},
{
"children": [
{
"attributes": {
"assignments": [672]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "index",
"overrides": null,
"scope": 749,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 671,
"name": "ElementaryTypeName",
"src": "4700:5:1"
}
],
"id": 672,
"name": "VariableDeclaration",
"src": "4700:11:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint8",
"referencedDeclaration": 109,
"type": "function (bytes memory,uint256) pure returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 526,
"type": "bytes calldata",
"value": "vaa"
},
"id": 673,
"name": "Identifier",
"src": "4714:3:1"
}
],
"id": 674,
"name": "MemberAccess",
"src": "4714:11:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "36",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 6",
"value": "6"
},
"id": 675,
"name": "Literal",
"src": "4726:1:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 662,
"type": "uint256",
"value": "i"
},
"id": 676,
"name": "Identifier",
"src": "4730:1:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3636",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 66",
"value": "66"
},
"id": 677,
"name": "Literal",
"src": "4734:2:1"
}
],
"id": 678,
"name": "BinaryOperation",
"src": "4730:6:1"
}
],
"id": 679,
"name": "BinaryOperation",
"src": "4726:10:1"
}
],
"id": 680,
"name": "FunctionCall",
"src": "4714:23:1"
}
],
"id": 681,
"name": "VariableDeclarationStatement",
"src": "4700:37:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_de9ff8e5647eeed7691d313f96ed0065761ad2da429d76b3b7868b564890def8",
"typeString": "literal_string \"signature indices must be ascending\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 682,
"name": "Identifier",
"src": "4751:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_int16",
"typeString": "int16"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 672,
"type": "uint8",
"value": "index"
},
"id": 683,
"name": "Identifier",
"src": "4759:5:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 657,
"type": "int16",
"value": "last_index"
},
"id": 684,
"name": "Identifier",
"src": "4767:10:1"
}
],
"id": 685,
"name": "BinaryOperation",
"src": "4759:18:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "7369676e617475726520696e6469636573206d75737420626520617363656e64696e67",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"signature indices must be ascending\"",
"value": "signature indices must be ascending"
},
"id": 686,
"name": "Literal",
"src": "4779:37:1"
}
],
"id": 687,
"name": "FunctionCall",
"src": "4751:66:1"
}
],
"id": 688,
"name": "ExpressionStatement",
"src": "4751:66:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "int16"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 657,
"type": "int16",
"value": "last_index"
},
"id": 689,
"name": "Identifier",
"src": "4831:10:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "int16",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(int16)"
},
"children": [
{
"attributes": {
"name": "int16",
"type": null
},
"id": 690,
"name": "ElementaryTypeName",
"src": "4844:5:1"
}
],
"id": 691,
"name": "ElementaryTypeNameExpression",
"src": "4844:5:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 672,
"type": "uint8",
"value": "index"
},
"id": 692,
"name": "Identifier",
"src": "4850:5:1"
}
],
"id": 693,
"name": "FunctionCall",
"src": "4844:12:1"
}
],
"id": 694,
"name": "Assignment",
"src": "4831:25:1"
}
],
"id": 695,
"name": "ExpressionStatement",
"src": "4831:25:1"
},
{
"attributes": {
"assignments": [697]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "r",
"overrides": null,
"scope": 749,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 696,
"name": "ElementaryTypeName",
"src": "4871:7:1"
}
],
"id": 697,
"name": "VariableDeclaration",
"src": "4871:9:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes32",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toBytes32",
"referencedDeclaration": 298,
"type": "function (bytes memory,uint256) pure returns (bytes32)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 526,
"type": "bytes calldata",
"value": "vaa"
},
"id": 698,
"name": "Identifier",
"src": "4883:3:1"
}
],
"id": 699,
"name": "MemberAccess",
"src": "4883:13:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "37",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 7",
"value": "7"
},
"id": 700,
"name": "Literal",
"src": "4897:1:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 662,
"type": "uint256",
"value": "i"
},
"id": 701,
"name": "Identifier",
"src": "4901:1:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3636",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 66",
"value": "66"
},
"id": 702,
"name": "Literal",
"src": "4905:2:1"
}
],
"id": 703,
"name": "BinaryOperation",
"src": "4901:6:1"
}
],
"id": 704,
"name": "BinaryOperation",
"src": "4897:10:1"
}
],
"id": 705,
"name": "FunctionCall",
"src": "4883:25:1"
}
],
"id": 706,
"name": "VariableDeclarationStatement",
"src": "4871:37:1"
},
{
"attributes": {
"assignments": [708]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "s",
"overrides": null,
"scope": 749,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 707,
"name": "ElementaryTypeName",
"src": "4922:7:1"
}
],
"id": 708,
"name": "VariableDeclaration",
"src": "4922:9:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes32",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toBytes32",
"referencedDeclaration": 298,
"type": "function (bytes memory,uint256) pure returns (bytes32)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 526,
"type": "bytes calldata",
"value": "vaa"
},
"id": 709,
"name": "Identifier",
"src": "4934:3:1"
}
],
"id": 710,
"name": "MemberAccess",
"src": "4934:13:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3339",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 39",
"value": "39"
},
"id": 711,
"name": "Literal",
"src": "4948:2:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 662,
"type": "uint256",
"value": "i"
},
"id": 712,
"name": "Identifier",
"src": "4953:1:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3636",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 66",
"value": "66"
},
"id": 713,
"name": "Literal",
"src": "4957:2:1"
}
],
"id": 714,
"name": "BinaryOperation",
"src": "4953:6:1"
}
],
"id": 715,
"name": "BinaryOperation",
"src": "4948:11:1"
}
],
"id": 716,
"name": "FunctionCall",
"src": "4934:26:1"
}
],
"id": 717,
"name": "VariableDeclarationStatement",
"src": "4922:38:1"
},
{
"attributes": {
"assignments": [719]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "v",
"overrides": null,
"scope": 749,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 718,
"name": "ElementaryTypeName",
"src": "4974:5:1"
}
],
"id": 719,
"name": "VariableDeclaration",
"src": "4974:7:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint8",
"referencedDeclaration": 109,
"type": "function (bytes memory,uint256) pure returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 526,
"type": "bytes calldata",
"value": "vaa"
},
"id": 720,
"name": "Identifier",
"src": "4984:3:1"
}
],
"id": 721,
"name": "MemberAccess",
"src": "4984:11:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3731",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 71",
"value": "71"
},
"id": 722,
"name": "Literal",
"src": "4996:2:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 662,
"type": "uint256",
"value": "i"
},
"id": 723,
"name": "Identifier",
"src": "5001:1:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3636",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 66",
"value": "66"
},
"id": 724,
"name": "Literal",
"src": "5005:2:1"
}
],
"id": 725,
"name": "BinaryOperation",
"src": "5001:6:1"
}
],
"id": 726,
"name": "BinaryOperation",
"src": "4996:11:1"
}
],
"id": 727,
"name": "FunctionCall",
"src": "4984:24:1"
}
],
"id": 728,
"name": "VariableDeclarationStatement",
"src": "4974:34:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+=",
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 719,
"type": "uint8",
"value": "v"
},
"id": 729,
"name": "Identifier",
"src": "5022:1:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3237",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 27",
"value": "27"
},
"id": 730,
"name": "Literal",
"src": "5027:2:1"
}
],
"id": 731,
"name": "Assignment",
"src": "5022:7:1"
}
],
"id": 732,
"name": "ExpressionStatement",
"src": "5022:7:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_862afa71aa5d7cd3e53f61178438850df5cce8f1009ff0681521493b85052621",
"typeString": "literal_string \"VAA signature invalid\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 733,
"name": "Identifier",
"src": "5043:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "address",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": -6,
"type": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)",
"value": "ecrecover"
},
"id": 734,
"name": "Identifier",
"src": "5051:9:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "hash",
"referencedDeclaration": 399,
"type": "bytes32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 529,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 735,
"name": "Identifier",
"src": "5061:10:1"
}
],
"id": 736,
"name": "MemberAccess",
"src": "5061:15:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 719,
"type": "uint8",
"value": "v"
},
"id": 737,
"name": "Identifier",
"src": "5078:1:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 697,
"type": "bytes32",
"value": "r"
},
"id": 738,
"name": "Identifier",
"src": "5081:1:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 708,
"type": "bytes32",
"value": "s"
},
"id": 739,
"name": "Identifier",
"src": "5084:1:1"
}
],
"id": 740,
"name": "FunctionCall",
"src": "5051:35:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "keys",
"referencedDeclaration": 368,
"type": "address[] memory"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 606,
"type": "struct Wormhole.GuardianSet memory",
"value": "guardian_set"
},
"id": 741,
"name": "Identifier",
"src": "5090:12:1"
}
],
"id": 742,
"name": "MemberAccess",
"src": "5090:17:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 672,
"type": "uint8",
"value": "index"
},
"id": 743,
"name": "Identifier",
"src": "5108:5:1"
}
],
"id": 744,
"name": "IndexAccess",
"src": "5090:24:1"
}
],
"id": 745,
"name": "BinaryOperation",
"src": "5051:63:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "564141207369676e617475726520696e76616c6964",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"VAA signature invalid\"",
"value": "VAA signature invalid"
},
"id": 746,
"name": "Literal",
"src": "5116:23:1"
}
],
"id": 747,
"name": "FunctionCall",
"src": "5043:97:1"
}
],
"id": 748,
"name": "ExpressionStatement",
"src": "5043:97:1"
}
],
"id": 749,
"name": "Block",
"src": "4686:465:1"
}
],
"id": 750,
"name": "ForStatement",
"src": "4647:504:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"member_name": "action",
"referencedDeclaration": 405,
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 529,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 751,
"name": "Identifier",
"src": "5161:10:1"
}
],
"id": 753,
"name": "MemberAccess",
"src": "5161:17:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint8",
"referencedDeclaration": 109,
"type": "function (bytes memory,uint256) pure returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 526,
"type": "bytes calldata",
"value": "vaa"
},
"id": 754,
"name": "Identifier",
"src": "5181:3:1"
}
],
"id": 755,
"name": "MemberAccess",
"src": "5181:11:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 565,
"type": "uint256",
"value": "offset"
},
"id": 756,
"name": "Identifier",
"src": "5193:6:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "34",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 4",
"value": "4"
},
"id": 757,
"name": "Literal",
"src": "5202:1:1"
}
],
"id": 758,
"name": "BinaryOperation",
"src": "5193:10:1"
}
],
"id": 759,
"name": "FunctionCall",
"src": "5181:23:1"
}
],
"id": 760,
"name": "Assignment",
"src": "5161:43:1"
}
],
"id": 761,
"name": "ExpressionStatement",
"src": "5161:43:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "bytes memory"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"member_name": "payload",
"referencedDeclaration": 407,
"type": "bytes memory"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 529,
"type": "struct Wormhole.ParsedVAA memory",
"value": "parsed_vaa"
},
"id": 762,
"name": "Identifier",
"src": "5214:10:1"
}
],
"id": 764,
"name": "MemberAccess",
"src": "5214:18:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes memory",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "slice",
"referencedDeclaration": 55,
"type": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 526,
"type": "bytes calldata",
"value": "vaa"
},
"id": 765,
"name": "Identifier",
"src": "5235:3:1"
}
],
"id": 766,
"name": "MemberAccess",
"src": "5235:9:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 565,
"type": "uint256",
"value": "offset"
},
"id": 767,
"name": "Identifier",
"src": "5245:6:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "35",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 5",
"value": "5"
},
"id": 768,
"name": "Literal",
"src": "5254:1:1"
}
],
"id": 769,
"name": "BinaryOperation",
"src": "5245:10:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "length",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 526,
"type": "bytes calldata",
"value": "vaa"
},
"id": 770,
"name": "Identifier",
"src": "5257:3:1"
}
],
"id": 771,
"name": "MemberAccess",
"src": "5257:10:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 565,
"type": "uint256",
"value": "offset"
},
"id": 772,
"name": "Identifier",
"src": "5271:6:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "35",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 5",
"value": "5"
},
"id": 773,
"name": "Literal",
"src": "5280:1:1"
}
],
"id": 774,
"name": "BinaryOperation",
"src": "5271:10:1"
}
],
"id": 775,
"name": "TupleExpression",
"src": "5270:12:1"
}
],
"id": 776,
"name": "BinaryOperation",
"src": "5257:25:1"
}
],
"id": 777,
"name": "FunctionCall",
"src": "5235:48:1"
}
],
"id": 778,
"name": "Assignment",
"src": "5214:69:1"
}
],
"id": 779,
"name": "ExpressionStatement",
"src": "5214:69:1"
}
],
"id": 780,
"name": "Block",
"src": "3542:1748:1"
}
],
"id": 781,
"name": "FunctionDefinition",
"src": "3445:1845:1"
},
{
"attributes": {
"documentation": null,
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "vaaUpdateGuardianSet",
"overrides": null,
"scope": 1420,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "data",
"overrides": null,
"scope": 889,
"stateVariable": false,
"storageLocation": "memory",
"type": "bytes",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes"
},
"id": 782,
"name": "ElementaryTypeName",
"src": "5326:5:1"
}
],
"id": 783,
"name": "VariableDeclaration",
"src": "5326:17:1"
}
],
"id": 784,
"name": "ParameterList",
"src": "5325:19:1"
},
{
"attributes": {
"parameters": [null]
},
"children": [],
"id": 785,
"name": "ParameterList",
"src": "5353:0:1"
},
{
"children": [
{
"attributes": {
"assignments": [787]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "new_guardian_set_index",
"overrides": null,
"scope": 888,
"stateVariable": false,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 786,
"name": "ElementaryTypeName",
"src": "5363:6:1"
}
],
"id": 787,
"name": "VariableDeclaration",
"src": "5363:29:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint32",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint32",
"referencedDeclaration": 163,
"type": "function (bytes memory,uint256) pure returns (uint32)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 783,
"type": "bytes memory",
"value": "data"
},
"id": 788,
"name": "Identifier",
"src": "5395:4:1"
}
],
"id": 789,
"name": "MemberAccess",
"src": "5395:13:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 790,
"name": "Literal",
"src": "5409:1:1"
}
],
"id": 791,
"name": "FunctionCall",
"src": "5395:16:1"
}
],
"id": 792,
"name": "VariableDeclarationStatement",
"src": "5363:48:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_a9c35350c4790f34190b54478b12348e0cbd9c4c717b5d4a6ca5709d71c4f33d",
"typeString": "literal_string \"index must increase in steps of 1\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 793,
"name": "Identifier",
"src": "5421:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 787,
"type": "uint32",
"value": "new_guardian_set_index"
},
"id": 794,
"name": "Identifier",
"src": "5429:22:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 414,
"type": "uint32",
"value": "guardian_set_index"
},
"id": 795,
"name": "Identifier",
"src": "5455:18:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "31",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 1",
"value": "1"
},
"id": 796,
"name": "Literal",
"src": "5476:1:1"
}
],
"id": 797,
"name": "BinaryOperation",
"src": "5455:22:1"
}
],
"id": 798,
"name": "BinaryOperation",
"src": "5429:48:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "696e646578206d75737420696e63726561736520696e207374657073206f662031",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"index must increase in steps of 1\"",
"value": "index must increase in steps of 1"
},
"id": 799,
"name": "Literal",
"src": "5479:35:1"
}
],
"id": 800,
"name": "FunctionCall",
"src": "5421:94:1"
}
],
"id": 801,
"name": "ExpressionStatement",
"src": "5421:94:1"
},
{
"attributes": {
"assignments": [803]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "len",
"overrides": null,
"scope": 888,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 802,
"name": "ElementaryTypeName",
"src": "5525:5:1"
}
],
"id": 803,
"name": "VariableDeclaration",
"src": "5525:9:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint8",
"referencedDeclaration": 109,
"type": "function (bytes memory,uint256) pure returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 783,
"type": "bytes memory",
"value": "data"
},
"id": 804,
"name": "Identifier",
"src": "5537:4:1"
}
],
"id": 805,
"name": "MemberAccess",
"src": "5537:12:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "34",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 4",
"value": "4"
},
"id": 806,
"name": "Literal",
"src": "5550:1:1"
}
],
"id": 807,
"name": "FunctionCall",
"src": "5537:15:1"
}
],
"id": 808,
"name": "VariableDeclarationStatement",
"src": "5525:27:1"
},
{
"attributes": {
"assignments": [813]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "new_guardians",
"overrides": null,
"scope": 888,
"stateVariable": false,
"storageLocation": "memory",
"type": "address[]",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"length": null,
"type": "address[]"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 811,
"name": "ElementaryTypeName",
"src": "5563:7:1"
}
],
"id": 812,
"name": "ArrayTypeName",
"src": "5563:9:1"
}
],
"id": 813,
"name": "VariableDeclaration",
"src": "5563:30:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "address[] memory",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "function (uint256) pure returns (address[] memory)"
},
"children": [
{
"attributes": {
"length": null,
"type": "address[]"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 814,
"name": "ElementaryTypeName",
"src": "5600:7:1"
}
],
"id": 815,
"name": "ArrayTypeName",
"src": "5600:9:1"
}
],
"id": 816,
"name": "NewExpression",
"src": "5596:13:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 803,
"type": "uint8",
"value": "len"
},
"id": 817,
"name": "Identifier",
"src": "5610:3:1"
}
],
"id": 818,
"name": "FunctionCall",
"src": "5596:18:1"
}
],
"id": 819,
"name": "VariableDeclarationStatement",
"src": "5563:51:1"
},
{
"children": [
{
"attributes": {
"assignments": [821]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "i",
"overrides": null,
"scope": 848,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 820,
"name": "ElementaryTypeName",
"src": "5629:4:1"
}
],
"id": 821,
"name": "VariableDeclaration",
"src": "5629:6:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 822,
"name": "Literal",
"src": "5638:1:1"
}
],
"id": 823,
"name": "VariableDeclarationStatement",
"src": "5629:10:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "<",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 821,
"type": "uint256",
"value": "i"
},
"id": 824,
"name": "Identifier",
"src": "5641:1:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 803,
"type": "uint8",
"value": "len"
},
"id": 825,
"name": "Identifier",
"src": "5645:3:1"
}
],
"id": 826,
"name": "BinaryOperation",
"src": "5641:7:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "++",
"prefix": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 821,
"type": "uint256",
"value": "i"
},
"id": 827,
"name": "Identifier",
"src": "5650:1:1"
}
],
"id": 828,
"name": "UnaryOperation",
"src": "5650:3:1"
}
],
"id": 829,
"name": "ExpressionStatement",
"src": "5650:3:1"
},
{
"children": [
{
"attributes": {
"assignments": [831]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "addr",
"overrides": null,
"scope": 847,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 830,
"name": "ElementaryTypeName",
"src": "5669:7:1"
}
],
"id": 831,
"name": "VariableDeclaration",
"src": "5669:12:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "address",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toAddress",
"referencedDeclaration": 82,
"type": "function (bytes memory,uint256) pure returns (address)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 783,
"type": "bytes memory",
"value": "data"
},
"id": 832,
"name": "Identifier",
"src": "5684:4:1"
}
],
"id": 833,
"name": "MemberAccess",
"src": "5684:14:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "35",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 5",
"value": "5"
},
"id": 834,
"name": "Literal",
"src": "5699:1:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 821,
"type": "uint256",
"value": "i"
},
"id": 835,
"name": "Identifier",
"src": "5703:1:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3230",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 20",
"value": "20"
},
"id": 836,
"name": "Literal",
"src": "5707:2:1"
}
],
"id": 837,
"name": "BinaryOperation",
"src": "5703:6:1"
}
],
"id": 838,
"name": "BinaryOperation",
"src": "5699:10:1"
}
],
"id": 839,
"name": "FunctionCall",
"src": "5684:26:1"
}
],
"id": 840,
"name": "VariableDeclarationStatement",
"src": "5669:41:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 813,
"type": "address[] memory",
"value": "new_guardians"
},
"id": 841,
"name": "Identifier",
"src": "5724:13:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 821,
"type": "uint256",
"value": "i"
},
"id": 842,
"name": "Identifier",
"src": "5738:1:1"
}
],
"id": 843,
"name": "IndexAccess",
"src": "5724:16:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 831,
"type": "address",
"value": "addr"
},
"id": 844,
"name": "Identifier",
"src": "5743:4:1"
}
],
"id": 845,
"name": "Assignment",
"src": "5724:23:1"
}
],
"id": 846,
"name": "ExpressionStatement",
"src": "5724:23:1"
}
],
"id": 847,
"name": "Block",
"src": "5655:103:1"
}
],
"id": 848,
"name": "ForStatement",
"src": "5624:134:1"
},
{
"attributes": {
"assignments": [850]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "old_guardian_set_index",
"overrides": null,
"scope": 888,
"stateVariable": false,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 849,
"name": "ElementaryTypeName",
"src": "5768:6:1"
}
],
"id": 850,
"name": "VariableDeclaration",
"src": "5768:29:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 414,
"type": "uint32",
"value": "guardian_set_index"
},
"id": 851,
"name": "Identifier",
"src": "5800:18:1"
}
],
"id": 852,
"name": "VariableDeclarationStatement",
"src": "5768:50:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 414,
"type": "uint32",
"value": "guardian_set_index"
},
"id": 853,
"name": "Identifier",
"src": "5828:18:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 787,
"type": "uint32",
"value": "new_guardian_set_index"
},
"id": 854,
"name": "Identifier",
"src": "5849:22:1"
}
],
"id": 855,
"name": "Assignment",
"src": "5828:43:1"
}
],
"id": 856,
"name": "ExpressionStatement",
"src": "5828:43:1"
},
{
"attributes": {
"assignments": [858]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "new_guardian_set",
"overrides": null,
"scope": 888,
"stateVariable": false,
"storageLocation": "memory",
"type": "struct Wormhole.GuardianSet",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "GuardianSet",
"referencedDeclaration": 371,
"type": "struct Wormhole.GuardianSet"
},
"id": 857,
"name": "UserDefinedTypeName",
"src": "5882:11:1"
}
],
"id": 858,
"name": "VariableDeclaration",
"src": "5882:35:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": true,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "struct Wormhole.GuardianSet memory",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 371,
"type": "type(struct Wormhole.GuardianSet storage pointer)",
"value": "GuardianSet"
},
"id": 859,
"name": "Identifier",
"src": "5920:11:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 813,
"type": "address[] memory",
"value": "new_guardians"
},
"id": 860,
"name": "Identifier",
"src": "5932:13:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 861,
"name": "Literal",
"src": "5947:1:1"
}
],
"id": 862,
"name": "FunctionCall",
"src": "5920:29:1"
}
],
"id": 863,
"name": "VariableDeclarationStatement",
"src": "5882:67:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "struct Wormhole.GuardianSet storage ref"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "struct Wormhole.GuardianSet storage ref"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 412,
"type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)",
"value": "guardian_sets"
},
"id": 864,
"name": "Identifier",
"src": "5959:13:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 414,
"type": "uint32",
"value": "guardian_set_index"
},
"id": 865,
"name": "Identifier",
"src": "5973:18:1"
}
],
"id": 866,
"name": "IndexAccess",
"src": "5959:33:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 858,
"type": "struct Wormhole.GuardianSet memory",
"value": "new_guardian_set"
},
"id": 867,
"name": "Identifier",
"src": "5995:16:1"
}
],
"id": 868,
"name": "Assignment",
"src": "5959:52:1"
}
],
"id": 869,
"name": "ExpressionStatement",
"src": "5959:52:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"member_name": "expiration_time",
"referencedDeclaration": 370,
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "struct Wormhole.GuardianSet storage ref"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 412,
"type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)",
"value": "guardian_sets"
},
"id": 870,
"name": "Identifier",
"src": "6021:13:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 850,
"type": "uint32",
"value": "old_guardian_set_index"
},
"id": 871,
"name": "Identifier",
"src": "6035:22:1"
}
],
"id": 872,
"name": "IndexAccess",
"src": "6021:37:1"
}
],
"id": 873,
"name": "MemberAccess",
"src": "6021:53:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint32",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(uint32)"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": null
},
"id": 874,
"name": "ElementaryTypeName",
"src": "6077:6:1"
}
],
"id": 875,
"name": "ElementaryTypeNameExpression",
"src": "6077:6:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "timestamp",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -4,
"type": "block",
"value": "block"
},
"id": 876,
"name": "Identifier",
"src": "6084:5:1"
}
],
"id": 877,
"name": "MemberAccess",
"src": "6084:15:1"
}
],
"id": 878,
"name": "FunctionCall",
"src": "6077:23:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 416,
"type": "uint32",
"value": "guardian_set_expirity"
},
"id": 879,
"name": "Identifier",
"src": "6103:21:1"
}
],
"id": 880,
"name": "BinaryOperation",
"src": "6077:47:1"
}
],
"id": 881,
"name": "Assignment",
"src": "6021:103:1"
}
],
"id": 882,
"name": "ExpressionStatement",
"src": "6021:103:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 377,
"type": "function (uint32,uint32)",
"value": "LogGuardianSetChanged"
},
"id": 883,
"name": "Identifier",
"src": "6140:21:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 850,
"type": "uint32",
"value": "old_guardian_set_index"
},
"id": 884,
"name": "Identifier",
"src": "6162:22:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 414,
"type": "uint32",
"value": "guardian_set_index"
},
"id": 885,
"name": "Identifier",
"src": "6186:18:1"
}
],
"id": 886,
"name": "FunctionCall",
"src": "6140:65:1"
}
],
"id": 887,
"name": "EmitStatement",
"src": "6135:70:1"
}
],
"id": 888,
"name": "Block",
"src": "5353:859:1"
}
],
"id": 889,
"name": "FunctionDefinition",
"src": "5296:916:1"
},
{
"attributes": {
"documentation": null,
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "vaaTransfer",
"overrides": null,
"scope": 1420,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "data",
"overrides": null,
"scope": 1051,
"stateVariable": false,
"storageLocation": "memory",
"type": "bytes",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes"
},
"id": 890,
"name": "ElementaryTypeName",
"src": "6239:5:1"
}
],
"id": 891,
"name": "VariableDeclaration",
"src": "6239:17:1"
}
],
"id": 892,
"name": "ParameterList",
"src": "6238:19:1"
},
{
"attributes": {
"parameters": [null]
},
"children": [],
"id": 893,
"name": "ParameterList",
"src": "6266:0:1"
},
{
"children": [
{
"attributes": {
"assignments": [895]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "source_chain",
"overrides": null,
"scope": 1050,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 894,
"name": "ElementaryTypeName",
"src": "6319:5:1"
}
],
"id": 895,
"name": "VariableDeclaration",
"src": "6319:18:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint8",
"referencedDeclaration": 109,
"type": "function (bytes memory,uint256) pure returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 891,
"type": "bytes memory",
"value": "data"
},
"id": 896,
"name": "Identifier",
"src": "6340:4:1"
}
],
"id": 897,
"name": "MemberAccess",
"src": "6340:12:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "34",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 4",
"value": "4"
},
"id": 898,
"name": "Literal",
"src": "6353:1:1"
}
],
"id": 899,
"name": "FunctionCall",
"src": "6340:15:1"
}
],
"id": 900,
"name": "VariableDeclarationStatement",
"src": "6319:36:1"
},
{
"attributes": {
"assignments": [902]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "target_chain",
"overrides": null,
"scope": 1050,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 901,
"name": "ElementaryTypeName",
"src": "6366:5:1"
}
],
"id": 902,
"name": "VariableDeclaration",
"src": "6366:18:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint8",
"referencedDeclaration": 109,
"type": "function (bytes memory,uint256) pure returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 891,
"type": "bytes memory",
"value": "data"
},
"id": 903,
"name": "Identifier",
"src": "6387:4:1"
}
],
"id": 904,
"name": "MemberAccess",
"src": "6387:12:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "35",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 5",
"value": "5"
},
"id": 905,
"name": "Literal",
"src": "6400:1:1"
}
],
"id": 906,
"name": "FunctionCall",
"src": "6387:15:1"
}
],
"id": 907,
"name": "VariableDeclarationStatement",
"src": "6366:36:1"
},
{
"attributes": {
"assignments": [909]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "target_address",
"overrides": null,
"scope": 1050,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 908,
"name": "ElementaryTypeName",
"src": "6521:7:1"
}
],
"id": 909,
"name": "VariableDeclaration",
"src": "6521:22:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "address",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_50_by_1",
"typeString": "int_const 50"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toAddress",
"referencedDeclaration": 82,
"type": "function (bytes memory,uint256) pure returns (address)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 891,
"type": "bytes memory",
"value": "data"
},
"id": 910,
"name": "Identifier",
"src": "6546:4:1"
}
],
"id": 911,
"name": "MemberAccess",
"src": "6546:14:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_50_by_1",
"typeString": "int_const 50"
},
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"operator": "+",
"type": "int_const 50"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3338",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 38",
"value": "38"
},
"id": 912,
"name": "Literal",
"src": "6561:2:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3132",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 12",
"value": "12"
},
"id": 913,
"name": "Literal",
"src": "6566:2:1"
}
],
"id": 914,
"name": "BinaryOperation",
"src": "6561:7:1"
}
],
"id": 915,
"name": "FunctionCall",
"src": "6546:23:1"
}
],
"id": 916,
"name": "VariableDeclarationStatement",
"src": "6521:48:1"
},
{
"attributes": {
"assignments": [918]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "token_chain",
"overrides": null,
"scope": 1050,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 917,
"name": "ElementaryTypeName",
"src": "6580:5:1"
}
],
"id": 918,
"name": "VariableDeclaration",
"src": "6580:17:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_70_by_1",
"typeString": "int_const 70"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint8",
"referencedDeclaration": 109,
"type": "function (bytes memory,uint256) pure returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 891,
"type": "bytes memory",
"value": "data"
},
"id": 919,
"name": "Identifier",
"src": "6600:4:1"
}
],
"id": 920,
"name": "MemberAccess",
"src": "6600:12:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3730",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 70",
"value": "70"
},
"id": 921,
"name": "Literal",
"src": "6613:2:1"
}
],
"id": 922,
"name": "FunctionCall",
"src": "6600:16:1"
}
],
"id": 923,
"name": "VariableDeclarationStatement",
"src": "6580:36:1"
},
{
"attributes": {
"assignments": [925]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "amount",
"overrides": null,
"scope": 1050,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 924,
"name": "ElementaryTypeName",
"src": "6680:7:1"
}
],
"id": 925,
"name": "VariableDeclaration",
"src": "6680:14:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_104_by_1",
"typeString": "int_const 104"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint256",
"referencedDeclaration": 271,
"type": "function (bytes memory,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 891,
"type": "bytes memory",
"value": "data"
},
"id": 926,
"name": "Identifier",
"src": "6697:4:1"
}
],
"id": 927,
"name": "MemberAccess",
"src": "6697:14:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "313034",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 104",
"value": "104"
},
"id": 928,
"name": "Literal",
"src": "6712:3:1"
}
],
"id": 929,
"name": "FunctionCall",
"src": "6697:19:1"
}
],
"id": 930,
"name": "VariableDeclarationStatement",
"src": "6680:36:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_e4bc00dc2f1f687d1ecd0a604d39e62ed5081a3cef70cb858e5f565f9bb7da23",
"typeString": "literal_string \"same chain transfers are not supported\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 931,
"name": "Identifier",
"src": "6727:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "!=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 895,
"type": "uint8",
"value": "source_chain"
},
"id": 932,
"name": "Identifier",
"src": "6735:12:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 902,
"type": "uint8",
"value": "target_chain"
},
"id": 933,
"name": "Identifier",
"src": "6751:12:1"
}
],
"id": 934,
"name": "BinaryOperation",
"src": "6735:28:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "73616d6520636861696e207472616e736665727320617265206e6f7420737570706f72746564",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"same chain transfers are not supported\"",
"value": "same chain transfers are not supported"
},
"id": 935,
"name": "Literal",
"src": "6765:40:1"
}
],
"id": 936,
"name": "FunctionCall",
"src": "6727:79:1"
}
],
"id": 937,
"name": "ExpressionStatement",
"src": "6727:79:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_cbd36b1271ec4677f9b6b0ce3c590e298ab53454b431f3898527107beeed1a5a",
"typeString": "literal_string \"transfer must be incoming\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 938,
"name": "Identifier",
"src": "6816:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 902,
"type": "uint8",
"value": "target_chain"
},
"id": 939,
"name": "Identifier",
"src": "6824:12:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 362,
"type": "uint8",
"value": "CHAIN_ID"
},
"id": 940,
"name": "Identifier",
"src": "6840:8:1"
}
],
"id": 941,
"name": "BinaryOperation",
"src": "6824:24:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "7472616e73666572206d75737420626520696e636f6d696e67",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"transfer must be incoming\"",
"value": "transfer must be incoming"
},
"id": 942,
"name": "Literal",
"src": "6850:27:1"
}
],
"id": 943,
"name": "FunctionCall",
"src": "6816:62:1"
}
],
"id": 944,
"name": "ExpressionStatement",
"src": "6816:62:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "!=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 918,
"type": "uint8",
"value": "token_chain"
},
"id": 945,
"name": "Identifier",
"src": "6893:11:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 362,
"type": "uint8",
"value": "CHAIN_ID"
},
"id": 946,
"name": "Identifier",
"src": "6908:8:1"
}
],
"id": 947,
"name": "BinaryOperation",
"src": "6893:23:1"
},
{
"children": [
{
"attributes": {
"assignments": [949]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "token_address",
"overrides": null,
"scope": 1003,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 948,
"name": "ElementaryTypeName",
"src": "6932:7:1"
}
],
"id": 949,
"name": "VariableDeclaration",
"src": "6932:21:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes32",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_71_by_1",
"typeString": "int_const 71"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toBytes32",
"referencedDeclaration": 298,
"type": "function (bytes memory,uint256) pure returns (bytes32)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 891,
"type": "bytes memory",
"value": "data"
},
"id": 950,
"name": "Identifier",
"src": "6956:4:1"
}
],
"id": 951,
"name": "MemberAccess",
"src": "6956:14:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3731",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 71",
"value": "71"
},
"id": 952,
"name": "Literal",
"src": "6971:2:1"
}
],
"id": 953,
"name": "FunctionCall",
"src": "6956:18:1"
}
],
"id": 954,
"name": "VariableDeclarationStatement",
"src": "6932:42:1"
},
{
"attributes": {
"assignments": [956]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "asset_id",
"overrides": null,
"scope": 1003,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 955,
"name": "ElementaryTypeName",
"src": "6988:7:1"
}
],
"id": 956,
"name": "VariableDeclaration",
"src": "6988:16:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes32",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": -8,
"type": "function (bytes memory) pure returns (bytes32)",
"value": "keccak256"
},
"id": 957,
"name": "Identifier",
"src": "7007:9:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes memory",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"member_name": "encodePacked",
"referencedDeclaration": null,
"type": "function () pure returns (bytes memory)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -1,
"type": "abi",
"value": "abi"
},
"id": 958,
"name": "Identifier",
"src": "7017:3:1"
}
],
"id": 959,
"name": "MemberAccess",
"src": "7017:16:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 918,
"type": "uint8",
"value": "token_chain"
},
"id": 960,
"name": "Identifier",
"src": "7034:11:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 949,
"type": "bytes32",
"value": "token_address"
},
"id": 961,
"name": "Identifier",
"src": "7047:13:1"
}
],
"id": 962,
"name": "FunctionCall",
"src": "7017:44:1"
}
],
"id": 963,
"name": "FunctionCall",
"src": "7007:55:1"
}
],
"id": 964,
"name": "VariableDeclarationStatement",
"src": "6988:74:1"
},
{
"attributes": {
"assignments": [966]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "wrapped_asset",
"overrides": null,
"scope": 1003,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 965,
"name": "ElementaryTypeName",
"src": "7154:7:1"
}
],
"id": 966,
"name": "VariableDeclaration",
"src": "7154:21:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 424,
"type": "mapping(bytes32 => address)",
"value": "wrappedAssets"
},
"id": 967,
"name": "Identifier",
"src": "7178:13:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 956,
"type": "bytes32",
"value": "asset_id"
},
"id": 968,
"name": "Identifier",
"src": "7192:8:1"
}
],
"id": 969,
"name": "IndexAccess",
"src": "7178:23:1"
}
],
"id": 970,
"name": "VariableDeclarationStatement",
"src": "7154:47:1"
},
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 966,
"type": "address",
"value": "wrapped_asset"
},
"id": 971,
"name": "Identifier",
"src": "7219:13:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": true,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "address payable",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(address)"
},
"children": [
{
"attributes": {
"name": "address",
"type": null
},
"id": 972,
"name": "ElementaryTypeName",
"src": "7236:7:1"
}
],
"id": 973,
"name": "ElementaryTypeNameExpression",
"src": "7236:7:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 974,
"name": "Literal",
"src": "7244:1:1"
}
],
"id": 975,
"name": "FunctionCall",
"src": "7236:10:1"
}
],
"id": 976,
"name": "BinaryOperation",
"src": "7219:27:1"
},
{
"children": [
{
"attributes": {
"assignments": [978]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "asset_decimals",
"overrides": null,
"scope": 993,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 977,
"name": "ElementaryTypeName",
"src": "7266:5:1"
}
],
"id": 978,
"name": "VariableDeclaration",
"src": "7266:20:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_103_by_1",
"typeString": "int_const 103"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toUint8",
"referencedDeclaration": 109,
"type": "function (bytes memory,uint256) pure returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 891,
"type": "bytes memory",
"value": "data"
},
"id": 979,
"name": "Identifier",
"src": "7289:4:1"
}
],
"id": 980,
"name": "MemberAccess",
"src": "7289:12:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "313033",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 103",
"value": "103"
},
"id": 981,
"name": "Literal",
"src": "7302:3:1"
}
],
"id": 982,
"name": "FunctionCall",
"src": "7289:17:1"
}
],
"id": 983,
"name": "VariableDeclarationStatement",
"src": "7266:40:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 966,
"type": "address",
"value": "wrapped_asset"
},
"id": 984,
"name": "Identifier",
"src": "7324:13:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "address",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1094,
"type": "function (bytes32,uint8,bytes32,uint8) returns (address)",
"value": "deployWrappedAsset"
},
"id": 985,
"name": "Identifier",
"src": "7340:18:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 956,
"type": "bytes32",
"value": "asset_id"
},
"id": 986,
"name": "Identifier",
"src": "7359:8:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 918,
"type": "uint8",
"value": "token_chain"
},
"id": 987,
"name": "Identifier",
"src": "7369:11:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 949,
"type": "bytes32",
"value": "token_address"
},
"id": 988,
"name": "Identifier",
"src": "7382:13:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 978,
"type": "uint8",
"value": "asset_decimals"
},
"id": 989,
"name": "Identifier",
"src": "7397:14:1"
}
],
"id": 990,
"name": "FunctionCall",
"src": "7340:72:1"
}
],
"id": 991,
"name": "Assignment",
"src": "7324:88:1"
}
],
"id": 992,
"name": "ExpressionStatement",
"src": "7324:88:1"
}
],
"id": 993,
"name": "Block",
"src": "7248:179:1"
}
],
"id": 994,
"name": "IfStatement",
"src": "7215:212:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "mint",
"referencedDeclaration": 1511,
"type": "function (address,uint256) external"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "contract WrappedAsset",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 2147,
"type": "type(contract WrappedAsset)",
"value": "WrappedAsset"
},
"id": 995,
"name": "Identifier",
"src": "7441:12:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 966,
"type": "address",
"value": "wrapped_asset"
},
"id": 996,
"name": "Identifier",
"src": "7454:13:1"
}
],
"id": 997,
"name": "FunctionCall",
"src": "7441:27:1"
}
],
"id": 998,
"name": "MemberAccess",
"src": "7441:32:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 909,
"type": "address",
"value": "target_address"
},
"id": 999,
"name": "Identifier",
"src": "7474:14:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 925,
"type": "uint256",
"value": "amount"
},
"id": 1000,
"name": "Identifier",
"src": "7490:6:1"
}
],
"id": 1001,
"name": "FunctionCall",
"src": "7441:56:1"
}
],
"id": 1002,
"name": "ExpressionStatement",
"src": "7441:56:1"
}
],
"id": 1003,
"name": "Block",
"src": "6918:590:1"
},
{
"children": [
{
"attributes": {
"assignments": [1005]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "token_address",
"overrides": null,
"scope": 1048,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 1004,
"name": "ElementaryTypeName",
"src": "7528:7:1"
}
],
"id": 1005,
"name": "VariableDeclaration",
"src": "7528:21:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "address",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_83_by_1",
"typeString": "int_const 83"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "toAddress",
"referencedDeclaration": 82,
"type": "function (bytes memory,uint256) pure returns (address)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 891,
"type": "bytes memory",
"value": "data"
},
"id": 1006,
"name": "Identifier",
"src": "7552:4:1"
}
],
"id": 1007,
"name": "MemberAccess",
"src": "7552:14:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_83_by_1",
"typeString": "int_const 83"
},
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"operator": "+",
"type": "int_const 83"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3731",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 71",
"value": "71"
},
"id": 1008,
"name": "Literal",
"src": "7567:2:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3132",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 12",
"value": "12"
},
"id": 1009,
"name": "Literal",
"src": "7572:2:1"
}
],
"id": 1010,
"name": "BinaryOperation",
"src": "7567:7:1"
}
],
"id": 1011,
"name": "FunctionCall",
"src": "7552:23:1"
}
],
"id": 1012,
"name": "VariableDeclarationStatement",
"src": "7528:47:1"
},
{
"attributes": {
"assignments": [1014]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "decimals",
"overrides": null,
"scope": 1048,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 1013,
"name": "ElementaryTypeName",
"src": "7590:5:1"
}
],
"id": 1014,
"name": "VariableDeclaration",
"src": "7590:14:1"
},
{
"attributes": {
"argumentTypes": null,
"arguments": [null],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [null],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "decimals",
"referencedDeclaration": 2584,
"type": "function () view external returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "contract ERC20",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 3008,
"type": "type(contract ERC20)",
"value": "ERC20"
},
"id": 1015,
"name": "Identifier",
"src": "7607:5:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1005,
"type": "address",
"value": "token_address"
},
"id": 1016,
"name": "Identifier",
"src": "7613:13:1"
}
],
"id": 1017,
"name": "FunctionCall",
"src": "7607:20:1"
}
],
"id": 1018,
"name": "MemberAccess",
"src": "7607:29:1"
}
],
"id": 1019,
"name": "FunctionCall",
"src": "7607:31:1"
}
],
"id": 1020,
"name": "VariableDeclarationStatement",
"src": "7590:48:1"
},
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1014,
"type": "uint8",
"value": "decimals"
},
"id": 1021,
"name": "Identifier",
"src": "7727:8:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "39",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 9",
"value": "9"
},
"id": 1022,
"name": "Literal",
"src": "7738:1:1"
}
],
"id": 1023,
"name": "BinaryOperation",
"src": "7727:12:1"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 925,
"type": "uint256",
"value": "amount"
},
"id": 1024,
"name": "Identifier",
"src": "7759:6:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "mul",
"referencedDeclaration": 2388,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 925,
"type": "uint256",
"value": "amount"
},
"id": 1025,
"name": "Identifier",
"src": "7768:6:1"
}
],
"id": 1026,
"name": "MemberAccess",
"src": "7768:10:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "**",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3130",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 10",
"value": "10"
},
"id": 1027,
"name": "Literal",
"src": "7779:2:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(uint256)"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": null
},
"id": 1028,
"name": "ElementaryTypeName",
"src": "7785:7:1"
}
],
"id": 1029,
"name": "ElementaryTypeNameExpression",
"src": "7785:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1014,
"type": "uint8",
"value": "decimals"
},
"id": 1030,
"name": "Identifier",
"src": "7793:8:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "39",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 9",
"value": "9"
},
"id": 1031,
"name": "Literal",
"src": "7804:1:1"
}
],
"id": 1032,
"name": "BinaryOperation",
"src": "7793:12:1"
}
],
"id": 1033,
"name": "FunctionCall",
"src": "7785:21:1"
}
],
"id": 1034,
"name": "BinaryOperation",
"src": "7779:27:1"
}
],
"id": 1035,
"name": "FunctionCall",
"src": "7768:39:1"
}
],
"id": 1036,
"name": "Assignment",
"src": "7759:48:1"
}
],
"id": 1037,
"name": "ExpressionStatement",
"src": "7759:48:1"
}
],
"id": 1038,
"name": "Block",
"src": "7741:81:1"
}
],
"id": 1039,
"name": "IfStatement",
"src": "7723:99:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "safeTransfer",
"referencedDeclaration": 3120,
"type": "function (contract IERC20,address,uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "contract IERC20",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 3086,
"type": "type(contract IERC20)",
"value": "IERC20"
},
"id": 1040,
"name": "Identifier",
"src": "7835:6:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1005,
"type": "address",
"value": "token_address"
},
"id": 1041,
"name": "Identifier",
"src": "7842:13:1"
}
],
"id": 1042,
"name": "FunctionCall",
"src": "7835:21:1"
}
],
"id": 1043,
"name": "MemberAccess",
"src": "7835:34:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 909,
"type": "address",
"value": "target_address"
},
"id": 1044,
"name": "Identifier",
"src": "7870:14:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 925,
"type": "uint256",
"value": "amount"
},
"id": 1045,
"name": "Identifier",
"src": "7886:6:1"
}
],
"id": 1046,
"name": "FunctionCall",
"src": "7835:58:1"
}
],
"id": 1047,
"name": "ExpressionStatement",
"src": "7835:58:1"
}
],
"id": 1048,
"name": "Block",
"src": "7514:390:1"
}
],
"id": 1049,
"name": "IfStatement",
"src": "6889:1015:1"
}
],
"id": 1050,
"name": "Block",
"src": "6266:1644:1"
}
],
"id": 1051,
"name": "FunctionDefinition",
"src": "6218:1692:1"
},
{
"attributes": {
"documentation": null,
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "deployWrappedAsset",
"overrides": null,
"scope": 1420,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "seed",
"overrides": null,
"scope": 1094,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 1052,
"name": "ElementaryTypeName",
"src": "7944:7:1"
}
],
"id": 1053,
"name": "VariableDeclaration",
"src": "7944:12:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "token_chain",
"overrides": null,
"scope": 1094,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 1054,
"name": "ElementaryTypeName",
"src": "7958:5:1"
}
],
"id": 1055,
"name": "VariableDeclaration",
"src": "7958:17:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "token_address",
"overrides": null,
"scope": 1094,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 1056,
"name": "ElementaryTypeName",
"src": "7977:7:1"
}
],
"id": 1057,
"name": "VariableDeclaration",
"src": "7977:21:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "decimals",
"overrides": null,
"scope": 1094,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 1058,
"name": "ElementaryTypeName",
"src": "8000:5:1"
}
],
"id": 1059,
"name": "VariableDeclaration",
"src": "8000:14:1"
}
],
"id": 1060,
"name": "ParameterList",
"src": "7943:72:1"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "asset",
"overrides": null,
"scope": 1094,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 1061,
"name": "ElementaryTypeName",
"src": "8033:7:1"
}
],
"id": 1062,
"name": "VariableDeclaration",
"src": "8033:13:1"
}
],
"id": 1063,
"name": "ParameterList",
"src": "8032:15:1"
},
{
"children": [
{
"attributes": {
"assignments": [1065]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "targetBytes",
"overrides": null,
"scope": 1093,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes20",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes20",
"type": "bytes20"
},
"id": 1064,
"name": "ElementaryTypeName",
"src": "8225:7:1"
}
],
"id": 1065,
"name": "VariableDeclaration",
"src": "8225:19:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes20",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(bytes20)"
},
"children": [
{
"attributes": {
"name": "bytes20",
"type": null
},
"id": 1066,
"name": "ElementaryTypeName",
"src": "8247:7:1"
}
],
"id": 1067,
"name": "ElementaryTypeNameExpression",
"src": "8247:7:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 359,
"type": "address",
"value": "wrappedAssetMaster"
},
"id": 1068,
"name": "Identifier",
"src": "8255:18:1"
}
],
"id": 1069,
"name": "FunctionCall",
"src": "8247:27:1"
}
],
"id": 1070,
"name": "VariableDeclarationStatement",
"src": "8225:49:1"
},
{
"attributes": {
"evmVersion": "istanbul",
"externalReferences": [
{
"declaration": 1062,
"isOffset": false,
"isSlot": false,
"src": "8593:5:1",
"valueSize": 1
},
{
"declaration": 1053,
"isOffset": false,
"isSlot": false,
"src": "8626:4:1",
"valueSize": 1
},
{
"declaration": 1065,
"isOffset": false,
"isSlot": false,
"src": "8463:11:1",
"valueSize": 1
}
],
"operations": "{\n let clone := mload(0x40)\n mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(clone, 0x14), targetBytes)\n mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n asset := create2(0, clone, 0x37, seed)\n}"
},
"children": [],
"id": 1071,
"name": "InlineAssembly",
"src": "8284:357:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "initialize",
"referencedDeclaration": 1490,
"type": "function (uint8,bytes32,uint8) external"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "contract WrappedAsset",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 2147,
"type": "type(contract WrappedAsset)",
"value": "WrappedAsset"
},
"id": 1072,
"name": "Identifier",
"src": "8679:12:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1062,
"type": "address",
"value": "asset"
},
"id": 1073,
"name": "Identifier",
"src": "8692:5:1"
}
],
"id": 1074,
"name": "FunctionCall",
"src": "8679:19:1"
}
],
"id": 1075,
"name": "MemberAccess",
"src": "8679:30:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1055,
"type": "uint8",
"value": "token_chain"
},
"id": 1076,
"name": "Identifier",
"src": "8710:11:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1057,
"type": "bytes32",
"value": "token_address"
},
"id": 1077,
"name": "Identifier",
"src": "8723:13:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1059,
"type": "uint8",
"value": "decimals"
},
"id": 1078,
"name": "Identifier",
"src": "8738:8:1"
}
],
"id": 1079,
"name": "FunctionCall",
"src": "8679:68:1"
}
],
"id": 1080,
"name": "ExpressionStatement",
"src": "8679:68:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 424,
"type": "mapping(bytes32 => address)",
"value": "wrappedAssets"
},
"id": 1081,
"name": "Identifier",
"src": "8783:13:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1053,
"type": "bytes32",
"value": "seed"
},
"id": 1082,
"name": "Identifier",
"src": "8797:4:1"
}
],
"id": 1083,
"name": "IndexAccess",
"src": "8783:19:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1062,
"type": "address",
"value": "asset"
},
"id": 1084,
"name": "Identifier",
"src": "8805:5:1"
}
],
"id": 1085,
"name": "Assignment",
"src": "8783:27:1"
}
],
"id": 1086,
"name": "ExpressionStatement",
"src": "8783:27:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 428,
"type": "mapping(address => bool)",
"value": "isWrappedAsset"
},
"id": 1087,
"name": "Identifier",
"src": "8820:14:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1062,
"type": "address",
"value": "asset"
},
"id": 1088,
"name": "Identifier",
"src": "8835:5:1"
}
],
"id": 1089,
"name": "IndexAccess",
"src": "8820:21:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "74727565",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "true"
},
"id": 1090,
"name": "Literal",
"src": "8844:4:1"
}
],
"id": 1091,
"name": "Assignment",
"src": "8820:28:1"
}
],
"id": 1092,
"name": "ExpressionStatement",
"src": "8820:28:1"
}
],
"id": 1093,
"name": "Block",
"src": "8047:808:1"
}
],
"id": 1094,
"name": "FunctionDefinition",
"src": "7916:939:1"
},
{
"attributes": {
"documentation": null,
"functionSelector": "70713960",
"implemented": true,
"isConstructor": false,
"kind": "function",
"name": "lockAssets",
"overrides": null,
"scope": 1420,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "asset",
"overrides": null,
"scope": 1314,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 1095,
"name": "ElementaryTypeName",
"src": "8890:7:1"
}
],
"id": 1096,
"name": "VariableDeclaration",
"src": "8890:13:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "amount",
"overrides": null,
"scope": 1314,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 1097,
"name": "ElementaryTypeName",
"src": "8913:7:1"
}
],
"id": 1098,
"name": "VariableDeclaration",
"src": "8913:14:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "recipient",
"overrides": null,
"scope": 1314,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 1099,
"name": "ElementaryTypeName",
"src": "8937:7:1"
}
],
"id": 1100,
"name": "VariableDeclaration",
"src": "8937:17:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "target_chain",
"overrides": null,
"scope": 1314,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 1101,
"name": "ElementaryTypeName",
"src": "8964:5:1"
}
],
"id": 1102,
"name": "VariableDeclaration",
"src": "8964:18:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "nonce",
"overrides": null,
"scope": 1314,
"stateVariable": false,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 1103,
"name": "ElementaryTypeName",
"src": "8992:6:1"
}
],
"id": 1104,
"name": "VariableDeclaration",
"src": "8992:12:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "refund_dust",
"overrides": null,
"scope": 1314,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 1105,
"name": "ElementaryTypeName",
"src": "9014:4:1"
}
],
"id": 1106,
"name": "VariableDeclaration",
"src": "9014:16:1"
}
],
"id": 1107,
"name": "ParameterList",
"src": "8880:156:1"
},
{
"attributes": {
"parameters": [null]
},
"children": [],
"id": 1110,
"name": "ParameterList",
"src": "9057:0:1"
},
{
"attributes": {
"arguments": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 3657,
"type": "modifier ()",
"value": "nonReentrant"
},
"id": 1108,
"name": "Identifier",
"src": "9044:12:1"
}
],
"id": 1109,
"name": "ModifierInvocation",
"src": "9044:12:1"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b",
"typeString": "literal_string \"must not transfer to the same chain\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 1111,
"name": "Identifier",
"src": "9067:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "!=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1102,
"type": "uint8",
"value": "target_chain"
},
"id": 1112,
"name": "Identifier",
"src": "9075:12:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 362,
"type": "uint8",
"value": "CHAIN_ID"
},
"id": 1113,
"name": "Identifier",
"src": "9091:8:1"
}
],
"id": 1114,
"name": "BinaryOperation",
"src": "9075:24:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "6d757374206e6f74207472616e7366657220746f207468652073616d6520636861696e",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"must not transfer to the same chain\"",
"value": "must not transfer to the same chain"
},
"id": 1115,
"name": "Literal",
"src": "9101:37:1"
}
],
"id": 1116,
"name": "FunctionCall",
"src": "9067:72:1"
}
],
"id": 1117,
"name": "ExpressionStatement",
"src": "9067:72:1"
},
{
"attributes": {
"assignments": [1119]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "asset_chain",
"overrides": null,
"scope": 1313,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 1118,
"name": "ElementaryTypeName",
"src": "9150:5:1"
}
],
"id": 1119,
"name": "VariableDeclaration",
"src": "9150:17:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 362,
"type": "uint8",
"value": "CHAIN_ID"
},
"id": 1120,
"name": "Identifier",
"src": "9170:8:1"
}
],
"id": 1121,
"name": "VariableDeclarationStatement",
"src": "9150:28:1"
},
{
"attributes": {
"assignments": [1123],
"initialValue": null
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "asset_address",
"overrides": null,
"scope": 1313,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 1122,
"name": "ElementaryTypeName",
"src": "9188:7:1"
}
],
"id": 1123,
"name": "VariableDeclaration",
"src": "9188:21:1"
}
],
"id": 1124,
"name": "VariableDeclarationStatement",
"src": "9188:21:1"
},
{
"attributes": {
"assignments": [1126]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "decimals",
"overrides": null,
"scope": 1313,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 1125,
"name": "ElementaryTypeName",
"src": "9219:5:1"
}
],
"id": 1126,
"name": "VariableDeclaration",
"src": "9219:14:1"
},
{
"attributes": {
"argumentTypes": null,
"arguments": [null],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [null],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "decimals",
"referencedDeclaration": 2584,
"type": "function () view external returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "contract ERC20",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 3008,
"type": "type(contract ERC20)",
"value": "ERC20"
},
"id": 1127,
"name": "Identifier",
"src": "9236:5:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1096,
"type": "address",
"value": "asset"
},
"id": 1128,
"name": "Identifier",
"src": "9242:5:1"
}
],
"id": 1129,
"name": "FunctionCall",
"src": "9236:12:1"
}
],
"id": 1130,
"name": "MemberAccess",
"src": "9236:21:1"
}
],
"id": 1131,
"name": "FunctionCall",
"src": "9236:23:1"
}
],
"id": 1132,
"name": "VariableDeclarationStatement",
"src": "9219:40:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 428,
"type": "mapping(address => bool)",
"value": "isWrappedAsset"
},
"id": 1133,
"name": "Identifier",
"src": "9274:14:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1096,
"type": "address",
"value": "asset"
},
"id": 1134,
"name": "Identifier",
"src": "9289:5:1"
}
],
"id": 1135,
"name": "IndexAccess",
"src": "9274:21:1"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "burn",
"referencedDeclaration": 1532,
"type": "function (address,uint256) external"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "contract WrappedAsset",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 2147,
"type": "type(contract WrappedAsset)",
"value": "WrappedAsset"
},
"id": 1136,
"name": "Identifier",
"src": "9311:12:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1096,
"type": "address",
"value": "asset"
},
"id": 1137,
"name": "Identifier",
"src": "9324:5:1"
}
],
"id": 1138,
"name": "FunctionCall",
"src": "9311:19:1"
}
],
"id": 1139,
"name": "MemberAccess",
"src": "9311:24:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address payable"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 1140,
"name": "Identifier",
"src": "9336:3:1"
}
],
"id": 1141,
"name": "MemberAccess",
"src": "9336:10:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1098,
"type": "uint256",
"value": "amount"
},
"id": 1142,
"name": "Identifier",
"src": "9348:6:1"
}
],
"id": 1143,
"name": "FunctionCall",
"src": "9311:44:1"
}
],
"id": 1144,
"name": "ExpressionStatement",
"src": "9311:44:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1119,
"type": "uint8",
"value": "asset_chain"
},
"id": 1145,
"name": "Identifier",
"src": "9369:11:1"
},
{
"attributes": {
"argumentTypes": null,
"arguments": [null],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [null],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "assetChain",
"referencedDeclaration": 1443,
"type": "function () view external returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "contract WrappedAsset",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 2147,
"type": "type(contract WrappedAsset)",
"value": "WrappedAsset"
},
"id": 1146,
"name": "Identifier",
"src": "9383:12:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1096,
"type": "address",
"value": "asset"
},
"id": 1147,
"name": "Identifier",
"src": "9396:5:1"
}
],
"id": 1148,
"name": "FunctionCall",
"src": "9383:19:1"
}
],
"id": 1149,
"name": "MemberAccess",
"src": "9383:30:1"
}
],
"id": 1150,
"name": "FunctionCall",
"src": "9383:32:1"
}
],
"id": 1151,
"name": "Assignment",
"src": "9369:46:1"
}
],
"id": 1152,
"name": "ExpressionStatement",
"src": "9369:46:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "bytes32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1123,
"type": "bytes32",
"value": "asset_address"
},
"id": 1153,
"name": "Identifier",
"src": "9429:13:1"
},
{
"attributes": {
"argumentTypes": null,
"arguments": [null],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes32",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [null],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "assetAddress",
"referencedDeclaration": 1445,
"type": "function () view external returns (bytes32)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "contract WrappedAsset",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 2147,
"type": "type(contract WrappedAsset)",
"value": "WrappedAsset"
},
"id": 1154,
"name": "Identifier",
"src": "9445:12:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1096,
"type": "address",
"value": "asset"
},
"id": 1155,
"name": "Identifier",
"src": "9458:5:1"
}
],
"id": 1156,
"name": "FunctionCall",
"src": "9445:19:1"
}
],
"id": 1157,
"name": "MemberAccess",
"src": "9445:32:1"
}
],
"id": 1158,
"name": "FunctionCall",
"src": "9445:34:1"
}
],
"id": 1159,
"name": "Assignment",
"src": "9429:50:1"
}
],
"id": 1160,
"name": "ExpressionStatement",
"src": "9429:50:1"
}
],
"id": 1161,
"name": "Block",
"src": "9297:193:1"
},
{
"children": [
{
"attributes": {
"assignments": [1163]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "balanceBefore",
"overrides": null,
"scope": 1286,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 1162,
"name": "ElementaryTypeName",
"src": "9510:7:1"
}
],
"id": 1163,
"name": "VariableDeclaration",
"src": "9510:21:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "balanceOf",
"referencedDeclaration": 3025,
"type": "function (address) view external returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "contract IERC20",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 3086,
"type": "type(contract IERC20)",
"value": "IERC20"
},
"id": 1164,
"name": "Identifier",
"src": "9534:6:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1096,
"type": "address",
"value": "asset"
},
"id": 1165,
"name": "Identifier",
"src": "9541:5:1"
}
],
"id": 1166,
"name": "FunctionCall",
"src": "9534:13:1"
}
],
"id": 1167,
"name": "MemberAccess",
"src": "9534:23:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "address payable",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Wormhole_$1420",
"typeString": "contract Wormhole"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(address)"
},
"children": [
{
"attributes": {
"name": "address",
"type": null
},
"id": 1168,
"name": "ElementaryTypeName",
"src": "9558:7:1"
}
],
"id": 1169,
"name": "ElementaryTypeNameExpression",
"src": "9558:7:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -28,
"type": "contract Wormhole",
"value": "this"
},
"id": 1170,
"name": "Identifier",
"src": "9566:4:1"
}
],
"id": 1171,
"name": "FunctionCall",
"src": "9558:13:1"
}
],
"id": 1172,
"name": "FunctionCall",
"src": "9534:38:1"
}
],
"id": 1173,
"name": "VariableDeclarationStatement",
"src": "9510:62:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "safeTransferFrom",
"referencedDeclaration": 3145,
"type": "function (contract IERC20,address,address,uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "contract IERC20",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 3086,
"type": "type(contract IERC20)",
"value": "IERC20"
},
"id": 1174,
"name": "Identifier",
"src": "9586:6:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1096,
"type": "address",
"value": "asset"
},
"id": 1175,
"name": "Identifier",
"src": "9593:5:1"
}
],
"id": 1176,
"name": "FunctionCall",
"src": "9586:13:1"
}
],
"id": 1177,
"name": "MemberAccess",
"src": "9586:30:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address payable"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 1178,
"name": "Identifier",
"src": "9617:3:1"
}
],
"id": 1179,
"name": "MemberAccess",
"src": "9617:10:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "address payable",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Wormhole_$1420",
"typeString": "contract Wormhole"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(address)"
},
"children": [
{
"attributes": {
"name": "address",
"type": null
},
"id": 1180,
"name": "ElementaryTypeName",
"src": "9629:7:1"
}
],
"id": 1181,
"name": "ElementaryTypeNameExpression",
"src": "9629:7:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -28,
"type": "contract Wormhole",
"value": "this"
},
"id": 1182,
"name": "Identifier",
"src": "9637:4:1"
}
],
"id": 1183,
"name": "FunctionCall",
"src": "9629:13:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1098,
"type": "uint256",
"value": "amount"
},
"id": 1184,
"name": "Identifier",
"src": "9644:6:1"
}
],
"id": 1185,
"name": "FunctionCall",
"src": "9586:65:1"
}
],
"id": 1186,
"name": "ExpressionStatement",
"src": "9586:65:1"
},
{
"attributes": {
"assignments": [1188]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "balanceAfter",
"overrides": null,
"scope": 1286,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 1187,
"name": "ElementaryTypeName",
"src": "9665:7:1"
}
],
"id": 1188,
"name": "VariableDeclaration",
"src": "9665:20:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "balanceOf",
"referencedDeclaration": 3025,
"type": "function (address) view external returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "contract IERC20",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 3086,
"type": "type(contract IERC20)",
"value": "IERC20"
},
"id": 1189,
"name": "Identifier",
"src": "9688:6:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1096,
"type": "address",
"value": "asset"
},
"id": 1190,
"name": "Identifier",
"src": "9695:5:1"
}
],
"id": 1191,
"name": "FunctionCall",
"src": "9688:13:1"
}
],
"id": 1192,
"name": "MemberAccess",
"src": "9688:23:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "address payable",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Wormhole_$1420",
"typeString": "contract Wormhole"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(address)"
},
"children": [
{
"attributes": {
"name": "address",
"type": null
},
"id": 1193,
"name": "ElementaryTypeName",
"src": "9712:7:1"
}
],
"id": 1194,
"name": "ElementaryTypeNameExpression",
"src": "9712:7:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -28,
"type": "contract Wormhole",
"value": "this"
},
"id": 1195,
"name": "Identifier",
"src": "9720:4:1"
}
],
"id": 1196,
"name": "FunctionCall",
"src": "9712:13:1"
}
],
"id": 1197,
"name": "FunctionCall",
"src": "9688:38:1"
}
],
"id": 1198,
"name": "VariableDeclarationStatement",
"src": "9665:61:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1098,
"type": "uint256",
"value": "amount"
},
"id": 1199,
"name": "Identifier",
"src": "9931:6:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sub",
"referencedDeclaration": 2354,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1188,
"type": "uint256",
"value": "balanceAfter"
},
"id": 1200,
"name": "Identifier",
"src": "9940:12:1"
}
],
"id": 1201,
"name": "MemberAccess",
"src": "9940:16:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1163,
"type": "uint256",
"value": "balanceBefore"
},
"id": 1202,
"name": "Identifier",
"src": "9957:13:1"
}
],
"id": 1203,
"name": "FunctionCall",
"src": "9940:31:1"
}
],
"id": 1204,
"name": "Assignment",
"src": "9931:40:1"
}
],
"id": 1205,
"name": "ExpressionStatement",
"src": "9931:40:1"
},
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1126,
"type": "uint8",
"value": "decimals"
},
"id": 1206,
"name": "Identifier",
"src": "10046:8:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "39",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 9",
"value": "9"
},
"id": 1207,
"name": "Literal",
"src": "10057:1:1"
}
],
"id": 1208,
"name": "BinaryOperation",
"src": "10046:12:1"
},
{
"children": [
{
"attributes": {
"assignments": [1210]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "original_amount",
"overrides": null,
"scope": 1253,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 1209,
"name": "ElementaryTypeName",
"src": "10078:7:1"
}
],
"id": 1210,
"name": "VariableDeclaration",
"src": "10078:23:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1098,
"type": "uint256",
"value": "amount"
},
"id": 1211,
"name": "Identifier",
"src": "10104:6:1"
}
],
"id": 1212,
"name": "VariableDeclarationStatement",
"src": "10078:32:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1098,
"type": "uint256",
"value": "amount"
},
"id": 1213,
"name": "Identifier",
"src": "10128:6:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "div",
"referencedDeclaration": 2410,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1098,
"type": "uint256",
"value": "amount"
},
"id": 1214,
"name": "Identifier",
"src": "10137:6:1"
}
],
"id": 1215,
"name": "MemberAccess",
"src": "10137:10:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "**",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3130",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 10",
"value": "10"
},
"id": 1216,
"name": "Literal",
"src": "10148:2:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(uint256)"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": null
},
"id": 1217,
"name": "ElementaryTypeName",
"src": "10154:7:1"
}
],
"id": 1218,
"name": "ElementaryTypeNameExpression",
"src": "10154:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1126,
"type": "uint8",
"value": "decimals"
},
"id": 1219,
"name": "Identifier",
"src": "10162:8:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "39",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 9",
"value": "9"
},
"id": 1220,
"name": "Literal",
"src": "10173:1:1"
}
],
"id": 1221,
"name": "BinaryOperation",
"src": "10162:12:1"
}
],
"id": 1222,
"name": "FunctionCall",
"src": "10154:21:1"
}
],
"id": 1223,
"name": "BinaryOperation",
"src": "10148:27:1"
}
],
"id": 1224,
"name": "FunctionCall",
"src": "10137:39:1"
}
],
"id": 1225,
"name": "Assignment",
"src": "10128:48:1"
}
],
"id": 1226,
"name": "ExpressionStatement",
"src": "10128:48:1"
},
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1106,
"type": "bool",
"value": "refund_dust"
},
"id": 1227,
"name": "Identifier",
"src": "10199:11:1"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "safeTransfer",
"referencedDeclaration": 3120,
"type": "function (contract IERC20,address,uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "contract IERC20",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3086,
"type": "type(contract IERC20)",
"value": "IERC20"
},
"id": 1228,
"name": "Identifier",
"src": "10234:6:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1096,
"type": "address",
"value": "asset"
},
"id": 1229,
"name": "Identifier",
"src": "10241:5:1"
}
],
"id": 1230,
"name": "FunctionCall",
"src": "10234:13:1"
}
],
"id": 1231,
"name": "MemberAccess",
"src": "10234:26:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address payable"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 1232,
"name": "Identifier",
"src": "10261:3:1"
}
],
"id": 1233,
"name": "MemberAccess",
"src": "10261:10:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "mod",
"referencedDeclaration": 2432,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1210,
"type": "uint256",
"value": "original_amount"
},
"id": 1234,
"name": "Identifier",
"src": "10273:15:1"
}
],
"id": 1235,
"name": "MemberAccess",
"src": "10273:19:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "**",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3130",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 10",
"value": "10"
},
"id": 1236,
"name": "Literal",
"src": "10293:2:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(uint256)"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": null
},
"id": 1237,
"name": "ElementaryTypeName",
"src": "10299:7:1"
}
],
"id": 1238,
"name": "ElementaryTypeNameExpression",
"src": "10299:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1126,
"type": "uint8",
"value": "decimals"
},
"id": 1239,
"name": "Identifier",
"src": "10307:8:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "39",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 9",
"value": "9"
},
"id": 1240,
"name": "Literal",
"src": "10318:1:1"
}
],
"id": 1241,
"name": "BinaryOperation",
"src": "10307:12:1"
}
],
"id": 1242,
"name": "FunctionCall",
"src": "10299:21:1"
}
],
"id": 1243,
"name": "BinaryOperation",
"src": "10293:27:1"
}
],
"id": 1244,
"name": "FunctionCall",
"src": "10273:48:1"
}
],
"id": 1245,
"name": "FunctionCall",
"src": "10234:88:1"
}
],
"id": 1246,
"name": "ExpressionStatement",
"src": "10234:88:1"
}
],
"id": 1247,
"name": "Block",
"src": "10212:129:1"
}
],
"id": 1248,
"name": "IfStatement",
"src": "10195:146:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1126,
"type": "uint8",
"value": "decimals"
},
"id": 1249,
"name": "Identifier",
"src": "10359:8:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "39",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 9",
"value": "9"
},
"id": 1250,
"name": "Literal",
"src": "10370:1:1"
}
],
"id": 1251,
"name": "Assignment",
"src": "10359:12:1"
}
],
"id": 1252,
"name": "ExpressionStatement",
"src": "10359:12:1"
}
],
"id": 1253,
"name": "Block",
"src": "10060:326:1"
}
],
"id": 1254,
"name": "IfStatement",
"src": "10042:344:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_173119466b5178b8ca47cb473e247f7a9a678958b1d751b4cef80e7a8162cdd4",
"typeString": "literal_string \"bridge balance would exceed maximum\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 1255,
"name": "Identifier",
"src": "10400:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "<=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "div",
"referencedDeclaration": 2410,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1188,
"type": "uint256",
"value": "balanceAfter"
},
"id": 1256,
"name": "Identifier",
"src": "10408:12:1"
}
],
"id": 1257,
"name": "MemberAccess",
"src": "10408:16:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "**",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3130",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 10",
"value": "10"
},
"id": 1258,
"name": "Literal",
"src": "10425:2:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(uint256)"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": null
},
"id": 1259,
"name": "ElementaryTypeName",
"src": "10431:7:1"
}
],
"id": 1260,
"name": "ElementaryTypeNameExpression",
"src": "10431:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"arguments": [null],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint8",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
null
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "decimals",
"referencedDeclaration": 2584,
"type": "function () view external returns (uint8)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "contract ERC20",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3008,
"type": "type(contract ERC20)",
"value": "ERC20"
},
"id": 1261,
"name": "Identifier",
"src": "10439:5:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1096,
"type": "address",
"value": "asset"
},
"id": 1262,
"name": "Identifier",
"src": "10445:5:1"
}
],
"id": 1263,
"name": "FunctionCall",
"src": "10439:12:1"
}
],
"id": 1264,
"name": "MemberAccess",
"src": "10439:21:1"
}
],
"id": 1265,
"name": "FunctionCall",
"src": "10439:23:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "39",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 9",
"value": "9"
},
"id": 1266,
"name": "Literal",
"src": "10465:1:1"
}
],
"id": 1267,
"name": "BinaryOperation",
"src": "10439:27:1"
}
],
"id": 1268,
"name": "FunctionCall",
"src": "10431:36:1"
}
],
"id": 1269,
"name": "BinaryOperation",
"src": "10425:42:1"
}
],
"id": 1270,
"name": "FunctionCall",
"src": "10408:60:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 357,
"type": "uint64",
"value": "MAX_UINT64"
},
"id": 1271,
"name": "Identifier",
"src": "10472:10:1"
}
],
"id": 1272,
"name": "BinaryOperation",
"src": "10408:74:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "6272696467652062616c616e636520776f756c6420657863656564206d6178696d756d",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"bridge balance would exceed maximum\"",
"value": "bridge balance would exceed maximum"
},
"id": 1273,
"name": "Literal",
"src": "10484:37:1"
}
],
"id": 1274,
"name": "FunctionCall",
"src": "10400:122:1"
}
],
"id": 1275,
"name": "ExpressionStatement",
"src": "10400:122:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "bytes32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1123,
"type": "bytes32",
"value": "asset_address"
},
"id": 1276,
"name": "Identifier",
"src": "10537:13:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes32",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(bytes32)"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": null
},
"id": 1277,
"name": "ElementaryTypeName",
"src": "10553:7:1"
}
],
"id": 1278,
"name": "ElementaryTypeNameExpression",
"src": "10553:7:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(uint256)"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": null
},
"id": 1279,
"name": "ElementaryTypeName",
"src": "10561:7:1"
}
],
"id": 1280,
"name": "ElementaryTypeNameExpression",
"src": "10561:7:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1096,
"type": "address",
"value": "asset"
},
"id": 1281,
"name": "Identifier",
"src": "10569:5:1"
}
],
"id": 1282,
"name": "FunctionCall",
"src": "10561:14:1"
}
],
"id": 1283,
"name": "FunctionCall",
"src": "10553:23:1"
}
],
"id": 1284,
"name": "Assignment",
"src": "10537:39:1"
}
],
"id": 1285,
"name": "ExpressionStatement",
"src": "10537:39:1"
}
],
"id": 1286,
"name": "Block",
"src": "9496:1091:1"
}
],
"id": 1287,
"name": "IfStatement",
"src": "9270:1317:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e",
"typeString": "literal_string \"truncated amount must not be 0\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 1288,
"name": "Identifier",
"src": "10636:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "!=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1098,
"type": "uint256",
"value": "amount"
},
"id": 1289,
"name": "Identifier",
"src": "10644:6:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 1290,
"name": "Literal",
"src": "10654:1:1"
}
],
"id": 1291,
"name": "BinaryOperation",
"src": "10644:11:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "7472756e636174656420616d6f756e74206d757374206e6f742062652030",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"truncated amount must not be 0\"",
"value": "truncated amount must not be 0"
},
"id": 1292,
"name": "Literal",
"src": "10657:32:1"
}
],
"id": 1293,
"name": "FunctionCall",
"src": "10636:54:1"
}
],
"id": 1294,
"name": "ExpressionStatement",
"src": "10636:54:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 395,
"type": "function (uint8,uint8,uint8,bytes32,bytes32,bytes32,uint256,uint32)",
"value": "LogTokensLocked"
},
"id": 1295,
"name": "Identifier",
"src": "10706:15:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1102,
"type": "uint8",
"value": "target_chain"
},
"id": 1296,
"name": "Identifier",
"src": "10722:12:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1119,
"type": "uint8",
"value": "asset_chain"
},
"id": 1297,
"name": "Identifier",
"src": "10736:11:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1126,
"type": "uint8",
"value": "decimals"
},
"id": 1298,
"name": "Identifier",
"src": "10749:8:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1123,
"type": "bytes32",
"value": "asset_address"
},
"id": 1299,
"name": "Identifier",
"src": "10759:13:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes32",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(bytes32)"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": null
},
"id": 1300,
"name": "ElementaryTypeName",
"src": "10774:7:1"
}
],
"id": 1301,
"name": "ElementaryTypeNameExpression",
"src": "10774:7:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(uint256)"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": null
},
"id": 1302,
"name": "ElementaryTypeName",
"src": "10782:7:1"
}
],
"id": 1303,
"name": "ElementaryTypeNameExpression",
"src": "10782:7:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address payable"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 1304,
"name": "Identifier",
"src": "10790:3:1"
}
],
"id": 1305,
"name": "MemberAccess",
"src": "10790:10:1"
}
],
"id": 1306,
"name": "FunctionCall",
"src": "10782:19:1"
}
],
"id": 1307,
"name": "FunctionCall",
"src": "10774:28:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1100,
"type": "bytes32",
"value": "recipient"
},
"id": 1308,
"name": "Identifier",
"src": "10804:9:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1098,
"type": "uint256",
"value": "amount"
},
"id": 1309,
"name": "Identifier",
"src": "10815:6:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1104,
"type": "uint32",
"value": "nonce"
},
"id": 1310,
"name": "Identifier",
"src": "10823:5:1"
}
],
"id": 1311,
"name": "FunctionCall",
"src": "10706:123:1"
}
],
"id": 1312,
"name": "EmitStatement",
"src": "10701:128:1"
}
],
"id": 1313,
"name": "Block",
"src": "9057:1779:1"
}
],
"id": 1314,
"name": "FunctionDefinition",
"src": "8861:1975:1"
},
{
"attributes": {
"documentation": null,
"functionSelector": "58d62e46",
"implemented": true,
"isConstructor": false,
"kind": "function",
"name": "lockETH",
"overrides": null,
"scope": 1420,
"stateMutability": "payable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "recipient",
"overrides": null,
"scope": 1403,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 1315,
"name": "ElementaryTypeName",
"src": "10868:7:1"
}
],
"id": 1316,
"name": "VariableDeclaration",
"src": "10868:17:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "target_chain",
"overrides": null,
"scope": 1403,
"stateVariable": false,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 1317,
"name": "ElementaryTypeName",
"src": "10895:5:1"
}
],
"id": 1318,
"name": "VariableDeclaration",
"src": "10895:18:1"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "nonce",
"overrides": null,
"scope": 1403,
"stateVariable": false,
"storageLocation": "default",
"type": "uint32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint32",
"type": "uint32"
},
"id": 1319,
"name": "ElementaryTypeName",
"src": "10923:6:1"
}
],
"id": 1320,
"name": "VariableDeclaration",
"src": "10923:12:1"
}
],
"id": 1321,
"name": "ParameterList",
"src": "10858:83:1"
},
{
"attributes": {
"parameters": [null]
},
"children": [],
"id": 1324,
"name": "ParameterList",
"src": "10970:0:1"
},
{
"attributes": {
"arguments": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 3657,
"type": "modifier ()",
"value": "nonReentrant"
},
"id": 1322,
"name": "Identifier",
"src": "10957:12:1"
}
],
"id": 1323,
"name": "ModifierInvocation",
"src": "10957:12:1"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b",
"typeString": "literal_string \"must not transfer to the same chain\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 1325,
"name": "Identifier",
"src": "10980:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "!=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1318,
"type": "uint8",
"value": "target_chain"
},
"id": 1326,
"name": "Identifier",
"src": "10988:12:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 362,
"type": "uint8",
"value": "CHAIN_ID"
},
"id": 1327,
"name": "Identifier",
"src": "11004:8:1"
}
],
"id": 1328,
"name": "BinaryOperation",
"src": "10988:24:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "6d757374206e6f74207472616e7366657220746f207468652073616d6520636861696e",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"must not transfer to the same chain\"",
"value": "must not transfer to the same chain"
},
"id": 1329,
"name": "Literal",
"src": "11014:37:1"
}
],
"id": 1330,
"name": "FunctionCall",
"src": "10980:72:1"
}
],
"id": 1331,
"name": "ExpressionStatement",
"src": "10980:72:1"
},
{
"attributes": {
"assignments": [1333]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "remainder",
"overrides": null,
"scope": 1402,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 1332,
"name": "ElementaryTypeName",
"src": "11063:7:1"
}
],
"id": 1333,
"name": "VariableDeclaration",
"src": "11063:17:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1000000000_by_1",
"typeString": "int_const 1000000000"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "mod",
"referencedDeclaration": 2432,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "value",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 1334,
"name": "Identifier",
"src": "11083:3:1"
}
],
"id": 1335,
"name": "MemberAccess",
"src": "11083:9:1"
}
],
"id": 1336,
"name": "MemberAccess",
"src": "11083:13:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_1000000000_by_1",
"typeString": "int_const 1000000000"
},
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"operator": "**",
"type": "int_const 1000000000"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3130",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 10",
"value": "10"
},
"id": 1337,
"name": "Literal",
"src": "11097:2:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "39",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 9",
"value": "9"
},
"id": 1338,
"name": "Literal",
"src": "11103:1:1"
}
],
"id": 1339,
"name": "BinaryOperation",
"src": "11097:7:1"
}
],
"id": 1340,
"name": "FunctionCall",
"src": "11083:22:1"
}
],
"id": 1341,
"name": "VariableDeclarationStatement",
"src": "11063:42:1"
},
{
"attributes": {
"assignments": [1343]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "transfer_amount",
"overrides": null,
"scope": 1402,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 1342,
"name": "ElementaryTypeName",
"src": "11115:7:1"
}
],
"id": 1343,
"name": "VariableDeclaration",
"src": "11115:23:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1000000000_by_1",
"typeString": "int_const 1000000000"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "div",
"referencedDeclaration": 2410,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "value",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 1344,
"name": "Identifier",
"src": "11141:3:1"
}
],
"id": 1345,
"name": "MemberAccess",
"src": "11141:9:1"
}
],
"id": 1346,
"name": "MemberAccess",
"src": "11141:13:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_1000000000_by_1",
"typeString": "int_const 1000000000"
},
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"operator": "**",
"type": "int_const 1000000000"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3130",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 10",
"value": "10"
},
"id": 1347,
"name": "Literal",
"src": "11155:2:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "39",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 9",
"value": "9"
},
"id": 1348,
"name": "Literal",
"src": "11161:1:1"
}
],
"id": 1349,
"name": "BinaryOperation",
"src": "11155:7:1"
}
],
"id": 1350,
"name": "FunctionCall",
"src": "11141:22:1"
}
],
"id": 1351,
"name": "VariableDeclarationStatement",
"src": "11115:48:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e",
"typeString": "literal_string \"truncated amount must not be 0\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 1352,
"name": "Identifier",
"src": "11173:7:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "!=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1343,
"type": "uint256",
"value": "transfer_amount"
},
"id": 1353,
"name": "Identifier",
"src": "11181:15:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 1354,
"name": "Literal",
"src": "11200:1:1"
}
],
"id": 1355,
"name": "BinaryOperation",
"src": "11181:20:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "7472756e636174656420616d6f756e74206d757374206e6f742062652030",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"truncated amount must not be 0\"",
"value": "truncated amount must not be 0"
},
"id": 1356,
"name": "Literal",
"src": "11203:32:1"
}
],
"id": 1357,
"name": "FunctionCall",
"src": "11173:63:1"
}
],
"id": 1358,
"name": "ExpressionStatement",
"src": "11173:63:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "transfer",
"referencedDeclaration": null,
"type": "function (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address payable"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 1359,
"name": "Identifier",
"src": "11282:3:1"
}
],
"id": 1362,
"name": "MemberAccess",
"src": "11282:10:1"
}
],
"id": 1363,
"name": "MemberAccess",
"src": "11282:19:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1333,
"type": "uint256",
"value": "remainder"
},
"id": 1364,
"name": "Identifier",
"src": "11302:9:1"
}
],
"id": 1365,
"name": "FunctionCall",
"src": "11282:30:1"
}
],
"id": 1366,
"name": "ExpressionStatement",
"src": "11282:30:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"arguments": [null],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [null],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"names": ["value"],
"type": "function () payable external"
},
"children": [
{
"attributes": {
"argumentTypes": [null],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "deposit",
"referencedDeclaration": 1425,
"type": "function () payable external"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": true,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "contract WETH",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 1431,
"type": "type(contract WETH)",
"value": "WETH"
},
"id": 1367,
"name": "Identifier",
"src": "11356:4:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 365,
"type": "address",
"value": "WETHAddress"
},
"id": 1368,
"name": "Identifier",
"src": "11361:11:1"
}
],
"id": 1369,
"name": "FunctionCall",
"src": "11356:17:1"
}
],
"id": 1370,
"name": "MemberAccess",
"src": "11356:25:1"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "value",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 1371,
"name": "Identifier",
"src": "11390:3:1"
}
],
"id": 1372,
"name": "MemberAccess",
"src": "11390:9:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1333,
"type": "uint256",
"value": "remainder"
},
"id": 1373,
"name": "Identifier",
"src": "11402:9:1"
}
],
"id": 1374,
"name": "BinaryOperation",
"src": "11390:21:1"
}
],
"id": 1375,
"name": "FunctionCallOptions",
"src": "11356:56:1"
}
],
"id": 1376,
"name": "FunctionCall",
"src": "11356:58:1"
}
],
"id": 1377,
"name": "ExpressionStatement",
"src": "11356:58:1"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_rational_9_by_1",
"typeString": "int_const 9"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"overloadedDeclarations": [null],
"referencedDeclaration": 395,
"type": "function (uint8,uint8,uint8,bytes32,bytes32,bytes32,uint256,uint32)",
"value": "LogTokensLocked"
},
"id": 1378,
"name": "Identifier",
"src": "11461:15:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1318,
"type": "uint8",
"value": "target_chain"
},
"id": 1379,
"name": "Identifier",
"src": "11477:12:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 362,
"type": "uint8",
"value": "CHAIN_ID"
},
"id": 1380,
"name": "Identifier",
"src": "11491:8:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "39",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 9",
"value": "9"
},
"id": 1381,
"name": "Literal",
"src": "11501:1:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": true,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes32",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(bytes32)"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": null
},
"id": 1382,
"name": "ElementaryTypeName",
"src": "11504:7:1"
}
],
"id": 1383,
"name": "ElementaryTypeNameExpression",
"src": "11504:7:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": true,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(uint256)"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": null
},
"id": 1384,
"name": "ElementaryTypeName",
"src": "11512:7:1"
}
],
"id": 1385,
"name": "ElementaryTypeNameExpression",
"src": "11512:7:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 365,
"type": "address",
"value": "WETHAddress"
},
"id": 1386,
"name": "Identifier",
"src": "11520:11:1"
}
],
"id": 1387,
"name": "FunctionCall",
"src": "11512:20:1"
}
],
"id": 1388,
"name": "FunctionCall",
"src": "11504:29:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "bytes32",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(bytes32)"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": null
},
"id": 1389,
"name": "ElementaryTypeName",
"src": "11535:7:1"
}
],
"id": 1390,
"name": "ElementaryTypeNameExpression",
"src": "11535:7:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "uint256",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(uint256)"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": null
},
"id": 1391,
"name": "ElementaryTypeName",
"src": "11543:7:1"
}
],
"id": 1392,
"name": "ElementaryTypeNameExpression",
"src": "11543:7:1"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address payable"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 1393,
"name": "Identifier",
"src": "11551:3:1"
}
],
"id": 1394,
"name": "MemberAccess",
"src": "11551:10:1"
}
],
"id": 1395,
"name": "FunctionCall",
"src": "11543:19:1"
}
],
"id": 1396,
"name": "FunctionCall",
"src": "11535:28:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1316,
"type": "bytes32",
"value": "recipient"
},
"id": 1397,
"name": "Identifier",
"src": "11565:9:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1343,
"type": "uint256",
"value": "transfer_amount"
},
"id": 1398,
"name": "Identifier",
"src": "11576:15:1"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 1320,
"type": "uint32",
"value": "nonce"
},
"id": 1399,
"name": "Identifier",
"src": "11593:5:1"
}
],
"id": 1400,
"name": "FunctionCall",
"src": "11461:138:1"
}
],
"id": 1401,
"name": "EmitStatement",
"src": "11456:143:1"
}
],
"id": 1402,
"name": "Block",
"src": "10970:636:1"
}
],
"id": 1403,
"name": "FunctionDefinition",
"src": "10842:764:1"
},
{
"attributes": {
"documentation": null,
"implemented": true,
"isConstructor": false,
"kind": "fallback",
"modifiers": [null],
"name": "",
"overrides": null,
"scope": 1420,
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
"children": [
{
"attributes": {
"parameters": [null]
},
"children": [],
"id": 1404,
"name": "ParameterList",
"src": "11620:2:1"
},
{
"attributes": {
"parameters": [null]
},
"children": [],
"id": 1405,
"name": "ParameterList",
"src": "11640:0:1"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2",
"typeString": "literal_string \"please use lockETH to transfer ETH to Solana\""
}
],
"overloadedDeclarations": [-19, -19],
"referencedDeclaration": -19,
"type": "function (string memory) pure",
"value": "revert"
},
"id": 1406,
"name": "Identifier",
"src": "11641:6:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"please use lockETH to transfer ETH to Solana\"",
"value": "please use lockETH to transfer ETH to Solana"
},
"id": 1407,
"name": "Literal",
"src": "11648:46:1"
}
],
"id": 1408,
"name": "FunctionCall",
"src": "11641:54:1"
}
],
"id": 1409,
"name": "ExpressionStatement",
"src": "11641:54:1"
}
],
"id": 1410,
"name": "Block",
"src": "11640:57:1"
}
],
"id": 1411,
"name": "FunctionDefinition",
"src": "11612:85:1"
},
{
"attributes": {
"documentation": null,
"implemented": true,
"isConstructor": false,
"kind": "receive",
"modifiers": [null],
"name": "",
"overrides": null,
"scope": 1420,
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
"children": [
{
"attributes": {
"parameters": [null]
},
"children": [],
"id": 1412,
"name": "ParameterList",
"src": "11710:2:1"
},
{
"attributes": {
"parameters": [null]
},
"children": [],
"id": 1413,
"name": "ParameterList",
"src": "11730:0:1"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2",
"typeString": "literal_string \"please use lockETH to transfer ETH to Solana\""
}
],
"overloadedDeclarations": [-19, -19],
"referencedDeclaration": -19,
"type": "function (string memory) pure",
"value": "revert"
},
"id": 1414,
"name": "Identifier",
"src": "11731:6:1"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"please use lockETH to transfer ETH to Solana\"",
"value": "please use lockETH to transfer ETH to Solana"
},
"id": 1415,
"name": "Literal",
"src": "11738:46:1"
}
],
"id": 1416,
"name": "FunctionCall",
"src": "11731:54:1"
}
],
"id": 1417,
"name": "ExpressionStatement",
"src": "11731:54:1"
}
],
"id": 1418,
"name": "Block",
"src": "11730:57:1"
}
],
"id": 1419,
"name": "FunctionDefinition",
"src": "11703:84:1"
}
],
"id": 1420,
"name": "ContractDefinition",
"src": "463:11326:1"
},
{
"attributes": {
"abstract": false,
"contractDependencies": [3086],
"contractKind": "interface",
"documentation": null,
"fullyImplemented": false,
"linearizedBaseContracts": [1431, 3086],
"name": "WETH",
"scope": 1432
},
"children": [
{
"attributes": {
"arguments": null
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "IERC20",
"referencedDeclaration": 3086,
"type": "contract IERC20"
},
"id": 1421,
"name": "UserDefinedTypeName",
"src": "11810:6:1"
}
],
"id": 1422,
"name": "InheritanceSpecifier",
"src": "11810:6:1"
},
{
"attributes": {
"body": null,
"documentation": null,
"functionSelector": "d0e30db0",
"implemented": false,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "deposit",
"overrides": null,
"scope": 1431,
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
"children": [
{
"attributes": {
"parameters": [null]
},
"children": [],
"id": 1423,
"name": "ParameterList",
"src": "11839:2:1"
},
{
"attributes": {
"parameters": [null]
},
"children": [],
"id": 1424,
"name": "ParameterList",
"src": "11858:0:1"
}
],
"id": 1425,
"name": "FunctionDefinition",
"src": "11823:36:1"
},
{
"attributes": {
"body": null,
"documentation": null,
"functionSelector": "2e1a7d4d",
"implemented": false,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "withdraw",
"overrides": null,
"scope": 1431,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "amount",
"overrides": null,
"scope": 1430,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 1426,
"name": "ElementaryTypeName",
"src": "11883:7:1"
}
],
"id": 1427,
"name": "VariableDeclaration",
"src": "11883:14:1"
}
],
"id": 1428,
"name": "ParameterList",
"src": "11882:16:1"
},
{
"attributes": {
"parameters": [null]
},
"children": [],
"id": 1429,
"name": "ParameterList",
"src": "11907:0:1"
}
],
"id": 1430,
"name": "FunctionDefinition",
"src": "11865:43:1"
}
],
"id": 1431,
"name": "ContractDefinition",
"src": "11792:118:1"
}
],
"id": 1432,
"name": "SourceUnit",
"src": "64:11847:1"
},
"compiler": {
"name": "solc",
"version": "0.6.12+commit.27d51765.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.3.4",
"updatedAt": "2021-04-12T21:53:29.871Z",
"devdoc": {
"kind": "dev",
"methods": {
"allowance(address,address)": {
"details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."
},
"approve(address,uint256)": {
"details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."
},
"balanceOf(address)": {
"details": "Returns the amount of tokens owned by `account`."
},
"totalSupply()": {
"details": "Returns the amount of tokens in existence."
},
"transfer(address,uint256)": {
"details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
},
"transferFrom(address,address,uint256)": {
"details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}