wormhole/web/contracts/Wormhole.json

22077 lines
1017 KiB
JSON
Raw Normal View History

2020-08-09 09:16:52 -07:00
{
"contractName": "Wormhole",
"abi": [
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "x",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "parity",
"type": "uint8"
},
{
"internalType": "uint32",
"name": "expiration_time",
"type": "uint32"
}
],
"internalType": "struct Wormhole.GuardianSet",
"name": "initial_guardian_set",
"type": "tuple"
},
{
"internalType": "address",
"name": "wrapped_asset_master",
"type": "address"
2020-08-09 12:16:18 -07:00
},
{
"internalType": "uint32",
"name": "_vaa_expiry",
"type": "uint32"
2020-08-09 09:16:52 -07:00
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "x",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "parity",
"type": "uint8"
},
{
"internalType": "uint32",
"name": "expiration_time",
"type": "uint32"
}
],
"indexed": true,
"internalType": "struct Wormhole.GuardianSet",
"name": "oldGuardian",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "x",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "parity",
"type": "uint8"
},
{
"internalType": "uint32",
"name": "expiration_time",
"type": "uint32"
}
],
"indexed": true,
"internalType": "struct Wormhole.GuardianSet",
"name": "newGuardian",
"type": "tuple"
}
],
"name": "LogGuardianSetChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "target_chain",
"type": "uint8"
},
{
"indexed": false,
"internalType": "uint8",
"name": "token_chain",
"type": "uint8"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "token",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "sender",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "recipient",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogTokensLocked",
"type": "event"
},
{
2020-08-09 12:16:18 -07:00
"stateMutability": "payable",
"type": "fallback"
},
{
"inputs": [],
"name": "guardian_set_index",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
2020-08-09 09:16:52 -07:00
"inputs": [
{
2020-08-09 12:16:18 -07:00
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"name": "guardian_sets",
"outputs": [
2020-08-09 09:16:52 -07:00
{
2020-08-09 12:16:18 -07:00
"internalType": "uint256",
"name": "x",
"type": "uint256"
2020-08-09 09:16:52 -07:00
},
{
2020-08-09 12:16:18 -07:00
"internalType": "uint8",
"name": "parity",
"type": "uint8"
2020-08-09 09:16:52 -07:00
},
{
2020-08-09 12:16:18 -07:00
"internalType": "uint32",
"name": "expiration_time",
"type": "uint32"
2020-08-09 09:16:52 -07:00
}
],
2020-08-09 12:16:18 -07:00
"stateMutability": "view",
"type": "function"
2020-08-09 09:16:52 -07:00
},
{
2020-08-09 12:16:18 -07:00
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "isWrappedAsset",
2020-08-09 09:16:52 -07:00
"outputs": [
{
2020-08-09 12:16:18 -07:00
"internalType": "bool",
2020-08-09 09:16:52 -07:00
"name": "",
2020-08-09 12:16:18 -07:00
"type": "bool"
2020-08-09 09:16:52 -07:00
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "vaa_expiry",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "wrappedAssetMaster",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
2020-08-09 12:16:18 -07:00
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "wrappedAssets",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
2020-08-09 09:16:52 -07:00
{
"stateMutability": "payable",
"type": "receive"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "vaa",
"type": "bytes"
}
],
"name": "submitVAA",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "recipient",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "target_chain",
"type": "uint8"
}
],
"name": "lockAssets",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "recipient",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "target_chain",
"type": "uint8"
}
],
"name": "lockETH",
"outputs": [],
"stateMutability": "payable",
"type": "function"
}
],
2020-08-09 12:16:18 -07:00
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"parity\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"expiration_time\",\"type\":\"uint32\"}],\"internalType\":\"struct Wormhole.GuardianSet\",\"name\":\"initial_guardian_set\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"wrapped_asset_master\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_vaa_expiry\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"parity\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"expiration_time\",\"type\":\"uint32\"}],\"indexed\":true,\"internalType\":\"struct Wormhole.GuardianSet\",\"name\":\"oldGuardian\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"parity\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"expiration_time\",\"type\":\"uint32\"}],\"indexed\":true,\"internalType\":\"struct Wormhole.GuardianSet\",\"name\":\"newGuardian\",\"type\":\"tuple\"}],\"name\":\"LogGuardianSetChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"target_chain\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"token_chain\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"token\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"sender\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"recipient\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LogTokensLocked\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"guardian_set_index\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"guardian_sets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"parity\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"expiration_time\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isWrappedAsset\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"recipient\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"target_chain\",\"type\":\"uint8\"}],\"name\":\"lockAssets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"recipient\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"target_chain\",\"type\":\"uint8\"}],\"name\":\"lockETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"vaa\",\"type\":\"bytes\"}],\"name\":\"submitVAA\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vaa_expiry\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrappedAssetMaster\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view
"bytecode": "0x60806040526002600060146101000a81548160ff021916908360ff1602179055503480156200002d57600080fd5b506040516200334a3803806200334a833981810160405281019062000053919062000213565b82600160008063ffffffff1681526020019081526020016000206000820151816000015560208201518160010160006101000a81548160ff021916908360ff16021790555060408201518160010160016101000a81548163ffffffff021916908363ffffffff1602179055509050506000600260006101000a81548163ffffffff021916908363ffffffff16021790555080600260046101000a81548163ffffffff021916908363ffffffff160217905550816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050506200035a565b6000815190506200015f81620002f2565b92915050565b6000606082840312156200017857600080fd5b62000184606062000269565b905060006200019684828501620001ce565b6000830152506020620001ac84828501620001fc565b6020830152506040620001c284828501620001e5565b60408301525092915050565b600081519050620001df816200030c565b92915050565b600081519050620001f68162000326565b92915050565b6000815190506200020d8162000340565b92915050565b600080600060a084860312156200022957600080fd5b6000620002398682870162000165565b93505060606200024c868287016200014e565b92505060806200025f86828701620001e5565b9150509250925092565b6000604051905081810181811067ffffffffffffffff821117156200028d57600080fd5b8060405250919050565b6000620002a482620002ab565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b620002fd8162000297565b81146200030957600080fd5b50565b6200031781620002cb565b81146200032357600080fd5b50565b6200033181620002d5565b81146200033d57600080fd5b50565b6200034b81620002e5565b81146200035757600080fd5b50565b612fe0806200036a6000396000f3fe60806040526004361061008a5760003560e01c80637f04d9e6116100595780637f04d9e6146101c6578063822d82b3146101f157806399da1d3c1461021c578063b6694c2a14610247578063e66fd37314610284576100ca565b80631a2be4da146101055780633bc0aee61461014257806342b0aefa1461016b578063780e2183146101aa576100ca565b366100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100c190612a5a565b60405180910390fd5b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100fc90612a5a565b60405180910390fd5b34801561011157600080fd5b5061012c60048036038101906101279190611f41565b6102ad565b60405161013991906129dd565b60405180910390f35b34801561014e57600080fd5b5061016960048036038101906101649190612084565b6102cd565b005b34801561017757600080fd5b50610192600480360381019061018d91906120f2565b6109e4565b6040516101a193929190612c8d565b60405180910390f35b6101c460048036038101906101bf9190612048565b610a2b565b005b3480156101d257600080fd5b506101db610b7c565b6040516101e89190612cc4565b60405180910390f35b3480156101fd57600080fd5b50610206610b92565b6040516102139190612cc4565b60405180910390f35b34801561022857600080fd5b50610231610ba8565b60405161023e919061291e565b60405180910390f35b34801561025357600080fd5b5061026e60048036038101906102699190611ff6565b610bcc565b60405161027b919061291e565b60405180910390f35b34801561029057600080fd5b506102ab60048036038101906102a69190611f6a565b610bff565b005b60056020528060005260406000206000915054906101000a900460ff1681565b6000610327600084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610ff790919063ffffffff16565b905060018160ff161461036f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036690612ada565b60405180910390fd5b60006103c9600185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061105590919063ffffffff16565b90506000610425600586868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506110b390919063ffffffff16565b90506000610481602587878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061111190919063ffffffff16565b905060006104dd60398888
"deployedBytecode": "0x60806040526004361061008a5760003560e01c80637f04d9e6116100595780637f04d9e6146101c6578063822d82b3146101f157806399da1d3c1461021c578063b6694c2a14610247578063e66fd37314610284576100ca565b80631a2be4da146101055780633bc0aee61461014257806342b0aefa1461016b578063780e2183146101aa576100ca565b366100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100c190612a5a565b60405180910390fd5b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100fc90612a5a565b60405180910390fd5b34801561011157600080fd5b5061012c60048036038101906101279190611f41565b6102ad565b60405161013991906129dd565b60405180910390f35b34801561014e57600080fd5b5061016960048036038101906101649190612084565b6102cd565b005b34801561017757600080fd5b50610192600480360381019061018d91906120f2565b6109e4565b6040516101a193929190612c8d565b60405180910390f35b6101c460048036038101906101bf9190612048565b610a2b565b005b3480156101d257600080fd5b506101db610b7c565b6040516101e89190612cc4565b60405180910390f35b3480156101fd57600080fd5b50610206610b92565b6040516102139190612cc4565b60405180910390f35b34801561022857600080fd5b50610231610ba8565b60405161023e919061291e565b60405180910390f35b34801561025357600080fd5b5061026e60048036038101906102699190611ff6565b610bcc565b60405161027b919061291e565b60405180910390f35b34801561029057600080fd5b506102ab60048036038101906102a69190611f6a565b610bff565b005b60056020528060005260406000206000915054906101000a900460ff1681565b6000610327600084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610ff790919063ffffffff16565b905060018160ff161461036f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036690612ada565b60405180910390fd5b60006103c9600185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061105590919063ffffffff16565b90506000610425600586868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506110b390919063ffffffff16565b90506000610481602587878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061111190919063ffffffff16565b905060006104dd603988888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061105590919063ffffffff16565b905042600260049054906101000a900463ffffffff16820163ffffffff161161053b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053290612afa565b60405180910390fd5b600061059c6039808a8a9050038a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061117e9092919063ffffffff16565b8051906020012090506003600082815260200190815260200160002060009054906101000a900460ff1615610606576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105fd90612a3a565b60405180910390fd5b61060e611e10565b600160008763ffffffff1663ffffffff168152602001908152602001600020604051806060016040529081600082015481526020016001820160009054906101000a900460ff1660ff1660ff1681526020016001820160019054906101000a900463ffffffff1663ffffffff1663ffffffff168152505090506000816040015163ffffffff1614806106a9575042816040015163ffffffff16115b6106e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106df90612bba565b60405180910390fd5b73__Schnorr_______________________________63ff51dff282600001518360200151888660001c896040518663ffffffff1660e01b8152600401610732959493929190612c3a565b60206040518083038186803b15801561074a57600080fd5b505af415801561075e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107829190611fcd565b6107c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b890612b1a565b60405180910390fd5b600061081b603d8b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437
2020-08-09 09:16:52 -07:00
"immutableReferences": {},
2020-08-09 12:16:18 -07:00
"sourceMap": "380:8438:2:-:0;;;629:1;612:18;;;;;;;;;;;;;;;;;;;;1696:327;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1835:20;1816:13;:16;1830:1;1816:16;;;;;;;;;;;;;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1929:1;1908:18;;:22;;;;;;;;;;;;;;;;;;1953:11;1940:10;;:24;;;;;;;;;;;;;;;;;;1996:20;1975:18;;:41;;;;;;;;;;;;;;;;;;1696:327;;;380:8438;;5:134:-1;;89:6;83:13;74:22;;101:33;128:5;101:33;:::i;:::-;68:71;;;;:::o;180:665::-;;308:4;296:9;291:3;287:19;283:30;280:2;;;326:1;323;316:12;280:2;344:20;359:4;344:20;:::i;:::-;335:29;;411:1;443:60;499:3;490:6;479:9;475:22;443:60;:::i;:::-;436:4;429:5;425:16;418:86;374:141;567:2;600:58;654:3;645:6;634:9;630:22;600:58;:::i;:::-;593:4;586:5;582:16;575:84;525:145;731:2;764:59;819:3;810:6;799:9;795:22;764:59;:::i;:::-;757:4;750:5;746:16;739:85;680:155;274:571;;;;:::o;852:134::-;;936:6;930:13;921:22;;948:33;975:5;948:33;:::i;:::-;915:71;;;;:::o;993:132::-;;1076:6;1070:13;1061:22;;1088:32;1114:5;1088:32;:::i;:::-;1055:70;;;;:::o;1132:130::-;;1214:6;1208:13;1199:22;;1226:31;1251:5;1226:31;:::i;:::-;1193:69;;;;:::o;1269:591::-;;;;1445:3;1433:9;1424:7;1420:23;1416:33;1413:2;;;1462:1;1459;1452:12;1413:2;1497:1;1514:92;1598:7;1589:6;1578:9;1574:22;1514:92;:::i;:::-;1504:102;;1476:136;1643:2;1661:64;1717:7;1708:6;1697:9;1693:22;1661:64;:::i;:::-;1651:74;;1622:109;1762:3;1781:63;1836:7;1827:6;1816:9;1812:22;1781:63;:::i;:::-;1771:73;;1741:109;1407:453;;;;;:::o;1867:256::-;;1929:2;1923:9;1913:19;;1967:4;1959:6;1955:17;2066:6;2054:10;2051:22;2030:18;2018:10;2015:34;2012:62;2009:2;;;2087:1;2084;2077:12;2009:2;2107:10;2103:2;2096:22;1907:216;;;;:::o;2130:91::-;;2192:24;2210:5;2192:24;:::i;:::-;2181:35;;2175:46;;;:::o;2228:121::-;;2301:42;2294:5;2290:54;2279:65;;2273:76;;;:::o;2356:72::-;;2418:5;2407:16;;2401:27;;;:::o;2435:88::-;;2507:10;2500:5;2496:22;2485:33;;2479:44;;;:::o;2530:81::-;;2601:4;2594:5;2590:16;2579:27;;2573:38;;;:::o;2618:117::-;2687:24;2705:5;2687:24;:::i;:::-;2680:5;2677:35;2667:2;;2726:1;2723;2716:12;2667:2;2661:74;:::o;2742:117::-;2811:24;2829:5;2811:24;:::i;:::-;2804:5;2801:35;2791:2;;2850:1;2847;2840:12;2791:2;2785:74;:::o;2866:115::-;2934:23;2951:5;2934:23;:::i;:::-;2927:5;2924:34;2914:2;;2972:1;2969;2962:12;2914:2;2908:73;:::o;2988:113::-;3055:22;3071:5;3055:22;:::i;:::-;3048:5;3045:33;3035:2;;3092:1;3089;3082:12;3035:2;3029:72;:::o;380:8438:2:-;;;;;;;",
"deployedSourceMap": "380:8438:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8760:54;;;;;;;;;;:::i;:::-;;;;;;;;380:8438;8675:54;;;;;;;;;;:::i;:::-;;;;;;;;1643:46;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2029:1797;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1245:51;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;8227:416;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1427:24;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1337:32;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;544:33;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1589:48;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;7059:1162;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1643:46;;;;;;;;;;;;;;;;;;;;;;:::o;2029:1797::-;2099:13;2115:14;2127:1;2115:3;;:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:14;;;;:::i;:::-;2099:30;;2158:1;2147:7;:12;;;2139:49;;;;;;;;;;;;:::i;:::-;;;;;;;;;2245:29;2277:15;2290:1;2277:3;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:15;;;;:::i;:::-;2245:47;;2303:17;2323:16;2337:1;2323:3;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:16;;;;:::i;:::-;2303:36;;2349:19;2371:17;2385:2;2371:3;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:17;;;;:::i;:::-;2349:39;;2446:16;2465;2478:2;2465:3;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:16;;;;:::i;:::-;2446:35;;2571:15;2558:10;;;;;;;;;;;2546:9;:22;:40;;;2538:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;2642:12;2667:30;2677:2;2694;2681:3;;:10;;:15;2667:3;;:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:30;;;;;:::i;:::-;2657:41;;;;;;2642:56;;2717:12;:18;2730:4;2717:18;;;;;;;;;;;;;;;;;;;;;2716:19;2708:56;;;;;;;;;;;;:::i;:::-;;;;;;;;;2775:31;;:::i;:::-;2809:13;:37;2823:22;2809:37;;;;;;;;;;;;;;;2775:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2896:1;2864:12;:28;;;:33;;;:83;;;;2932:15;2901:12;:28;;;:46;;;2864:83;2856:120;;;;;;;;;;;;:::i;:::-;;;;;;;;;3007:7;:23;3048:12;:14;;;3080:12;:19;;;3117:9;3152:4;3144:13;;3175:11;3007:193;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2986:252;;;;;;;;;;;;:::i;:::-;;;;;;;;;3249:12;3264:15;3276:2;3264:3;;:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:15;;;;:::i;:::-;3249:30;;3289:17;3309:15;3321:2;3309:3;;:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:15;;;;:::i;:::-;3289:35;;3334:20;3357:26;3367:2;3371:11;3357:26;;:3;;:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:26;;;;;:::i;:::-;3334:49;;3431:4;3421:6;:14;;;3417:332;;;3485:18;;;;;;;;;;;3459:44;;:22;:44;;;3451:114;;;;;;;;;;;;:::i;:::-;;;;;;;;;3579:29;3600:7;3579:20;:29::i;:::-;3417:332;;;3639:4;3629:6;:14;;;3625:124;;;3659:20;3671:7;3659:11;:20::i;:::-;3625:124;;;3710:28;;;;;;;;;;:::i;:::-;;;;;;;;3625:124;3417:332;3815:4;3794:12;:18;3807:4;3794:18;;;;;;;;;;;;:25;;;;;;;;;;;;;;;;;;2029:1797;;;;;;;;;;;;:::o;1245:51::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;8227:416::-;8351:1;8338:9;:14;;8330:47;;;;;;;;;;;;:::i;:::-;;;;;;;;;713:42;8421:25;;;8455:9;8421:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8601:10;8593:19;;8585:28;;713:42;8562:20;;8554:29;;8514:122;8530:12;8544:8;;;;;;;;;;;8615:9;8626;8514:122;;;;;;;;;:::i;:::-;;;;;;;;8227:416;;:::o;1427:24::-;;;;;;;;;;;;;:::o;1337:32::-;;;;;;;;;;;;;:::o;544:33::-;;;;;;;;;;;;:::o;1589:48::-;;;;;;;;;;;;;;;;;;;;;;:::o;7059:1162::-;7222:1;7212:6;:11;;7204:44;;;;;;;;;;;;:::i;:::-;;;;;;;;;7259:17;7279:8;;;;;;;;;;;7259:28;;7297:21;7332:14;:21;7347:5;7332:21;;;;;;;;;;;;;;;;;;;;;;;;;7328:765;;;7382:5;7369:24;;;7394:10;7406:6;7369:44;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7454:5;7441:30;;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7427:46;;7516:5;7503:32;;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7487:50;;7328:765;;;7568:21;7599:5;7592:23;;;7624:4;7592:38;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7568:62;;7644:65;7675:
"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/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"./BytesLib.sol\";\nimport \"./SchnorrSECP256K1.sol\";\nimport \"./WrappedAsset.sol\";\n\ncontract Wormhole {\n using SafeERC20 for IERC20;\n using BytesLib for bytes;\n using SafeMath for uint256;\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 uint256 x;\n uint8 parity;\n uint32 expiration_time;\n }\n\n event LogGuardianSetChanged(\n GuardianSet indexed oldGuardian,\n GuardianSet indexed newGuardian\n );\n\n event LogTokensLocked(\n uint8 target_chain,\n uint8 token_chain,\n bytes32 indexed token,\n bytes32 indexed sender,\n bytes32 recipient,\n uint256 amount\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 an vaa is valid in seconds\n uint32 public vaa_expiry;\n\n // Mapping of already consumedVAAs\n mapping(bytes32 => bool) 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 _vaa_expiry) public {\n guardian_sets[0] = initial_guardian_set;\n // Explicitly set for doc purposes\n guardian_set_index = 0;\n vaa_expiry = _vaa_expiry;\n\n wrappedAssetMaster = wrapped_asset_master;\n }\n\n function submitVAA(\n bytes calldata vaa\n ) public {\n uint8 version = vaa.toUint8(0);\n require(version == 1, \"VAA version incompatible\");\n\n // Load 4 bytes starting from index 1\n uint32 vaa_guardian_set_index = vaa.toUint32(1);\n\n uint256 signature = vaa.toUint256(5);\n address sig_address = vaa.toAddress(37);\n\n // Load 4 bytes starting from index 77\n uint32 timestamp = vaa.toUint32(57);\n\n // Verify that the VAA is still valid\n require(timestamp + vaa_expiry > block.timestamp, \"VAA has expired\");\n\n // Hash the body\n bytes32 hash = keccak256(vaa.slice(57, vaa.length - 57));\n require(!consumedVAAs[hash], \"VAA was already executed\");\n\n GuardianSet memory guardian_set = guardian_sets[vaa_guardian_set_index];\n require(guardian_set.expiration_time == 0 || guardian_set.expiration_time > block.timestamp, \"guardian set has expired\");\n require(\n Schnorr.verifySignature(\n guardian_set.x,\n guardian_set.parity,\n signature,\n uint256(hash),\n sig_address\n ),\n \"VAA signature invalid\");\n\n uint8 action = vaa.toUint8(61);\n uint8 payload_len = vaa.toUint8(62);\n bytes memory payload = vaa.slice(63, payload_len);\n\n // Process VAA\n if (action == 0x01) {\n require(vaa_guardian_set_index == guardian_set_index, \"only the current guardian set can change the guardian set\");\n vaaUpdateGuardianSet(payload);\n } else if (action == 0x10) {\n vaaTransfer(payload);\n } else {\n revert(\"invalid VAA action\");\n }\n\n // Set the VAA as consumed\n consumedVAAs[hash] = true;\n }\n\n function vaaUpdateGuardianSet(bytes memory data) private {\n uint256 new_key_x = data.toUint25
2020-08-09 09:16:52 -07:00
"sourcePath": "/home/hhofstadt/Dev/certus/wormhole/ethereum/contracts/Wormhole.sol",
"ast": {
"absolutePath": "/home/hhofstadt/Dev/certus/wormhole/ethereum/contracts/Wormhole.sol",
"exportedSymbols": {
"WETH": [
2020-08-09 12:16:18 -07:00
1192
2020-08-09 09:16:52 -07:00
],
"Wormhole": [
2020-08-09 12:16:18 -07:00
1181
2020-08-09 09:16:52 -07:00
]
},
2020-08-09 12:16:18 -07:00
"id": 1193,
2020-08-09 09:16:52 -07:00
"license": "Apache 2",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 455,
"literals": [
"solidity",
"^",
"0.6",
".0"
],
"nodeType": "PragmaDirective",
"src": "64:23:2"
},
{
"id": 456,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "88:33:2"
},
{
"absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"id": 457,
"nodeType": "ImportDirective",
2020-08-09 12:16:18 -07:00
"scope": 1193,
"sourceUnit": 2034,
2020-08-09 09:16:52 -07:00
"src": "123:56:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
"id": 458,
"nodeType": "ImportDirective",
2020-08-09 12:16:18 -07:00
"scope": 1193,
"sourceUnit": 2247,
2020-08-09 09:16:52 -07:00
"src": "180:59:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
"file": "@openzeppelin/contracts/math/SafeMath.sol",
"id": 459,
"nodeType": "ImportDirective",
2020-08-09 12:16:18 -07:00
"scope": 1193,
"sourceUnit": 1956,
2020-08-09 09:16:52 -07:00
"src": "240:51:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/hhofstadt/Dev/certus/wormhole/ethereum/contracts/BytesLib.sol",
"file": "./BytesLib.sol",
"id": 460,
"nodeType": "ImportDirective",
2020-08-09 12:16:18 -07:00
"scope": 1193,
2020-08-09 09:16:52 -07:00
"sourceUnit": 334,
"src": "292:24:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/hhofstadt/Dev/certus/wormhole/ethereum/contracts/SchnorrSECP256K1.sol",
"file": "./SchnorrSECP256K1.sol",
"id": 461,
"nodeType": "ImportDirective",
2020-08-09 12:16:18 -07:00
"scope": 1193,
2020-08-09 09:16:52 -07:00
"sourceUnit": 454,
"src": "317:32:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/hhofstadt/Dev/certus/wormhole/ethereum/contracts/WrappedAsset.sol",
"file": "./WrappedAsset.sol",
"id": 462,
"nodeType": "ImportDirective",
2020-08-09 12:16:18 -07:00
"scope": 1193,
"sourceUnit": 1737,
2020-08-09 09:16:52 -07:00
"src": "350:28:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
2020-08-09 12:16:18 -07:00
"id": 1181,
2020-08-09 09:16:52 -07:00
"linearizedBaseContracts": [
2020-08-09 12:16:18 -07:00
1181
2020-08-09 09:16:52 -07:00
],
"name": "Wormhole",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 465,
"libraryName": {
"contractScope": null,
"id": 463,
"name": "SafeERC20",
"nodeType": "UserDefinedTypeName",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2246,
2020-08-09 09:16:52 -07:00
"src": "410:9:2",
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_SafeERC20_$2246",
2020-08-09 09:16:52 -07:00
"typeString": "library SafeERC20"
}
},
"nodeType": "UsingForDirective",
"src": "404:27:2",
"typeName": {
"contractScope": null,
"id": 464,
"name": "IERC20",
"nodeType": "UserDefinedTypeName",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2033,
2020-08-09 09:16:52 -07:00
"src": "424:6:2",
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_IERC20_$2033",
2020-08-09 09:16:52 -07:00
"typeString": "contract IERC20"
}
}
},
{
"id": 468,
"libraryName": {
"contractScope": null,
"id": 466,
"name": "BytesLib",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 333,
"src": "442:8:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BytesLib_$333",
"typeString": "library BytesLib"
}
},
"nodeType": "UsingForDirective",
"src": "436:25:2",
"typeName": {
"id": 467,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "455:5:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
}
},
{
"id": 471,
"libraryName": {
"contractScope": null,
"id": 469,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1955,
2020-08-09 09:16:52 -07:00
"src": "472:8:2",
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_SafeMath_$1955",
2020-08-09 09:16:52 -07:00
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "466:27:2",
"typeName": {
"id": 470,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "485:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": false,
"functionSelector": "99da1d3c",
"id": 473,
"mutability": "mutable",
"name": "wrappedAssetMaster",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
2020-08-09 09:16:52 -07:00
"src": "544:33:2",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 472,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "544:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 476,
"mutability": "mutable",
"name": "CHAIN_ID",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
2020-08-09 09:16:52 -07:00
"src": "612:18:2",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 474,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "612:5:2",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": {
"argumentTypes": null,
"hexValue": "32",
"id": 475,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "629:1:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"visibility": "internal"
},
{
"constant": true,
"id": 479,
"mutability": "constant",
"name": "WETHAddress",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
2020-08-09 09:16:52 -07:00
"src": "682:73:2",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 477,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "682:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": {
"argumentTypes": null,
"hexValue": "307843303261614133396232323346453844304130653543344632376541443930383343373536436332",
"id": 478,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "713:42:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"value": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
},
"visibility": "internal"
},
{
"canonicalName": "Wormhole.GuardianSet",
"id": 486,
"members": [
{
"constant": false,
"id": 481,
"mutability": "mutable",
"name": "x",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 486,
"src": "791:9:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 480,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "791:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 483,
"mutability": "mutable",
"name": "parity",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 486,
"src": "810:12:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 482,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "810:5:2",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 485,
"mutability": "mutable",
"name": "expiration_time",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 486,
"src": "832:22:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 484,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "832:6:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "GuardianSet",
"nodeType": "StructDefinition",
2020-08-09 12:16:18 -07:00
"scope": 1181,
2020-08-09 09:16:52 -07:00
"src": "762:99:2",
"visibility": "public"
},
{
"anonymous": false,
"documentation": null,
"id": 492,
"name": "LogGuardianSetChanged",
"nodeType": "EventDefinition",
"parameters": {
"id": 491,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 488,
"indexed": true,
"mutability": "mutable",
"name": "oldGuardian",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 492,
"src": "904:31:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
"id": 487,
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 486,
"src": "904:11:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 490,
"indexed": true,
"mutability": "mutable",
"name": "newGuardian",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 492,
"src": "945:31:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
"id": 489,
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 486,
"src": "945:11:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "894:88:2"
},
"src": "867:116:2"
},
{
"anonymous": false,
"documentation": null,
"id": 506,
"name": "LogTokensLocked",
"nodeType": "EventDefinition",
"parameters": {
"id": 505,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 494,
"indexed": false,
"mutability": "mutable",
"name": "target_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 506,
"src": "1020:18:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 493,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1020:5:2",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 496,
"indexed": false,
"mutability": "mutable",
"name": "token_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 506,
"src": "1048:17:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 495,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1048:5:2",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 498,
"indexed": true,
"mutability": "mutable",
"name": "token",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 506,
"src": "1075:21:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 497,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1075:7:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 500,
"indexed": true,
"mutability": "mutable",
"name": "sender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 506,
"src": "1106:22:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 499,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1106:7:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 502,
"indexed": false,
"mutability": "mutable",
"name": "recipient",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 506,
"src": "1138:17:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 501,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1138:7:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 504,
"indexed": false,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 506,
"src": "1165:14:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 503,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1165:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1010:175:2"
},
"src": "989:197:2"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"functionSelector": "42b0aefa",
"id": 510,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "guardian_sets",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1245:51:2",
2020-08-09 09:16:52 -07:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 509,
2020-08-09 09:16:52 -07:00
"keyType": {
2020-08-09 12:16:18 -07:00
"id": 507,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1253:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Mapping",
2020-08-09 12:16:18 -07:00
"src": "1245:30:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet)"
},
"valueType": {
"contractScope": null,
2020-08-09 12:16:18 -07:00
"id": 508,
2020-08-09 09:16:52 -07:00
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 486,
2020-08-09 12:16:18 -07:00
"src": "1263:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
}
},
"value": null,
2020-08-09 12:16:18 -07:00
"visibility": "public"
2020-08-09 09:16:52 -07:00
},
{
"constant": false,
"functionSelector": "822d82b3",
2020-08-09 12:16:18 -07:00
"id": 512,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "guardian_set_index",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1337:32:2",
2020-08-09 09:16:52 -07:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 511,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1337:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "7f04d9e6",
2020-08-09 12:16:18 -07:00
"id": 514,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "vaa_expiry",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1427:24:2",
2020-08-09 09:16:52 -07:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 513,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1427:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 518,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "consumedVAAs",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1497:37:2",
2020-08-09 09:16:52 -07:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 517,
2020-08-09 09:16:52 -07:00
"keyType": {
2020-08-09 12:16:18 -07:00
"id": 515,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1505:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
2020-08-09 12:16:18 -07:00
"src": "1497:24:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"valueType": {
2020-08-09 12:16:18 -07:00
"id": 516,
2020-08-09 09:16:52 -07:00
"name": "bool",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1516:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"functionSelector": "b6694c2a",
"id": 522,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "wrappedAssets",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1589:48:2",
2020-08-09 09:16:52 -07:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 521,
2020-08-09 09:16:52 -07:00
"keyType": {
2020-08-09 12:16:18 -07:00
"id": 519,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1597:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
2020-08-09 12:16:18 -07:00
"src": "1589:27:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
},
"valueType": {
2020-08-09 12:16:18 -07:00
"id": 520,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1608:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
"value": null,
2020-08-09 12:16:18 -07:00
"visibility": "public"
2020-08-09 09:16:52 -07:00
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"functionSelector": "1a2be4da",
"id": 526,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "isWrappedAsset",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1643:46:2",
2020-08-09 09:16:52 -07:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 525,
2020-08-09 09:16:52 -07:00
"keyType": {
2020-08-09 12:16:18 -07:00
"id": 523,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1651:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
2020-08-09 12:16:18 -07:00
"src": "1643:24:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
2020-08-09 12:16:18 -07:00
"id": 524,
2020-08-09 09:16:52 -07:00
"name": "bool",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1662:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
2020-08-09 12:16:18 -07:00
"visibility": "public"
2020-08-09 09:16:52 -07:00
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 553,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "1806:217:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 539,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 535,
2020-08-09 09:16:52 -07:00
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 510,
"src": "1816:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
2020-08-09 12:16:18 -07:00
"id": 537,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 536,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "1830:1:2",
2020-08-09 09:16:52 -07:00
"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",
2020-08-09 12:16:18 -07:00
"src": "1816:16:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 538,
2020-08-09 09:16:52 -07:00
"name": "initial_guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 528,
"src": "1835:20:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
2020-08-09 12:16:18 -07:00
"src": "1816:39:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
2020-08-09 12:16:18 -07:00
"id": 540,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "1816:39:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 543,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 541,
2020-08-09 09:16:52 -07:00
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 512,
"src": "1908:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 542,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "1929:1:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
2020-08-09 12:16:18 -07:00
"src": "1908:22:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"id": 544,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "1908:22:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 547,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 545,
"name": "vaa_expiry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 514,
"src": "1940:10:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 546,
"name": "_vaa_expiry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 532,
"src": "1953:11:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "1940:24:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"id": 548,
"nodeType": "ExpressionStatement",
"src": "1940:24:2"
},
{
"expression": {
"argumentTypes": null,
"id": 551,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 549,
2020-08-09 09:16:52 -07:00
"name": "wrappedAssetMaster",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 473,
2020-08-09 12:16:18 -07:00
"src": "1975:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 550,
2020-08-09 09:16:52 -07:00
"name": "wrapped_asset_master",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 530,
"src": "1996:20:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2020-08-09 12:16:18 -07:00
"src": "1975:41:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2020-08-09 12:16:18 -07:00
"id": 552,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "1975:41:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
2020-08-09 12:16:18 -07:00
"id": 554,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 533,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 528,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "initial_guardian_set",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 554,
"src": "1708:39:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
2020-08-09 12:16:18 -07:00
"id": 527,
2020-08-09 09:16:52 -07:00
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 486,
2020-08-09 12:16:18 -07:00
"src": "1708:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 530,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "wrapped_asset_master",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 554,
"src": "1749:28:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 529,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1749:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
2020-08-09 12:16:18 -07:00
},
{
"constant": false,
"id": 532,
"mutability": "mutable",
"name": "_vaa_expiry",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 554,
"src": "1779:18:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 531,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "1779:6:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
2020-08-09 09:16:52 -07:00
}
],
2020-08-09 12:16:18 -07:00
"src": "1707:91:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 534,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "1806:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1696:327:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 727,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "2089:1737:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
560
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 560,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "version",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2099:13:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 559,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2099:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 565,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 563,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2127:1:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 561,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2115:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 562,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
2020-08-09 12:16:18 -07:00
"src": "2115:11:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 564,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2115:14:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2099:30:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
2020-08-09 12:16:18 -07:00
"id": 569,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 567,
2020-08-09 09:16:52 -07:00
"name": "version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 560,
"src": "2147:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
2020-08-09 12:16:18 -07:00
"id": 568,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2158:1:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
2020-08-09 12:16:18 -07:00
"src": "2147:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5641412076657273696f6e20696e636f6d70617469626c65",
2020-08-09 12:16:18 -07:00
"id": 570,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2161:26:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 566,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "2139:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 571,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2139:49:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 572,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "2139:49:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
574
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 574,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "vaa_guardian_set_index",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2245:29:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 573,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2245:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 579,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
2020-08-09 12:16:18 -07:00
"id": 577,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2290:1:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 575,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2277:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 576,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint32",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
2020-08-09 12:16:18 -07:00
"src": "2277:12:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 578,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2277:15:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2245:47:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
581
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 581,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "signature",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2303:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 580,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2303:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 586,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "35",
2020-08-09 12:16:18 -07:00
"id": 584,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2337:1:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 582,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2323:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 583,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint256",
"nodeType": "MemberAccess",
"referencedDeclaration": 271,
2020-08-09 12:16:18 -07:00
"src": "2323:13:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 585,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2323:16:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2303:36:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
588
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 588,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "sig_address",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2349:19:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 587,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2349:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 593,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3337",
2020-08-09 12:16:18 -07:00
"id": 591,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2385:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_37_by_1",
"typeString": "int_const 37"
},
"value": "37"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_37_by_1",
"typeString": "int_const 37"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 589,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2371:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 590,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 82,
2020-08-09 12:16:18 -07:00
"src": "2371:13:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 592,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2371:17:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2349:39:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
595
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 595,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "timestamp",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2446:16:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 594,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2446:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 600,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3537",
2020-08-09 12:16:18 -07:00
"id": 598,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2478:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_57_by_1",
"typeString": "int_const 57"
},
"value": "57"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_57_by_1",
"typeString": "int_const 57"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 596,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2465:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 597,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint32",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
2020-08-09 12:16:18 -07:00
"src": "2465:12:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 599,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2465:16:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2446:35:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
2020-08-09 12:16:18 -07:00
"id": 607,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
2020-08-09 12:16:18 -07:00
"id": 604,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 602,
2020-08-09 09:16:52 -07:00
"name": "timestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 595,
"src": "2546:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 603,
2020-08-09 09:16:52 -07:00
"name": "vaa_expiry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 514,
"src": "2558:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"src": "2546:22:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
2020-08-09 12:16:18 -07:00
"operator": ">",
2020-08-09 09:16:52 -07:00
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 605,
2020-08-09 09:16:52 -07:00
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
2020-08-09 12:16:18 -07:00
"src": "2571:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
2020-08-09 12:16:18 -07:00
"id": 606,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "2571:15:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
2020-08-09 12:16:18 -07:00
"src": "2546:40:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "564141206861732065787069726564",
2020-08-09 12:16:18 -07:00
"id": 608,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2588:17:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_716b6a367d262f21a121968c96e61557fe9c6281596966426b955d4c8c65cb86",
"typeString": "literal_string \"VAA has expired\""
},
"value": "VAA has expired"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_716b6a367d262f21a121968c96e61557fe9c6281596966426b955d4c8c65cb86",
"typeString": "literal_string \"VAA has expired\""
}
],
2020-08-09 12:16:18 -07:00
"id": 601,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "2538:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 609,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2538:68:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 610,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "2538:68:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
612
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 612,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "hash",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2642:12:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 611,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2642:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 623,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3537",
2020-08-09 12:16:18 -07:00
"id": 616,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2677:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_57_by_1",
"typeString": "int_const 57"
},
"value": "57"
},
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
2020-08-09 12:16:18 -07:00
"id": 620,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 617,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2681:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 618,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "2681:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3537",
2020-08-09 12:16:18 -07:00
"id": 619,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2694:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_57_by_1",
"typeString": "int_const 57"
},
"value": "57"
},
2020-08-09 12:16:18 -07:00
"src": "2681:15:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_57_by_1",
"typeString": "int_const 57"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 614,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2667:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 615,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "slice",
"nodeType": "MemberAccess",
"referencedDeclaration": 55,
2020-08-09 12:16:18 -07:00
"src": "2667:9:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 621,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2667:30:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
2020-08-09 12:16:18 -07:00
"id": 613,
2020-08-09 09:16:52 -07:00
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
2020-08-09 12:16:18 -07:00
"src": "2657:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
2020-08-09 12:16:18 -07:00
"id": 622,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2657:41:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2642:56:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 628,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
2020-08-09 12:16:18 -07:00
"src": "2716:19:2",
2020-08-09 09:16:52 -07:00
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 625,
2020-08-09 09:16:52 -07:00
"name": "consumedVAAs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 518,
"src": "2717:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
2020-08-09 12:16:18 -07:00
"id": 627,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 626,
2020-08-09 09:16:52 -07:00
"name": "hash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 612,
"src": "2730:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "2717:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5641412077617320616c7265616479206578656375746564",
2020-08-09 12:16:18 -07:00
"id": 629,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2737:26:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 624,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "2708:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 630,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2708:56:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 631,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "2708:56:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
633
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 633,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "guardian_set",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2775:31:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
2020-08-09 12:16:18 -07:00
"id": 632,
2020-08-09 09:16:52 -07:00
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 486,
2020-08-09 12:16:18 -07:00
"src": "2775:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 637,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 634,
2020-08-09 09:16:52 -07:00
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 510,
"src": "2809:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
2020-08-09 12:16:18 -07:00
"id": 636,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 635,
2020-08-09 09:16:52 -07:00
"name": "vaa_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 574,
"src": "2823:22:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "2809:37:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2775:71:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
2020-08-09 12:16:18 -07:00
"id": 648,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
2020-08-09 12:16:18 -07:00
"id": 642,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 639,
2020-08-09 09:16:52 -07:00
"name": "guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 633,
"src": "2864:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 640,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "expiration_time",
"nodeType": "MemberAccess",
"referencedDeclaration": 485,
2020-08-09 12:16:18 -07:00
"src": "2864:28:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 641,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2896:1:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
2020-08-09 12:16:18 -07:00
"src": "2864:33:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
2020-08-09 12:16:18 -07:00
"id": 647,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 643,
2020-08-09 09:16:52 -07:00
"name": "guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 633,
"src": "2901:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 644,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "expiration_time",
"nodeType": "MemberAccess",
"referencedDeclaration": 485,
2020-08-09 12:16:18 -07:00
"src": "2901:28:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 645,
2020-08-09 09:16:52 -07:00
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
2020-08-09 12:16:18 -07:00
"src": "2932:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
2020-08-09 12:16:18 -07:00
"id": 646,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "2932:15:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
2020-08-09 12:16:18 -07:00
"src": "2901:46:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
2020-08-09 12:16:18 -07:00
"src": "2864:83:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "677561726469616e20736574206861732065787069726564",
2020-08-09 12:16:18 -07:00
"id": 649,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2949:26:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 638,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "2856:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 650,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2856:120:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 651,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "2856:120:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 655,
2020-08-09 09:16:52 -07:00
"name": "guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 633,
"src": "3048:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 656,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "x",
"nodeType": "MemberAccess",
"referencedDeclaration": 481,
2020-08-09 12:16:18 -07:00
"src": "3048:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 657,
2020-08-09 09:16:52 -07:00
"name": "guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 633,
"src": "3080:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 658,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "parity",
"nodeType": "MemberAccess",
"referencedDeclaration": 483,
2020-08-09 12:16:18 -07:00
"src": "3080:19:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 659,
2020-08-09 09:16:52 -07:00
"name": "signature",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 581,
"src": "3117:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 662,
2020-08-09 09:16:52 -07:00
"name": "hash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 612,
"src": "3152:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
2020-08-09 12:16:18 -07:00
"id": 661,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "3144:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 660,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3144:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 663,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3144:13:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 664,
2020-08-09 09:16:52 -07:00
"name": "sig_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 588,
"src": "3175:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 653,
2020-08-09 09:16:52 -07:00
"name": "Schnorr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 453,
2020-08-09 12:16:18 -07:00
"src": "3007:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Schnorr_$453_$",
"typeString": "type(library Schnorr)"
}
},
2020-08-09 12:16:18 -07:00
"id": 654,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "verifySignature",
"nodeType": "MemberAccess",
"referencedDeclaration": 452,
2020-08-09 12:16:18 -07:00
"src": "3007:23:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_delegatecall_pure$_t_uint256_$_t_uint8_$_t_uint256_$_t_uint256_$_t_address_$returns$_t_bool_$",
"typeString": "function (uint256,uint8,uint256,uint256,address) pure returns (bool)"
}
},
2020-08-09 12:16:18 -07:00
"id": 665,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3007:193:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "564141207369676e617475726520696e76616c6964",
2020-08-09 12:16:18 -07:00
"id": 666,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3214:23:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 652,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "2986:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 667,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2986:252:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 668,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "2986:252:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
670
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 670,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "action",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "3249:12:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 669,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3249:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 675,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3631",
2020-08-09 12:16:18 -07:00
"id": 673,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3276:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_61_by_1",
"typeString": "int_const 61"
},
"value": "61"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_61_by_1",
"typeString": "int_const 61"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 671,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "3264:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 672,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
2020-08-09 12:16:18 -07:00
"src": "3264:11:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 674,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3264:15:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "3249:30:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
677
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 677,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "payload_len",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "3289:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 676,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3289:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 682,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3632",
2020-08-09 12:16:18 -07:00
"id": 680,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3321:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_62_by_1",
"typeString": "int_const 62"
},
"value": "62"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_62_by_1",
"typeString": "int_const 62"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 678,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "3309:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 679,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
2020-08-09 12:16:18 -07:00
"src": "3309:11:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 681,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3309:15:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "3289:35:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
684
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 684,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "payload",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "3334:20:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 683,
2020-08-09 09:16:52 -07:00
"name": "bytes",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3334:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 690,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3633",
2020-08-09 12:16:18 -07:00
"id": 687,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3367:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_63_by_1",
"typeString": "int_const 63"
},
"value": "63"
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 688,
2020-08-09 09:16:52 -07:00
"name": "payload_len",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 677,
"src": "3371:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_63_by_1",
"typeString": "int_const 63"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 685,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "3357:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 686,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "slice",
"nodeType": "MemberAccess",
"referencedDeclaration": 55,
2020-08-09 12:16:18 -07:00
"src": "3357:9:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 689,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3357:26:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "3334:49:2"
2020-08-09 09:16:52 -07:00
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
2020-08-09 12:16:18 -07:00
"id": 693,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 691,
2020-08-09 09:16:52 -07:00
"name": "action",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 670,
"src": "3421:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30783031",
2020-08-09 12:16:18 -07:00
"id": 692,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3431:4:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "0x01"
},
2020-08-09 12:16:18 -07:00
"src": "3421:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
2020-08-09 12:16:18 -07:00
"id": 708,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 706,
2020-08-09 09:16:52 -07:00
"name": "action",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 670,
"src": "3629:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30783130",
2020-08-09 12:16:18 -07:00
"id": 707,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3639:4:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "0x10"
},
2020-08-09 12:16:18 -07:00
"src": "3629:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
2020-08-09 12:16:18 -07:00
"id": 718,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "3696:53:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "696e76616c69642056414120616374696f6e",
2020-08-09 12:16:18 -07:00
"id": 715,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3717:20:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 714,
2020-08-09 09:16:52 -07:00
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
-19,
-19
],
"referencedDeclaration": -19,
2020-08-09 12:16:18 -07:00
"src": "3710:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 716,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3710:28:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 717,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "3710:28:2"
2020-08-09 09:16:52 -07:00
}
]
},
2020-08-09 12:16:18 -07:00
"id": 719,
2020-08-09 09:16:52 -07:00
"nodeType": "IfStatement",
2020-08-09 12:16:18 -07:00
"src": "3625:124:2",
2020-08-09 09:16:52 -07:00
"trueBody": {
2020-08-09 12:16:18 -07:00
"id": 713,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "3645:45:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 710,
2020-08-09 09:16:52 -07:00
"name": "payload",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 684,
"src": "3671:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
2020-08-09 12:16:18 -07:00
"id": 709,
2020-08-09 09:16:52 -07:00
"name": "vaaTransfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 949,
"src": "3659:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (bytes memory)"
}
},
2020-08-09 12:16:18 -07:00
"id": 711,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3659:20:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 712,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "3659:20:2"
2020-08-09 09:16:52 -07:00
}
]
}
},
2020-08-09 12:16:18 -07:00
"id": 720,
2020-08-09 09:16:52 -07:00
"nodeType": "IfStatement",
2020-08-09 12:16:18 -07:00
"src": "3417:332:2",
2020-08-09 09:16:52 -07:00
"trueBody": {
2020-08-09 12:16:18 -07:00
"id": 705,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "3437:182:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 697,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 695,
"name": "vaa_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 574,
"src": "3459:22:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 696,
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 512,
"src": "3485:18:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "3459:44:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6f6e6c79207468652063757272656e7420677561726469616e207365742063616e206368616e67652074686520677561726469616e20736574",
"id": 698,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3505:59:2",
"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": 694,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "3451:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 699,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3451:114:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 700,
"nodeType": "ExpressionStatement",
"src": "3451:114:2"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 702,
2020-08-09 09:16:52 -07:00
"name": "payload",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 684,
"src": "3600:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
2020-08-09 12:16:18 -07:00
"id": 701,
2020-08-09 09:16:52 -07:00
"name": "vaaUpdateGuardianSet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 822,
"src": "3579:20:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (bytes memory)"
}
},
2020-08-09 12:16:18 -07:00
"id": 703,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3579:29:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 704,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "3579:29:2"
2020-08-09 09:16:52 -07:00
}
]
}
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 725,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 721,
2020-08-09 09:16:52 -07:00
"name": "consumedVAAs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 518,
"src": "3794:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
2020-08-09 12:16:18 -07:00
"id": 723,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 722,
2020-08-09 09:16:52 -07:00
"name": "hash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 612,
"src": "3807:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "3794:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
2020-08-09 12:16:18 -07:00
"id": 724,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3815:4:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
2020-08-09 12:16:18 -07:00
"src": "3794:25:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
2020-08-09 12:16:18 -07:00
"id": 726,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "3794:25:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
"functionSelector": "3bc0aee6",
2020-08-09 12:16:18 -07:00
"id": 728,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "submitVAA",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 557,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 556,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "vaa",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 728,
"src": "2057:18:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 555,
2020-08-09 09:16:52 -07:00
"name": "bytes",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2057:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "2047:34:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 558,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "2089:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "2029:1797:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 821,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "3889:873:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
734
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 734,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "new_key_x",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 821,
"src": "3899:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 733,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3899:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 739,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 737,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3934:1:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 735,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 730,
"src": "3919:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 736,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint256",
"nodeType": "MemberAccess",
"referencedDeclaration": 271,
2020-08-09 12:16:18 -07:00
"src": "3919:14:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 738,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3919:17:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "3899:37:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
741
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 741,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
2020-08-09 12:16:18 -07:00
"name": "y_parity",
2020-08-09 09:16:52 -07:00
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 821,
"src": "3946:16:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 740,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3946:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 746,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3332",
2020-08-09 12:16:18 -07:00
"id": 744,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3978:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 742,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 730,
"src": "3965:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 743,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
2020-08-09 12:16:18 -07:00
"memberName": "toUint8",
2020-08-09 09:16:52 -07:00
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 109,
"src": "3965:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"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)"
2020-08-09 09:16:52 -07:00
}
},
2020-08-09 12:16:18 -07:00
"id": 745,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3965:16:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_uint8",
"typeString": "uint8"
2020-08-09 09:16:52 -07:00
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "3946:35:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
748
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 748,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "new_guardian_set_index",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 821,
"src": "3991:29:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 747,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3991:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 753,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"hexValue": "3333",
"id": 751,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "4037:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_rational_33_by_1",
"typeString": "int_const 33"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"value": "33"
2020-08-09 09:16:52 -07:00
}
],
"expression": {
"argumentTypes": [
{
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_rational_33_by_1",
"typeString": "int_const 33"
2020-08-09 09:16:52 -07:00
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 749,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 730,
"src": "4023:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 750,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint32",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
2020-08-09 12:16:18 -07:00
"src": "4023:13:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 752,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4023:17:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "3991:49:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
2020-08-09 12:16:18 -07:00
"id": 757,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 755,
2020-08-09 09:16:52 -07:00
"name": "new_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 748,
"src": "4059:22:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 756,
2020-08-09 09:16:52 -07:00
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 512,
"src": "4084:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"src": "4059:43:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e646578206f66206e657720677561726469616e20736574206d757374206265203e2063757272656e74",
2020-08-09 12:16:18 -07:00
"id": 758,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "4104:45:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_906a0f9350878de65dacfb23a6e8e903db110639fb839bf569ced494236848c8",
"typeString": "literal_string \"index of new guardian set must be > current\""
},
"value": "index of new guardian set must be > current"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_906a0f9350878de65dacfb23a6e8e903db110639fb839bf569ced494236848c8",
"typeString": "literal_string \"index of new guardian set must be > current\""
}
],
2020-08-09 12:16:18 -07:00
"id": 754,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "4051:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 759,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4051:99:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 760,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "4051:99:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
2020-08-09 12:16:18 -07:00
"id": 765,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 762,
2020-08-09 09:16:52 -07:00
"name": "new_key_x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 734,
"src": "4168:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 763,
2020-08-09 09:16:52 -07:00
"name": "Schnorr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 453,
2020-08-09 12:16:18 -07:00
"src": "4180:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Schnorr_$453_$",
"typeString": "type(library Schnorr)"
}
},
2020-08-09 12:16:18 -07:00
"id": 764,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "HALF_Q",
"nodeType": "MemberAccess",
"referencedDeclaration": 346,
2020-08-09 12:16:18 -07:00
"src": "4180:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
2020-08-09 12:16:18 -07:00
"src": "4168:26:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e76616c6964206b657920666f722066617374205363686e6f727220766572696669636174696f6e",
2020-08-09 12:16:18 -07:00
"id": 766,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "4196:43:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ad2abc16dac8cf88f3decb4180ebbab2f7006b83967f36fdb68b8d2df95c5160",
"typeString": "literal_string \"invalid key for fast Schnorr verification\""
},
"value": "invalid key for fast Schnorr verification"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_ad2abc16dac8cf88f3decb4180ebbab2f7006b83967f36fdb68b8d2df95c5160",
"typeString": "literal_string \"invalid key for fast Schnorr verification\""
}
],
2020-08-09 12:16:18 -07:00
"id": 761,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "4160:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 767,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4160:80:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 768,
"nodeType": "ExpressionStatement",
"src": "4160:80:2"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 772,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 770,
"name": "y_parity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 741,
"src": "4258:8:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 771,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4270:1:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "4258:13:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e76616c6964207920706172697479",
"id": 773,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4273:18:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4233cf3bcdde1caab54cb7e3337f4cce4e488f0e7c2711d64d9cdf67ee1ee175",
"typeString": "literal_string \"invalid y parity\""
},
"value": "invalid y parity"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4233cf3bcdde1caab54cb7e3337f4cce4e488f0e7c2711d64d9cdf67ee1ee175",
"typeString": "literal_string \"invalid y parity\""
}
],
"id": 769,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "4250:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 774,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4250:42:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 775,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "4250:42:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
777
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 777,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "old_guardian_set_index",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 821,
"src": "4303:29:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 776,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "4303:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 779,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 778,
2020-08-09 09:16:52 -07:00
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 512,
"src": "4335:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "4303:50:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 782,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 780,
2020-08-09 09:16:52 -07:00
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 512,
"src": "4363:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 781,
2020-08-09 09:16:52 -07:00
"name": "new_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 748,
"src": "4384:22:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"src": "4363:43:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"id": 783,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "4363:43:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
785
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 785,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "new_guardian_set",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 821,
"src": "4417:35:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
2020-08-09 12:16:18 -07:00
"id": 784,
2020-08-09 09:16:52 -07:00
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 486,
2020-08-09 12:16:18 -07:00
"src": "4417:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 794,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 787,
2020-08-09 09:16:52 -07:00
"name": "new_key_x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 734,
"src": "4467:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 790,
"name": "y_parity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 741,
"src": "4484:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
2020-08-09 12:16:18 -07:00
"id": 789,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "4478:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint8_$",
"typeString": "type(uint8)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 788,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "4478:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 791,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4478:15:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 792,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "4495:1:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
2020-08-09 12:16:18 -07:00
"id": 786,
2020-08-09 09:16:52 -07:00
"name": "GuardianSet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 486,
2020-08-09 12:16:18 -07:00
"src": "4455:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_GuardianSet_$486_storage_ptr_$",
"typeString": "type(struct Wormhole.GuardianSet storage pointer)"
}
},
2020-08-09 12:16:18 -07:00
"id": 793,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "structConstructorCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4455:42:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "4417:80:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 799,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 795,
2020-08-09 09:16:52 -07:00
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 510,
"src": "4507:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
2020-08-09 12:16:18 -07:00
"id": 797,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 796,
2020-08-09 09:16:52 -07:00
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 512,
"src": "4521:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "4507:33:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 798,
2020-08-09 09:16:52 -07:00
"name": "new_guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 785,
"src": "4543:16:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
2020-08-09 12:16:18 -07:00
"src": "4507:52:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
2020-08-09 12:16:18 -07:00
"id": 800,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "4507:52:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 812,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 801,
2020-08-09 09:16:52 -07:00
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 510,
"src": "4569:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
2020-08-09 12:16:18 -07:00
"id": 803,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 802,
2020-08-09 09:16:52 -07:00
"name": "old_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 777,
"src": "4583:22:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "4569:37:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
2020-08-09 12:16:18 -07:00
"id": 804,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "expiration_time",
"nodeType": "MemberAccess",
"referencedDeclaration": 485,
2020-08-09 12:16:18 -07:00
"src": "4569:53:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
2020-08-09 12:16:18 -07:00
"id": 811,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 807,
2020-08-09 09:16:52 -07:00
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
2020-08-09 12:16:18 -07:00
"src": "4632:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
2020-08-09 12:16:18 -07:00
"id": 808,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "4632:15:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
2020-08-09 12:16:18 -07:00
"id": 806,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "4625:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint32_$",
"typeString": "type(uint32)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 805,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "4625:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 809,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4625:23:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 810,
2020-08-09 09:16:52 -07:00
"name": "vaa_expiry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 514,
"src": "4651:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"src": "4625:36:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"src": "4569:92:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"id": 813,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "4569:92:2"
2020-08-09 09:16:52 -07:00
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 815,
2020-08-09 09:16:52 -07:00
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 510,
"src": "4699:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
2020-08-09 12:16:18 -07:00
"id": 817,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 816,
2020-08-09 09:16:52 -07:00
"name": "old_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 777,
"src": "4713:22:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "4699:37:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 818,
2020-08-09 09:16:52 -07:00
"name": "new_guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 785,
"src": "4738:16:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
},
{
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
],
2020-08-09 12:16:18 -07:00
"id": 814,
2020-08-09 09:16:52 -07:00
"name": "LogGuardianSetChanged",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 492,
2020-08-09 12:16:18 -07:00
"src": "4677:21:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_struct$_GuardianSet_$486_memory_ptr_$_t_struct$_GuardianSet_$486_memory_ptr_$returns$__$",
"typeString": "function (struct Wormhole.GuardianSet memory,struct Wormhole.GuardianSet memory)"
}
},
2020-08-09 12:16:18 -07:00
"id": 819,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4677:78:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 820,
2020-08-09 09:16:52 -07:00
"nodeType": "EmitStatement",
2020-08-09 12:16:18 -07:00
"src": "4672:83:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
2020-08-09 12:16:18 -07:00
"id": 822,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "vaaUpdateGuardianSet",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 731,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 730,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 822,
"src": "3862:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 729,
2020-08-09 09:16:52 -07:00
"name": "bytes",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3862:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "3861:19:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 732,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "3889:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "3832:930:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 948,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "4816:1325:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
828
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 828,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "source_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 948,
"src": "4869:18:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 827,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "4869:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 833,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "34",
2020-08-09 12:16:18 -07:00
"id": 831,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "4903:1:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 829,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "4890:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 830,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
2020-08-09 12:16:18 -07:00
"src": "4890:12:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 832,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4890:15:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "4869:36:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
835
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 835,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "target_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 948,
"src": "4916:18:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 834,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "4916:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 840,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "35",
2020-08-09 12:16:18 -07:00
"id": 838,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "4950:1:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 836,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "4937:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 837,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
2020-08-09 12:16:18 -07:00
"src": "4937:12:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 839,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4937:15:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "4916:36:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
842
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 842,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "target_address",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 948,
"src": "5071:22:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 841,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5071:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 849,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_50_by_1",
"typeString": "int_const 50"
},
2020-08-09 12:16:18 -07:00
"id": 847,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3338",
2020-08-09 12:16:18 -07:00
"id": 845,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5111:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_38_by_1",
"typeString": "int_const 38"
},
"value": "38"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3132",
2020-08-09 12:16:18 -07:00
"id": 846,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5116:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_12_by_1",
"typeString": "int_const 12"
},
"value": "12"
},
2020-08-09 12:16:18 -07:00
"src": "5111:7:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 843,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "5096:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 844,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 82,
2020-08-09 12:16:18 -07:00
"src": "5096:14:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 848,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5096:23:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "5071:48:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
851
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 851,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "token_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 948,
"src": "5130:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 850,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5130:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 856,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3730",
2020-08-09 12:16:18 -07:00
"id": 854,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5163:2:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 852,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "5150:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 853,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
2020-08-09 12:16:18 -07:00
"src": "5150:12:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 855,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5150:16:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "5130:36:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
858
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 858,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 948,
"src": "5230:14:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 857,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5230:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 863,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "313033",
2020-08-09 12:16:18 -07:00
"id": 861,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5262:3:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 859,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "5247:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 860,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint256",
"nodeType": "MemberAccess",
"referencedDeclaration": 271,
2020-08-09 12:16:18 -07:00
"src": "5247:14:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 862,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5247:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "5230:36:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
2020-08-09 12:16:18 -07:00
"id": 867,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 865,
2020-08-09 09:16:52 -07:00
"name": "source_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 828,
"src": "5285:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 866,
2020-08-09 09:16:52 -07:00
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 835,
"src": "5301:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
2020-08-09 12:16:18 -07:00
"src": "5285:28:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "73616d6520636861696e207472616e736665727320617265206e6f7420737570706f72746564",
2020-08-09 12:16:18 -07:00
"id": 868,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5315:40:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 864,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "5277:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 869,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5277:79:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 870,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "5277:79:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
2020-08-09 12:16:18 -07:00
"id": 874,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 872,
2020-08-09 09:16:52 -07:00
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 835,
"src": "5374:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 873,
2020-08-09 09:16:52 -07:00
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
2020-08-09 12:16:18 -07:00
"src": "5390:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
2020-08-09 12:16:18 -07:00
"src": "5374:24:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "7472616e73666572206d75737420626520696e636f6d696e67",
2020-08-09 12:16:18 -07:00
"id": 875,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5400:27:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 871,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "5366:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 876,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5366:62:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 877,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "5366:62:2"
2020-08-09 09:16:52 -07:00
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
2020-08-09 12:16:18 -07:00
"id": 880,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 878,
2020-08-09 09:16:52 -07:00
"name": "token_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 851,
"src": "5443:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 879,
2020-08-09 09:16:52 -07:00
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
2020-08-09 12:16:18 -07:00
"src": "5458:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
2020-08-09 12:16:18 -07:00
"src": "5443:23:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
2020-08-09 12:16:18 -07:00
"id": 946,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "5990:145:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
930
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 930,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "token_address",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 946,
"src": "6004:21:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 929,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6004:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 937,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_83_by_1",
"typeString": "int_const 83"
},
2020-08-09 12:16:18 -07:00
"id": 935,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3731",
2020-08-09 12:16:18 -07:00
"id": 933,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "6043:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_71_by_1",
"typeString": "int_const 71"
},
"value": "71"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3132",
2020-08-09 12:16:18 -07:00
"id": 934,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "6048:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_12_by_1",
"typeString": "int_const 12"
},
"value": "12"
},
2020-08-09 12:16:18 -07:00
"src": "6043:7:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 931,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "6028:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 932,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 82,
2020-08-09 12:16:18 -07:00
"src": "6028:14:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 936,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6028:23:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "6004:47:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 942,
2020-08-09 09:16:52 -07:00
"name": "target_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 842,
"src": "6101:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 943,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 858,
"src": "6117:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 939,
2020-08-09 09:16:52 -07:00
"name": "token_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 930,
"src": "6073:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 938,
2020-08-09 09:16:52 -07:00
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2033,
"src": "6066:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_IERC20_$2033_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract IERC20)"
}
},
2020-08-09 12:16:18 -07:00
"id": 940,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6066:21:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_IERC20_$2033",
2020-08-09 09:16:52 -07:00
"typeString": "contract IERC20"
}
},
2020-08-09 12:16:18 -07:00
"id": 941,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "safeTransfer",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2067,
"src": "6066:34:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$2033_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$2033_$",
2020-08-09 09:16:52 -07:00
"typeString": "function (contract IERC20,address,uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 944,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6066:58:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 945,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "6066:58:2"
2020-08-09 09:16:52 -07:00
}
]
},
2020-08-09 12:16:18 -07:00
"id": 947,
2020-08-09 09:16:52 -07:00
"nodeType": "IfStatement",
2020-08-09 12:16:18 -07:00
"src": "5439:696:2",
2020-08-09 09:16:52 -07:00
"trueBody": {
2020-08-09 12:16:18 -07:00
"id": 928,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "5468:516:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
882
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 882,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "token_address",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 928,
"src": "5482:21:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 881,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5482:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 887,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3731",
2020-08-09 12:16:18 -07:00
"id": 885,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5521:2:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 883,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "5506:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 884,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toBytes32",
"nodeType": "MemberAccess",
"referencedDeclaration": 298,
2020-08-09 12:16:18 -07:00
"src": "5506:14:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 886,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5506:18:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "5482:42:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
889
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 889,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "asset_id",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 928,
"src": "5538:16:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 888,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5538:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 897,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 893,
2020-08-09 09:16:52 -07:00
"name": "token_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 851,
"src": "5584:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 894,
2020-08-09 09:16:52 -07:00
"name": "token_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 882,
"src": "5597:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 891,
2020-08-09 09:16:52 -07:00
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -1,
2020-08-09 12:16:18 -07:00
"src": "5567:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
2020-08-09 12:16:18 -07:00
"id": 892,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodePacked",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "5567:16:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
"typeString": "function () pure returns (bytes memory)"
}
},
2020-08-09 12:16:18 -07:00
"id": 895,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5567:44:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
2020-08-09 12:16:18 -07:00
"id": 890,
2020-08-09 09:16:52 -07:00
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
2020-08-09 12:16:18 -07:00
"src": "5557:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
2020-08-09 12:16:18 -07:00
"id": 896,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5557:55:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "5538:74:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
899
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 899,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "wrapped_asset",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 928,
"src": "5704:21:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 898,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5704:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 903,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 900,
2020-08-09 09:16:52 -07:00
"name": "wrappedAssets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 522,
"src": "5728:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
}
},
2020-08-09 12:16:18 -07:00
"id": 902,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 901,
2020-08-09 09:16:52 -07:00
"name": "asset_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 889,
"src": "5742:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "5728:23:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "5704:47:2"
2020-08-09 09:16:52 -07:00
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
2020-08-09 12:16:18 -07:00
"id": 909,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 904,
2020-08-09 09:16:52 -07:00
"name": "wrapped_asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 899,
"src": "5769:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 907,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5794:1:2",
2020-08-09 09:16:52 -07:00
"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"
}
],
2020-08-09 12:16:18 -07:00
"id": 906,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "5786:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 905,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5786:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 908,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5786:10:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
2020-08-09 12:16:18 -07:00
"src": "5769:27:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
2020-08-09 12:16:18 -07:00
"id": 919,
2020-08-09 09:16:52 -07:00
"nodeType": "IfStatement",
2020-08-09 12:16:18 -07:00
"src": "5765:138:2",
2020-08-09 09:16:52 -07:00
"trueBody": {
2020-08-09 12:16:18 -07:00
"id": 918,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "5798:105:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 916,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 910,
2020-08-09 09:16:52 -07:00
"name": "wrapped_asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 899,
"src": "5816:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 912,
2020-08-09 09:16:52 -07:00
"name": "asset_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 889,
"src": "5851:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 913,
2020-08-09 09:16:52 -07:00
"name": "token_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 851,
"src": "5861:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 914,
2020-08-09 09:16:52 -07:00
"name": "token_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 882,
"src": "5874:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
2020-08-09 12:16:18 -07:00
"id": 911,
2020-08-09 09:16:52 -07:00
"name": "deployWrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 989,
"src": "5832:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint8_$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32,uint8,bytes32) returns (address)"
}
},
2020-08-09 12:16:18 -07:00
"id": 915,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5832:56:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2020-08-09 12:16:18 -07:00
"src": "5816:72:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2020-08-09 12:16:18 -07:00
"id": 917,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "5816:72:2"
2020-08-09 09:16:52 -07:00
}
]
}
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 924,
2020-08-09 09:16:52 -07:00
"name": "target_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 842,
"src": "5950:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 925,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 858,
"src": "5966:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 921,
2020-08-09 09:16:52 -07:00
"name": "wrapped_asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 899,
"src": "5930:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 920,
2020-08-09 09:16:52 -07:00
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1736,
"src": "5917:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$1736_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract WrappedAsset)"
}
},
2020-08-09 12:16:18 -07:00
"id": 922,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5917:27:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_WrappedAsset_$1736",
2020-08-09 09:16:52 -07:00
"typeString": "contract WrappedAsset"
}
},
2020-08-09 12:16:18 -07:00
"id": 923,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mint",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1274,
"src": "5917:32:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256) external"
}
},
2020-08-09 12:16:18 -07:00
"id": 926,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5917:56:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 927,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "5917:56:2"
2020-08-09 09:16:52 -07:00
}
]
}
}
]
},
"documentation": null,
2020-08-09 12:16:18 -07:00
"id": 949,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "vaaTransfer",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 825,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 824,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 949,
"src": "4789:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 823,
2020-08-09 09:16:52 -07:00
"name": "bytes",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "4789:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "4788:19:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 826,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "4816:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "4768:1373:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 988,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "6262:791:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
961
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 961,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "targetBytes",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 988,
"src": "6440:19:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes20",
"typeString": "bytes20"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 960,
2020-08-09 09:16:52 -07:00
"name": "bytes20",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6440:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes20",
"typeString": "bytes20"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 966,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 964,
2020-08-09 09:16:52 -07:00
"name": "wrappedAssetMaster",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 473,
2020-08-09 12:16:18 -07:00
"src": "6470:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 963,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "6462:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes20_$",
"typeString": "type(bytes20)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 962,
2020-08-09 09:16:52 -07:00
"name": "bytes20",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6462:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 965,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6462:27:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes20",
"typeString": "bytes20"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "6440:49:2"
2020-08-09 09:16:52 -07:00
},
{
"AST": {
"nodeType": "YulBlock",
2020-08-09 12:16:18 -07:00
"src": "6508:341:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"nodeType": "YulVariableDeclaration",
2020-08-09 12:16:18 -07:00
"src": "6522:24:2",
2020-08-09 09:16:52 -07:00
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6541:4:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0x40"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6535:5:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6535:11:2"
2020-08-09 09:16:52 -07:00
},
"variables": [
{
"name": "clone",
"nodeType": "YulTypedName",
2020-08-09 12:16:18 -07:00
"src": "6526:5:2",
2020-08-09 09:16:52 -07:00
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "clone",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6566:5:2"
2020-08-09 09:16:52 -07:00
},
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6573:66:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6559:6:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6559:81:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "6559:81:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "clone",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6664:5:2"
2020-08-09 09:16:52 -07:00
},
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6671:4:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0x14"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6660:3:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6660:16:2"
2020-08-09 09:16:52 -07:00
},
{
"name": "targetBytes",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6678:11:2"
2020-08-09 09:16:52 -07:00
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6653:6:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6653:37:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "6653:37:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "clone",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6714:5:2"
2020-08-09 09:16:52 -07:00
},
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6721:4:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0x28"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6710:3:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6710:16:2"
2020-08-09 09:16:52 -07:00
},
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6728:66:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6703:6:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6703:92:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "6703:92:2"
2020-08-09 09:16:52 -07:00
},
{
"nodeType": "YulAssignment",
2020-08-09 12:16:18 -07:00
"src": "6808:31:2",
2020-08-09 09:16:52 -07:00
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6824:1:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0"
},
{
"name": "clone",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6827:5:2"
2020-08-09 09:16:52 -07:00
},
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6834:4:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0x37"
}
],
"functionName": {
"name": "create",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6817:6:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6817:22:2"
2020-08-09 09:16:52 -07:00
},
"variableNames": [
{
"name": "asset",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6808:5:2"
2020-08-09 09:16:52 -07:00
}
]
}
]
},
"evmVersion": "istanbul",
"externalReferences": [
{
2020-08-09 12:16:18 -07:00
"declaration": 958,
2020-08-09 09:16:52 -07:00
"isOffset": false,
"isSlot": false,
2020-08-09 12:16:18 -07:00
"src": "6808:5:2",
2020-08-09 09:16:52 -07:00
"valueSize": 1
},
{
2020-08-09 12:16:18 -07:00
"declaration": 961,
2020-08-09 09:16:52 -07:00
"isOffset": false,
"isSlot": false,
2020-08-09 12:16:18 -07:00
"src": "6678:11:2",
2020-08-09 09:16:52 -07:00
"valueSize": 1
}
],
2020-08-09 12:16:18 -07:00
"id": 967,
2020-08-09 09:16:52 -07:00
"nodeType": "InlineAssembly",
2020-08-09 12:16:18 -07:00
"src": "6499:350:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 972,
2020-08-09 09:16:52 -07:00
"name": "token_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 953,
"src": "6918:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 973,
2020-08-09 09:16:52 -07:00
"name": "token_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 955,
"src": "6931:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 969,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 958,
"src": "6900:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 968,
2020-08-09 09:16:52 -07:00
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1736,
"src": "6887:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$1736_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract WrappedAsset)"
}
},
2020-08-09 12:16:18 -07:00
"id": 970,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6887:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_WrappedAsset_$1736",
2020-08-09 09:16:52 -07:00
"typeString": "contract WrappedAsset"
}
},
2020-08-09 12:16:18 -07:00
"id": 971,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1253,
"src": "6887:30:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint8_$_t_bytes32_$returns$__$",
"typeString": "function (uint8,bytes32) external"
}
},
2020-08-09 12:16:18 -07:00
"id": 974,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6887:58:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 975,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "6887:58:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 980,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 976,
2020-08-09 09:16:52 -07:00
"name": "wrappedAssets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 522,
"src": "6981:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
}
},
2020-08-09 12:16:18 -07:00
"id": 978,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 977,
2020-08-09 09:16:52 -07:00
"name": "seed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 951,
"src": "6995:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "6981:19:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 979,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 958,
"src": "7003:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2020-08-09 12:16:18 -07:00
"src": "6981:27:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2020-08-09 12:16:18 -07:00
"id": 981,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "6981:27:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 986,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 982,
2020-08-09 09:16:52 -07:00
"name": "isWrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 526,
"src": "7018:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
2020-08-09 12:16:18 -07:00
"id": 984,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 983,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 958,
"src": "7033:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "7018:21:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
2020-08-09 12:16:18 -07:00
"id": 985,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "7042:4:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
2020-08-09 12:16:18 -07:00
"src": "7018:28:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
2020-08-09 12:16:18 -07:00
"id": 987,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7018:28:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
2020-08-09 12:16:18 -07:00
"id": 989,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "deployWrappedAsset",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 956,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 951,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "seed",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 989,
"src": "6175:12:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 950,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6175:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 953,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "token_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 989,
"src": "6189:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 952,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6189:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 955,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "token_address",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 989,
"src": "6208:21:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 954,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6208:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "6174:56:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 959,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 958,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "asset",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 989,
"src": "6248:13:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 957,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6248:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "6247:15:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "6147:906:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 1115,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "7194:1027:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
2020-08-09 12:16:18 -07:00
"id": 1003,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1001,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 993,
"src": "7212:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 1002,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "7222:1:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
2020-08-09 12:16:18 -07:00
"src": "7212:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "616d6f756e74206d757374206e6f742062652030",
2020-08-09 12:16:18 -07:00
"id": 1004,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "7225:22:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c3143f59cb0e580c5873dd9b2860385487237680573a0afd40e8c0860e76a5d3",
"typeString": "literal_string \"amount must not be 0\""
},
"value": "amount must not be 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c3143f59cb0e580c5873dd9b2860385487237680573a0afd40e8c0860e76a5d3",
"typeString": "literal_string \"amount must not be 0\""
}
],
2020-08-09 12:16:18 -07:00
"id": 1000,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "7204:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 1005,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7204:44:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1006,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7204:44:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
1008
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1008,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "asset_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1115,
"src": "7259:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1007,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7259:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 1010,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1009,
2020-08-09 09:16:52 -07:00
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
2020-08-09 12:16:18 -07:00
"src": "7279:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "7259:28:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
1012
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1012,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "asset_address",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1115,
"src": "7297:21:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1011,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7297:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 1013,
2020-08-09 09:16:52 -07:00
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "7297:21:2"
2020-08-09 09:16:52 -07:00
},
{
"condition": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1014,
2020-08-09 09:16:52 -07:00
"name": "isWrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 526,
"src": "7332:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1016,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1015,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7347:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "7332:21:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
2020-08-09 12:16:18 -07:00
"id": 1097,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "7554:539:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
1044
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1044,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "balanceBefore",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1097,
"src": "7568:21:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1043,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7568:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 1054,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1051,
2020-08-09 09:16:52 -07:00
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
2020-08-09 12:16:18 -07:00
"src": "7624:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_Wormhole_$1181",
2020-08-09 09:16:52 -07:00
"typeString": "contract Wormhole"
}
}
],
"expression": {
"argumentTypes": [
{
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_Wormhole_$1181",
2020-08-09 09:16:52 -07:00
"typeString": "contract Wormhole"
}
],
2020-08-09 12:16:18 -07:00
"id": 1050,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "7616:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1049,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7616:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1052,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7616:13:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 1046,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7599:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1045,
2020-08-09 09:16:52 -07:00
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2033,
"src": "7592:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_IERC20_$2033_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract IERC20)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1047,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7592:13:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_IERC20_$2033",
2020-08-09 09:16:52 -07:00
"typeString": "contract IERC20"
}
},
2020-08-09 12:16:18 -07:00
"id": 1048,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1972,
"src": "7592:23:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1053,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7592:38:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "7568:62:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1059,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "7675:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1060,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "7675:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1063,
2020-08-09 09:16:52 -07:00
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
2020-08-09 12:16:18 -07:00
"src": "7695:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_Wormhole_$1181",
2020-08-09 09:16:52 -07:00
"typeString": "contract Wormhole"
}
}
],
"expression": {
"argumentTypes": [
{
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_Wormhole_$1181",
2020-08-09 09:16:52 -07:00
"typeString": "contract Wormhole"
}
],
2020-08-09 12:16:18 -07:00
"id": 1062,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "7687:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1061,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7687:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1064,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7687:13:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1065,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 993,
"src": "7702:6:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 1056,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7651:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1055,
2020-08-09 09:16:52 -07:00
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2033,
"src": "7644:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_IERC20_$2033_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract IERC20)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1057,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7644:13:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_IERC20_$2033",
2020-08-09 09:16:52 -07:00
"typeString": "contract IERC20"
}
},
2020-08-09 12:16:18 -07:00
"id": 1058,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "safeTransferFrom",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2092,
"src": "7644:30:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$2033_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$2033_$",
2020-08-09 09:16:52 -07:00
"typeString": "function (contract IERC20,address,address,uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1066,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7644:65:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1067,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7644:65:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
1069
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1069,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "balanceAfter",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1097,
"src": "7723:20:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1068,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7723:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 1079,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1076,
2020-08-09 09:16:52 -07:00
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
2020-08-09 12:16:18 -07:00
"src": "7778:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_Wormhole_$1181",
2020-08-09 09:16:52 -07:00
"typeString": "contract Wormhole"
}
}
],
"expression": {
"argumentTypes": [
{
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_Wormhole_$1181",
2020-08-09 09:16:52 -07:00
"typeString": "contract Wormhole"
}
],
2020-08-09 12:16:18 -07:00
"id": 1075,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "7770:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1074,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7770:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1077,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7770:13:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 1071,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7753:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1070,
2020-08-09 09:16:52 -07:00
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2033,
"src": "7746:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_IERC20_$2033_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract IERC20)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1072,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7746:13:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_IERC20_$2033",
2020-08-09 09:16:52 -07:00
"typeString": "contract IERC20"
}
},
2020-08-09 12:16:18 -07:00
"id": 1073,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1972,
"src": "7746:23:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1078,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7746:38:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "7723:61:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1085,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1080,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 993,
"src": "7989:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1083,
2020-08-09 09:16:52 -07:00
"name": "balanceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1044,
"src": "8015:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1081,
2020-08-09 09:16:52 -07:00
"name": "balanceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1069,
"src": "7998:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
2020-08-09 12:16:18 -07:00
"id": 1082,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1805,
"src": "7998:16:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1084,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7998:31:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
2020-08-09 12:16:18 -07:00
"src": "7989:40:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
2020-08-09 12:16:18 -07:00
"id": 1086,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7989:40:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1095,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1087,
2020-08-09 09:16:52 -07:00
"name": "asset_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1012,
"src": "8043:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1092,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "8075:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1091,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8067:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1090,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8067:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1093,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8067:14:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
2020-08-09 12:16:18 -07:00
"id": 1089,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8059:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1088,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8059:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1094,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8059:23:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
2020-08-09 12:16:18 -07:00
"src": "8043:39:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
2020-08-09 12:16:18 -07:00
"id": 1096,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "8043:39:2"
2020-08-09 09:16:52 -07:00
}
]
},
2020-08-09 12:16:18 -07:00
"id": 1098,
2020-08-09 09:16:52 -07:00
"nodeType": "IfStatement",
2020-08-09 12:16:18 -07:00
"src": "7328:765:2",
2020-08-09 09:16:52 -07:00
"trueBody": {
2020-08-09 12:16:18 -07:00
"id": 1042,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "7355:193:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1021,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "7394:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1022,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "7394:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1023,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 993,
"src": "7406:6:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 1018,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7382:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1017,
2020-08-09 09:16:52 -07:00
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1736,
"src": "7369:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$1736_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract WrappedAsset)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1019,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7369:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_WrappedAsset_$1736",
2020-08-09 09:16:52 -07:00
"typeString": "contract WrappedAsset"
}
},
2020-08-09 12:16:18 -07:00
"id": 1020,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "burn",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1295,
"src": "7369:24:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256) external"
}
},
2020-08-09 12:16:18 -07:00
"id": 1024,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7369:44:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1025,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7369:44:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1032,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1026,
2020-08-09 09:16:52 -07:00
"name": "asset_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1008,
"src": "7427:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1028,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7454:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1027,
2020-08-09 09:16:52 -07:00
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1736,
"src": "7441:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$1736_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract WrappedAsset)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1029,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7441:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_WrappedAsset_$1736",
2020-08-09 09:16:52 -07:00
"typeString": "contract WrappedAsset"
}
},
2020-08-09 12:16:18 -07:00
"id": 1030,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "assetChain",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1204,
"src": "7441:30:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
"typeString": "function () view external returns (uint8)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1031,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7441:32:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
2020-08-09 12:16:18 -07:00
"src": "7427:46:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
2020-08-09 12:16:18 -07:00
"id": 1033,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7427:46:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1040,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1034,
2020-08-09 09:16:52 -07:00
"name": "asset_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1012,
"src": "7487:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1036,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7516:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1035,
2020-08-09 09:16:52 -07:00
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1736,
"src": "7503:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$1736_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract WrappedAsset)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1037,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7503:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_WrappedAsset_$1736",
2020-08-09 09:16:52 -07:00
"typeString": "contract WrappedAsset"
}
},
2020-08-09 12:16:18 -07:00
"id": 1038,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "assetAddress",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1206,
"src": "7503:32:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_bytes32_$",
"typeString": "function () view external returns (bytes32)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1039,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7503:34:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
2020-08-09 12:16:18 -07:00
"src": "7487:50:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
2020-08-09 12:16:18 -07:00
"id": 1041,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7487:50:2"
2020-08-09 09:16:52 -07:00
}
]
}
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1100,
2020-08-09 09:16:52 -07:00
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 997,
"src": "8124:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1101,
2020-08-09 09:16:52 -07:00
"name": "asset_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1008,
"src": "8138:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_uint8",
"typeString": "uint8"
2020-08-09 09:16:52 -07:00
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1102,
"name": "asset_address",
2020-08-09 09:16:52 -07:00
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1012,
"src": "8151:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1107,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "8182:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1108,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "8182:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
2020-08-09 12:16:18 -07:00
"id": 1106,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8174:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1105,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8174:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1109,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8174:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
2020-08-09 12:16:18 -07:00
"id": 1104,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8166:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1103,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8166:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1110,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8166:28:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1111,
"name": "recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 995,
"src": "8196:9:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 1112,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 993,
"src": "8207:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"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"
}
],
2020-08-09 12:16:18 -07:00
"id": 1099,
2020-08-09 09:16:52 -07:00
"name": "LogTokensLocked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 506,
2020-08-09 12:16:18 -07:00
"src": "8108:15:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_uint256_$returns$__$",
"typeString": "function (uint8,uint8,bytes32,bytes32,bytes32,uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1113,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8108:106:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1114,
2020-08-09 09:16:52 -07:00
"nodeType": "EmitStatement",
2020-08-09 12:16:18 -07:00
"src": "8103:111:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
"functionSelector": "e66fd373",
2020-08-09 12:16:18 -07:00
"id": 1116,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "lockAssets",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 998,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 991,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "asset",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1116,
"src": "7088:13:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 990,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7088:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 993,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1116,
"src": "7111:14:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 992,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7111:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 995,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "recipient",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1116,
"src": "7135:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 994,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7135:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 997,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "target_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1116,
"src": "7162:18:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 996,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7162:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "7078:108:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 999,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "7194:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "7059:1162:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 1163,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "8320:323:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
2020-08-09 12:16:18 -07:00
"id": 1127,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1124,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "8338:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1125,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "8338:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 1126,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "8351:1:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
2020-08-09 12:16:18 -07:00
"src": "8338:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "616d6f756e74206d757374206e6f742062652030",
2020-08-09 12:16:18 -07:00
"id": 1128,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "8354:22:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c3143f59cb0e580c5873dd9b2860385487237680573a0afd40e8c0860e76a5d3",
"typeString": "literal_string \"amount must not be 0\""
},
"value": "amount must not be 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c3143f59cb0e580c5873dd9b2860385487237680573a0afd40e8c0860e76a5d3",
"typeString": "literal_string \"amount must not be 0\""
}
],
2020-08-09 12:16:18 -07:00
"id": 1123,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "8330:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 1129,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8330:47:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1130,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "8330:47:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1132,
2020-08-09 09:16:52 -07:00
"name": "WETHAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 479,
2020-08-09 12:16:18 -07:00
"src": "8426:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1131,
2020-08-09 09:16:52 -07:00
"name": "WETH",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1192,
"src": "8421:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_WETH_$1192_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract WETH)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1133,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8421:17:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_WETH_$1192",
2020-08-09 09:16:52 -07:00
"typeString": "contract WETH"
}
},
2020-08-09 12:16:18 -07:00
"id": 1134,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "deposit",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1186,
"src": "8421:25:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_payable$__$returns$__$",
"typeString": "function () payable external"
}
},
2020-08-09 12:16:18 -07:00
"id": 1137,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"names": [
"value"
],
"nodeType": "FunctionCallOptions",
"options": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1135,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "8455:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1136,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "8455:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
2020-08-09 12:16:18 -07:00
"src": "8421:44:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_payable$__$returns$__$value",
"typeString": "function () payable external"
}
},
2020-08-09 12:16:18 -07:00
"id": 1138,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8421:46:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1139,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "8421:46:2"
2020-08-09 09:16:52 -07:00
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1141,
2020-08-09 09:16:52 -07:00
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1120,
"src": "8530:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1142,
2020-08-09 09:16:52 -07:00
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
2020-08-09 12:16:18 -07:00
"src": "8544:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1147,
2020-08-09 09:16:52 -07:00
"name": "WETHAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 479,
2020-08-09 12:16:18 -07:00
"src": "8570:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1146,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8562:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1145,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8562:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1148,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8562:20:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
2020-08-09 12:16:18 -07:00
"id": 1144,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8554:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1143,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8554:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1149,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8554:29:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1154,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "8601:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1155,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "8601:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
2020-08-09 12:16:18 -07:00
"id": 1153,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8593:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1152,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8593:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1156,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8593:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
2020-08-09 12:16:18 -07:00
"id": 1151,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8585:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1150,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8585:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1157,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8585:28:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
2020-08-09 12:16:18 -07:00
{
"argumentTypes": null,
"id": 1158,
"name": "recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1118,
"src": "8615:9:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
2020-08-09 09:16:52 -07:00
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1159,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "8626:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1160,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "8626:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"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"
}
],
2020-08-09 12:16:18 -07:00
"id": 1140,
2020-08-09 09:16:52 -07:00
"name": "LogTokensLocked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 506,
2020-08-09 12:16:18 -07:00
"src": "8514:15:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_uint256_$returns$__$",
"typeString": "function (uint8,uint8,bytes32,bytes32,bytes32,uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1161,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8514:122:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1162,
2020-08-09 09:16:52 -07:00
"nodeType": "EmitStatement",
2020-08-09 12:16:18 -07:00
"src": "8509:127:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
"functionSelector": "780e2183",
2020-08-09 12:16:18 -07:00
"id": 1164,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "lockETH",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 1121,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1118,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "recipient",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1164,
"src": "8253:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1117,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8253:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1120,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "target_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1164,
"src": "8280:18:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1119,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8280:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "8243:61:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 1122,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8320:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "8227:416:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "payable",
"virtual": false,
"visibility": "public"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 1171,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "8674:57:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61",
2020-08-09 12:16:18 -07:00
"id": 1168,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "8682:46:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 1167,
2020-08-09 09:16:52 -07:00
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
-19,
-19
],
"referencedDeclaration": -19,
2020-08-09 12:16:18 -07:00
"src": "8675:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 1169,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8675:54:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1170,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "8675:54:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
2020-08-09 12:16:18 -07:00
"id": 1172,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "fallback",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 1165,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8654:2:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 1166,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8674:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "8646:85:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 1179,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "8759:57:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61",
2020-08-09 12:16:18 -07:00
"id": 1176,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "8767:46:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 1175,
2020-08-09 09:16:52 -07:00
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
-19,
-19
],
"referencedDeclaration": -19,
2020-08-09 12:16:18 -07:00
"src": "8760:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 1177,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8760:54:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1178,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "8760:54:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
2020-08-09 12:16:18 -07:00
"id": 1180,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "receive",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 1173,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8739:2:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 1174,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8759:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "8732:84:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
}
],
2020-08-09 12:16:18 -07:00
"scope": 1193,
"src": "380:8438:2"
2020-08-09 09:16:52 -07:00
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
2020-08-09 12:16:18 -07:00
"id": 1182,
2020-08-09 09:16:52 -07:00
"name": "IERC20",
"nodeType": "UserDefinedTypeName",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2033,
"src": "8839:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_IERC20_$2033",
2020-08-09 09:16:52 -07:00
"typeString": "contract IERC20"
}
},
2020-08-09 12:16:18 -07:00
"id": 1183,
2020-08-09 09:16:52 -07:00
"nodeType": "InheritanceSpecifier",
2020-08-09 12:16:18 -07:00
"src": "8839:6:2"
2020-08-09 09:16:52 -07:00
}
],
"contractDependencies": [
2020-08-09 12:16:18 -07:00
2033
2020-08-09 09:16:52 -07:00
],
"contractKind": "interface",
"documentation": null,
"fullyImplemented": false,
2020-08-09 12:16:18 -07:00
"id": 1192,
2020-08-09 09:16:52 -07:00
"linearizedBaseContracts": [
2020-08-09 12:16:18 -07:00
1192,
2033
2020-08-09 09:16:52 -07:00
],
"name": "WETH",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": null,
"functionSelector": "d0e30db0",
2020-08-09 12:16:18 -07:00
"id": 1186,
2020-08-09 09:16:52 -07:00
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "deposit",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 1184,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8864:2:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 1185,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8883:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1192,
"src": "8848:36:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"functionSelector": "2e1a7d4d",
2020-08-09 12:16:18 -07:00
"id": 1191,
2020-08-09 09:16:52 -07:00
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "withdraw",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 1189,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1188,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1191,
"src": "8904:14:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1187,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8904:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "8903:16:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 1190,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8928:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1192,
"src": "8886:43:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
2020-08-09 12:16:18 -07:00
"scope": 1193,
"src": "8821:110:2"
2020-08-09 09:16:52 -07:00
}
],
2020-08-09 12:16:18 -07:00
"src": "64:8868:2"
2020-08-09 09:16:52 -07:00
},
"legacyAST": {
"absolutePath": "/home/hhofstadt/Dev/certus/wormhole/ethereum/contracts/Wormhole.sol",
"exportedSymbols": {
"WETH": [
2020-08-09 12:16:18 -07:00
1192
2020-08-09 09:16:52 -07:00
],
"Wormhole": [
2020-08-09 12:16:18 -07:00
1181
2020-08-09 09:16:52 -07:00
]
},
2020-08-09 12:16:18 -07:00
"id": 1193,
2020-08-09 09:16:52 -07:00
"license": "Apache 2",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 455,
"literals": [
"solidity",
"^",
"0.6",
".0"
],
"nodeType": "PragmaDirective",
"src": "64:23:2"
},
{
"id": 456,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "88:33:2"
},
{
"absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"id": 457,
"nodeType": "ImportDirective",
2020-08-09 12:16:18 -07:00
"scope": 1193,
"sourceUnit": 2034,
2020-08-09 09:16:52 -07:00
"src": "123:56:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
"id": 458,
"nodeType": "ImportDirective",
2020-08-09 12:16:18 -07:00
"scope": 1193,
"sourceUnit": 2247,
2020-08-09 09:16:52 -07:00
"src": "180:59:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
"file": "@openzeppelin/contracts/math/SafeMath.sol",
"id": 459,
"nodeType": "ImportDirective",
2020-08-09 12:16:18 -07:00
"scope": 1193,
"sourceUnit": 1956,
2020-08-09 09:16:52 -07:00
"src": "240:51:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/hhofstadt/Dev/certus/wormhole/ethereum/contracts/BytesLib.sol",
"file": "./BytesLib.sol",
"id": 460,
"nodeType": "ImportDirective",
2020-08-09 12:16:18 -07:00
"scope": 1193,
2020-08-09 09:16:52 -07:00
"sourceUnit": 334,
"src": "292:24:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/hhofstadt/Dev/certus/wormhole/ethereum/contracts/SchnorrSECP256K1.sol",
"file": "./SchnorrSECP256K1.sol",
"id": 461,
"nodeType": "ImportDirective",
2020-08-09 12:16:18 -07:00
"scope": 1193,
2020-08-09 09:16:52 -07:00
"sourceUnit": 454,
"src": "317:32:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/hhofstadt/Dev/certus/wormhole/ethereum/contracts/WrappedAsset.sol",
"file": "./WrappedAsset.sol",
"id": 462,
"nodeType": "ImportDirective",
2020-08-09 12:16:18 -07:00
"scope": 1193,
"sourceUnit": 1737,
2020-08-09 09:16:52 -07:00
"src": "350:28:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
2020-08-09 12:16:18 -07:00
"id": 1181,
2020-08-09 09:16:52 -07:00
"linearizedBaseContracts": [
2020-08-09 12:16:18 -07:00
1181
2020-08-09 09:16:52 -07:00
],
"name": "Wormhole",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 465,
"libraryName": {
"contractScope": null,
"id": 463,
"name": "SafeERC20",
"nodeType": "UserDefinedTypeName",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2246,
2020-08-09 09:16:52 -07:00
"src": "410:9:2",
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_SafeERC20_$2246",
2020-08-09 09:16:52 -07:00
"typeString": "library SafeERC20"
}
},
"nodeType": "UsingForDirective",
"src": "404:27:2",
"typeName": {
"contractScope": null,
"id": 464,
"name": "IERC20",
"nodeType": "UserDefinedTypeName",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2033,
2020-08-09 09:16:52 -07:00
"src": "424:6:2",
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_IERC20_$2033",
2020-08-09 09:16:52 -07:00
"typeString": "contract IERC20"
}
}
},
{
"id": 468,
"libraryName": {
"contractScope": null,
"id": 466,
"name": "BytesLib",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 333,
"src": "442:8:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BytesLib_$333",
"typeString": "library BytesLib"
}
},
"nodeType": "UsingForDirective",
"src": "436:25:2",
"typeName": {
"id": 467,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "455:5:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
}
},
{
"id": 471,
"libraryName": {
"contractScope": null,
"id": 469,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1955,
2020-08-09 09:16:52 -07:00
"src": "472:8:2",
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_SafeMath_$1955",
2020-08-09 09:16:52 -07:00
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "466:27:2",
"typeName": {
"id": 470,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "485:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": false,
"functionSelector": "99da1d3c",
"id": 473,
"mutability": "mutable",
"name": "wrappedAssetMaster",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
2020-08-09 09:16:52 -07:00
"src": "544:33:2",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 472,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "544:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 476,
"mutability": "mutable",
"name": "CHAIN_ID",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
2020-08-09 09:16:52 -07:00
"src": "612:18:2",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 474,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "612:5:2",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": {
"argumentTypes": null,
"hexValue": "32",
"id": 475,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "629:1:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"visibility": "internal"
},
{
"constant": true,
"id": 479,
"mutability": "constant",
"name": "WETHAddress",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
2020-08-09 09:16:52 -07:00
"src": "682:73:2",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 477,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "682:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": {
"argumentTypes": null,
"hexValue": "307843303261614133396232323346453844304130653543344632376541443930383343373536436332",
"id": 478,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "713:42:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"value": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
},
"visibility": "internal"
},
{
"canonicalName": "Wormhole.GuardianSet",
"id": 486,
"members": [
{
"constant": false,
"id": 481,
"mutability": "mutable",
"name": "x",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 486,
"src": "791:9:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 480,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "791:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 483,
"mutability": "mutable",
"name": "parity",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 486,
"src": "810:12:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 482,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "810:5:2",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 485,
"mutability": "mutable",
"name": "expiration_time",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 486,
"src": "832:22:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 484,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "832:6:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "GuardianSet",
"nodeType": "StructDefinition",
2020-08-09 12:16:18 -07:00
"scope": 1181,
2020-08-09 09:16:52 -07:00
"src": "762:99:2",
"visibility": "public"
},
{
"anonymous": false,
"documentation": null,
"id": 492,
"name": "LogGuardianSetChanged",
"nodeType": "EventDefinition",
"parameters": {
"id": 491,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 488,
"indexed": true,
"mutability": "mutable",
"name": "oldGuardian",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 492,
"src": "904:31:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
"id": 487,
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 486,
"src": "904:11:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 490,
"indexed": true,
"mutability": "mutable",
"name": "newGuardian",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 492,
"src": "945:31:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
"id": 489,
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 486,
"src": "945:11:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "894:88:2"
},
"src": "867:116:2"
},
{
"anonymous": false,
"documentation": null,
"id": 506,
"name": "LogTokensLocked",
"nodeType": "EventDefinition",
"parameters": {
"id": 505,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 494,
"indexed": false,
"mutability": "mutable",
"name": "target_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 506,
"src": "1020:18:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 493,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1020:5:2",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 496,
"indexed": false,
"mutability": "mutable",
"name": "token_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 506,
"src": "1048:17:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 495,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1048:5:2",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 498,
"indexed": true,
"mutability": "mutable",
"name": "token",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 506,
"src": "1075:21:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 497,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1075:7:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 500,
"indexed": true,
"mutability": "mutable",
"name": "sender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 506,
"src": "1106:22:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 499,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1106:7:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 502,
"indexed": false,
"mutability": "mutable",
"name": "recipient",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 506,
"src": "1138:17:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 501,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1138:7:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 504,
"indexed": false,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 506,
"src": "1165:14:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 503,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1165:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1010:175:2"
},
"src": "989:197:2"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"functionSelector": "42b0aefa",
"id": 510,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "guardian_sets",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1245:51:2",
2020-08-09 09:16:52 -07:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 509,
2020-08-09 09:16:52 -07:00
"keyType": {
2020-08-09 12:16:18 -07:00
"id": 507,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1253:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Mapping",
2020-08-09 12:16:18 -07:00
"src": "1245:30:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet)"
},
"valueType": {
"contractScope": null,
2020-08-09 12:16:18 -07:00
"id": 508,
2020-08-09 09:16:52 -07:00
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 486,
2020-08-09 12:16:18 -07:00
"src": "1263:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
}
},
"value": null,
2020-08-09 12:16:18 -07:00
"visibility": "public"
2020-08-09 09:16:52 -07:00
},
{
"constant": false,
"functionSelector": "822d82b3",
2020-08-09 12:16:18 -07:00
"id": 512,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "guardian_set_index",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1337:32:2",
2020-08-09 09:16:52 -07:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 511,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1337:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "7f04d9e6",
2020-08-09 12:16:18 -07:00
"id": 514,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "vaa_expiry",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1427:24:2",
2020-08-09 09:16:52 -07:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 513,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1427:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 518,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "consumedVAAs",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1497:37:2",
2020-08-09 09:16:52 -07:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 517,
2020-08-09 09:16:52 -07:00
"keyType": {
2020-08-09 12:16:18 -07:00
"id": 515,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1505:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
2020-08-09 12:16:18 -07:00
"src": "1497:24:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"valueType": {
2020-08-09 12:16:18 -07:00
"id": 516,
2020-08-09 09:16:52 -07:00
"name": "bool",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1516:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"functionSelector": "b6694c2a",
"id": 522,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "wrappedAssets",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1589:48:2",
2020-08-09 09:16:52 -07:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 521,
2020-08-09 09:16:52 -07:00
"keyType": {
2020-08-09 12:16:18 -07:00
"id": 519,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1597:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
2020-08-09 12:16:18 -07:00
"src": "1589:27:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
},
"valueType": {
2020-08-09 12:16:18 -07:00
"id": 520,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1608:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
"value": null,
2020-08-09 12:16:18 -07:00
"visibility": "public"
2020-08-09 09:16:52 -07:00
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"functionSelector": "1a2be4da",
"id": 526,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "isWrappedAsset",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1643:46:2",
2020-08-09 09:16:52 -07:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 525,
2020-08-09 09:16:52 -07:00
"keyType": {
2020-08-09 12:16:18 -07:00
"id": 523,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1651:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
2020-08-09 12:16:18 -07:00
"src": "1643:24:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
2020-08-09 12:16:18 -07:00
"id": 524,
2020-08-09 09:16:52 -07:00
"name": "bool",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1662:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
2020-08-09 12:16:18 -07:00
"visibility": "public"
2020-08-09 09:16:52 -07:00
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 553,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "1806:217:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 539,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 535,
2020-08-09 09:16:52 -07:00
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 510,
"src": "1816:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
2020-08-09 12:16:18 -07:00
"id": 537,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 536,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "1830:1:2",
2020-08-09 09:16:52 -07:00
"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",
2020-08-09 12:16:18 -07:00
"src": "1816:16:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 538,
2020-08-09 09:16:52 -07:00
"name": "initial_guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 528,
"src": "1835:20:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
2020-08-09 12:16:18 -07:00
"src": "1816:39:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
2020-08-09 12:16:18 -07:00
"id": 540,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "1816:39:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 543,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 541,
2020-08-09 09:16:52 -07:00
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 512,
"src": "1908:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 542,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "1929:1:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1908:22:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"id": 544,
"nodeType": "ExpressionStatement",
"src": "1908:22:2"
},
{
"expression": {
"argumentTypes": null,
"id": 547,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 545,
"name": "vaa_expiry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 514,
"src": "1940:10:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 546,
"name": "_vaa_expiry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 532,
"src": "1953:11:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"src": "1940:24:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"id": 548,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "1940:24:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 551,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 549,
2020-08-09 09:16:52 -07:00
"name": "wrappedAssetMaster",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 473,
2020-08-09 12:16:18 -07:00
"src": "1975:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 550,
2020-08-09 09:16:52 -07:00
"name": "wrapped_asset_master",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 530,
"src": "1996:20:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2020-08-09 12:16:18 -07:00
"src": "1975:41:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2020-08-09 12:16:18 -07:00
"id": 552,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "1975:41:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
2020-08-09 12:16:18 -07:00
"id": 554,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 533,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 528,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "initial_guardian_set",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 554,
"src": "1708:39:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
2020-08-09 12:16:18 -07:00
"id": 527,
2020-08-09 09:16:52 -07:00
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 486,
2020-08-09 12:16:18 -07:00
"src": "1708:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 530,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "wrapped_asset_master",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 554,
"src": "1749:28:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 529,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "1749:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
2020-08-09 12:16:18 -07:00
},
{
"constant": false,
"id": 532,
"mutability": "mutable",
"name": "_vaa_expiry",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 554,
"src": "1779:18:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 531,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "1779:6:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
2020-08-09 09:16:52 -07:00
}
],
2020-08-09 12:16:18 -07:00
"src": "1707:91:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 534,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "1806:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "1696:327:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 727,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "2089:1737:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
560
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 560,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "version",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2099:13:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 559,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2099:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 565,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 563,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2127:1:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 561,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2115:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 562,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
2020-08-09 12:16:18 -07:00
"src": "2115:11:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 564,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2115:14:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2099:30:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
2020-08-09 12:16:18 -07:00
"id": 569,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 567,
2020-08-09 09:16:52 -07:00
"name": "version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 560,
"src": "2147:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
2020-08-09 12:16:18 -07:00
"id": 568,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2158:1:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
2020-08-09 12:16:18 -07:00
"src": "2147:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5641412076657273696f6e20696e636f6d70617469626c65",
2020-08-09 12:16:18 -07:00
"id": 570,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2161:26:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 566,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "2139:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 571,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2139:49:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 572,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "2139:49:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
574
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 574,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "vaa_guardian_set_index",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2245:29:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 573,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2245:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 579,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
2020-08-09 12:16:18 -07:00
"id": 577,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2290:1:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 575,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2277:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 576,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint32",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
2020-08-09 12:16:18 -07:00
"src": "2277:12:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 578,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2277:15:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2245:47:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
581
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 581,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "signature",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2303:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 580,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2303:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 586,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "35",
2020-08-09 12:16:18 -07:00
"id": 584,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2337:1:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 582,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2323:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 583,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint256",
"nodeType": "MemberAccess",
"referencedDeclaration": 271,
2020-08-09 12:16:18 -07:00
"src": "2323:13:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 585,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2323:16:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2303:36:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
588
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 588,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "sig_address",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2349:19:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 587,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2349:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 593,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3337",
2020-08-09 12:16:18 -07:00
"id": 591,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2385:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_37_by_1",
"typeString": "int_const 37"
},
"value": "37"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_37_by_1",
"typeString": "int_const 37"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 589,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2371:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 590,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 82,
2020-08-09 12:16:18 -07:00
"src": "2371:13:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 592,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2371:17:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2349:39:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
595
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 595,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "timestamp",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2446:16:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 594,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2446:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 600,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3537",
2020-08-09 12:16:18 -07:00
"id": 598,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2478:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_57_by_1",
"typeString": "int_const 57"
},
"value": "57"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_57_by_1",
"typeString": "int_const 57"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 596,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2465:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 597,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint32",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
2020-08-09 12:16:18 -07:00
"src": "2465:12:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 599,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2465:16:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2446:35:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
2020-08-09 12:16:18 -07:00
"id": 607,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
2020-08-09 12:16:18 -07:00
"id": 604,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 602,
2020-08-09 09:16:52 -07:00
"name": "timestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 595,
"src": "2546:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 603,
2020-08-09 09:16:52 -07:00
"name": "vaa_expiry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 514,
"src": "2558:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"src": "2546:22:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
2020-08-09 12:16:18 -07:00
"operator": ">",
2020-08-09 09:16:52 -07:00
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 605,
2020-08-09 09:16:52 -07:00
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
2020-08-09 12:16:18 -07:00
"src": "2571:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
2020-08-09 12:16:18 -07:00
"id": 606,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "2571:15:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
2020-08-09 12:16:18 -07:00
"src": "2546:40:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "564141206861732065787069726564",
2020-08-09 12:16:18 -07:00
"id": 608,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2588:17:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_716b6a367d262f21a121968c96e61557fe9c6281596966426b955d4c8c65cb86",
"typeString": "literal_string \"VAA has expired\""
},
"value": "VAA has expired"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_716b6a367d262f21a121968c96e61557fe9c6281596966426b955d4c8c65cb86",
"typeString": "literal_string \"VAA has expired\""
}
],
2020-08-09 12:16:18 -07:00
"id": 601,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "2538:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 609,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2538:68:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 610,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "2538:68:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
612
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 612,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "hash",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2642:12:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 611,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2642:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 623,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3537",
2020-08-09 12:16:18 -07:00
"id": 616,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2677:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_57_by_1",
"typeString": "int_const 57"
},
"value": "57"
},
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
2020-08-09 12:16:18 -07:00
"id": 620,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 617,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2681:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 618,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "2681:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3537",
2020-08-09 12:16:18 -07:00
"id": 619,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2694:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_57_by_1",
"typeString": "int_const 57"
},
"value": "57"
},
2020-08-09 12:16:18 -07:00
"src": "2681:15:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_57_by_1",
"typeString": "int_const 57"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 614,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "2667:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 615,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "slice",
"nodeType": "MemberAccess",
"referencedDeclaration": 55,
2020-08-09 12:16:18 -07:00
"src": "2667:9:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 621,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2667:30:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
2020-08-09 12:16:18 -07:00
"id": 613,
2020-08-09 09:16:52 -07:00
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
2020-08-09 12:16:18 -07:00
"src": "2657:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
2020-08-09 12:16:18 -07:00
"id": 622,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2657:41:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2642:56:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 628,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
2020-08-09 12:16:18 -07:00
"src": "2716:19:2",
2020-08-09 09:16:52 -07:00
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 625,
2020-08-09 09:16:52 -07:00
"name": "consumedVAAs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 518,
"src": "2717:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
2020-08-09 12:16:18 -07:00
"id": 627,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 626,
2020-08-09 09:16:52 -07:00
"name": "hash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 612,
"src": "2730:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "2717:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5641412077617320616c7265616479206578656375746564",
2020-08-09 12:16:18 -07:00
"id": 629,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2737:26:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 624,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "2708:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 630,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2708:56:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 631,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "2708:56:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
633
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 633,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "guardian_set",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "2775:31:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
2020-08-09 12:16:18 -07:00
"id": 632,
2020-08-09 09:16:52 -07:00
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 486,
2020-08-09 12:16:18 -07:00
"src": "2775:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 637,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 634,
2020-08-09 09:16:52 -07:00
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 510,
"src": "2809:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
2020-08-09 12:16:18 -07:00
"id": 636,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 635,
2020-08-09 09:16:52 -07:00
"name": "vaa_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 574,
"src": "2823:22:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "2809:37:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "2775:71:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
2020-08-09 12:16:18 -07:00
"id": 648,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
2020-08-09 12:16:18 -07:00
"id": 642,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 639,
2020-08-09 09:16:52 -07:00
"name": "guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 633,
"src": "2864:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 640,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "expiration_time",
"nodeType": "MemberAccess",
"referencedDeclaration": 485,
2020-08-09 12:16:18 -07:00
"src": "2864:28:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 641,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2896:1:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
2020-08-09 12:16:18 -07:00
"src": "2864:33:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
2020-08-09 12:16:18 -07:00
"id": 647,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 643,
2020-08-09 09:16:52 -07:00
"name": "guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 633,
"src": "2901:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 644,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "expiration_time",
"nodeType": "MemberAccess",
"referencedDeclaration": 485,
2020-08-09 12:16:18 -07:00
"src": "2901:28:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 645,
2020-08-09 09:16:52 -07:00
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
2020-08-09 12:16:18 -07:00
"src": "2932:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
2020-08-09 12:16:18 -07:00
"id": 646,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "2932:15:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
2020-08-09 12:16:18 -07:00
"src": "2901:46:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
2020-08-09 12:16:18 -07:00
"src": "2864:83:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "677561726469616e20736574206861732065787069726564",
2020-08-09 12:16:18 -07:00
"id": 649,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "2949:26:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 638,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "2856:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 650,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2856:120:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 651,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "2856:120:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 655,
2020-08-09 09:16:52 -07:00
"name": "guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 633,
"src": "3048:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 656,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "x",
"nodeType": "MemberAccess",
"referencedDeclaration": 481,
2020-08-09 12:16:18 -07:00
"src": "3048:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 657,
2020-08-09 09:16:52 -07:00
"name": "guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 633,
"src": "3080:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 658,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "parity",
"nodeType": "MemberAccess",
"referencedDeclaration": 483,
2020-08-09 12:16:18 -07:00
"src": "3080:19:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 659,
2020-08-09 09:16:52 -07:00
"name": "signature",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 581,
"src": "3117:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 662,
2020-08-09 09:16:52 -07:00
"name": "hash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 612,
"src": "3152:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
2020-08-09 12:16:18 -07:00
"id": 661,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "3144:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 660,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3144:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 663,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3144:13:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 664,
2020-08-09 09:16:52 -07:00
"name": "sig_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 588,
"src": "3175:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 653,
2020-08-09 09:16:52 -07:00
"name": "Schnorr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 453,
2020-08-09 12:16:18 -07:00
"src": "3007:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Schnorr_$453_$",
"typeString": "type(library Schnorr)"
}
},
2020-08-09 12:16:18 -07:00
"id": 654,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "verifySignature",
"nodeType": "MemberAccess",
"referencedDeclaration": 452,
2020-08-09 12:16:18 -07:00
"src": "3007:23:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_delegatecall_pure$_t_uint256_$_t_uint8_$_t_uint256_$_t_uint256_$_t_address_$returns$_t_bool_$",
"typeString": "function (uint256,uint8,uint256,uint256,address) pure returns (bool)"
}
},
2020-08-09 12:16:18 -07:00
"id": 665,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3007:193:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "564141207369676e617475726520696e76616c6964",
2020-08-09 12:16:18 -07:00
"id": 666,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3214:23:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 652,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "2986:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 667,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "2986:252:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 668,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "2986:252:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
670
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 670,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "action",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "3249:12:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 669,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3249:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 675,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3631",
2020-08-09 12:16:18 -07:00
"id": 673,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3276:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_61_by_1",
"typeString": "int_const 61"
},
"value": "61"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_61_by_1",
"typeString": "int_const 61"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 671,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "3264:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 672,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
2020-08-09 12:16:18 -07:00
"src": "3264:11:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 674,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3264:15:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "3249:30:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
677
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 677,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "payload_len",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "3289:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 676,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3289:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 682,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3632",
2020-08-09 12:16:18 -07:00
"id": 680,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3321:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_62_by_1",
"typeString": "int_const 62"
},
"value": "62"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_62_by_1",
"typeString": "int_const 62"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 678,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "3309:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 679,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
2020-08-09 12:16:18 -07:00
"src": "3309:11:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 681,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3309:15:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "3289:35:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
684
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 684,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "payload",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 727,
"src": "3334:20:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 683,
2020-08-09 09:16:52 -07:00
"name": "bytes",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3334:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 690,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3633",
2020-08-09 12:16:18 -07:00
"id": 687,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3367:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_63_by_1",
"typeString": "int_const 63"
},
"value": "63"
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 688,
2020-08-09 09:16:52 -07:00
"name": "payload_len",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 677,
"src": "3371:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_63_by_1",
"typeString": "int_const 63"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 685,
2020-08-09 09:16:52 -07:00
"name": "vaa",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 556,
"src": "3357:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
2020-08-09 12:16:18 -07:00
"id": 686,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "slice",
"nodeType": "MemberAccess",
"referencedDeclaration": 55,
2020-08-09 12:16:18 -07:00
"src": "3357:9:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 689,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3357:26:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "3334:49:2"
2020-08-09 09:16:52 -07:00
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
2020-08-09 12:16:18 -07:00
"id": 693,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 691,
2020-08-09 09:16:52 -07:00
"name": "action",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 670,
"src": "3421:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30783031",
2020-08-09 12:16:18 -07:00
"id": 692,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3431:4:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "0x01"
},
2020-08-09 12:16:18 -07:00
"src": "3421:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
2020-08-09 12:16:18 -07:00
"id": 708,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 706,
2020-08-09 09:16:52 -07:00
"name": "action",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 670,
"src": "3629:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30783130",
2020-08-09 12:16:18 -07:00
"id": 707,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3639:4:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "0x10"
},
2020-08-09 12:16:18 -07:00
"src": "3629:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
2020-08-09 12:16:18 -07:00
"id": 718,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "3696:53:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "696e76616c69642056414120616374696f6e",
2020-08-09 12:16:18 -07:00
"id": 715,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3717:20:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 714,
2020-08-09 09:16:52 -07:00
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
-19,
-19
],
"referencedDeclaration": -19,
2020-08-09 12:16:18 -07:00
"src": "3710:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 716,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3710:28:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 717,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "3710:28:2"
2020-08-09 09:16:52 -07:00
}
]
},
2020-08-09 12:16:18 -07:00
"id": 719,
2020-08-09 09:16:52 -07:00
"nodeType": "IfStatement",
2020-08-09 12:16:18 -07:00
"src": "3625:124:2",
2020-08-09 09:16:52 -07:00
"trueBody": {
2020-08-09 12:16:18 -07:00
"id": 713,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "3645:45:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 710,
2020-08-09 09:16:52 -07:00
"name": "payload",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 684,
"src": "3671:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
2020-08-09 12:16:18 -07:00
"id": 709,
2020-08-09 09:16:52 -07:00
"name": "vaaTransfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 949,
"src": "3659:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (bytes memory)"
}
},
2020-08-09 12:16:18 -07:00
"id": 711,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3659:20:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 712,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "3659:20:2"
2020-08-09 09:16:52 -07:00
}
]
}
},
2020-08-09 12:16:18 -07:00
"id": 720,
2020-08-09 09:16:52 -07:00
"nodeType": "IfStatement",
2020-08-09 12:16:18 -07:00
"src": "3417:332:2",
2020-08-09 09:16:52 -07:00
"trueBody": {
2020-08-09 12:16:18 -07:00
"id": 705,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "3437:182:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 697,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 695,
"name": "vaa_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 574,
"src": "3459:22:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 696,
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 512,
"src": "3485:18:2",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "3459:44:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6f6e6c79207468652063757272656e7420677561726469616e207365742063616e206368616e67652074686520677561726469616e20736574",
"id": 698,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3505:59:2",
"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": 694,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "3451:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 699,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3451:114:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 700,
"nodeType": "ExpressionStatement",
"src": "3451:114:2"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 702,
2020-08-09 09:16:52 -07:00
"name": "payload",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 684,
"src": "3600:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
2020-08-09 12:16:18 -07:00
"id": 701,
2020-08-09 09:16:52 -07:00
"name": "vaaUpdateGuardianSet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 822,
"src": "3579:20:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (bytes memory)"
}
},
2020-08-09 12:16:18 -07:00
"id": 703,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3579:29:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 704,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "3579:29:2"
2020-08-09 09:16:52 -07:00
}
]
}
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 725,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 721,
2020-08-09 09:16:52 -07:00
"name": "consumedVAAs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 518,
"src": "3794:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
2020-08-09 12:16:18 -07:00
"id": 723,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 722,
2020-08-09 09:16:52 -07:00
"name": "hash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 612,
"src": "3807:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "3794:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
2020-08-09 12:16:18 -07:00
"id": 724,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3815:4:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
2020-08-09 12:16:18 -07:00
"src": "3794:25:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
2020-08-09 12:16:18 -07:00
"id": 726,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "3794:25:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
"functionSelector": "3bc0aee6",
2020-08-09 12:16:18 -07:00
"id": 728,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "submitVAA",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 557,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 556,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "vaa",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 728,
"src": "2057:18:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 555,
2020-08-09 09:16:52 -07:00
"name": "bytes",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "2057:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "2047:34:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 558,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "2089:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "2029:1797:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 821,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "3889:873:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
734
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 734,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "new_key_x",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 821,
"src": "3899:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 733,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3899:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 739,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 737,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3934:1:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 735,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 730,
"src": "3919:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 736,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint256",
"nodeType": "MemberAccess",
"referencedDeclaration": 271,
2020-08-09 12:16:18 -07:00
"src": "3919:14:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 738,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3919:17:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "3899:37:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
741
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 741,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
2020-08-09 12:16:18 -07:00
"name": "y_parity",
2020-08-09 09:16:52 -07:00
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 821,
"src": "3946:16:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 740,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3946:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 746,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3332",
2020-08-09 12:16:18 -07:00
"id": 744,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "3978:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 742,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 730,
"src": "3965:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 743,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
2020-08-09 12:16:18 -07:00
"memberName": "toUint8",
2020-08-09 09:16:52 -07:00
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 109,
"src": "3965:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"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)"
2020-08-09 09:16:52 -07:00
}
},
2020-08-09 12:16:18 -07:00
"id": 745,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "3965:16:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_uint8",
"typeString": "uint8"
2020-08-09 09:16:52 -07:00
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "3946:35:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
748
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 748,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "new_guardian_set_index",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 821,
"src": "3991:29:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 747,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3991:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 753,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"hexValue": "3333",
"id": 751,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "4037:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_rational_33_by_1",
"typeString": "int_const 33"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"value": "33"
2020-08-09 09:16:52 -07:00
}
],
"expression": {
"argumentTypes": [
{
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_rational_33_by_1",
"typeString": "int_const 33"
2020-08-09 09:16:52 -07:00
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 749,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 730,
"src": "4023:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 750,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint32",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
2020-08-09 12:16:18 -07:00
"src": "4023:13:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 752,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4023:17:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "3991:49:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
2020-08-09 12:16:18 -07:00
"id": 757,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 755,
2020-08-09 09:16:52 -07:00
"name": "new_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 748,
"src": "4059:22:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 756,
2020-08-09 09:16:52 -07:00
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 512,
"src": "4084:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"src": "4059:43:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e646578206f66206e657720677561726469616e20736574206d757374206265203e2063757272656e74",
2020-08-09 12:16:18 -07:00
"id": 758,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "4104:45:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_906a0f9350878de65dacfb23a6e8e903db110639fb839bf569ced494236848c8",
"typeString": "literal_string \"index of new guardian set must be > current\""
},
"value": "index of new guardian set must be > current"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_906a0f9350878de65dacfb23a6e8e903db110639fb839bf569ced494236848c8",
"typeString": "literal_string \"index of new guardian set must be > current\""
}
],
2020-08-09 12:16:18 -07:00
"id": 754,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "4051:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 759,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4051:99:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 760,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "4051:99:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
2020-08-09 12:16:18 -07:00
"id": 765,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 762,
2020-08-09 09:16:52 -07:00
"name": "new_key_x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 734,
"src": "4168:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 763,
2020-08-09 09:16:52 -07:00
"name": "Schnorr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 453,
2020-08-09 12:16:18 -07:00
"src": "4180:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Schnorr_$453_$",
"typeString": "type(library Schnorr)"
}
},
2020-08-09 12:16:18 -07:00
"id": 764,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "HALF_Q",
"nodeType": "MemberAccess",
"referencedDeclaration": 346,
2020-08-09 12:16:18 -07:00
"src": "4180:14:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4168:26:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e76616c6964206b657920666f722066617374205363686e6f727220766572696669636174696f6e",
"id": 766,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4196:43:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ad2abc16dac8cf88f3decb4180ebbab2f7006b83967f36fdb68b8d2df95c5160",
"typeString": "literal_string \"invalid key for fast Schnorr verification\""
},
"value": "invalid key for fast Schnorr verification"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_ad2abc16dac8cf88f3decb4180ebbab2f7006b83967f36fdb68b8d2df95c5160",
"typeString": "literal_string \"invalid key for fast Schnorr verification\""
}
],
"id": 761,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "4160:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 767,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4160:80:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 768,
"nodeType": "ExpressionStatement",
"src": "4160:80:2"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 772,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 770,
"name": "y_parity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 741,
"src": "4258:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
2020-08-09 12:16:18 -07:00
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 771,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4270:1:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "4258:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"hexValue": "696e76616c6964207920706172697479",
"id": 773,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "4273:18:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_stringliteral_4233cf3bcdde1caab54cb7e3337f4cce4e488f0e7c2711d64d9cdf67ee1ee175",
"typeString": "literal_string \"invalid y parity\""
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"value": "invalid y parity"
2020-08-09 09:16:52 -07:00
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_stringliteral_4233cf3bcdde1caab54cb7e3337f4cce4e488f0e7c2711d64d9cdf67ee1ee175",
"typeString": "literal_string \"invalid y parity\""
2020-08-09 09:16:52 -07:00
}
],
2020-08-09 12:16:18 -07:00
"id": 769,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "4250:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 774,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4250:42:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 775,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "4250:42:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
777
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 777,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "old_guardian_set_index",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 821,
"src": "4303:29:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 776,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "4303:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 779,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 778,
2020-08-09 09:16:52 -07:00
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 512,
"src": "4335:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "4303:50:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 782,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 780,
2020-08-09 09:16:52 -07:00
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 512,
"src": "4363:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 781,
2020-08-09 09:16:52 -07:00
"name": "new_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 748,
"src": "4384:22:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"src": "4363:43:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"id": 783,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "4363:43:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
785
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 785,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "new_guardian_set",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 821,
"src": "4417:35:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet"
},
"typeName": {
"contractScope": null,
2020-08-09 12:16:18 -07:00
"id": 784,
2020-08-09 09:16:52 -07:00
"name": "GuardianSet",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 486,
2020-08-09 12:16:18 -07:00
"src": "4417:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage_ptr",
"typeString": "struct Wormhole.GuardianSet"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 794,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 787,
2020-08-09 09:16:52 -07:00
"name": "new_key_x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 734,
"src": "4467:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 790,
"name": "y_parity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 741,
"src": "4484:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
2020-08-09 12:16:18 -07:00
"id": 789,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "4478:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint8_$",
"typeString": "type(uint8)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 788,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "4478:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 791,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4478:15:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 792,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "4495:1:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
2020-08-09 12:16:18 -07:00
"id": 786,
2020-08-09 09:16:52 -07:00
"name": "GuardianSet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 486,
2020-08-09 12:16:18 -07:00
"src": "4455:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_GuardianSet_$486_storage_ptr_$",
"typeString": "type(struct Wormhole.GuardianSet storage pointer)"
}
},
2020-08-09 12:16:18 -07:00
"id": 793,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "structConstructorCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4455:42:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "4417:80:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 799,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 795,
2020-08-09 09:16:52 -07:00
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 510,
"src": "4507:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
2020-08-09 12:16:18 -07:00
"id": 797,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 796,
2020-08-09 09:16:52 -07:00
"name": "guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 512,
"src": "4521:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "4507:33:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 798,
2020-08-09 09:16:52 -07:00
"name": "new_guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 785,
"src": "4543:16:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
},
2020-08-09 12:16:18 -07:00
"src": "4507:52:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
2020-08-09 12:16:18 -07:00
"id": 800,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "4507:52:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 812,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 801,
2020-08-09 09:16:52 -07:00
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 510,
"src": "4569:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
2020-08-09 12:16:18 -07:00
"id": 803,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 802,
2020-08-09 09:16:52 -07:00
"name": "old_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 777,
"src": "4583:22:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "4569:37:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
2020-08-09 12:16:18 -07:00
"id": 804,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "expiration_time",
"nodeType": "MemberAccess",
"referencedDeclaration": 485,
2020-08-09 12:16:18 -07:00
"src": "4569:53:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
2020-08-09 12:16:18 -07:00
"id": 811,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 807,
2020-08-09 09:16:52 -07:00
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
2020-08-09 12:16:18 -07:00
"src": "4632:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
2020-08-09 12:16:18 -07:00
"id": 808,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "4632:15:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
2020-08-09 12:16:18 -07:00
"id": 806,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "4625:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint32_$",
"typeString": "type(uint32)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 805,
2020-08-09 09:16:52 -07:00
"name": "uint32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "4625:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 809,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4625:23:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 810,
2020-08-09 09:16:52 -07:00
"name": "vaa_expiry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 514,
"src": "4651:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"src": "4625:36:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"src": "4569:92:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
2020-08-09 12:16:18 -07:00
"id": 813,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "4569:92:2"
2020-08-09 09:16:52 -07:00
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 815,
2020-08-09 09:16:52 -07:00
"name": "guardian_sets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 510,
"src": "4699:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$486_storage_$",
"typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)"
}
},
2020-08-09 12:16:18 -07:00
"id": 817,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 816,
2020-08-09 09:16:52 -07:00
"name": "old_guardian_set_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 777,
"src": "4713:22:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "4699:37:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 818,
2020-08-09 09:16:52 -07:00
"name": "new_guardian_set",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 785,
"src": "4738:16:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_GuardianSet_$486_storage",
"typeString": "struct Wormhole.GuardianSet storage ref"
},
{
"typeIdentifier": "t_struct$_GuardianSet_$486_memory_ptr",
"typeString": "struct Wormhole.GuardianSet memory"
}
],
2020-08-09 12:16:18 -07:00
"id": 814,
2020-08-09 09:16:52 -07:00
"name": "LogGuardianSetChanged",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 492,
2020-08-09 12:16:18 -07:00
"src": "4677:21:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_struct$_GuardianSet_$486_memory_ptr_$_t_struct$_GuardianSet_$486_memory_ptr_$returns$__$",
"typeString": "function (struct Wormhole.GuardianSet memory,struct Wormhole.GuardianSet memory)"
}
},
2020-08-09 12:16:18 -07:00
"id": 819,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4677:78:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 820,
2020-08-09 09:16:52 -07:00
"nodeType": "EmitStatement",
2020-08-09 12:16:18 -07:00
"src": "4672:83:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
2020-08-09 12:16:18 -07:00
"id": 822,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "vaaUpdateGuardianSet",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 731,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 730,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 822,
"src": "3862:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 729,
2020-08-09 09:16:52 -07:00
"name": "bytes",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "3862:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "3861:19:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 732,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "3889:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "3832:930:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 948,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "4816:1325:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
828
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 828,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "source_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 948,
"src": "4869:18:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 827,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "4869:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 833,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "34",
2020-08-09 12:16:18 -07:00
"id": 831,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "4903:1:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 829,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "4890:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 830,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
2020-08-09 12:16:18 -07:00
"src": "4890:12:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 832,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4890:15:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "4869:36:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
835
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 835,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "target_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 948,
"src": "4916:18:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 834,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "4916:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 840,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "35",
2020-08-09 12:16:18 -07:00
"id": 838,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "4950:1:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 836,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "4937:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 837,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
2020-08-09 12:16:18 -07:00
"src": "4937:12:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 839,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "4937:15:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "4916:36:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
842
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 842,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "target_address",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 948,
"src": "5071:22:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 841,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5071:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 849,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_50_by_1",
"typeString": "int_const 50"
},
2020-08-09 12:16:18 -07:00
"id": 847,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3338",
2020-08-09 12:16:18 -07:00
"id": 845,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5111:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_38_by_1",
"typeString": "int_const 38"
},
"value": "38"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3132",
2020-08-09 12:16:18 -07:00
"id": 846,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5116:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_12_by_1",
"typeString": "int_const 12"
},
"value": "12"
},
2020-08-09 12:16:18 -07:00
"src": "5111:7:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 843,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "5096:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 844,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 82,
2020-08-09 12:16:18 -07:00
"src": "5096:14:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 848,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5096:23:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "5071:48:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
851
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 851,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "token_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 948,
"src": "5130:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 850,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5130:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 856,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3730",
2020-08-09 12:16:18 -07:00
"id": 854,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5163:2:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 852,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "5150:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 853,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint8",
"nodeType": "MemberAccess",
"referencedDeclaration": 109,
2020-08-09 12:16:18 -07:00
"src": "5150:12:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 855,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5150:16:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "5130:36:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
858
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 858,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 948,
"src": "5230:14:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 857,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5230:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 863,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "313033",
2020-08-09 12:16:18 -07:00
"id": 861,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5262:3:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 859,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "5247:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 860,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toUint256",
"nodeType": "MemberAccess",
"referencedDeclaration": 271,
2020-08-09 12:16:18 -07:00
"src": "5247:14:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 862,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5247:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "5230:36:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
2020-08-09 12:16:18 -07:00
"id": 867,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 865,
2020-08-09 09:16:52 -07:00
"name": "source_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 828,
"src": "5285:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 866,
2020-08-09 09:16:52 -07:00
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 835,
"src": "5301:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
2020-08-09 12:16:18 -07:00
"src": "5285:28:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "73616d6520636861696e207472616e736665727320617265206e6f7420737570706f72746564",
2020-08-09 12:16:18 -07:00
"id": 868,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5315:40:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 864,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "5277:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 869,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5277:79:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 870,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "5277:79:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
2020-08-09 12:16:18 -07:00
"id": 874,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 872,
2020-08-09 09:16:52 -07:00
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 835,
"src": "5374:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 873,
2020-08-09 09:16:52 -07:00
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
2020-08-09 12:16:18 -07:00
"src": "5390:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
2020-08-09 12:16:18 -07:00
"src": "5374:24:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "7472616e73666572206d75737420626520696e636f6d696e67",
2020-08-09 12:16:18 -07:00
"id": 875,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5400:27:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 871,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "5366:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 876,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5366:62:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 877,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "5366:62:2"
2020-08-09 09:16:52 -07:00
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
2020-08-09 12:16:18 -07:00
"id": 880,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 878,
2020-08-09 09:16:52 -07:00
"name": "token_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 851,
"src": "5443:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 879,
2020-08-09 09:16:52 -07:00
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
2020-08-09 12:16:18 -07:00
"src": "5458:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
2020-08-09 12:16:18 -07:00
"src": "5443:23:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
2020-08-09 12:16:18 -07:00
"id": 946,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "5990:145:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
930
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 930,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "token_address",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 946,
"src": "6004:21:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 929,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6004:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 937,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_83_by_1",
"typeString": "int_const 83"
},
2020-08-09 12:16:18 -07:00
"id": 935,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3731",
2020-08-09 12:16:18 -07:00
"id": 933,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "6043:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_71_by_1",
"typeString": "int_const 71"
},
"value": "71"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3132",
2020-08-09 12:16:18 -07:00
"id": 934,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "6048:2:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_12_by_1",
"typeString": "int_const 12"
},
"value": "12"
},
2020-08-09 12:16:18 -07:00
"src": "6043:7:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 931,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "6028:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 932,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 82,
2020-08-09 12:16:18 -07:00
"src": "6028:14:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 936,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6028:23:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "6004:47:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 942,
2020-08-09 09:16:52 -07:00
"name": "target_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 842,
"src": "6101:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 943,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 858,
"src": "6117:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 939,
2020-08-09 09:16:52 -07:00
"name": "token_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 930,
"src": "6073:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 938,
2020-08-09 09:16:52 -07:00
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2033,
"src": "6066:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_IERC20_$2033_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract IERC20)"
}
},
2020-08-09 12:16:18 -07:00
"id": 940,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6066:21:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_IERC20_$2033",
2020-08-09 09:16:52 -07:00
"typeString": "contract IERC20"
}
},
2020-08-09 12:16:18 -07:00
"id": 941,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "safeTransfer",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2067,
"src": "6066:34:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$2033_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$2033_$",
2020-08-09 09:16:52 -07:00
"typeString": "function (contract IERC20,address,uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 944,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6066:58:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 945,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "6066:58:2"
2020-08-09 09:16:52 -07:00
}
]
},
2020-08-09 12:16:18 -07:00
"id": 947,
2020-08-09 09:16:52 -07:00
"nodeType": "IfStatement",
2020-08-09 12:16:18 -07:00
"src": "5439:696:2",
2020-08-09 09:16:52 -07:00
"trueBody": {
2020-08-09 12:16:18 -07:00
"id": 928,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "5468:516:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
882
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 882,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "token_address",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 928,
"src": "5482:21:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 881,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5482:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 887,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "3731",
2020-08-09 12:16:18 -07:00
"id": 885,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5521:2:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 883,
2020-08-09 09:16:52 -07:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 824,
"src": "5506:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
2020-08-09 12:16:18 -07:00
"id": 884,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toBytes32",
"nodeType": "MemberAccess",
"referencedDeclaration": 298,
2020-08-09 12:16:18 -07:00
"src": "5506:14:2",
2020-08-09 09:16:52 -07:00
"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)"
}
},
2020-08-09 12:16:18 -07:00
"id": 886,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5506:18:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "5482:42:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
889
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 889,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "asset_id",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 928,
"src": "5538:16:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 888,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5538:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 897,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 893,
2020-08-09 09:16:52 -07:00
"name": "token_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 851,
"src": "5584:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 894,
2020-08-09 09:16:52 -07:00
"name": "token_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 882,
"src": "5597:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 891,
2020-08-09 09:16:52 -07:00
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -1,
2020-08-09 12:16:18 -07:00
"src": "5567:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
2020-08-09 12:16:18 -07:00
"id": 892,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodePacked",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "5567:16:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
"typeString": "function () pure returns (bytes memory)"
}
},
2020-08-09 12:16:18 -07:00
"id": 895,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5567:44:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
2020-08-09 12:16:18 -07:00
"id": 890,
2020-08-09 09:16:52 -07:00
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
2020-08-09 12:16:18 -07:00
"src": "5557:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
2020-08-09 12:16:18 -07:00
"id": 896,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5557:55:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "5538:74:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
899
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 899,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "wrapped_asset",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 928,
"src": "5704:21:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 898,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5704:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 903,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 900,
2020-08-09 09:16:52 -07:00
"name": "wrappedAssets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 522,
"src": "5728:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
}
},
2020-08-09 12:16:18 -07:00
"id": 902,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 901,
2020-08-09 09:16:52 -07:00
"name": "asset_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 889,
"src": "5742:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "5728:23:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "5704:47:2"
2020-08-09 09:16:52 -07:00
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
2020-08-09 12:16:18 -07:00
"id": 909,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 904,
2020-08-09 09:16:52 -07:00
"name": "wrapped_asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 899,
"src": "5769:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 907,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "5794:1:2",
2020-08-09 09:16:52 -07:00
"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"
}
],
2020-08-09 12:16:18 -07:00
"id": 906,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "5786:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 905,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "5786:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 908,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5786:10:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
2020-08-09 12:16:18 -07:00
"src": "5769:27:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
2020-08-09 12:16:18 -07:00
"id": 919,
2020-08-09 09:16:52 -07:00
"nodeType": "IfStatement",
2020-08-09 12:16:18 -07:00
"src": "5765:138:2",
2020-08-09 09:16:52 -07:00
"trueBody": {
2020-08-09 12:16:18 -07:00
"id": 918,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "5798:105:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 916,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 910,
2020-08-09 09:16:52 -07:00
"name": "wrapped_asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 899,
"src": "5816:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 912,
2020-08-09 09:16:52 -07:00
"name": "asset_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 889,
"src": "5851:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 913,
2020-08-09 09:16:52 -07:00
"name": "token_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 851,
"src": "5861:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 914,
2020-08-09 09:16:52 -07:00
"name": "token_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 882,
"src": "5874:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
2020-08-09 12:16:18 -07:00
"id": 911,
2020-08-09 09:16:52 -07:00
"name": "deployWrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 989,
"src": "5832:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint8_$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32,uint8,bytes32) returns (address)"
}
},
2020-08-09 12:16:18 -07:00
"id": 915,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5832:56:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2020-08-09 12:16:18 -07:00
"src": "5816:72:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2020-08-09 12:16:18 -07:00
"id": 917,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "5816:72:2"
2020-08-09 09:16:52 -07:00
}
]
}
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 924,
2020-08-09 09:16:52 -07:00
"name": "target_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 842,
"src": "5950:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 925,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 858,
"src": "5966:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 921,
2020-08-09 09:16:52 -07:00
"name": "wrapped_asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 899,
"src": "5930:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 920,
2020-08-09 09:16:52 -07:00
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1736,
"src": "5917:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$1736_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract WrappedAsset)"
}
},
2020-08-09 12:16:18 -07:00
"id": 922,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5917:27:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_WrappedAsset_$1736",
2020-08-09 09:16:52 -07:00
"typeString": "contract WrappedAsset"
}
},
2020-08-09 12:16:18 -07:00
"id": 923,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mint",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1274,
"src": "5917:32:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256) external"
}
},
2020-08-09 12:16:18 -07:00
"id": 926,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "5917:56:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 927,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "5917:56:2"
2020-08-09 09:16:52 -07:00
}
]
}
}
]
},
"documentation": null,
2020-08-09 12:16:18 -07:00
"id": 949,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "vaaTransfer",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 825,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 824,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 949,
"src": "4789:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 823,
2020-08-09 09:16:52 -07:00
"name": "bytes",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "4789:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "4788:19:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 826,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "4816:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "4768:1373:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 988,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "6262:791:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
961
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 961,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "targetBytes",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 988,
"src": "6440:19:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes20",
"typeString": "bytes20"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 960,
2020-08-09 09:16:52 -07:00
"name": "bytes20",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6440:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes20",
"typeString": "bytes20"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 966,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 964,
2020-08-09 09:16:52 -07:00
"name": "wrappedAssetMaster",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 473,
2020-08-09 12:16:18 -07:00
"src": "6470:18:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 963,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "6462:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes20_$",
"typeString": "type(bytes20)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 962,
2020-08-09 09:16:52 -07:00
"name": "bytes20",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6462:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 965,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6462:27:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes20",
"typeString": "bytes20"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "6440:49:2"
2020-08-09 09:16:52 -07:00
},
{
"AST": {
"nodeType": "YulBlock",
2020-08-09 12:16:18 -07:00
"src": "6508:341:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"nodeType": "YulVariableDeclaration",
2020-08-09 12:16:18 -07:00
"src": "6522:24:2",
2020-08-09 09:16:52 -07:00
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6541:4:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0x40"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6535:5:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6535:11:2"
2020-08-09 09:16:52 -07:00
},
"variables": [
{
"name": "clone",
"nodeType": "YulTypedName",
2020-08-09 12:16:18 -07:00
"src": "6526:5:2",
2020-08-09 09:16:52 -07:00
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "clone",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6566:5:2"
2020-08-09 09:16:52 -07:00
},
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6573:66:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6559:6:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6559:81:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "6559:81:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "clone",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6664:5:2"
2020-08-09 09:16:52 -07:00
},
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6671:4:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0x14"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6660:3:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6660:16:2"
2020-08-09 09:16:52 -07:00
},
{
"name": "targetBytes",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6678:11:2"
2020-08-09 09:16:52 -07:00
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6653:6:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6653:37:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "6653:37:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "clone",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6714:5:2"
2020-08-09 09:16:52 -07:00
},
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6721:4:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0x28"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6710:3:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6710:16:2"
2020-08-09 09:16:52 -07:00
},
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6728:66:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6703:6:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6703:92:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "6703:92:2"
2020-08-09 09:16:52 -07:00
},
{
"nodeType": "YulAssignment",
2020-08-09 12:16:18 -07:00
"src": "6808:31:2",
2020-08-09 09:16:52 -07:00
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6824:1:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0"
},
{
"name": "clone",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6827:5:2"
2020-08-09 09:16:52 -07:00
},
{
"kind": "number",
"nodeType": "YulLiteral",
2020-08-09 12:16:18 -07:00
"src": "6834:4:2",
2020-08-09 09:16:52 -07:00
"type": "",
"value": "0x37"
}
],
"functionName": {
"name": "create",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6817:6:2"
2020-08-09 09:16:52 -07:00
},
"nodeType": "YulFunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6817:22:2"
2020-08-09 09:16:52 -07:00
},
"variableNames": [
{
"name": "asset",
"nodeType": "YulIdentifier",
2020-08-09 12:16:18 -07:00
"src": "6808:5:2"
2020-08-09 09:16:52 -07:00
}
]
}
]
},
"evmVersion": "istanbul",
"externalReferences": [
{
2020-08-09 12:16:18 -07:00
"declaration": 958,
2020-08-09 09:16:52 -07:00
"isOffset": false,
"isSlot": false,
2020-08-09 12:16:18 -07:00
"src": "6808:5:2",
2020-08-09 09:16:52 -07:00
"valueSize": 1
},
{
2020-08-09 12:16:18 -07:00
"declaration": 961,
2020-08-09 09:16:52 -07:00
"isOffset": false,
"isSlot": false,
2020-08-09 12:16:18 -07:00
"src": "6678:11:2",
2020-08-09 09:16:52 -07:00
"valueSize": 1
}
],
2020-08-09 12:16:18 -07:00
"id": 967,
2020-08-09 09:16:52 -07:00
"nodeType": "InlineAssembly",
2020-08-09 12:16:18 -07:00
"src": "6499:350:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 972,
2020-08-09 09:16:52 -07:00
"name": "token_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 953,
"src": "6918:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 973,
2020-08-09 09:16:52 -07:00
"name": "token_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 955,
"src": "6931:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 969,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 958,
"src": "6900:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 968,
2020-08-09 09:16:52 -07:00
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1736,
"src": "6887:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$1736_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract WrappedAsset)"
}
},
2020-08-09 12:16:18 -07:00
"id": 970,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6887:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_WrappedAsset_$1736",
2020-08-09 09:16:52 -07:00
"typeString": "contract WrappedAsset"
}
},
2020-08-09 12:16:18 -07:00
"id": 971,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1253,
"src": "6887:30:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint8_$_t_bytes32_$returns$__$",
"typeString": "function (uint8,bytes32) external"
}
},
2020-08-09 12:16:18 -07:00
"id": 974,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "6887:58:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 975,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "6887:58:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 980,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 976,
2020-08-09 09:16:52 -07:00
"name": "wrappedAssets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 522,
"src": "6981:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
}
},
2020-08-09 12:16:18 -07:00
"id": 978,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 977,
2020-08-09 09:16:52 -07:00
"name": "seed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 951,
"src": "6995:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "6981:19:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 979,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 958,
"src": "7003:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2020-08-09 12:16:18 -07:00
"src": "6981:27:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2020-08-09 12:16:18 -07:00
"id": 981,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "6981:27:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 986,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 982,
2020-08-09 09:16:52 -07:00
"name": "isWrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 526,
"src": "7018:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
2020-08-09 12:16:18 -07:00
"id": 984,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 983,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 958,
"src": "7033:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "7018:21:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
2020-08-09 12:16:18 -07:00
"id": 985,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "7042:4:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
2020-08-09 12:16:18 -07:00
"src": "7018:28:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
2020-08-09 12:16:18 -07:00
"id": 987,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7018:28:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
2020-08-09 12:16:18 -07:00
"id": 989,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "deployWrappedAsset",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 956,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 951,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "seed",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 989,
"src": "6175:12:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 950,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6175:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 953,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "token_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 989,
"src": "6189:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 952,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6189:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 955,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "token_address",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 989,
"src": "6208:21:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 954,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6208:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "6174:56:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 959,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 958,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "asset",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 989,
"src": "6248:13:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 957,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "6248:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "6247:15:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "6147:906:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 1115,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "7194:1027:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
2020-08-09 12:16:18 -07:00
"id": 1003,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1001,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 993,
"src": "7212:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 1002,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "7222:1:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
2020-08-09 12:16:18 -07:00
"src": "7212:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "616d6f756e74206d757374206e6f742062652030",
2020-08-09 12:16:18 -07:00
"id": 1004,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "7225:22:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c3143f59cb0e580c5873dd9b2860385487237680573a0afd40e8c0860e76a5d3",
"typeString": "literal_string \"amount must not be 0\""
},
"value": "amount must not be 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c3143f59cb0e580c5873dd9b2860385487237680573a0afd40e8c0860e76a5d3",
"typeString": "literal_string \"amount must not be 0\""
}
],
2020-08-09 12:16:18 -07:00
"id": 1000,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "7204:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 1005,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7204:44:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1006,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7204:44:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
1008
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1008,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "asset_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1115,
"src": "7259:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1007,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7259:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 1010,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1009,
2020-08-09 09:16:52 -07:00
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
2020-08-09 12:16:18 -07:00
"src": "7279:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "7259:28:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
1012
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1012,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "asset_address",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1115,
"src": "7297:21:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1011,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7297:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 1013,
2020-08-09 09:16:52 -07:00
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "7297:21:2"
2020-08-09 09:16:52 -07:00
},
{
"condition": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1014,
2020-08-09 09:16:52 -07:00
"name": "isWrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 526,
"src": "7332:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1016,
2020-08-09 09:16:52 -07:00
"indexExpression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1015,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7347:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
2020-08-09 12:16:18 -07:00
"src": "7332:21:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
2020-08-09 12:16:18 -07:00
"id": 1097,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "7554:539:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"assignments": [
2020-08-09 12:16:18 -07:00
1044
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1044,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "balanceBefore",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1097,
"src": "7568:21:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1043,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7568:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 1054,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1051,
2020-08-09 09:16:52 -07:00
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
2020-08-09 12:16:18 -07:00
"src": "7624:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_Wormhole_$1181",
2020-08-09 09:16:52 -07:00
"typeString": "contract Wormhole"
}
}
],
"expression": {
"argumentTypes": [
{
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_Wormhole_$1181",
2020-08-09 09:16:52 -07:00
"typeString": "contract Wormhole"
}
],
2020-08-09 12:16:18 -07:00
"id": 1050,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "7616:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1049,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7616:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1052,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7616:13:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 1046,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7599:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1045,
2020-08-09 09:16:52 -07:00
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2033,
"src": "7592:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_IERC20_$2033_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract IERC20)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1047,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7592:13:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_IERC20_$2033",
2020-08-09 09:16:52 -07:00
"typeString": "contract IERC20"
}
},
2020-08-09 12:16:18 -07:00
"id": 1048,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1972,
"src": "7592:23:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1053,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7592:38:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "7568:62:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1059,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "7675:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1060,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "7675:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1063,
2020-08-09 09:16:52 -07:00
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
2020-08-09 12:16:18 -07:00
"src": "7695:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_Wormhole_$1181",
2020-08-09 09:16:52 -07:00
"typeString": "contract Wormhole"
}
}
],
"expression": {
"argumentTypes": [
{
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_Wormhole_$1181",
2020-08-09 09:16:52 -07:00
"typeString": "contract Wormhole"
}
],
2020-08-09 12:16:18 -07:00
"id": 1062,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "7687:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1061,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7687:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1064,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7687:13:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1065,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 993,
"src": "7702:6:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 1056,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7651:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1055,
2020-08-09 09:16:52 -07:00
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2033,
"src": "7644:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_IERC20_$2033_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract IERC20)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1057,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7644:13:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_IERC20_$2033",
2020-08-09 09:16:52 -07:00
"typeString": "contract IERC20"
}
},
2020-08-09 12:16:18 -07:00
"id": 1058,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "safeTransferFrom",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2092,
"src": "7644:30:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$2033_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$2033_$",
2020-08-09 09:16:52 -07:00
"typeString": "function (contract IERC20,address,address,uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1066,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7644:65:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1067,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7644:65:2"
2020-08-09 09:16:52 -07:00
},
{
"assignments": [
2020-08-09 12:16:18 -07:00
1069
2020-08-09 09:16:52 -07:00
],
"declarations": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1069,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "balanceAfter",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1097,
"src": "7723:20:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1068,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7723:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"id": 1079,
2020-08-09 09:16:52 -07:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1076,
2020-08-09 09:16:52 -07:00
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
2020-08-09 12:16:18 -07:00
"src": "7778:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_Wormhole_$1181",
2020-08-09 09:16:52 -07:00
"typeString": "contract Wormhole"
}
}
],
"expression": {
"argumentTypes": [
{
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_Wormhole_$1181",
2020-08-09 09:16:52 -07:00
"typeString": "contract Wormhole"
}
],
2020-08-09 12:16:18 -07:00
"id": 1075,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "7770:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1074,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7770:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1077,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7770:13:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 1071,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7753:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1070,
2020-08-09 09:16:52 -07:00
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2033,
"src": "7746:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_IERC20_$2033_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract IERC20)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1072,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7746:13:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_IERC20_$2033",
2020-08-09 09:16:52 -07:00
"typeString": "contract IERC20"
}
},
2020-08-09 12:16:18 -07:00
"id": 1073,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1972,
"src": "7746:23:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1078,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7746:38:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
2020-08-09 12:16:18 -07:00
"src": "7723:61:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1085,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1080,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 993,
"src": "7989:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1083,
2020-08-09 09:16:52 -07:00
"name": "balanceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1044,
"src": "8015:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1081,
2020-08-09 09:16:52 -07:00
"name": "balanceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1069,
"src": "7998:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
2020-08-09 12:16:18 -07:00
"id": 1082,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1805,
"src": "7998:16:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1084,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7998:31:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
2020-08-09 12:16:18 -07:00
"src": "7989:40:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
2020-08-09 12:16:18 -07:00
"id": 1086,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7989:40:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1095,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1087,
2020-08-09 09:16:52 -07:00
"name": "asset_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1012,
"src": "8043:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1092,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "8075:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1091,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8067:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1090,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8067:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1093,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8067:14:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
2020-08-09 12:16:18 -07:00
"id": 1089,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8059:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1088,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8059:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1094,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8059:23:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
2020-08-09 12:16:18 -07:00
"src": "8043:39:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
2020-08-09 12:16:18 -07:00
"id": 1096,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "8043:39:2"
2020-08-09 09:16:52 -07:00
}
]
},
2020-08-09 12:16:18 -07:00
"id": 1098,
2020-08-09 09:16:52 -07:00
"nodeType": "IfStatement",
2020-08-09 12:16:18 -07:00
"src": "7328:765:2",
2020-08-09 09:16:52 -07:00
"trueBody": {
2020-08-09 12:16:18 -07:00
"id": 1042,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "7355:193:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1021,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "7394:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1022,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "7394:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1023,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 993,
"src": "7406:6:2",
2020-08-09 09:16:52 -07:00
"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,
2020-08-09 12:16:18 -07:00
"id": 1018,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7382:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1017,
2020-08-09 09:16:52 -07:00
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1736,
"src": "7369:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$1736_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract WrappedAsset)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1019,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7369:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_WrappedAsset_$1736",
2020-08-09 09:16:52 -07:00
"typeString": "contract WrappedAsset"
}
},
2020-08-09 12:16:18 -07:00
"id": 1020,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "burn",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1295,
"src": "7369:24:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256) external"
}
},
2020-08-09 12:16:18 -07:00
"id": 1024,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7369:44:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1025,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7369:44:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1032,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1026,
2020-08-09 09:16:52 -07:00
"name": "asset_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1008,
"src": "7427:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1028,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7454:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1027,
2020-08-09 09:16:52 -07:00
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1736,
"src": "7441:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$1736_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract WrappedAsset)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1029,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7441:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_WrappedAsset_$1736",
2020-08-09 09:16:52 -07:00
"typeString": "contract WrappedAsset"
}
},
2020-08-09 12:16:18 -07:00
"id": 1030,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "assetChain",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1204,
"src": "7441:30:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
"typeString": "function () view external returns (uint8)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1031,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7441:32:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
2020-08-09 12:16:18 -07:00
"src": "7427:46:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
2020-08-09 12:16:18 -07:00
"id": 1033,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7427:46:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1040,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1034,
2020-08-09 09:16:52 -07:00
"name": "asset_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1012,
"src": "7487:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1036,
2020-08-09 09:16:52 -07:00
"name": "asset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 991,
"src": "7516:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1035,
2020-08-09 09:16:52 -07:00
"name": "WrappedAsset",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1736,
"src": "7503:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_WrappedAsset_$1736_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract WrappedAsset)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1037,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7503:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_WrappedAsset_$1736",
2020-08-09 09:16:52 -07:00
"typeString": "contract WrappedAsset"
}
},
2020-08-09 12:16:18 -07:00
"id": 1038,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "assetAddress",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1206,
"src": "7503:32:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_bytes32_$",
"typeString": "function () view external returns (bytes32)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1039,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "7503:34:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
2020-08-09 12:16:18 -07:00
"src": "7487:50:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
2020-08-09 12:16:18 -07:00
"id": 1041,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "7487:50:2"
2020-08-09 09:16:52 -07:00
}
]
}
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1100,
2020-08-09 09:16:52 -07:00
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 997,
"src": "8124:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1101,
2020-08-09 09:16:52 -07:00
"name": "asset_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1008,
"src": "8138:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1102,
2020-08-09 09:16:52 -07:00
"name": "asset_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1012,
"src": "8151:13:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1107,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "8182:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1108,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "8182:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
2020-08-09 12:16:18 -07:00
"id": 1106,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8174:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1105,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8174:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1109,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8174:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
2020-08-09 12:16:18 -07:00
"id": 1104,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8166:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1103,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8166:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1110,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8166:28:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1111,
"name": "recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 995,
"src": "8196:9:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 1112,
2020-08-09 09:16:52 -07:00
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 993,
"src": "8207:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"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"
}
],
2020-08-09 12:16:18 -07:00
"id": 1099,
2020-08-09 09:16:52 -07:00
"name": "LogTokensLocked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 506,
2020-08-09 12:16:18 -07:00
"src": "8108:15:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_uint256_$returns$__$",
"typeString": "function (uint8,uint8,bytes32,bytes32,bytes32,uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1113,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8108:106:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1114,
2020-08-09 09:16:52 -07:00
"nodeType": "EmitStatement",
2020-08-09 12:16:18 -07:00
"src": "8103:111:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
"functionSelector": "e66fd373",
2020-08-09 12:16:18 -07:00
"id": 1116,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "lockAssets",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 998,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 991,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "asset",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1116,
"src": "7088:13:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 990,
2020-08-09 09:16:52 -07:00
"name": "address",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7088:7:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 993,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1116,
"src": "7111:14:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 992,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7111:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 995,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "recipient",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1116,
"src": "7135:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 994,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7135:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 997,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "target_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1116,
"src": "7162:18:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 996,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "7162:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "7078:108:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 999,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "7194:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "7059:1162:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 1163,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "8320:323:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
2020-08-09 12:16:18 -07:00
"id": 1127,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1124,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "8338:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1125,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "8338:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
2020-08-09 12:16:18 -07:00
"id": 1126,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "8351:1:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
2020-08-09 12:16:18 -07:00
"src": "8338:14:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "616d6f756e74206d757374206e6f742062652030",
2020-08-09 12:16:18 -07:00
"id": 1128,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "8354:22:2",
2020-08-09 09:16:52 -07:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c3143f59cb0e580c5873dd9b2860385487237680573a0afd40e8c0860e76a5d3",
"typeString": "literal_string \"amount must not be 0\""
},
"value": "amount must not be 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c3143f59cb0e580c5873dd9b2860385487237680573a0afd40e8c0860e76a5d3",
"typeString": "literal_string \"amount must not be 0\""
}
],
2020-08-09 12:16:18 -07:00
"id": 1123,
2020-08-09 09:16:52 -07:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
2020-08-09 12:16:18 -07:00
"src": "8330:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 1129,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8330:47:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1130,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "8330:47:2"
2020-08-09 09:16:52 -07:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1132,
2020-08-09 09:16:52 -07:00
"name": "WETHAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 479,
2020-08-09 12:16:18 -07:00
"src": "8426:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1131,
2020-08-09 09:16:52 -07:00
"name": "WETH",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1192,
"src": "8421:4:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_type$_t_contract$_WETH_$1192_$",
2020-08-09 09:16:52 -07:00
"typeString": "type(contract WETH)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1133,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8421:17:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_WETH_$1192",
2020-08-09 09:16:52 -07:00
"typeString": "contract WETH"
}
},
2020-08-09 12:16:18 -07:00
"id": 1134,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "deposit",
"nodeType": "MemberAccess",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1186,
"src": "8421:25:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_payable$__$returns$__$",
"typeString": "function () payable external"
}
},
2020-08-09 12:16:18 -07:00
"id": 1137,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"names": [
"value"
],
"nodeType": "FunctionCallOptions",
"options": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1135,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "8455:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1136,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "8455:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
2020-08-09 12:16:18 -07:00
"src": "8421:44:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_payable$__$returns$__$value",
"typeString": "function () payable external"
}
},
2020-08-09 12:16:18 -07:00
"id": 1138,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8421:46:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1139,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "8421:46:2"
2020-08-09 09:16:52 -07:00
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1141,
2020-08-09 09:16:52 -07:00
"name": "target_chain",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 1120,
"src": "8530:12:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1142,
2020-08-09 09:16:52 -07:00
"name": "CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 476,
2020-08-09 12:16:18 -07:00
"src": "8544:8:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1147,
2020-08-09 09:16:52 -07:00
"name": "WETHAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 479,
2020-08-09 12:16:18 -07:00
"src": "8570:11:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
2020-08-09 12:16:18 -07:00
"id": 1146,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8562:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1145,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8562:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1148,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8562:20:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
2020-08-09 12:16:18 -07:00
"id": 1144,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8554:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1143,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8554:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1149,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8554:29:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1154,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "8601:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1155,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "8601:10:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
2020-08-09 12:16:18 -07:00
"id": 1153,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8593:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1152,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8593:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1156,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8593:19:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
2020-08-09 12:16:18 -07:00
"id": 1151,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
2020-08-09 12:16:18 -07:00
"src": "8585:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1150,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8585:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
2020-08-09 12:16:18 -07:00
"id": 1157,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8585:28:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
2020-08-09 12:16:18 -07:00
{
"argumentTypes": null,
"id": 1158,
"name": "recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1118,
"src": "8615:9:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
2020-08-09 09:16:52 -07:00
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
2020-08-09 12:16:18 -07:00
"id": 1159,
2020-08-09 09:16:52 -07:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
2020-08-09 12:16:18 -07:00
"src": "8626:3:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
2020-08-09 12:16:18 -07:00
"id": 1160,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
2020-08-09 12:16:18 -07:00
"src": "8626:9:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"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"
}
],
2020-08-09 12:16:18 -07:00
"id": 1140,
2020-08-09 09:16:52 -07:00
"name": "LogTokensLocked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 506,
2020-08-09 12:16:18 -07:00
"src": "8514:15:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_uint256_$returns$__$",
"typeString": "function (uint8,uint8,bytes32,bytes32,bytes32,uint256)"
}
},
2020-08-09 12:16:18 -07:00
"id": 1161,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8514:122:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1162,
2020-08-09 09:16:52 -07:00
"nodeType": "EmitStatement",
2020-08-09 12:16:18 -07:00
"src": "8509:127:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
"functionSelector": "780e2183",
2020-08-09 12:16:18 -07:00
"id": 1164,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "lockETH",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 1121,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1118,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "recipient",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1164,
"src": "8253:17:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1117,
2020-08-09 09:16:52 -07:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8253:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1120,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "target_chain",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1164,
"src": "8280:18:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1119,
2020-08-09 09:16:52 -07:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8280:5:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "8243:61:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 1122,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8320:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "8227:416:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "payable",
"virtual": false,
"visibility": "public"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 1171,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "8674:57:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61",
2020-08-09 12:16:18 -07:00
"id": 1168,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "8682:46:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 1167,
2020-08-09 09:16:52 -07:00
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
-19,
-19
],
"referencedDeclaration": -19,
2020-08-09 12:16:18 -07:00
"src": "8675:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 1169,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8675:54:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1170,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "8675:54:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
2020-08-09 12:16:18 -07:00
"id": 1172,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "fallback",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 1165,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8654:2:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 1166,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8674:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "8646:85:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
{
"body": {
2020-08-09 12:16:18 -07:00
"id": 1179,
2020-08-09 09:16:52 -07:00
"nodeType": "Block",
2020-08-09 12:16:18 -07:00
"src": "8759:57:2",
2020-08-09 09:16:52 -07:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61",
2020-08-09 12:16:18 -07:00
"id": 1176,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2020-08-09 12:16:18 -07:00
"src": "8767:46:2",
2020-08-09 09:16:52 -07:00
"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\""
}
],
2020-08-09 12:16:18 -07:00
"id": 1175,
2020-08-09 09:16:52 -07:00
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
-19,
-19
],
"referencedDeclaration": -19,
2020-08-09 12:16:18 -07:00
"src": "8760:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
2020-08-09 12:16:18 -07:00
"id": 1177,
2020-08-09 09:16:52 -07:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2020-08-09 12:16:18 -07:00
"src": "8760:54:2",
2020-08-09 09:16:52 -07:00
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2020-08-09 12:16:18 -07:00
"id": 1178,
2020-08-09 09:16:52 -07:00
"nodeType": "ExpressionStatement",
2020-08-09 12:16:18 -07:00
"src": "8760:54:2"
2020-08-09 09:16:52 -07:00
}
]
},
"documentation": null,
2020-08-09 12:16:18 -07:00
"id": 1180,
2020-08-09 09:16:52 -07:00
"implemented": true,
"kind": "receive",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 1173,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8739:2:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 1174,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8759:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1181,
"src": "8732:84:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
}
],
2020-08-09 12:16:18 -07:00
"scope": 1193,
"src": "380:8438:2"
2020-08-09 09:16:52 -07:00
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
2020-08-09 12:16:18 -07:00
"id": 1182,
2020-08-09 09:16:52 -07:00
"name": "IERC20",
"nodeType": "UserDefinedTypeName",
2020-08-09 12:16:18 -07:00
"referencedDeclaration": 2033,
"src": "8839:6:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
2020-08-09 12:16:18 -07:00
"typeIdentifier": "t_contract$_IERC20_$2033",
2020-08-09 09:16:52 -07:00
"typeString": "contract IERC20"
}
},
2020-08-09 12:16:18 -07:00
"id": 1183,
2020-08-09 09:16:52 -07:00
"nodeType": "InheritanceSpecifier",
2020-08-09 12:16:18 -07:00
"src": "8839:6:2"
2020-08-09 09:16:52 -07:00
}
],
"contractDependencies": [
2020-08-09 12:16:18 -07:00
2033
2020-08-09 09:16:52 -07:00
],
"contractKind": "interface",
"documentation": null,
"fullyImplemented": false,
2020-08-09 12:16:18 -07:00
"id": 1192,
2020-08-09 09:16:52 -07:00
"linearizedBaseContracts": [
2020-08-09 12:16:18 -07:00
1192,
2033
2020-08-09 09:16:52 -07:00
],
"name": "WETH",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": null,
"functionSelector": "d0e30db0",
2020-08-09 12:16:18 -07:00
"id": 1186,
2020-08-09 09:16:52 -07:00
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "deposit",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 1184,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8864:2:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 1185,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8883:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1192,
"src": "8848:36:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"functionSelector": "2e1a7d4d",
2020-08-09 12:16:18 -07:00
"id": 1191,
2020-08-09 09:16:52 -07:00
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "withdraw",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
2020-08-09 12:16:18 -07:00
"id": 1189,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2020-08-09 12:16:18 -07:00
"id": 1188,
2020-08-09 09:16:52 -07:00
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
2020-08-09 12:16:18 -07:00
"scope": 1191,
"src": "8904:14:2",
2020-08-09 09:16:52 -07:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2020-08-09 12:16:18 -07:00
"id": 1187,
2020-08-09 09:16:52 -07:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2020-08-09 12:16:18 -07:00
"src": "8904:7:2",
2020-08-09 09:16:52 -07:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2020-08-09 12:16:18 -07:00
"src": "8903:16:2"
2020-08-09 09:16:52 -07:00
},
"returnParameters": {
2020-08-09 12:16:18 -07:00
"id": 1190,
2020-08-09 09:16:52 -07:00
"nodeType": "ParameterList",
"parameters": [],
2020-08-09 12:16:18 -07:00
"src": "8928:0:2"
2020-08-09 09:16:52 -07:00
},
2020-08-09 12:16:18 -07:00
"scope": 1192,
"src": "8886:43:2",
2020-08-09 09:16:52 -07:00
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
2020-08-09 12:16:18 -07:00
"scope": 1193,
"src": "8821:110:2"
2020-08-09 09:16:52 -07:00
}
],
2020-08-09 12:16:18 -07:00
"src": "64:8868:2"
2020-08-09 09:16:52 -07:00
},
"compiler": {
"name": "solc",
"version": "0.6.12+commit.27d51765.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.2.3",
2020-08-09 12:16:18 -07:00
"updatedAt": "2020-08-09T18:58:34.074Z",
2020-08-09 09:16:52 -07:00
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}